int[] to = new int[] { toStart, toEnd };
/*
- * Jalview always models from dna to protein, so switch values if the
- * GFF mapping is from protein to dna
+ * Jalview always models from dna to protein, so invert
+ * mapping if the GFF mapping is from protein to dna
*/
- if (mappingType == MappingType.PeptideToNucleotide)
+ if (MappingType.isPeptideToDna(mappingType))
{
int[] temp = from;
from = to;
to = temp;
- mappingType = mappingType.getInverse();
+ mappingType = MappingType.CdsToPeptide;
}
int fromRatio = mappingType.getFromRatio();
String namesDelimiter, char nameValueSeparator,
String valuesDelimiter)
{
- Map<String, List<String>> map = new HashMap<String, List<String>>();
+ Map<String, List<String>> map = new HashMap<>();
if (text == null || text.trim().length() == 0)
{
return map;
List<String> vals = map.get(key);
if (vals == null)
{
- vals = new ArrayList<String>();
+ vals = new ArrayList<>();
map.put(key, vals);
}
for (String val : values.split(valuesDelimiter))