Skip to content
Snippets Groups Projects
Commit 1b945e66 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

drugbank responses changed

parent 34fbf66d
No related branches found
No related tags found
3 merge requests!573Merge 12.1.5 into master,!569drugbank responses changed,!568drugbank responses changed
Pipeline #8124 passed
...@@ -85,17 +85,17 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi ...@@ -85,17 +85,17 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi
/** /**
* Url used for accessing information about target synonyms. * Url used for accessing information about target synonyms.
*/ */
static final String URLPEP = "https://www.drugbank.ca/biodb/polypeptides/"; static final String URLPEP = "https://www.drugbank.ca/polypeptides/";
/** /**
* Url that allows to search for drugs using target hgnc name. * Url that allows to search for drugs using target hgnc name.
*/ */
static final String URL_TARGETS = "https://www.drugbank.ca/search?utf8=%E2%9C%93&searcher=targets&query="; static final String URL_TARGETS = "https://www.drugbank.ca/search?utf8=%E2%9C%93&searcher=bio_entities&query=";
/** /**
* Url that helps finding drug name for given target identifier. * Url that helps finding drug name for given target identifier.
*/ */
static final String URL_TARGET_DETAIL = "https://www.drugbank.ca/biodb/bio_entities/"; static final String URL_TARGET_DETAIL = "https://www.drugbank.ca/bio_entities/";
/** /**
* Pattern used to get information about {@link Drug#bloodBrainBarrier blood * Pattern used to get information about {@link Drug#bloodBrainBarrier blood
...@@ -107,7 +107,7 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi ...@@ -107,7 +107,7 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi
* Pattern that extract information about target identifier when searching for * Pattern that extract information about target identifier when searching for
* targets with given set of HGNC names. * targets with given set of HGNC names.
*/ */
private Pattern targetPattern = Pattern.compile("(?<=\"/biodb/bio_entities/)([\\s\\S]*?)(?=\")"); private Pattern targetPattern = Pattern.compile("(?<=\"/bio_entities/)([\\s\\S]*?)(?=\")");
/** /**
* Default constructor. * Default constructor.
...@@ -372,7 +372,7 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi ...@@ -372,7 +372,7 @@ public class DrugbankHTMLParser extends DrugAnnotation implements IExternalServi
type = htmlPage.substring(kindIndex, endKindIndex); type = htmlPage.substring(kindIndex, endKindIndex);
} }
if (type.trim().equalsIgnoreCase("Protein")) { if (type.trim().equalsIgnoreCase("Protein")) {
int uniprotIdStart = htmlPage.indexOf("/biodb/polypeptides/") + "/biodb/polypeptides/".length(); int uniprotIdStart = htmlPage.indexOf("\"/polypeptides/") + "\"/polypeptides/".length();
Target result = new Target(); Target result = new Target();
result.setType(TargetType.SINGLE_PROTEIN); result.setType(TargetType.SINGLE_PROTEIN);
......
...@@ -82,6 +82,10 @@ public class TaxonomyBackend extends CachableInterface implements IExternalServi ...@@ -82,6 +82,10 @@ public class TaxonomyBackend extends CachableInterface implements IExternalServi
if (term == null || "".equals(term.trim())) { if (term == null || "".equals(term.trim())) {
return null; return null;
} }
if (term.equalsIgnoreCase("Humans")) {
term="Human";
}
String res = getCacheValue(TAXONOMY_CACHE_PREFIX + term); String res = getCacheValue(TAXONOMY_CACHE_PREFIX + term);
if (res != null) { if (res != null) {
return new MiriamData(MiriamType.TAXONOMY, res); return new MiriamData(MiriamType.TAXONOMY, res);
......
...@@ -81,8 +81,9 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions { ...@@ -81,8 +81,9 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions {
assertEquals("Diazoxide", test.getName()); assertEquals("Diazoxide", test.getName());
assertEquals("DB01119", test.getSources().get(0).getResource()); assertEquals("DB01119", test.getSources().get(0).getResource());
assertTrue(test.getBloodBrainBarrier().equalsIgnoreCase("YES")); assertTrue(test.getBloodBrainBarrier().equalsIgnoreCase("YES"));
logger.debug(test.getDescription());
boolean res = test.getDescription().contains( boolean res = test.getDescription().contains(
"A benzothiadiazine derivative that is a peripheral vasodilator used for hypertensive emergencies. It lacks diuretic effect, apparently because it lacks a sulfonamide group. [PubChem]"); "A benzothiadiazine derivative that is a peripheral vasodilator used for hypertensive emergencies. It lacks diuretic effect, apparently because it lacks a sulfonamide group.");
assertTrue(res); assertTrue(res);
assertEquals(6, test.getTargets().size()); assertEquals(6, test.getTargets().size());
assertTrue(test.getApproved()); assertTrue(test.getApproved());
...@@ -159,9 +160,9 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions { ...@@ -159,9 +160,9 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions {
assertEquals("Amantadine", amantadineDrug.getName()); assertEquals("Amantadine", amantadineDrug.getName());
assertEquals("DB00915", amantadineDrug.getSources().get(0).getResource()); assertEquals("DB00915", amantadineDrug.getSources().get(0).getResource());
boolean res = amantadineDrug.getDescription().contains( boolean res = amantadineDrug.getDescription().contains(
"An antiviral that is used in the prophylactic or symptomatic treatment of influenza A. It is also used as an antiparkinsonian agent, to treat extrapyramidal reactions, and for postherpetic neuralgia. The mechanisms of its effects in movement disorders are not well understood but probably reflect an increase in synthesis and release of dopamine, with perhaps some inhibition of dopamine uptake. [PubChem]"); "An antiviral that is used in the prophylactic or symptomatic treatment of influenza A. It is also used as an antiparkinsonian agent, to treat extrapyramidal reactions, and for postherpetic neuralgia. The mechanisms of its effects in movement disorders are not well understood but probably reflect an increase in synthesis and release of dopamine, with perhaps some inhibition of dopamine uptake.");
assertTrue(res); assertTrue(res);
assertEquals(3, amantadineDrug.getTargets().size()); assertTrue(amantadineDrug.getTargets().size() >= 3);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
...@@ -280,7 +281,7 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions { ...@@ -280,7 +281,7 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions {
try { try {
List<Drug> drugs = drugBankHTMLParser.getDrugListByTarget(new MiriamData(MiriamType.HGNC_SYMBOL, "NFKB2")); List<Drug> drugs = drugBankHTMLParser.getDrugListByTarget(new MiriamData(MiriamType.HGNC_SYMBOL, "NFKB2"));
assertNotNull(drugs); assertNotNull(drugs);
assertTrue("Only " + drugs.size() + " drugs were found, but at least 8 were expected", drugs.size() >= 8); assertTrue("Only " + drugs.size() + " drugs were found, but at least 5 were expected", drugs.size() >= 5);
drugBankHTMLParser.getDrugListByTarget(new MiriamData(MiriamType.HGNC_SYMBOL, "NFKB2")); drugBankHTMLParser.getDrugListByTarget(new MiriamData(MiriamType.HGNC_SYMBOL, "NFKB2"));
...@@ -828,12 +829,12 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions { ...@@ -828,12 +829,12 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions {
} }
} }
@Test @Test
public void testExtractTargetsFromPageContent() throws Exception { public void testExtractTargetsFromPageContent() throws Exception {
try { try {
String pageContent = " Details</a>blablablablabla Details</a>"; String pageContent = " Details</a>blablablablabla Details</a>";
List<Target> result = drugBankHTMLParser.extractTargetsFromPageContent(pageContent,2,3); List<Target> result = drugBankHTMLParser.extractTargetsFromPageContent(pageContent, 2, 3);
assertEquals(0, result.size()); assertEquals(0, result.size());
...@@ -843,7 +844,5 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions { ...@@ -843,7 +844,5 @@ public class DrugbankHTMLParserTest extends AnnotationTestFunctions {
} }
} }
} }
...@@ -57,6 +57,17 @@ public class TaxonomyBackendTest extends AnnotationTestFunctions { ...@@ -57,6 +57,17 @@ public class TaxonomyBackendTest extends AnnotationTestFunctions {
} }
} }
@Test
public void testByHumansName() throws Exception {
try {
MiriamData md = taxonomyBackend.getByName("Humans");
assertTrue(md.equals(TaxonomyBackend.HUMAN_TAXONOMY));
} catch (Exception e) {
e.printStackTrace();
throw e;
}
}
@Test @Test
public void testByComplexName() throws Exception { public void testByComplexName() throws Exception {
try { try {
......
Details</a><strong>1. <a href="/biodb/polypeptides/P21430">Matrix protein 2</a></strong></div><div class="card-body"><div class="row"><div class="col-sm-12 col-lg-5"><dl><dt class="col-md-5 col-sm-6">Kind</dt><dd class="col-md-7 col-sm-6">Protein</dd><dt class="col-md-5 col-sm-6">Organism</dt><dd class="col-md-7 col-sm-6">Influenza A virus (strain A/Ann Arbor/6/1960 H2N2)</dd><dt class="col-md-5 col-sm-6">Pharmacological action</dt><dd class="col-md-7 col-sm-6"><div class="badge badge badge-yes">Yes</div></dd><dt class="col-md-5 col-sm-6">Actions</dt><dd class="col-md-7 col-sm-6"><div class="badge badge-pill badge-action">Inhibitor</div></dd></dl></div><div class="col-sm-12 col-lg-7"><dl><dt class="col-md-5 col-sm-6">General Function</dt><dd class="col-md-7 col-sm-6">Ion channel activity</dd><dt class="col-md-5 col-sm-6">Specific Function</dt><dd class="col-md-7 col-sm-6">Forms a proton-selective ion channel that is necessary for the efficient release of the viral genome during virus entry. After attaching to the cell surface, the virion enters the cell by endocytos...</dd><dt class="col-md-5 col-sm-6">Gene Name</dt><dd class="col-md-7 col-sm-6">M</dd><dt class="col-md-5 col-sm-6">Uniprot ID</dt><dd class="col-md-7 col-sm-6"><a target="_blank" href="http://www.uniprot.org/uniprot/P21430">P21430</a></dd><dt class="col-md-5 col-sm-6">Uniprot Name</dt><dd class="col-md-7 col-sm-6">Matrix protein 2</dd><dt class="col-md-5 col-sm-6">Molecular Weight</dt><dd class="col-md-7 col-sm-6">11165.62 Da</dd></dl></div></div><h5>References</h5><div class="references"><ol class="cite-this-references"><li id="reference-A10951">Wang C, Takeuchi K, Pinto LH, Lamb RA: Ion channel activity of influenza A virus M2 protein: characterization of the amantadine block. J Virol. 1993 Sep;67(9):5585-94. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/7688826">PubMed:7688826</a>] </li><li id="reference-A4968">Jing X, Ma C, Ohigashi Y, Oliveira FA, Jardetzky TS, Pinto LH, Lamb RA: Functional studies indicate amantadine binds to the pore of the influenza A virus M2 proton-selective ion channel. Proc Natl Acad Sci U S A. 2008 Aug 5;105(31):10967-72. doi: 10.1073/pnas.0804958105. Epub 2008 Jul 31. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/18669647">PubMed:18669647</a>] </li><li id="reference-A10952">Wang J, Cady SD, Balannik V, Pinto LH, DeGrado WF, Hong M: Discovery of spiro-piperidine inhibitors and their modulation of the dynamics of the M2 proton channel from influenza A virus. J Am Chem Soc. 2009 Jun 17;131(23):8066-76. doi: 10.1021/ja900063s. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/19469531">PubMed:19469531</a>] </li><li id="reference-A3946">Beigel J, Bray M: Current and future antiviral therapy of severe seasonal and avian influenza. Antiviral Res. 2008 Apr;78(1):91-102. doi: 10.1016/j.antiviral.2008.01.003. Epub 2008 Feb 4. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/18328578">PubMed:18328578</a>] </li><li id="reference-A10953">Lear JD: Proton conduction through the M2 protein of the influenza A virus; a quantitative, mechanistic analysis of experimental data. FEBS Lett. 2003 Sep 18;552(1):17-22. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/12972146">PubMed:12972146</a>] </li><li id="reference-A10954">Salom D, Hill BR, Lear JD, DeGrado WF: pH-dependent tetramerization and amantadine binding of the transmembrane helix of M2 from the influenza A virus. Biochemistry. 2000 Nov 21;39(46):14160-70. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/11087364">PubMed:11087364</a>] </li></ol></div></div></div><div class="bond card" id="BE0000641"><div class="card-header"><a class="btn btn-drugbank-secondary btn-sm bond-details-link ml-3" href="/biodb/polypeptides/Q8TCU5"> Details</a><strong>1. <a href="/polypeptides/P21430">Matrix protein 2</a></strong></div><div class="card-body"><div class="row"><div class="col-sm-12 col-lg-5"><dl><dt class="col-md-5 col-sm-6">Kind</dt><dd class="col-md-7 col-sm-6">Protein</dd><dt class="col-md-5 col-sm-6">Organism</dt><dd class="col-md-7 col-sm-6">Influenza A virus (strain A/Ann Arbor/6/1960 H2N2)</dd><dt class="col-md-5 col-sm-6">Pharmacological action</dt><dd class="col-md-7 col-sm-6"><div class="badge badge badge-yes">Yes</div></dd><dt class="col-md-5 col-sm-6">Actions</dt><dd class="col-md-7 col-sm-6"><div class="badge badge-pill badge-action">Inhibitor</div></dd></dl></div><div class="col-sm-12 col-lg-7"><dl><dt class="col-md-5 col-sm-6">General Function</dt><dd class="col-md-7 col-sm-6">Ion channel activity</dd><dt class="col-md-5 col-sm-6">Specific Function</dt><dd class="col-md-7 col-sm-6">Forms a proton-selective ion channel that is necessary for the efficient release of the viral genome during virus entry. After attaching to the cell surface, the virion enters the cell by endocytos...</dd><dt class="col-md-5 col-sm-6">Gene Name</dt><dd class="col-md-7 col-sm-6">M</dd><dt class="col-md-5 col-sm-6">Uniprot ID</dt><dd class="col-md-7 col-sm-6"><a target="_blank" href="http://www.uniprot.org/uniprot/P21430">P21430</a></dd><dt class="col-md-5 col-sm-6">Uniprot Name</dt><dd class="col-md-7 col-sm-6">Matrix protein 2</dd><dt class="col-md-5 col-sm-6">Molecular Weight</dt><dd class="col-md-7 col-sm-6">11165.62 Da</dd></dl></div></div><h5>References</h5><div class="references"><ol class="cite-this-references"><li id="reference-A10951">Wang C, Takeuchi K, Pinto LH, Lamb RA: Ion channel activity of influenza A virus M2 protein: characterization of the amantadine block. J Virol. 1993 Sep;67(9):5585-94. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/7688826">PubMed:7688826</a>] </li><li id="reference-A4968">Jing X, Ma C, Ohigashi Y, Oliveira FA, Jardetzky TS, Pinto LH, Lamb RA: Functional studies indicate amantadine binds to the pore of the influenza A virus M2 proton-selective ion channel. Proc Natl Acad Sci U S A. 2008 Aug 5;105(31):10967-72. doi: 10.1073/pnas.0804958105. Epub 2008 Jul 31. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/18669647">PubMed:18669647</a>] </li><li id="reference-A10952">Wang J, Cady SD, Balannik V, Pinto LH, DeGrado WF, Hong M: Discovery of spiro-piperidine inhibitors and their modulation of the dynamics of the M2 proton channel from influenza A virus. J Am Chem Soc. 2009 Jun 17;131(23):8066-76. doi: 10.1021/ja900063s. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/19469531">PubMed:19469531</a>] </li><li id="reference-A3946">Beigel J, Bray M: Current and future antiviral therapy of severe seasonal and avian influenza. Antiviral Res. 2008 Apr;78(1):91-102. doi: 10.1016/j.antiviral.2008.01.003. Epub 2008 Feb 4. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/18328578">PubMed:18328578</a>] </li><li id="reference-A10953">Lear JD: Proton conduction through the M2 protein of the influenza A virus; a quantitative, mechanistic analysis of experimental data. FEBS Lett. 2003 Sep 18;552(1):17-22. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/12972146">PubMed:12972146</a>] </li><li id="reference-A10954">Salom D, Hill BR, Lear JD, DeGrado WF: pH-dependent tetramerization and amantadine binding of the transmembrane helix of M2 from the influenza A virus. Biochemistry. 2000 Nov 21;39(46):14160-70. [<a target="_blank" href="http://www.ncbi.nlm.nih.gov/pubmed/11087364">PubMed:11087364</a>] </li></ol></div></div></div><div class="bond card" id="BE0000641"><div class="card-header"><a class="btn btn-drugbank-secondary btn-sm bond-details-link ml-3" href="/polypeptides/Q8TCU5">
\ No newline at end of file \ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment