*/
package jalview.ext.ensembl;
-import jalview.util.Platform;
-import jalview.util.StringUtils;
-
import java.io.BufferedReader;
import java.io.DataOutputStream;
import java.io.IOException;
import org.json.simple.parser.ParseException;
+import jalview.util.Platform;
+import jalview.util.StringUtils;
+
/**
* Base class for Ensembl REST service clients
*
InputStream response = connection.getInputStream();
- Platform.timeCheck(null, Platform.TIME_MARK);
+ // Platform.timeCheck(null, Platform.TIME_MARK);
Object ret = Platform.parseJSON(response);
- Platform.timeCheck("EnsemblRestClient.getJSON " + url,
- Platform.TIME_MARK);
+ // Platform.timeCheck("EnsemblRestClient.getJSON " + url,
+ // Platform.TIME_MARK);
return ret;
}
*/
package jalview.ext.ensembl;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.json.simple.parser.ParseException;
+
import jalview.analysis.AlignmentUtils;
import jalview.analysis.Dna;
import jalview.bin.Cache;
import jalview.util.DBRefUtils;
import jalview.util.IntRangeComparator;
import jalview.util.MapList;
-import jalview.util.Platform;
-
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Map;
-
-import org.json.simple.parser.ParseException;
/**
* Base class for Ensembl sequence fetchers
EnsemblFeatures gffFetcher = new EnsemblFeatures(getDomain());
EnsemblFeatureType[] features = getFeaturesToFetch();
- Platform.timeCheck("ESP.getsequencerec1", Platform.TIME_MARK);
-
+ // Platform.timeCheck("ESP.getsequencerec1", Platform.TIME_MARK);
AlignmentI geneFeatures = gffFetcher.getSequenceRecords(accId,
features);
genomicSequence = geneFeatures.getSequenceAt(0);
}
- Platform.timeCheck("ESP.getsequencerec2", Platform.TIME_MARK);
+ // Platform.timeCheck("ESP.getsequencerec2", Platform.TIME_MARK);
if (genomicSequence != null)
{
* fetch and map protein product, and add it as a cross-reference
* of the retrieved sequence
*/
- Platform.timeCheck("ESP.transferFeatures", Platform.TIME_MARK);
+ // Platform.timeCheck("ESP.transferFeatures", Platform.TIME_MARK);
addProteinProduct(querySeq);
}
}
System.err.println(
"Error transferring Ensembl features: " + e.getMessage());
}
- Platform.timeCheck("ESP.addfeat done", Platform.TIME_MARK);
+ // Platform.timeCheck("ESP.addfeat done", Platform.TIME_MARK);
}
/**
protected void getCrossReferences(SequenceI seq)
{
- Platform.timeCheck("ESP. getdataseq ", Platform.TIME_MARK);
+ // Platform.timeCheck("ESP. getdataseq ", Platform.TIME_MARK);
while (seq.getDatasetSequence() != null)
seq = seq.getDatasetSequence();
}
- Platform.timeCheck("ESP. getxref ", Platform.TIME_MARK);
+ // Platform.timeCheck("ESP. getxref ", Platform.TIME_MARK);
EnsemblXref xrefFetcher = new EnsemblXref(getDomain(), getDbSource(),
getEnsemblDataVersion());
seq.addDBRef(self);
- Platform.timeCheck("ESP. seqprox done ", Platform.TIME_MARK);
-
+ // Platform.timeCheck("ESP. seqprox done ", Platform.TIME_MARK);
}
/**
inProgress = false;
throw new JalviewException("ENSEMBL Rest API not available.");
}
- Platform.timeCheck("EnsemblSeqProx.fetchSeq ", Platform.TIME_MARK);
+ // Platform.timeCheck("EnsemblSeqProx.fetchSeq ", Platform.TIME_MARK);
List<SequenceI> seqs = parseSequenceJson(ids);
if (seqs == null)
* for now, assumes only one sequence returned; refactor if needed
* in future to handle a JSONArray with more than one
*/
-
- Platform.timeCheck("ENS seqproxy", Platform.TIME_MARK);
+ // Platform.timeCheck("ENS seqproxy", Platform.TIME_MARK);
Map<String, Object> val = (Map<String, Object>) getJSON(null, ids, -1, MODE_MAP, null);
if (val == null)
return null;
System.err.println("Error processing JSON response: " + e.toString());
// ignore
}
- Platform.timeCheck("ENS seqproxy2", Platform.TIME_MARK);
+ // Platform.timeCheck("ENS seqproxy2", Platform.TIME_MARK);
return result;
}
return false;
}
-
- Platform.timeCheck("ESP. xfer " + sfs.size(), Platform.TIME_MARK);
-
+ // Platform.timeCheck("ESP. xfer " + sfs.size(), Platform.TIME_MARK);
boolean result = transferFeatures(sfs, targetSequence, mapping,
accessionId);
*/
package jalview.fts.service.pdb;
-import jalview.datamodel.SequenceI;
-import jalview.fts.api.FTSData;
-import jalview.fts.api.FTSDataColumnI;
-import jalview.fts.api.FTSRestClientI;
-import jalview.fts.core.FTSRestClient;
-import jalview.fts.core.FTSRestRequest;
-import jalview.fts.core.FTSRestResponse;
-import jalview.util.JSONUtils;
-import jalview.util.MessageManager;
-import jalview.util.Platform;
-
import java.net.URI;
import java.util.ArrayList;
import java.util.Collection;
import com.sun.jersey.api.client.WebResource;
import com.sun.jersey.api.client.config.DefaultClientConfig;
+import jalview.datamodel.SequenceI;
+import jalview.fts.api.FTSData;
+import jalview.fts.api.FTSDataColumnI;
+import jalview.fts.api.FTSRestClientI;
+import jalview.fts.core.FTSRestClient;
+import jalview.fts.core.FTSRestRequest;
+import jalview.fts.core.FTSRestResponse;
+import jalview.util.JSONUtils;
+import jalview.util.MessageManager;
+import jalview.util.Platform;
+
/**
* A rest client for querying the Search endpoint of the PDB API
*
URI uri = webResource.getURI();
- System.out.println(uri);
+ // System.out.println(uri);
// Execute the REST request
ClientResponse clientResponse = webResource