git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-629 Set Metal as default LAF for build server tests
[jalview.git]
/
src
/
jalview
/
ext
/
ensembl
/
EnsemblSequenceFetcher.java
diff --git
a/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java
b/src/jalview/ext/ensembl/EnsemblSequenceFetcher.java
index
0aaaf93
..
66b0e3b
100644
(file)
--- a/
src/jalview/ext/ensembl/EnsemblSequenceFetcher.java
+++ b/
src/jalview/ext/ensembl/EnsemblSequenceFetcher.java
@@
-20,6
+20,7
@@
*/
package jalview.ext.ensembl;
*/
package jalview.ext.ensembl;
+import jalview.analysis.AlignmentUtils;
import jalview.bin.Cache;
import jalview.datamodel.DBRefSource;
import jalview.ws.seqfetcher.DbSourceProxyImpl;
import jalview.bin.Cache;
import jalview.datamodel.DBRefSource;
import jalview.ws.seqfetcher.DbSourceProxyImpl;
@@
-41,7
+42,8
@@
abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
// domain properties default values:
protected static final String DEFAULT_ENSEMBL_BASEURL = "https://rest.ensembl.org";
// domain properties default values:
protected static final String DEFAULT_ENSEMBL_BASEURL = "https://rest.ensembl.org";
- protected static final String DEFAULT_ENSEMBL_GENOMES_BASEURL = "https://rest.ensemblgenomes.org";
+ // ensemblgenomes REST service merged to ensembl 9th April 2019
+ protected static final String DEFAULT_ENSEMBL_GENOMES_BASEURL = DEFAULT_ENSEMBL_BASEURL;
/*
* accepts ENSG/T/E/P with 11 digits
/*
* accepts ENSG/T/E/P with 11 digits
@@
-64,7
+66,7
@@
abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
protected static final String PARENT = "Parent";
protected static final String PARENT = "Parent";
- protected static final String ID = "id";
+ protected static final String JSON_ID = AlignmentUtils.VARIANT_ID; // "id";
protected static final String OBJECT_TYPE = "object_type";
protected static final String OBJECT_TYPE = "object_type";
@@
-90,10
+92,10
@@
abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
* the default domain names may be overridden in .jalview_properties;
* this allows an easy change from http to https in future if needed
*/
* the default domain names may be overridden in .jalview_properties;
* this allows an easy change from http to https in future if needed
*/
- ensemblDomain = Cache.getDefault(ENSEMBL_BASEURL,
- DEFAULT_ENSEMBL_BASEURL);
+ ensemblDomain = Cache
+ .getDefault(ENSEMBL_BASEURL, DEFAULT_ENSEMBL_BASEURL).trim();
ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
ensemblGenomesDomain = Cache.getDefault(ENSEMBL_GENOMES_BASEURL,
- DEFAULT_ENSEMBL_GENOMES_BASEURL);
+ DEFAULT_ENSEMBL_GENOMES_BASEURL).trim();
domain = ensemblDomain;
}
domain = ensemblDomain;
}
@@
-101,10
+103,6
@@
abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
public String getDbSource()
{
// NB ensure Uniprot xrefs are canonicalised from "Ensembl" to "ENSEMBL"
public String getDbSource()
{
// NB ensure Uniprot xrefs are canonicalised from "Ensembl" to "ENSEMBL"
- if (ensemblGenomesDomain.equals(getDomain()))
- {
- return DBRefSource.ENSEMBLGENOMES;
- }
return DBRefSource.ENSEMBL;
}
return DBRefSource.ENSEMBL;
}
@@
-168,6
+166,6
@@
abstract class EnsemblSequenceFetcher extends DbSourceProxyImpl
protected void setDomain(String d)
{
protected void setDomain(String d)
{
- domain = d;
+ domain = d == null ? null : d.trim();
}
}
}
}