package jalview.datamodel.xdb.embl;
import jalview.analysis.SequenceIdMatcher;
+import jalview.bin.Cache;
import jalview.datamodel.DBRefEntry;
import jalview.datamodel.DBRefSource;
import jalview.datamodel.FeatureProperties;
import jalview.util.MappingUtils;
import jalview.util.StringUtils;
+import java.text.ParseException;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.List;
}
/**
- * Returns the CDS positions as a list of [start, end, start, end...]
+ * Returns the CDS positions as a single array of [start, end, start, end...]
* positions. If on the reverse strand, these will be in descending order.
*
* @param feature
{
return new int[] {};
}
- List<int[]> ranges = DnaUtils.parseLocation(feature.location);
- return ranges == null ? new int[] {} : listToArray(ranges);
+
+ try
+ {
+ List<int[]> ranges = DnaUtils.parseLocation(feature.location);
+ return listToArray(ranges);
+ } catch (ParseException e)
+ {
+ Cache.log.warn(String.format(
+ "Not parsing inexact CDS location %s in ENA %s",
+ feature.location, this.accession));
+ return new int[] {};
+ }
}
/**