@Test @Transactional(propagation = Propagation.REQUIRES_NEW, rollbackFor = Exception.class) public void testFindBlatReadSequence() throws IOException, ExternalDbUnavailableException { Species testSpecies = new Species(); testSpecies.setName("human"); testSpecies.setVersion("hg19"); referenceGenomeManager.registerSpecies(testSpecies); referenceGenomeManager.updateSpecies(testReference.getId(), testSpecies.getVersion()); String readSequence = "CAGTATCGTCCTTACTATTACATAGTGTGGTAGCGATGCAGTCCCAGTGAAAAAAAAAAAAAAAAAAAC"; List<PSLRecord> records = blatSearchManager.findBlatReadSequence(testReference.getId(), readSequence); Assert.assertNotNull(records); Assert.assertEquals(1, records.size()); }
public List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence) throws ExternalDbUnavailableException, IOException { Assert.isTrue(referenceId != null && StringUtils.isNotBlank(readSequence), MessagesConstants.ERROR_NULL_PARAM); Reference reference = referenceGenomeManager.load(referenceId); Assert.notNull(reference.getSpecies(), getMessage(MessagesConstants.NULL_SPECIES_FOR_GENOME, reference.getName())); return find(readSequence, reference.getSpecies()); }
BlatSearchManager { public List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence) throws ExternalDbUnavailableException, IOException { Assert.isTrue(referenceId != null && StringUtils.isNotBlank(readSequence), MessagesConstants.ERROR_NULL_PARAM); Reference reference = referenceGenomeManager.load(referenceId); Assert.notNull(reference.getSpecies(), getMessage(MessagesConstants.NULL_SPECIES_FOR_GENOME, reference.getName())); return find(readSequence, reference.getSpecies()); } }
BlatSearchManager { public List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence) throws ExternalDbUnavailableException, IOException { Assert.isTrue(referenceId != null && StringUtils.isNotBlank(readSequence), MessagesConstants.ERROR_NULL_PARAM); Reference reference = referenceGenomeManager.load(referenceId); Assert.notNull(reference.getSpecies(), getMessage(MessagesConstants.NULL_SPECIES_FOR_GENOME, reference.getName())); return find(readSequence, reference.getSpecies()); }  }
BlatSearchManager { public List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence) throws ExternalDbUnavailableException, IOException { Assert.isTrue(referenceId != null && StringUtils.isNotBlank(readSequence), MessagesConstants.ERROR_NULL_PARAM); Reference reference = referenceGenomeManager.load(referenceId); Assert.notNull(reference.getSpecies(), getMessage(MessagesConstants.NULL_SPECIES_FOR_GENOME, reference.getName())); return find(readSequence, reference.getSpecies()); }  List<PSLRecord> find(String readSequence, Species species); List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence); }
BlatSearchManager { public List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence) throws ExternalDbUnavailableException, IOException { Assert.isTrue(referenceId != null && StringUtils.isNotBlank(readSequence), MessagesConstants.ERROR_NULL_PARAM); Reference reference = referenceGenomeManager.load(referenceId); Assert.notNull(reference.getSpecies(), getMessage(MessagesConstants.NULL_SPECIES_FOR_GENOME, reference.getName())); return find(readSequence, reference.getSpecies()); }  List<PSLRecord> find(String readSequence, Species species); List<PSLRecord> findBlatReadSequence(Long referenceId, String readSequence);  }