Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
6ed5817b
Commit
6ed5817b
authored
Apr 24, 2019
by
Piotr Gawron
Browse files
ssl certificate for
https://ctdbase.org/
is invalid, so top using SSL
parent
6489f848
Changes
1
Hide whitespace changes
Inline
Side-by-side
annotation/src/main/java/lcsb/mapviewer/annotation/services/ChemicalParser.java
View file @
6ed5817b
...
...
@@ -70,18 +70,18 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
/**
* Home page of ctd database.
*/
static
final
String
URL
=
"http
s
://ctdbase.org/"
;
static
final
String
URL
=
"http://ctdbase.org/"
;
/**
* URL to get a list of chemicals by disease id.
*/
public
static
final
String
DISEASE_URL
=
"https://ctdbase.org/
detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
public
static
final
String
DISEASE_URL
=
URL
+
"
detail.go?6578706f7274=1&d-1332398-e=5&view=chem&"
+
"type=disease&acc=MESH%3A"
;
/**
* URL to get a list of chemicals by gene id.
*/
public
static
final
String
DISEASE_GENE_URL
=
"https://ctdbase.org/
detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
public
static
final
String
DISEASE_GENE_URL
=
URL
+
"
detail.go?slimTerm=all&6578706f7274=1&qid=3464576&"
+
"d-1332398-e=5&view=disease&type=gene&assnType=curated&acc="
;
/**
...
...
@@ -404,10 +404,10 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
}
if
(
result
!=
null
)
{
MeSH
mesh
=
meshParser
.
getMeSH
(
result
.
getChemicalId
());
if
(
mesh
!=
null
)
{
result
.
addSynonyms
(
mesh
.
getSynonyms
());
if
(
mesh
!=
null
)
{
result
.
addSynonyms
(
mesh
.
getSynonyms
());
}
else
{
logger
.
warn
(
"Problematic mesh id: "
+
result
.
getChemicalId
());
logger
.
warn
(
"Problematic mesh id: "
+
result
.
getChemicalId
());
}
}
...
...
@@ -486,7 +486,7 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
if
(
entrez
==
null
)
{
invalidHgnc
.
add
(
md
);
}
else
{
String
query
=
"https://ctdbase.org/
detail.go?type=gene&view=ixn&chemAcc="
+
chemID
.
getResource
()
+
"&acc="
String
query
=
URL
+
"
detail.go?type=gene&view=ixn&chemAcc="
+
chemID
.
getResource
()
+
"&acc="
+
entrez
.
getResource
();
String
referencesPage
=
getWebPageContent
(
query
);
Matcher
matcher
=
pattern
.
matcher
(
referencesPage
);
...
...
@@ -494,7 +494,7 @@ public class ChemicalParser extends CachableInterface implements IExternalServic
idx
.
add
(
matcher
.
group
(
1
));
}
for
(
String
string
:
idx
)
{
String
query2
=
"https://ctdbase.org/
detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId="
String
query2
=
URL
+
"
detail.go?6578706f7274=1&d-1340579-e=5&type=relationship&ixnId="
+
string
;
String
referencesPage2
=
getWebPageContent
(
query2
);
String
[]
lines
=
referencesPage2
.
split
(
"\n"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment