public void GetAllPositions()
        {
            var seqProvider = ParserTestUtils.GetSequenceProvider(10329, "AC", 'A', _chromDict);
            var positions   = PreLoadUtilities.GetPositions(GetVcfStream(), null, seqProvider);

            Assert.Equal(2, positions.Count);
            Assert.Equal(4, positions[Chrom1].Count);
            Assert.Equal(4, positions[Chrom2].Count);
        }
        public void GetPositions_inRange()
        {
            var chromosome      = new Chromosome("chr1", "1", 0);
            var annotationRange = new GenomicRange(new GenomicPosition(chromosome, 10019), new GenomicPosition(chromosome, 10290));
            var seqProvider     = ParserTestUtils.GetSequenceProvider(10329, "AC", 'A', _chromDict);
            var positions       = PreLoadUtilities.GetPositions(GetVcfStream(), annotationRange, seqProvider);

            Assert.Single(positions);
            Assert.Equal(3, positions[Chrom1].Count);
        }
Esempio n. 3
0
        public void GetPositions_inRange()
        {
            var annotationRange = new GenomicRange(new GenomicPosition(ChromosomeUtilities.Chr1, 10019), new GenomicPosition(ChromosomeUtilities.Chr1, 10290));
            var seqProvider     = ParserTestUtils.GetSequenceProvider(10329, "AC", 'A', ChromosomeUtilities.RefNameToChromosome);

            (var positions, _) = PreLoadUtilities.GetPositions(GetVcfStream(), annotationRange, seqProvider, null);

            Assert.Single(positions);
            Assert.Equal(3, positions[ChromosomeUtilities.Chr1].Count);
        }
Esempio n. 4
0
        public void GetAllPositions()
        {
            //we only need the sequence provider for variant rotation.
            var seqProvider = ParserTestUtils.GetSequenceProvider(10329, "AC", 'A', ChromosomeUtilities.RefNameToChromosome);

            (var positions, _) = PreLoadUtilities.GetPositions(GetVcfStream(), null, seqProvider, null);

            Assert.Equal(2, positions.Count);
            Assert.Equal(4, positions[ChromosomeUtilities.Chr1].Count);
            Assert.Equal(4, positions[ChromosomeUtilities.Chr2].Count);
        }
Esempio n. 5
0
        public void GetAllPositions_skip_refs()
        {
            //we only need the sequence provider for variant rotation.
            var seqProvider      = ParserTestUtils.GetSequenceProvider(10329, "AC", 'A', ChromosomeUtilities.RefNameToChromosome);
            var refMinorProvider = ParserTestUtils.GetRefMinorProvider(
                new List <(IChromosome chrom, int position, string globalMinor)>
            {
                (ChromosomeUtilities.Chr1, 10275, "A")
            }
                );

            (var positions, _) = PreLoadUtilities.GetPositions(GetRefMinorVcfStream(), null, seqProvider, refMinorProvider);

            Assert.Equal(2, positions.Count);
            Assert.Equal(5, positions[ChromosomeUtilities.Chr1].Count);
            Assert.Equal(4, positions[ChromosomeUtilities.Chr2].Count);
        }