public static void Process(CalledAllele allele, float minFrequency, int?lowDepthFilter, int?filterVariantQscore, bool filterSingleStrandVariants, float?variantFreqFilter, float?lowGqFilter, int?indelRepeatFilter, RMxNFilterSettings rMxNFilterSettings, float?noCallFilter, float?ampliconBiasFilter, ChrReference chrReference, bool isStitchedSource = false) { allele.SetFractionNoCalls(); ApplyFilters(allele, lowDepthFilter, filterVariantQscore, filterSingleStrandVariants, variantFreqFilter, lowGqFilter, indelRepeatFilter, rMxNFilterSettings, noCallFilter, ampliconBiasFilter, isStitchedSource, chrReference); }
/// <summary> /// Warning. This algorithm has an inherent assumption: /// the VS must be in order of their true position (first base of difference). /// Thats not always how they appeared in the vcf. /// </summary> /// <param name="allele"></param> /// <param name="clusterVariantSites"></param> /// <param name="referenceSequence"></param> /// <param name="neighborhoodDepthAtSites"></param> /// <param name="clusterCountsAtSites"></param> /// <param name="chromosome"></param> /// <returns></returns> public static CalledAllele Create(string chromosome, int alleleCoordinate, string alleleReference, string alleleAlternate, int varCount, int noCallCount, int totalCoverage, int refSpt, AlleleCategory category, int qNoiselevel, int maxQscore) { if (totalCoverage < varCount) //sometimes the orignal vcf and the bam dont agree... { totalCoverage = varCount; } // Nima: Commented this line for pics-1017 //refSpt = totalCoverage - varCount; if (category == AlleleCategory.Reference) { refSpt = varCount; } var allele = new CalledAllele(category) { Chromosome = chromosome, ReferencePosition = alleleCoordinate, ReferenceAllele = alleleReference, AlternateAllele = alleleAlternate, TotalCoverage = totalCoverage, Type = category, AlleleSupport = varCount, ReferenceSupport = refSpt, NumNoCalls = noCallCount, VariantQscore = VariantQualityCalculator.AssignPoissonQScore(varCount, totalCoverage, qNoiselevel, maxQscore), NoiseLevelApplied = qNoiselevel }; allele.SetFractionNoCalls(); return(allele); }