*/
package jalview.ext.ensembl;
-import jalview.bin.Cache;
+import jalview.bin.Console;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.GeneLociI;
import jalview.datamodel.GeneLocus;
}
/**
- * Calls the /lookup/id rest service and returns the response as a Map<String, Object>,
- * or null if any error
+ * Calls the /lookup/id rest service and returns the response as a Map<String,
+ * Object>, or null if any error
*
* @param identifier
* @param objectType
* @return
*/
@SuppressWarnings("unchecked")
- protected Map<String, Object> getResult(String identifier, String objectType)
+ protected Map<String, Object> getResult(String identifier,
+ String objectType)
{
List<String> ids = Arrays.asList(new String[] { identifier });
try
{
- return (Map<String, Object>) getJSON(getUrl(identifier, objectType), ids, -1, MODE_MAP, null);
- }
- catch (IOException | ParseException e)
+ return (Map<String, Object>) getJSON(getUrl(identifier, objectType),
+ ids, -1, MODE_MAP, null);
+ } catch (IOException | ParseException e)
{
System.err.println("Error parsing " + identifier + " lookup response "
+ e.getMessage());
boolean reverseStrand = "-1".equals(strand);
int toStart = reverseStrand ? end : start;
int toEnd = reverseStrand ? start : end;
- List<int[]> fromRange = Collections.singletonList(new int[] { 1,
- fromEnd });
- List<int[]> toRange = Collections.singletonList(new int[] { toStart,
- toEnd });
+ List<int[]> fromRange = Collections
+ .singletonList(new int[]
+ { 1, fromEnd });
+ List<int[]> toRange = Collections
+ .singletonList(new int[]
+ { toStart, toEnd });
final Mapping map = new Mapping(
new MapList(fromRange, toRange, 1, 1));
return new GeneLocus(species == null ? "" : species, assembly,
chromosome, map);
} catch (NullPointerException | NumberFormatException e)
{
- Cache.error("Error looking up gene loci: " + e.getMessage());
+ Console.error("Error looking up gene loci: " + e.getMessage());
e.printStackTrace();
}
return null;