/// <summary> /// Loads the distribution of insert sizes, creates an array of [counts] /// </summary> void loadDistribution() { //load all the data var producer = bp.ParseRangeAsEnumerableSequences(FileName, mtDNAName, 0, Int32.MaxValue); //Go through and make an array of counts foreach (var s in producer) { TotalMTReads++; if ((s.Flag & SAMFlags.PairedRead) != SAMFlags.PairedRead) { continue; } else if (s.ISize == 0) { CountZero++; } else { int i = s.ISize; //those less than 0 should have their mate contain a value, can continue if (i < 0) { continue; } else if (i > (StaticResources.CRS_LENGTH - 1)) { CountOverMax++; } else { countsOfSize [i] += 1.0; } } } }