public void Merge(ReadStatusCounter other) { foreach (var readStatus in other._readStatuses) { if (!_readStatuses.ContainsKey(readStatus.Key)) { _readStatuses.Add(readStatus.Key, readStatus.Value); } else { _readStatuses[readStatus.Key] += readStatus.Value; } } foreach (var debugReadStatus in other._debugReadStatuses) { if (!_debugReadStatuses.ContainsKey(debugReadStatus.Key)) { _debugReadStatuses.Add(debugReadStatus.Key, debugReadStatus.Value); } else { _debugReadStatuses[debugReadStatus.Key] += debugReadStatus.Value; } } }
public ReadMerger(int minBasecallQuality, bool allowRescuedInsertionBaseDisagreement, bool useSoftclippedBases, bool nifyDisagreements, ReadStatusCounter statusCounter, bool debug, bool ignoreProbeSoftclips) { _minBasecallQuality = minBasecallQuality; _allowRescuedInsertionBaseDisagreement = allowRescuedInsertionBaseDisagreement; _useSoftclippedBases = useSoftclippedBases; _nifyDisagreements = nifyDisagreements; _statusCounter = statusCounter; _debug = debug; _ignoreProbeSoftclips = ignoreProbeSoftclips; }
public BasicStitcher(int minBaseCallQuality, bool nifyDisagreements = true, bool useSoftclippedBases = true, bool debug = false, bool nifyUnstitchablePairs = false, bool allowRescuedInsertionBaseDisagreement = false, bool ignoreProbeSoftclips = true, int maxReadLength = 1024) { _nifyUnstitchablePairs = nifyUnstitchablePairs; _ignoreProbeSoftclips = ignoreProbeSoftclips; _useSoftclippedBases = useSoftclippedBases; _debug = debug; _statusCounter = new ReadStatusCounter(); _cigarReconciler = new CigarReconciler(_statusCounter, _useSoftclippedBases, _debug, _ignoreProbeSoftclips, maxReadLength); _readMerger = new ReadMerger(minBaseCallQuality, allowRescuedInsertionBaseDisagreement, _useSoftclippedBases, nifyDisagreements, _statusCounter, _debug, _ignoreProbeSoftclips); }
public BasicStitcher(int minBaseCallQuality, bool nifyDisagreements = true, bool useSoftclippedBases = true, bool debug = false, bool nifyUnstitchablePairs = false, bool allowRescuedInsertionBaseDisagreement = false, bool ignoreProbeSoftclips = true, int maxReadLength = 1024, bool ignoreReadsAboveMaxLength = false, uint minMapQuality = 1, bool dontStitchHomopolymerBridge = true, int thresholdNumDisagreeingBases = int.MaxValue) { _nifyUnstitchablePairs = nifyUnstitchablePairs; _ignoreProbeSoftclips = ignoreProbeSoftclips; _useSoftclippedBases = useSoftclippedBases; _debug = debug; _minMapQuality = minMapQuality; _dontStitchHomopolymerBridge = dontStitchHomopolymerBridge; _statusCounter = new ReadStatusCounter(); _cigarReconciler = new CigarReconciler(_statusCounter, _useSoftclippedBases, _debug, _ignoreProbeSoftclips, maxReadLength, minBaseCallQuality, ignoreReadsAboveMaxStitchedLength: ignoreReadsAboveMaxLength, nifyDisagreements: nifyDisagreements); _readMerger = new ReadMerger(minBaseCallQuality, allowRescuedInsertionBaseDisagreement, _useSoftclippedBases, nifyDisagreements, _statusCounter, _debug, _ignoreProbeSoftclips); _thresholdNumDisagreeingBases = thresholdNumDisagreeingBases; }
public CigarReconciler(ReadStatusCounter statusCounter, bool useSoftclippedBases, bool debug, bool ignoreProbeSoftclips, int maxReadLength, bool allowTerminalClipsToSupportOverlappingDels = true) { _statusCounter = statusCounter; _useSoftclippedBases = useSoftclippedBases; _debug = debug; _ignoreProbeSoftclips = ignoreProbeSoftclips; _allowTerminalClipsToSupportOverlappingDels = allowTerminalClipsToSupportOverlappingDels; var maxStitchedReadLength = maxReadLength * 2 - 1; _stitchPositions = new StitchedPosition[maxStitchedReadLength]; // For performance reasons, we keep one collection of StitchedPositions and recycle them for each pair we try to stitch for (var i = 0; i < maxStitchedReadLength; i++) { _stitchPositions[i] = new StitchedPosition(); } }
public void SetStatusCounter(ReadStatusCounter counter) { _statusCounter = counter; }