Commit fcaf43ab authored by Piotr Gawron's avatar Piotr Gawron
Browse files

search for drugs with rna components didn't work

parent 33056d70
Pipeline #11279 passed with stage
in 11 minutes and 9 seconds
...@@ -3,6 +3,8 @@ minerva (13.1.1) stable; urgency=medium ...@@ -3,6 +3,8 @@ minerva (13.1.1) stable; urgency=medium
* Bug fix: "Terms of Use" change to "Terms of Service" in all places (#843) * Bug fix: "Terms of Use" change to "Terms of Service" in all places (#843)
* Bug fix: upgrade to 13.1.0 crashed on machines where every element was * Bug fix: upgrade to 13.1.0 crashed on machines where every element was
inside compartment (#856) inside compartment (#856)
* Bug fix: searching for some drugs in chembl didn't provide any results even
though that data exists, for instance 'DORLIMOMAB ARITOX' (#842)
-- Piotr Gawron <piotr.gawron@uni.lu> Fri, 28 Jun 2019 17:00:00 +0200 -- Piotr Gawron <piotr.gawron@uni.lu> Fri, 28 Jun 2019 17:00:00 +0200
......
...@@ -256,12 +256,15 @@ public class ChEMBLParser extends DrugAnnotation implements IExternalService { ...@@ -256,12 +256,15 @@ public class ChEMBLParser extends DrugAnnotation implements IExternalService {
MiriamData result = null; MiriamData result = null;
Node uniprotAccessionId = XmlParser.getNode("accession", targetComponent.getChildNodes()); Node uniprotAccessionId = XmlParser.getNode("accession", targetComponent.getChildNodes());
if (uniprotAccessionId != null) { if (uniprotAccessionId != null) {
try { String uniprotId = uniprotAccessionId.getTextContent();
result = uniprotAnnotator if (uniprotId != null && !uniprotId.isEmpty()) {
.uniProtToHgnc(new MiriamData(MiriamType.UNIPROT, uniprotAccessionId.getTextContent())); try {
result.setAnnotator(null); result = uniprotAnnotator
} catch (UniprotSearchException e) { .uniProtToHgnc(new MiriamData(MiriamType.UNIPROT, uniprotId));
throw new DrugSearchException(e); result.setAnnotator(null);
} catch (UniprotSearchException e) {
throw new DrugSearchException(e);
}
} }
} }
return result; return result;
......
...@@ -273,6 +273,19 @@ public class ChEMBLParserTest extends AnnotationTestFunctions { ...@@ -273,6 +273,19 @@ public class ChEMBLParserTest extends AnnotationTestFunctions {
} }
@Test
public void testGetTargetWithRnaComponent() throws Exception {
try {
Target test = chemblParser.getTargetFromId(new MiriamData(MiriamType.CHEMBL_TARGET, "CHEMBL2363135"));
assertEquals(test.getSource().getResource(), "CHEMBL2363135");
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test @Test
public void testGetTargetFromInvalidId() throws Exception { public void testGetTargetFromInvalidId() throws Exception {
try { try {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment