Ejemplo n.º 1
0
        public virtual ISmallVariantCaller CreateSomaticVariantCaller(
            ChrReference chrReference, string bamFilePath, IVcfWriter <CalledAllele> vcfWriter,
            IStrandBiasFileWriter strandBiasFileWriter = null, IAmpliconBiasFileWriter ampliconBiasFileWriter = null, string intervalFilePath = null, List <string> chrToProcess = null)
        {
            var alignmentSource = CreateAlignmentSource(chrReference, bamFilePath, _options.UseStitchedXDInfo, chrToProcess);
            var variantFinder   = CreateVariantFinder();
            var intervalSet     = GetIntervalSet(chrReference.Name, bamFilePath);
            var forceGtAlleles  = SelectForcedAllele(_forcedAllelesByChrom, chrReference.Name, intervalSet);

            var alleleCaller   = CreateVariantCaller(chrReference, intervalSet, alignmentSource, forceGtAlleles);
            var stateManager   = CreateStateManager(intervalSet, alignmentSource.SourceIsStitched, alignmentSource.SourceIsCollapsed);
            var intervalPadder = CreateRegionPadder(chrReference, intervalSet, _options.VcfWritingParameters.OutputGvcfFile);


            return(new SmallVariantCaller(alignmentSource, variantFinder, alleleCaller,
                                          vcfWriter, stateManager, chrReference, intervalPadder, strandBiasFileWriter, ampliconBiasFileWriter, intervalSet, forceGtAlleles));
        }
 public SmallVariantCaller(IAlignmentSource alignmentSource, ICandidateVariantFinder variantFinder, IAlleleCaller alleleCaller,
                           IVcfWriter <CalledAllele> vcfWriter, IStateManager stateManager, ChrReference chrReference, IRegionMapper regionMapper,
                           IStrandBiasFileWriter strandBiasFileWriter, IAmpliconBiasFileWriter ampBiasFileWriter, ChrIntervalSet intervalSet = null, HashSet <Tuple <string, int, string, string> > forcedGTAlleles = null)
 {
     _alignmentSource               = alignmentSource;
     _variantFinder                 = variantFinder;
     _alleleCaller                  = alleleCaller;
     _vcfWriter                     = vcfWriter;
     _stateManager                  = stateManager;
     _chrReference                  = chrReference;
     _regionMapper                  = regionMapper;
     _strandBiasFileWriter          = strandBiasFileWriter;
     _ampliconBiasFileWriter        = ampBiasFileWriter;
     _intervalSet                   = intervalSet;
     _forcedGtAlleles               = forcedGTAlleles;
     _unProcessedForcedAllelesByPos = CreateForcedAllelePos(_forcedGtAlleles);
     _writeBiasFiles                = (strandBiasFileWriter != null && ampBiasFileWriter != null);
 }
 public override ISmallVariantCaller CreateSomaticVariantCaller(ChrReference chrReference, string bamFilePath,
                                                                IVcfWriter <CalledAllele> vcfWriter, IStrandBiasFileWriter strandBiasFileWriter = null, IAmpliconBiasFileWriter ampliconBiasFileWriter = null,
                                                                string intervalFilePath = null, List <string> chrToProcess = null)
 {
     return(MockSomaticVariantCaller != null ? MockSomaticVariantCaller.Object : base.CreateSomaticVariantCaller(chrReference, bamFilePath, vcfWriter,
                                                                                                                 strandBiasFileWriter, ampliconBiasFileWriter, intervalFilePath, chrToProcess));
 }