Exemplo n.º 1
0
        public List <CalledAllele> SetGenotypes(IEnumerable <CalledAllele> alleles)
        {
            var allelesToPrune = new List <CalledAllele>();


            var singleGTForLoci = CalculateDiploidGenotype(alleles, MinDepthToGenotype,
                                                           _diploidSnvThresholdingParameters, _diploidIndelThresholdingParameters, out allelesToPrune);
            int phaseSetIndex = 1;  //reserve -1 for unset, and 0 for reference, and 1 and 2 for alts

            foreach (var allele in alleles)
            {
                allele.Genotype       = singleGTForLoci;
                allele.GenotypeQscore = DiploidGenotypeQualityCalculator.Compute(allele, MinGQScore, MaxGQScore);


                if (allele.IsRefType)
                {
                    allele.PhaseSetIndex = 0;
                }
                else
                {
                    allele.PhaseSetIndex = phaseSetIndex;
                    phaseSetIndex++;
                }
            }

            return(allelesToPrune);
        }
Exemplo n.º 2
0
        public List <CalledAllele> SetGenotypes(IEnumerable <CalledAllele> alleles)
        {
            var allelesToPrune = new List <CalledAllele>();


            var singleGTForLoci = CalculateDiploidGenotype(alleles, MinDepthToGenotype, _diploidThresholdingParameters, out allelesToPrune);

            foreach (var allele in alleles)
            {
                allele.Genotype       = singleGTForLoci;
                allele.GenotypeQscore = DiploidGenotypeQualityCalculator.Compute(allele, MinGQScore, MaxGQScore);
            }

            return(allelesToPrune);
        }