@Test @Transactional(propagation = Propagation.REQUIRES_NEW) public void testUrlNotRegistered() throws Exception { String bedUrl = UrlTestingUtils.TEST_FILE_SERVER_URL + "/genes_sorted.bed"; String indexUrl = UrlTestingUtils.TEST_FILE_SERVER_URL + "/genes_sorted.bed.tbi"; Server server = UrlTestingUtils.getFileServer(context); try { server.start(); Track<BedRecord> track = new Track<>(); track.setScaleFactor(FULL_QUERY_SCALE_FACTOR); track.setStartIndex(1); track.setEndIndex(TEST_END_INDEX); track.setChromosome(testChromosome); track = bedManager.loadFeatures(track, bedUrl, indexUrl); Assert.assertFalse(track.getBlocks().isEmpty()); track.getBlocks().stream().forEach(b -> { if (b.getThickStart() != null) { Assert.assertEquals(b.getStartIndex(), b.getThickStart()); } if (b.getThickEnd() != null) { Assert.assertEquals(b.getEndIndex(), b.getThickEnd()); } }); } finally { server.stop(); } }
public Track<BedRecord> loadFeatures(final Track<BedRecord> track) throws FeatureFileReadingException { final Chromosome chromosome = trackHelper.validateTrack(track); final BedFile bedFile = bedFileManager.load(track.getId()); return loadTrackFromFile(track, bedFile, chromosome); }
BedManager { public Track<BedRecord> loadFeatures(final Track<BedRecord> track) throws FeatureFileReadingException { final Chromosome chromosome = trackHelper.validateTrack(track); final BedFile bedFile = bedFileManager.load(track.getId()); return loadTrackFromFile(track, bedFile, chromosome); } }
BedManager { public Track<BedRecord> loadFeatures(final Track<BedRecord> track) throws FeatureFileReadingException { final Chromosome chromosome = trackHelper.validateTrack(track); final BedFile bedFile = bedFileManager.load(track.getId()); return loadTrackFromFile(track, bedFile, chromosome); }  }
BedManager { public Track<BedRecord> loadFeatures(final Track<BedRecord> track) throws FeatureFileReadingException { final Chromosome chromosome = trackHelper.validateTrack(track); final BedFile bedFile = bedFileManager.load(track.getId()); return loadTrackFromFile(track, bedFile, chromosome); }  BedFile registerBed(final IndexedFileRegistrationRequest request); Track<BedRecord> loadFeatures(final Track<BedRecord> track); Track<BedRecord> loadFeatures(final Track<BedRecord> track, String fileUrl, String indexUrl); Track<Wig> loadHistogram(final Track<Wig> track); BedFile unregisterBedFile(long bedFileId); BedFile reindexBedFile(long bedFileId); }
BedManager { public Track<BedRecord> loadFeatures(final Track<BedRecord> track) throws FeatureFileReadingException { final Chromosome chromosome = trackHelper.validateTrack(track); final BedFile bedFile = bedFileManager.load(track.getId()); return loadTrackFromFile(track, bedFile, chromosome); }  BedFile registerBed(final IndexedFileRegistrationRequest request); Track<BedRecord> loadFeatures(final Track<BedRecord> track); Track<BedRecord> loadFeatures(final Track<BedRecord> track, String fileUrl, String indexUrl); Track<Wig> loadHistogram(final Track<Wig> track); BedFile unregisterBedFile(long bedFileId); BedFile reindexBedFile(long bedFileId);  }