@Test @Transactional(propagation = Propagation.REQUIRED) public void getSequenceInterval() throws Exception { ChromosomeReferenceSequence referenceSequence = new ChromosomeReferenceSequence(chromosomes, referenceId, referenceManager); ReferenceSequence sequence = referenceSequence.getSubsequenceAt(CHR_1, INTERVAL_START, INTERVAL_END); Assert.assertEquals(EXPECTED_SEQUENCES.get(CHR_1).substring(INTERVAL_START - 1, INTERVAL_END), sequence.getBaseString()); }
@Override public ReferenceSequence getSubsequenceAt(String contig, long start, long stop) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } try { byte[] sequenceBytes = referenceManager .getSequenceByteArray((int) start, (int) stop, referenceId, chromosome.getName()); return new ReferenceSequence(contig, chromosome.getId().intValue(), sequenceBytes); } catch (IOException e) { LOG.debug(e.getMessage(), e); return null; } }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSubsequenceAt(String contig, long start, long stop) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } try { byte[] sequenceBytes = referenceManager .getSequenceByteArray((int) start, (int) stop, referenceId, chromosome.getName()); return new ReferenceSequence(contig, chromosome.getId().intValue(), sequenceBytes); } catch (IOException e) { LOG.debug(e.getMessage(), e); return null; } } }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSubsequenceAt(String contig, long start, long stop) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } try { byte[] sequenceBytes = referenceManager .getSequenceByteArray((int) start, (int) stop, referenceId, chromosome.getName()); return new ReferenceSequence(contig, chromosome.getId().intValue(), sequenceBytes); } catch (IOException e) { LOG.debug(e.getMessage(), e); return null; } } ChromosomeReferenceSequence(final List<Chromosome> chromosomes, final Long referenceId,
            ReferenceManager referenceManager); }
ChromosomeReferenceSequence implements ReferenceSequenceFile { @Override public ReferenceSequence getSubsequenceAt(String contig, long start, long stop) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } try { byte[] sequenceBytes = referenceManager .getSequenceByteArray((int) start, (int) stop, referenceId, chromosome.getName()); return new ReferenceSequence(contig, chromosome.getId().intValue(), sequenceBytes); } catch (IOException e) { LOG.debug(e.getMessage(), e); return null; } } 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 getSubsequenceAt(String contig, long start, long stop) { Chromosome chromosome = chromosomeMap.get(contig); if (chromosome == null) { chromosome = chromosomeMap.get(Utils.changeChromosomeName(contig)); } try { byte[] sequenceBytes = referenceManager .getSequenceByteArray((int) start, (int) stop, referenceId, chromosome.getName()); return new ReferenceSequence(contig, chromosome.getId().intValue(), sequenceBytes); } catch (IOException e) { LOG.debug(e.getMessage(), e); return null; } } 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();  }