JAL-3210 Improvements to eclipse detection. New src tree and SwingJS updated from...
[jalview.git] / src / jalview / ext / ensembl / EnsemblMap.java
index e9f1af1..9789819 100644 (file)
@@ -3,10 +3,8 @@ package jalview.ext.ensembl;
 import jalview.datamodel.AlignmentI;
 import jalview.datamodel.DBRefSource;
 import jalview.datamodel.GeneLociI;
-import jalview.util.JSONUtils;
 import jalview.util.MapList;
 
-import java.io.BufferedReader;
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.net.URL;
@@ -18,18 +16,6 @@ import java.util.Map;
 
 import org.json.simple.parser.ParseException;
 
-/**
- * A client for the Ensembl REST service /map endpoint, to convert from
- * coordinates of one genome assembly to another.
- * <p>
- * Note that species and assembly identifiers passed to this class must be valid
- * in Ensembl. They are not case sensitive.
- * 
- * @author gmcarstairs
- * @see https://rest.ensembl.org/documentation/info/assembly_map
- * @see https://rest.ensembl.org/info/assembly/human?content-type=text/xml
- * @see https://rest.ensembl.org/info/species?content-type=text/xml
- */
 public class EnsemblMap extends EnsemblRestClient
 {
   private static final String MAPPED = "mapped";
@@ -166,7 +152,9 @@ public class EnsemblMap extends EnsemblRestClient
     {
       Iterator<Object> rvals = (Iterator<Object>) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS);
       if (rvals == null)
-         return null;
+      {
+        return null;
+      }
       while (rvals.hasNext())
       {
         // todo check for "mapped"
@@ -233,7 +221,7 @@ public class EnsemblMap extends EnsemblRestClient
     URL url = null;
     try
     {
-      String domain = new EnsemblInfo().getDomain(division);
+      String domain = EnsemblInfo.getDomain(division);
       if (domain != null)
       {
         url = getIdMapUrl(domain, accession, start, end, cdsOrCdna);
@@ -298,7 +286,9 @@ GeneLociI parseIdMappingResponse(URL url, String accession,
     {
       Iterator<Object> rvals = (Iterator<Object>) getJSON(url, null, -1, MODE_ITERATOR, MAPPINGS);
       if (rvals == null)
-         return null;
+      {
+        return null;
+      }
       String assembly = null;
       String chromosome = null;
       int fromEnd = 0;