@Test @Transactional(propagation = Propagation.REQUIRED) public void getSequence() throws Exception { ChromosomeReferenceSequence referenceSequence = new ChromosomeReferenceSequence(chromosomes, referenceId, referenceManager); Assert.assertTrue(referenceSequence.getSequenceDictionary() != null); Assert.assertEquals(EXPECTED_CHROMOSOMES.size(), referenceSequence.getSequenceDictionary().size()); for (Map.Entry<String, Integer> chrSize : EXPECTED_CHROMOSOMES.entrySet()) { ReferenceSequence sequence = referenceSequence.getSequence(chrSize.getKey()); Assert.assertEquals(chrSize.getValue().intValue(), sequence.length()); Assert.assertEquals(EXPECTED_SEQUENCES.get(chrSize.getKey()), sequence.getBaseString()); } }
@Override public ReferenceSequence getSequence(String contig) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } return getSubsequenceAt(contig, 1, chromosome.getSize()); }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSequence(String contig) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } return getSubsequenceAt(contig, 1, chromosome.getSize()); } }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSequence(String contig) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } return getSubsequenceAt(contig, 1, chromosome.getSize()); } ChromosomeReferenceSequence(final List<Chromosome> chromosomes, final Long referenceId,
            ReferenceManager referenceManager); }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSequence(String contig) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } return getSubsequenceAt(contig, 1, chromosome.getSize()); } ChromosomeReferenceSequence(final List<Chromosome> chromosomes, final Long referenceId,
            ReferenceManager referenceManager); @Override SAMSequenceDictionary getSequenceDictionary(); @Override ReferenceSequence nextSequence(); @Override void reset(); @Override boolean isIndexed(); @Override ReferenceSequence getSequence(String contig); @Override ReferenceSequence getSubsequenceAt(String contig, long start, long stop); @Override void close(); }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSequence(String contig) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } return getSubsequenceAt(contig, 1, chromosome.getSize()); } ChromosomeReferenceSequence(final List<Chromosome> chromosomes, final Long referenceId,
            ReferenceManager referenceManager); @Override SAMSequenceDictionary getSequenceDictionary(); @Override ReferenceSequence nextSequence(); @Override void reset(); @Override boolean isIndexed(); @Override ReferenceSequence getSequence(String contig); @Override ReferenceSequence getSubsequenceAt(String contig, long start, long stop); @Override void close();  }