jalview.release=releases/Release_2_10_2b1_Branch
-jalview.version=2.10.2b1
+jalview.version=2.10.2b2
<tr>
<td width="60" nowrap>
<div align="center">
+ <strong><a name="Jalview.2.10.2b2">2.10.2b2</a><br />
+ <em>2/10/2017</em></strong>
+ </div>
+ </td>
+ <td><div align="left">
+ <em>New features in Jalview Desktop</em>
+ <ul>
+ <li>
+ <!-- JAL-2748 -->Uniprot Sequence Fetcher now uses web API at uniprot.org
+ <!-- JAL-2745 -->HTTPS used for all connections to ebi.ac.uk
+ </li>
+
+ </ul>
+ </div></td>
+ <td><div align="left">
+ <em></em>
+ <ul>
+ <li>
+ <!-- -->
+ </li>
+ </ul>
+ </div></td>
+ </tr>
+ <tr>
+ <td width="60" nowrap>
+ <div align="center">
<strong><a name="Jalview.2.10.2b1">2.10.2b1</a><br />
<em>7/9/2017</em></strong>
</div>
</li>
</ul>
</div></td>
-
+ </tr>
<tr>
<td width="60" nowrap>
<div align="center">
</head>
<body>
<p>
- <strong>Jalview 2.10.2b1 bugfix release</strong>
+ <strong>Jalview 2.10.2b2 bugfix release</strong>
</p>
<p>
- This is patch release for 2.10.2. See the <a
- href="releases.html#Jalview.2.10.2b1">release notes</a> for full
- details about the bugs addressed. This release also introduces
- additional improvements to the overview panel, and patches for
- several minor issues including the ability to correctly recover
- cross-references for Uniprot protein sequences from Ensembl.
+ This is patch release for 2.10.2. See the
+ <a href="releases.html#Jalview.2.10.2b2">release notes</a> for full
+ details about the bugs addressed. This second patch release fixes
+ problems with the Uniprot sequence fetcher and introduces secure SSL
+ connections for access to EMBL-EBI resources. The previous patch
+ release introduced additional improvements to the overview panel,
+ and patches for several minor issues including the ability to
+ correctly recover cross-references for Uniprot protein sequences
+ from Ensembl.
</p>
<p>
<strong>What's new in Jalview 2.10.2 ?</strong>
private static FTSRestClientI instance = null;
- public static final String PDB_SEARCH_ENDPOINT = "http://www.ebi.ac.uk/pdbe/search/pdb/select?";
+ public static final String PDB_SEARCH_ENDPOINT = "https://www.ebi.ac.uk/pdbe/search/pdb/select?";
protected PDBFTSRestClient()
{
* Default sequence URL link string for EMBL-EBI search
*/
public static final String DEFAULT_STRING = DEFAULT_LABEL
- + "|http://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$";
+ + "|https://www.ebi.ac.uk/ebisearch/search.ebi?db=allebi&query=$SEQUENCE_ID$";
/*
* not instantiable
import jalview.datamodel.SequenceI;
import jalview.datamodel.UniprotEntry;
import jalview.datamodel.UniprotFile;
-import jalview.ws.ebi.EBIFetchClient;
import jalview.ws.seqfetcher.DbSourceProxyImpl;
-import java.io.File;
-import java.io.FileReader;
+import java.io.InputStream;
+import java.io.InputStreamReader;
import java.io.Reader;
import java.net.URL;
+import java.net.URLConnection;
import java.util.ArrayList;
import java.util.Vector;
queries = queries.toUpperCase().replaceAll(
"(UNIPROT\\|?|UNIPROT_|UNIREF\\d+_|UNIREF\\d+\\|?)", "");
AlignmentI al = null;
- EBIFetchClient ebi = new EBIFetchClient();
- // uniprotxml parameter required since december 2007
- // uniprotkb dbname changed introduced december 2008
- File file = ebi.fetchDataAsFile("uniprotkb:" + queries, "uniprotxml",
- "xml");
+
+ String downloadstring = "http://www.uniprot.org/uniprot/" + queries
+ + ".xml";
+ URL url = null;
+ URLConnection urlconn = null;
+
+ url = new URL(downloadstring);
+ urlconn = url.openConnection();
+ InputStream istr = urlconn.getInputStream();
Vector<UniprotEntry> entries = getUniprotEntries(
- new FileReader(file));
+ new InputStreamReader(istr, "UTF-8"));
if (entries != null)
{
- ArrayList<SequenceI> seqs = new ArrayList<SequenceI>();
+ ArrayList<SequenceI> seqs = new ArrayList<>();
for (UniprotEntry entry : entries)
{
seqs.add(uniprotEntryToSequenceI(entry));
return al;
} catch (Exception e)
{
- stopQuery();
throw (e);
+ } finally
+ {
+ stopQuery();
}
}
sequence.setDescription(getUniprotEntryDescription(entry));
final String dbVersion = getDbVersion();
- ArrayList<DBRefEntry> dbRefs = new ArrayList<DBRefEntry>();
+ ArrayList<DBRefEntry> dbRefs = new ArrayList<>();
for (String accessionId : entry.getAccession())
{
DBRefEntry dbRef = new DBRefEntry(DBRefSource.UNIPROT, dbVersion,
dbRefs.add(dbRef);
}
- Vector<PDBEntry> onlyPdbEntries = new Vector<PDBEntry>();
+ Vector<PDBEntry> onlyPdbEntries = new Vector<>();
for (PDBEntry pdb : entry.getDbReference())
{
DBRefEntry dbr = new DBRefEntry();
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
{
URL rcall = new URL(url);
- InputStream is = new BufferedInputStream(rcall.openStream());
+ HttpURLConnection conn = (HttpURLConnection) rcall.openConnection();
+ int responseCode = conn.getResponseCode();
+ if (responseCode != 200)
+ {
+ System.err.println("Warning: response code " + responseCode
+ + " for " + url);
+ }
+ InputStream is = new BufferedInputStream(conn.getInputStream());
if (outFile != null)
{
FileOutputStream fio = new FileOutputStream(outFile);
if (database.equalsIgnoreCase(DBRefSource.EMBL)
|| database.equalsIgnoreCase(DBRefSource.EMBLCDS))
{
- url = "http://www.ebi.ac.uk/ena/data/view/" + ids.toLowerCase()
+ url = "https://www.ebi.ac.uk/ena/data/view/" + ids.toLowerCase()
+ (format != null ? "&" + format : "");
}
else
{
- url = "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/"
+ url = "https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/"
+ database.toLowerCase() + "/" + ids.toLowerCase()
+ (format != null ? "/" + format : "");
}
/*
* EMBL
*/
- assertEquals("http://www.ebi.ac.uk/ena/data/view/x53838&display=xml",
+ assertEquals("https://www.ebi.ac.uk/ena/data/view/x53838&display=xml",
EBIFetchClient.buildUrl("X53838", "EMBL", "display=xml"));
/*
* EMBLCDS
*/
- assertEquals("http://www.ebi.ac.uk/ena/data/view/caa37824&display=xml",
+ assertEquals("https://www.ebi.ac.uk/ena/data/view/caa37824&display=xml",
EBIFetchClient.buildUrl("CAA37824", "EMBL", "display=xml"));
/*
- * Uniprot
- */
- assertEquals(
- "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/uniprot/p00340/uniprotxml",
- EBIFetchClient.buildUrl("P00340", "UNIPROT", "uniprotxml"));
-
- /*
* PDB / pdb
*/
- assertEquals("http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/pdb",
+ assertEquals("https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/pdb",
EBIFetchClient.buildUrl("3A6S", "PDB", "pdb"));
/*
* PDB / mmCIF
*/
assertEquals(
- "http://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/mmCIF",
+ "https://www.ebi.ac.uk/Tools/dbfetch/dbfetch/pdb/3a6s/mmCIF",
EBIFetchClient.buildUrl("3A6S", "PDB", "mmCIF"));
}