public PairHandler(Dictionary <int, string> refIdMapping, IAlignmentStitcher stitcher, bool filterUnstitchablePairs = false, bool tryStitch = true) { _refIdMapping = refIdMapping; _stitcher = stitcher; _filterUnstitchablePairs = filterUnstitchablePairs; _tryStitch = tryStitch; }
public PairHandler(Dictionary <int, string> refIdMapping, IAlignmentStitcher stitcher, bool filterUnstitchablePairs, ReadStatusCounter statusCounter) { _refIdMapping = refIdMapping; _stitcher = stitcher; _filterUnstitchablePairs = filterUnstitchablePairs; _statusCounter = statusCounter; _stitcher.SetStatusCounter(_statusCounter); }
public PairHandler(Dictionary <int, string> refIdMapping, IAlignmentStitcher stitcher, ReadStatusCounter statusCounter, bool filterUnstitchablePairs = false, bool tryStitch = true) { _refIdMapping = refIdMapping; _stitcher = stitcher; _filterUnstitchablePairs = filterUnstitchablePairs; _masterStatusCounter = statusCounter; _statusCounter = new ReadStatusCounter(); _stitcher.SetStatusCounter(_statusCounter); _tryStitch = tryStitch; }
public AlignmentSource(IAlignmentExtractor alignmentExtractor, IAlignmentMateFinder mateFinder, IAlignmentStitcher stitcher, AlignmentSourceConfig config) // add intervals { _alignmentExtractor = alignmentExtractor; _mateFinder = mateFinder; _stitcher = stitcher; _config = config; }
private ISomaticVariantCaller CreateMockVariantCaller(VcfFileWriter vcfWriter, ApplicationOptions options, ChrReference chrRef, MockAlignmentExtractor mae, IStrandBiasFileWriter biasFileWriter = null, string intervalFilePath = null) { var config = new AlignmentSourceConfig { MinimumMapQuality = options.MinimumMapQuality, OnlyUseProperPairs = options.OnlyUseProperPairs, }; IAlignmentStitcher stitcher = null; if (options.StitchReads) { if (options.UseXCStitcher) { stitcher = new XCStitcher(options.MinimumBaseCallQuality); } else { stitcher = new BasicStitcher(options.MinimumBaseCallQuality); } } var mateFinder = options.StitchReads ? new AlignmentMateFinder(MAX_FRAGMENT_SIZE) : null; var RegionPadder = new RegionPadder(chrRef, null); var alignmentSource = new AlignmentSource(mae, mateFinder, stitcher, config); var variantFinder = new CandidateVariantFinder(options.MinimumBaseCallQuality, options.MaxSizeMNV, options.MaxGapBetweenMNV, options.CallMNVs); var alleleCaller = new AlleleCaller(new VariantCallerConfig { IncludeReferenceCalls = options.OutputgVCFFiles, MinVariantQscore = options.MinimumVariantQScore, MaxVariantQscore = options.MaximumVariantQScore, VariantQscoreFilterThreshold = options.FilteredVariantQScore > options.MinimumVariantQScore ? options.FilteredVariantQScore : (int?)null, MinCoverage = options.MinimumCoverage, MinFrequency = options.MinimumFrequency, EstimatedBaseCallQuality = options.AppliedNoiseLevel == -1 ? options.MinimumBaseCallQuality : options.AppliedNoiseLevel, StrandBiasModel = options.StrandBiasModel, StrandBiasFilterThreshold = options.StrandBiasAcceptanceCriteria, FilterSingleStrandVariants = options.FilterOutVariantsPresentOnlyOneStrand, GenotypeModel = options.GTModel }); var stateManager = new RegionStateManager(); return(new SomaticVariantCaller( alignmentSource, variantFinder, alleleCaller, vcfWriter, stateManager, chrRef, RegionPadder, biasFileWriter)); }
public static void TryStitchAndAssertFailed(IAlignmentStitcher stitcher, AlignmentSet alignmentSet) { Assert.False(stitcher.TryStitch(alignmentSet).Stitched); }
public static void TryStitchAndAssertAddedSeparately(IAlignmentStitcher stitcher, AlignmentSet alignmentSet) { Assert.True(stitcher.TryStitch(alignmentSet).Stitched); Assert.True(alignmentSet.ReadsForProcessing.Contains(alignmentSet.PartnerRead1)); Assert.True(alignmentSet.ReadsForProcessing.Contains(alignmentSet.PartnerRead2)); }
public static void TryStitchAndAssertFailed(IAlignmentStitcher stitcher, AlignmentSet alignmentSet) { Assert.Throws <ReadsNotStitchableException>(() => stitcher.TryStitch(alignmentSet)); }