Example #1
0
        private static void CheckSimpleCombinations(
            CalledAllele VarA, CalledAllele VarB, ConsensusBuilder cb,
            Genotype ExpectedGT, string ExpectedAlt,
            VariantComparisonCase ComparisonCase)
        {
            var AandB               = cb.CombineVariants(VarA, VarB, ComparisonCase);
            var BandA               = cb.CombineVariants(VarB, VarA, ComparisonCase);
            var AandNull            = cb.CombineVariants(VarA, null, VariantComparisonCase.CanNotCombine);
            var NullAndB            = cb.CombineVariants(null, VarB, VariantComparisonCase.CanNotCombine);
            int ExpectedAlleleCount = VarA.AlleleSupport + VarB.AlleleSupport;

            if (ComparisonCase == VariantComparisonCase.OneReferenceOneAlternate)
            {
                //for this test, we presume we are calling alternate.
                ExpectedAlleleCount = (VarA.Type == AlleleCategory.Snv) ? VarA.AlleleSupport : VarB.AlleleSupport;
            }

            //check alt-and-nocalls

            Assert.Equal(ExpectedGT, AandB.Genotype);
            Assert.Equal(VarA.ReferenceAllele, AandB.ReferenceAllele);
            Assert.Equal(ExpectedAlt, AandB.AlternateAllele);
            Assert.Equal(VarA.TotalCoverage + VarB.TotalCoverage, AandB.TotalCoverage);
            Assert.Equal(ExpectedAlleleCount, AandB.AlleleSupport);

            Assert.Equal(ExpectedGT, BandA.Genotype);
            Assert.Equal(VarA.ReferenceAllele, BandA.ReferenceAllele);
            Assert.Equal(ExpectedAlt, BandA.AlternateAllele);
            Assert.Equal(VarA.TotalCoverage + VarB.TotalCoverage, BandA.TotalCoverage);
            Assert.Equal(ExpectedAlleleCount, BandA.AlleleSupport);

            Assert.Equal(ConsensusBuilder.DoDefensiveGenotyping(VarA), AandNull.Genotype);
            Assert.Equal(VarA.ReferenceAllele, AandNull.ReferenceAllele);
            Assert.Equal(VarA.AlternateAllele, AandNull.AlternateAllele);
            Assert.Equal(VarA.TotalCoverage, AandNull.TotalCoverage);
            Assert.Equal(VarA.AlleleSupport, AandNull.AlleleSupport);

            Assert.Equal(ConsensusBuilder.DoDefensiveGenotyping(VarB), NullAndB.Genotype);
            Assert.Equal(VarB.ReferenceAllele, NullAndB.ReferenceAllele);
            Assert.Equal(VarB.AlternateAllele, NullAndB.AlternateAllele);
            Assert.Equal(VarB.TotalCoverage, NullAndB.TotalCoverage);
            Assert.Equal(VarB.AlleleSupport, NullAndB.AlleleSupport);
        }
Example #2
0
        public void VennVcf_CombineTwoPoolVariants_Qscore_DiffentNL_Test()
        {
            //chr3	41266161	.	A	G	30	PASS	DP=3067	GT:GQ:AD:VF:NL:SB	0/1:30:3005,54:0.0176:35:-100.0000
            CalledAllele VarA = new CalledAllele()
            {
                Chromosome        = "chr3",
                ReferencePosition = 41266161,
                TotalCoverage     = 3067,
                Genotype          = Pisces.Domain.Types.Genotype.HeterozygousAltRef,
                VariantQscore     = 30,
                GenotypeQscore    = 30,
                AlleleSupport     = 54,
                ReferenceSupport  = 3005,
                NoiseLevelApplied = 35,
                StrandBiasResults = new Pisces.Domain.Models.BiasResults()
                {
                    GATKBiasScore = -100.0000
                },
                ReferenceAllele = "A",
                AlternateAllele = "G",
                Type            = Pisces.Domain.Types.AlleleCategory.Snv
            };


            ///chr3	41266161	.	A	.	75	PASS	DP=3795	GT:GQ:AD:VF:NL:SB	0/0:75:3780:0.0040:2:-100.0000
            CalledAllele VarB = new CalledAllele()
            {
                Chromosome        = "chr3",
                ReferencePosition = 41266161,
                TotalCoverage     = 3795,
                Genotype          = Pisces.Domain.Types.Genotype.HomozygousRef,
                VariantQscore     = 75,
                GenotypeQscore    = 75,
                AlleleSupport     = 3780,
                ReferenceSupport  = 3780,
                NoiseLevelApplied = 2,
                StrandBiasResults = new Pisces.Domain.Models.BiasResults()
                {
                    GATKBiasScore = -100.0000
                },
                ReferenceAllele = "A",
                AlternateAllele = ".",
                Type            = Pisces.Domain.Types.AlleleCategory.Reference
            };



            //old answer
            //chr3	41266161	.	A	.	100.00	PASS	DP=6862;cosmic=COSM1423020,COSM1423021;EVS=0|69.0|6503;phastCons	GT:GQ:AD:VF:NL:SB:PB:GQX	0/0:100:6785:0.0079:35:-100:-100.0000:100

            SampleAggregationParameters SampleAggregationOptions = new SampleAggregationParameters();

            SampleAggregationOptions.ProbePoolBiasThreshold = 0.5f;
            SampleAggregationOptions.HowToCombineQScore     = SampleAggregationParameters.CombineQScoreMethod.CombinePoolsAndReCalculate;

            _basicOptions.BamFilterParams.MinimumBaseCallQuality      = 20;
            _basicOptions.VariantCallingParams.MinimumFrequency       = 0.01f;
            _basicOptions.VariantCallingParams.MinimumFrequencyFilter = 0.03f;
            _basicOptions.SampleAggregationParameters = SampleAggregationOptions;

            string consensusOut = Path.Combine(_TestDataPath, "ConsensusOut.vcf");
            VariantComparisonCase ComparisonCase   = VennProcessor.GetComparisonCase(VarA, VarB);
            ConsensusBuilder      consensusBuilder = new ConsensusBuilder(consensusOut, _basicOptions);
            AggregateAllele       consensus        = consensusBuilder.CombineVariants(VarA, VarB, ComparisonCase);

            Console.WriteLine(consensus.ToString());

            double expectedNoiseLevel = MathOperations.PtoQ(
                (MathOperations.QtoP(35) + MathOperations.QtoP(2)) / (2.0)); // 5

            //GT:GQ:AD:VF:NL:SB:PB:GQX	0/0:100:6785:0.0079:35:-100:-100.0000:100
            Assert.NotNull(consensus);
            Assert.Equal(consensus.VariantQscore, 100);
            Assert.Equal(consensus.ReferenceAllele, "A");
            Assert.Equal(consensus.AlternateAllele, ".");
            Assert.Equal(consensus.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(consensus.TotalCoverage, 6862);
            Assert.Equal(consensus.ReferenceSupport, 6785);
            Assert.Equal(consensus.AlleleSupport, 6785);
            Assert.Equal(consensus.GenotypeQscore, 100);
            Assert.Equal(consensus.Frequency, 0.98877877f);
            Assert.Equal(consensus.NoiseLevelApplied, ((int)expectedNoiseLevel));
            Assert.Equal(consensus.NoiseLevelApplied, 5);
            Assert.Equal(consensus.StrandBiasResults.GATKBiasScore, -100);
            Assert.Equal(consensus.PoolBiasResults.GATKBiasScore, -100.0000);


            //now check, we take the min NL score if we are taking the min Q score.
            // (in this case of combined alt+ref -> ref, the q score will still need to be recalculated.
            //just with the MIN NL.
            SampleAggregationOptions.HowToCombineQScore = SampleAggregationParameters.CombineQScoreMethod.TakeMin;
            ComparisonCase = VennProcessor.GetComparisonCase(VarA, VarB);
            consensus      = consensusBuilder.CombineVariants(VarA, VarB, ComparisonCase);
            Assert.Equal(consensus.NoiseLevelApplied, 2);
            Assert.Equal(consensus.VariantQscore, 100);


            //ok, now sanity check we dont barf if either input is null:
            ComparisonCase = VennProcessor.GetComparisonCase(VarA, null);
            consensus      = consensusBuilder.CombineVariants(VarA, null, ComparisonCase);
            Assert.Equal(consensus.NoiseLevelApplied, 35);
            Assert.Equal(consensus.VariantQscore, 100);

            ComparisonCase = VennProcessor.GetComparisonCase(null, VarB);
            consensus      = consensusBuilder.CombineVariants(null, VarB, ComparisonCase);
            Assert.Equal(consensus.NoiseLevelApplied, 2);
            Assert.Equal(consensus.VariantQscore, 100);

            //ok, lets check this again, for the PoolQScores option.
            //sanity check we dont barf if either input is null:
            SampleAggregationOptions.HowToCombineQScore = SampleAggregationParameters.CombineQScoreMethod.CombinePoolsAndReCalculate;
            ComparisonCase = VennProcessor.GetComparisonCase(VarA, null);
            consensus      = consensusBuilder.CombineVariants(VarA, null, ComparisonCase);
            Assert.Equal(consensus.NoiseLevelApplied, 35);
            Assert.Equal(consensus.VariantQscore, 100);//low freq variant -> nocall. note, qscore would be 41 if NL = 20.

            ComparisonCase = VennProcessor.GetComparisonCase(null, VarB);
            consensus      = consensusBuilder.CombineVariants(null, VarB, ComparisonCase);
            Assert.Equal(consensus.NoiseLevelApplied, 2);
            Assert.Equal(consensus.VariantQscore, 100); //sold ref
        }
Example #3
0
        public void VennVcf_CombineTwoPoolVariants_Qscore_Test()
        {
            //Var A, kdot-43_S3.genome.vcf
            //chr3	41266161	.	A	G	30	PASS	DP=3067	GT:GQ:AD:VF:NL:SB	0/1:30:3005,54:0.0176:35:-100.0000
            CalledAllele VarA = new CalledAllele();

            VarA.Chromosome        = "chr3";
            VarA.ReferencePosition = 41266161;
            VarA.TotalCoverage     = 3067;
            VarA.Genotype          = Pisces.Domain.Types.Genotype.HeterozygousAltRef;
            VarA.GenotypeQscore    = 30;
            VarA.AlleleSupport     = 54;
            VarA.ReferenceSupport  = 3005;
            //              "VF", "0.0176"
            VarA.NoiseLevelApplied = 35;
            VarA.StrandBiasResults = new Pisces.Domain.Models.BiasResults()
            {
                GATKBiasScore = -100
            };
            VarA.ReferenceAllele = "A";
            VarA.AlternateAllele = "G";
            VarA.Filters         = new List <Pisces.Domain.Types.FilterType>();
            VarA.VariantQscore   = 30;
            VarA.Type            = Pisces.Domain.Types.AlleleCategory.Snv;

            //Var B, kdot-43_S4.genome.vcf
            //chr3	41266161	.	A	.	75	PASS	DP=3795	GT:GQ:AD:VF:NL:SB	0/0:75:3780:0.0040:35:-100.0000
            CalledAllele VarB = new CalledAllele();

            VarB.Chromosome        = "chr3";
            VarB.ReferencePosition = 41266161;
            VarB.TotalCoverage     = 3795;
            VarB.Genotype          = Pisces.Domain.Types.Genotype.HomozygousRef;
            VarB.GenotypeQscore    = 75;
            VarB.AlleleSupport     = 3780;
            VarB.ReferenceSupport  = 3780;
            //              "VF", "0.0040"
            VarB.NoiseLevelApplied = 35;
            VarB.StrandBiasResults = new Pisces.Domain.Models.BiasResults()
            {
                GATKBiasScore = -100
            };
            VarB.ReferenceAllele = "A";
            VarB.AlternateAllele = ".";
            VarB.Filters         = new List <Pisces.Domain.Types.FilterType>();
            VarB.VariantQscore   = 75;
            VarB.Type            = Pisces.Domain.Types.AlleleCategory.Reference;

            //old answer
            //chr3	41266161	.	A	.	100.00	PASS	DP=6862;cosmic=COSM1423020,COSM1423021;EVS=0|69.0|6503;phastCons	GT:GQ:AD:VF:NL:SB:PB:GQX	0/0:100:6785:0.0079:35:-100:-100.0000:100

            VennVcfOptions parameters = new VennVcfOptions();

            parameters.VariantCallingParams.MinimumFrequencyFilter        = 0.03f;
            parameters.VariantCallingParams.MinimumFrequency              = 0.01f;
            parameters.BamFilterParams.MinimumBaseCallQuality             = 20;
            parameters.SampleAggregationParameters.ProbePoolBiasThreshold = 0.5f;
            parameters.SampleAggregationParameters.HowToCombineQScore     = SampleAggregationParameters.CombineQScoreMethod.TakeMin;

            VariantComparisonCase ComparisonCase   = VennProcessor.GetComparisonCase(VarA, VarB);
            ConsensusBuilder      consensusBuilder = new ConsensusBuilder("", parameters);
            AggregateAllele       consensus        = consensusBuilder.CombineVariants(VarA, VarB, ComparisonCase);

            //GT:GQ:AD:VF:NL:SB:PB:GQX	0/0:100:6785:0.0079:35:-100:-100.0000:100
            Assert.NotNull(consensus);
            Assert.Equal(consensus.VariantQscore, 100);
            Assert.Equal(consensus.GenotypeQscore, 100);
            Assert.Equal(consensus.ReferenceAllele, "A");
            Assert.Equal(consensus.AlternateAllele, ".");
            Assert.Equal(consensus.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(consensus.GenotypeQscore, 100);
            Assert.Equal(consensus.AlleleSupport, 6785);
            Assert.Equal(consensus.ReferenceSupport, 6785);
            Assert.Equal(consensus.TotalCoverage, 6862);
            Assert.Equal(consensus.Frequency, 0.98877, 4);
            Assert.Equal(consensus.NoiseLevelApplied, 35);
            Assert.Equal(consensus.StrandBiasResults.GATKBiasScore, -100);
            Assert.Equal(consensus.PoolBiasResults.GATKBiasScore, -100);
        }
Example #4
0
        public void VennVcf_CombineTwoPoolVariants_RulesAthroughD_Tests()
        {
            var outDir      = TestPaths.LocalScratchDirectory;
            var VcfPathRoot = _TestDataPath;

            string OutputPath = Path.Combine(outDir, "outEandF.vcf");

            if (File.Exists(OutputPath))
            {
                File.Delete(OutputPath);
            }

            VennVcfOptions parameters = new VennVcfOptions();

            parameters.VariantCallingParams.MinimumFrequencyFilter = 0.03f;
            parameters.VariantCallingParams.MinimumFrequency       = 0.01f;
            parameters.ConsensusFileName = OutputPath;

            string VcfPath_PoolA = Path.Combine(VcfPathRoot, "09H-03403-MT1-1_S7.genome.vcf");
            var    PoolAVariants = (AlleleReader.GetAllVariantsInFile(VcfPath_PoolA)).ToList();

            string VcfPath_PoolB = Path.Combine(VcfPathRoot, "09H-03403-MT1-1_S8.genome.vcf");
            var    PoolBVariants = (AlleleReader.GetAllVariantsInFile(VcfPath_PoolB)).ToList();

            CalledAllele VariantA = PoolAVariants[0];
            CalledAllele VariantB = PoolBVariants[0];

            List <CalledAllele[]> pairs = VennProcessor.SelectPairs(
                new List <CalledAllele>()
            {
                VariantA
            },
                new List <CalledAllele>
            {
                VariantB
            });

            VariantComparisonCase ComparisonCase   = VennProcessor.GetComparisonCase(pairs[0][0], pairs[0][1]);
            ConsensusBuilder      consensusBuilder = new ConsensusBuilder("", parameters);
            CalledAllele          Consensus        = consensusBuilder.CombineVariants(
                VariantA, VariantB, ComparisonCase);

            //Rule "A" test
            //A	if combined VF<1% and less than 2.6% in each pool, call REF
            //(note, we were Alt in one pool and ref in another)

            Assert.Equal(VariantA.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(VariantA.Frequency, 0.9979, 4);
            Assert.Equal(VariantA.VariantQscore, 100);
            Assert.Equal(VariantA.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(VariantB.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantB.Frequency, 0.0173, 4);
            Assert.Equal(VariantB.VariantQscore, 100);
            Assert.Equal(VariantB.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(ComparisonCase, VariantComparisonCase.OneReferenceOneAlternate);
            Assert.Equal(Consensus.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(Consensus.Frequency, 0.9907, 4);
            Assert.Equal(Consensus.VariantQscore, 100);
            Assert.Equal(Consensus.Filters, new List <Pisces.Domain.Types.FilterType> {
            });                                                                            //<-low VF tag will NOT added by post-processing b/c is ref call

            //B	if combined VF<1% and more than 2.6% in one pool, call NO CALL

            VariantA = PoolAVariants[1];
            VariantB = PoolBVariants[1];

            ComparisonCase = VennProcessor.GetComparisonCase(VariantA, VariantB);
            Consensus      = consensusBuilder.CombineVariants(
                VariantA, VariantB, ComparisonCase);

            Assert.Equal(VariantA.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantA.Frequency, 0.0776, 4);
            Assert.Equal(VariantA.VariantQscore, 100);
            Assert.Equal(VariantA.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(VariantB.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(VariantB.Frequency, 0.9989, 4);
            Assert.Equal(VariantB.VariantQscore, 100);
            Assert.Equal(VariantB.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(ComparisonCase, VariantComparisonCase.OneReferenceOneAlternate);
            Assert.Equal(Consensus.Genotype, Pisces.Domain.Types.Genotype.AltLikeNoCall);
            Assert.Equal(Consensus.Frequency, 0.0070, 4);
            Assert.Equal(Consensus.VariantQscore, 0);
            Assert.Equal(Consensus.Filters, new List <Pisces.Domain.Types.FilterType>
            {
                Pisces.Domain.Types.FilterType.PoolBias
            });                                          //<-low VF tag will also get added by post-processing

            //Rule "Ca" test
            //C-a	if combined 1%<VF<2.6%
            // and more than 2.6% in one pool and less than 1% in the other, call NO CALL w/PB

            VariantA = PoolAVariants[2];
            VariantB = PoolBVariants[2];

            ComparisonCase = VennProcessor.GetComparisonCase(VariantA, VariantB);
            Consensus      = consensusBuilder.CombineVariants(
                VariantA, VariantB, ComparisonCase);

            Assert.Equal(VariantA.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantA.Frequency, 0.0367, 4);
            Assert.Equal(VariantA.VariantQscore, 100);
            Assert.Equal(VariantA.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(VariantB.Genotype, Pisces.Domain.Types.Genotype.HomozygousRef);
            Assert.Equal(VariantB.Frequency, 0.9976, 4);
            Assert.Equal(VariantB.VariantQscore, 100);
            Assert.Equal(VariantB.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(ComparisonCase, VariantComparisonCase.OneReferenceOneAlternate);
            Assert.Equal(Consensus.Genotype, Pisces.Domain.Types.Genotype.AltLikeNoCall);
            Assert.Equal(Consensus.Frequency, 0.0117, 4);
            Assert.Equal(Consensus.VariantQscore, 23);
            Assert.Equal(Consensus.Filters, new List <Pisces.Domain.Types.FilterType> {
                Pisces.Domain.Types.FilterType.PoolBias
            });
            //Rule "Cb" test
            //C-a	if combined 1%<VF<2.6%
            // and more than 2.6% in one pool and between 1% and 2.6% in the other, call NO CALL w/ no PB

            VariantA = PoolAVariants[3];
            VariantB = PoolBVariants[3];

            ComparisonCase = VennProcessor.GetComparisonCase(VariantA, VariantB);
            Consensus      = consensusBuilder.CombineVariants(
                VariantA, VariantB, ComparisonCase);

            Assert.Equal(VariantA.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantA.Frequency, 0.01725, 4);
            Assert.Equal(VariantA.VariantQscore, 100);
            Assert.Equal(VariantA.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(VariantB.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantB.Frequency, 0.03667, 4);
            Assert.Equal(VariantB.VariantQscore, 100);
            Assert.Equal(VariantB.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(ComparisonCase, VariantComparisonCase.AgreedOnAlternate);
            Assert.Equal(Consensus.Genotype, Pisces.Domain.Types.Genotype.AltLikeNoCall);
            Assert.Equal(Consensus.Frequency, 0.02347, 4);
            Assert.Equal(Consensus.VariantQscore, 100);
            Assert.Equal(Consensus.Filters, new List <Pisces.Domain.Types.FilterType> {
            });                                                                            //<-low VF tag will also get added by post-processing

            //Rule "D" test
            //D	if combined VF>=2.6% call VARIANT (PB if only present in one pool, using 1% as the cutoff)

            VariantA = PoolAVariants[4];
            VariantB = PoolBVariants[4];

            ComparisonCase = VennProcessor.GetComparisonCase(VariantA, VariantB);
            Consensus      = consensusBuilder.CombineVariants(
                VariantA, VariantB, ComparisonCase);

            Assert.Equal(VariantA.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantA.Frequency, 0.2509, 4);
            Assert.Equal(VariantA.VariantQscore, 100);
            Assert.Equal(VariantA.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(VariantB.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(VariantB.Frequency, 0.0367, 4);
            Assert.Equal(VariantB.VariantQscore, 100);
            Assert.Equal(VariantB.Filters, new List <Pisces.Domain.Types.FilterType> {
            });

            Assert.Equal(ComparisonCase, VariantComparisonCase.AgreedOnAlternate);
            Assert.Equal(Consensus.Genotype, Pisces.Domain.Types.Genotype.HeterozygousAltRef);
            Assert.Equal(Consensus.Frequency, 0.1716, 4);
            Assert.Equal(Consensus.VariantQscore, 100);
            Assert.Equal(Consensus.Filters, new List <Pisces.Domain.Types.FilterType> {
            });                                                                            //<-low VF tag will also get set by post processor
        }
Example #5
0
        //check consensus builder works on GT "1" and "0" .
        //and in combination with 0/1, etc.
        public void CombineHaploidCalls()
        {
            var options = new VennVcfOptions();

            options.Validate();//set defaults

            var hemiAltA = new CalledAllele();

            hemiAltA.Chromosome        = "chr1";
            hemiAltA.ReferencePosition = 1;
            hemiAltA.ReferenceAllele   = "A";
            hemiAltA.AlternateAllele   = "T";
            hemiAltA.Type          = AlleleCategory.Snv;
            hemiAltA.TotalCoverage = 100;
            hemiAltA.AlleleSupport = 25;
            hemiAltA.Genotype      = Genotype.HemizygousAlt;

            var hemiAltB = new CalledAllele();

            hemiAltB.Chromosome        = "chr1";
            hemiAltB.ReferencePosition = 1;
            hemiAltB.ReferenceAllele   = "A";
            hemiAltB.AlternateAllele   = "T";
            hemiAltB.Type          = AlleleCategory.Snv;
            hemiAltB.TotalCoverage = 100;
            hemiAltB.AlleleSupport = 25;
            hemiAltB.Genotype      = Genotype.HemizygousAlt;

            var hemiRefA = new CalledAllele();

            hemiRefA.Chromosome        = "chr1";
            hemiRefA.ReferencePosition = 1;
            hemiRefA.ReferenceAllele   = "A";
            hemiRefA.AlternateAllele   = ".";
            hemiRefA.Type             = AlleleCategory.Reference;
            hemiRefA.TotalCoverage    = 100;
            hemiRefA.AlleleSupport    = 25;
            hemiRefA.ReferenceSupport = 25;
            hemiRefA.Genotype         = Genotype.HemizygousRef;

            var hemiRefB = new CalledAllele();

            hemiRefB.Chromosome        = "chr1";
            hemiRefB.ReferencePosition = 1;
            hemiRefB.ReferenceAllele   = "A";
            hemiRefB.AlternateAllele   = ".";
            hemiRefB.Type             = AlleleCategory.Reference;
            hemiRefB.TotalCoverage    = 100;
            hemiRefB.AlleleSupport    = 25;
            hemiRefB.ReferenceSupport = 25;
            hemiRefB.Genotype         = Genotype.HemizygousRef;

            var hemiNoCallA = new CalledAllele();

            hemiNoCallA.Chromosome        = "chr1";
            hemiNoCallA.ReferencePosition = 1;
            hemiNoCallA.ReferenceAllele   = "A";
            hemiNoCallA.AlternateAllele   = ".";
            hemiNoCallA.Type             = AlleleCategory.Reference;
            hemiNoCallA.TotalCoverage    = 100;
            hemiNoCallA.AlleleSupport    = 25;
            hemiNoCallA.ReferenceSupport = 25;
            hemiNoCallA.Genotype         = Genotype.HemizygousNoCall;

            var hemiNoCallB = new CalledAllele();

            hemiNoCallB.Chromosome        = "chr1";
            hemiNoCallB.ReferencePosition = 1;
            hemiNoCallB.ReferenceAllele   = "A";
            hemiNoCallB.AlternateAllele   = ".";
            hemiNoCallB.Type             = AlleleCategory.Reference;
            hemiNoCallB.TotalCoverage    = 100;
            hemiNoCallB.AlleleSupport    = 25;
            hemiNoCallB.ReferenceSupport = 25;
            hemiNoCallB.Genotype         = Genotype.HemizygousNoCall;

            var NormalAltA = new CalledAllele();

            NormalAltA.Chromosome        = "chr1";
            NormalAltA.ReferencePosition = 1;
            NormalAltA.ReferenceAllele   = "A";
            NormalAltA.AlternateAllele   = "T";
            NormalAltA.Type          = AlleleCategory.Snv;
            NormalAltA.TotalCoverage = 100;
            NormalAltA.AlleleSupport = 25;
            NormalAltA.Genotype      = Genotype.HeterozygousAltRef;


            var NormalRefA = new CalledAllele();

            NormalRefA.Chromosome        = "chr1";
            NormalRefA.ReferencePosition = 1;
            NormalRefA.ReferenceAllele   = "A";
            NormalRefA.AlternateAllele   = ".";
            NormalRefA.Type             = AlleleCategory.Reference;
            NormalRefA.TotalCoverage    = 300;
            NormalRefA.AlleleSupport    = 50;
            NormalRefA.ReferenceSupport = 50;
            NormalRefA.Genotype         = Genotype.HomozygousRef;

            var cb = new ConsensusBuilder("cbHaploid.vcf", options);

            CheckSimpleCombinations(hemiAltA, hemiAltB, cb, Genotype.HomozygousAlt, hemiAltA.AlternateAllele, VariantComparisonCase.AgreedOnAlternate);//<- default untill we update consensus code with 1/. etc.
            CheckSimpleCombinations(hemiRefA, hemiRefB, cb, Genotype.HomozygousRef, hemiRefA.AlternateAllele, VariantComparisonCase.AgreedOnReference);
            CheckSimpleCombinations(hemiNoCallA, hemiNoCallB, cb, Genotype.RefLikeNoCall, hemiNoCallA.AlternateAllele, VariantComparisonCase.AgreedOnReference);

            CheckSimpleCombinations(hemiAltA, NormalAltA, cb, Genotype.HeterozygousAltRef, NormalAltA.AlternateAllele, VariantComparisonCase.AgreedOnAlternate);//<- default untill we update consensus code with 1/. etc.
            CheckSimpleCombinations(hemiRefA, NormalAltA, cb, Genotype.HeterozygousAltRef, NormalAltA.AlternateAllele, VariantComparisonCase.OneReferenceOneAlternate);
            CheckSimpleCombinations(hemiNoCallA, NormalAltA, cb, Genotype.HeterozygousAltRef, NormalAltA.AlternateAllele, VariantComparisonCase.OneReferenceOneAlternate);

            CheckSimpleCombinations(hemiAltA, NormalRefA, cb, Genotype.HeterozygousAltRef, hemiAltA.AlternateAllele, VariantComparisonCase.OneReferenceOneAlternate);//<- default untill we update consensus code with 1/. etc.
            CheckSimpleCombinations(hemiRefA, NormalRefA, cb, Genotype.HomozygousRef, NormalRefA.AlternateAllele, VariantComparisonCase.AgreedOnReference);
            CheckSimpleCombinations(hemiNoCallA, NormalRefA, cb, Genotype.HomozygousRef, NormalRefA.AlternateAllele, VariantComparisonCase.AgreedOnReference);
        }