示例#1
0
        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;
                }
            }
        }
示例#2
0
 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;
 }
示例#3
0
 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);
 }
示例#4
0
 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;
 }
示例#5
0
        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;
 }