@Test @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) public void testLoadLocalNonRegisteredBam() throws Exception { final String bamPath = resource.getFile().getAbsolutePath() + TEST_BAM_NAME; final String indexPath = bamPath + BAI_EXTENSION; Track<Read> fullTrackQ = new Track<>(); fullTrackQ.setStartIndex(TEST_START_INDEX_SMALL_RANGE); fullTrackQ.setEndIndex(TEST_END_INDEX_SMALL_RANGE); fullTrackQ.setScaleFactor(SCALE_FACTOR_SMALL); fullTrackQ.setChromosome(new Chromosome(testChromosome.getId())); BamQueryOption option = new BamQueryOption(); option.setTrackDirection(TrackDirectionType.MIDDLE); option.setShowSpliceJunction(true); option.setShowClipping(true); option.setFrame(TEST_FRAME_SIZE); option.setCount(TEST_COUNT); ResponseEmitterMock emitterMock = new ResponseEmitterMock(); bamManager.sendBamTrackToEmitterFromUrl(fullTrackQ, option, bamPath, indexPath, emitterMock); BamTrack<Read> fullTrack = emitterMock.getBamTrack(); testBamTrack(fullTrack); }
public void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl, String indexUrl, ResponseBodyEmitter emitter) throws IOException { final Chromosome chromosome = trackHelper.validateUrlTrack(track, bamUrl, indexUrl); BamQueryOption currentOptions = option == null ? new BamQueryOption() : option; BamUtil.validateOptions(currentOptions, chromosome); fillEmitterByBamTrackFromURL(track, bamUrl, indexUrl, currentOptions, emitter); }
BamManager { public void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl, String indexUrl, ResponseBodyEmitter emitter) throws IOException { final Chromosome chromosome = trackHelper.validateUrlTrack(track, bamUrl, indexUrl); BamQueryOption currentOptions = option == null ? new BamQueryOption() : option; BamUtil.validateOptions(currentOptions, chromosome); fillEmitterByBamTrackFromURL(track, bamUrl, indexUrl, currentOptions, emitter); } }
BamManager { public void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl, String indexUrl, ResponseBodyEmitter emitter) throws IOException { final Chromosome chromosome = trackHelper.validateUrlTrack(track, bamUrl, indexUrl); BamQueryOption currentOptions = option == null ? new BamQueryOption() : option; BamUtil.validateOptions(currentOptions, chromosome); fillEmitterByBamTrackFromURL(track, bamUrl, indexUrl, currentOptions, emitter); }  }
BamManager { public void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl, String indexUrl, ResponseBodyEmitter emitter) throws IOException { final Chromosome chromosome = trackHelper.validateUrlTrack(track, bamUrl, indexUrl); BamQueryOption currentOptions = option == null ? new BamQueryOption() : option; BamUtil.validateOptions(currentOptions, chromosome); fillEmitterByBamTrackFromURL(track, bamUrl, indexUrl, currentOptions, emitter); }  BamFile registerBam(final IndexedFileRegistrationRequest request); BamFile unregisterBamFile(final long bamFileId); void sendBamTrackToEmitter(final Track<Read> track, BamQueryOption option, ResponseBodyEmitter emitter); void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl,
                                                       String indexUrl, ResponseBodyEmitter emitter); Track<Sequence> calculateConsensusSequence(final Track<Sequence> track); Read loadRead(final ReadQuery query, String fileUrl, String indexUrl); }
BamManager { public void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl, String indexUrl, ResponseBodyEmitter emitter) throws IOException { final Chromosome chromosome = trackHelper.validateUrlTrack(track, bamUrl, indexUrl); BamQueryOption currentOptions = option == null ? new BamQueryOption() : option; BamUtil.validateOptions(currentOptions, chromosome); fillEmitterByBamTrackFromURL(track, bamUrl, indexUrl, currentOptions, emitter); }  BamFile registerBam(final IndexedFileRegistrationRequest request); BamFile unregisterBamFile(final long bamFileId); void sendBamTrackToEmitter(final Track<Read> track, BamQueryOption option, ResponseBodyEmitter emitter); void sendBamTrackToEmitterFromUrl(final Track<Read> track, BamQueryOption option, String bamUrl,
                                                       String indexUrl, ResponseBodyEmitter emitter); Track<Sequence> calculateConsensusSequence(final Track<Sequence> track); Read loadRead(final ReadQuery query, String fileUrl, String indexUrl);  }