import jalview.api.AlignmentViewPanel;
import jalview.api.FeatureColourI;
-import jalview.bin.Cache;
import jalview.datamodel.GraphLine;
import jalview.datamodel.features.FeatureAttributes;
import jalview.datamodel.features.FeatureAttributes.Datatype;
*/
public class FeatureTypeSettings extends JalviewDialog
{
- /*
- * 'top level' Sequence Ontology terms
- */
- private final static String SO_ROOTS = "sequence_variant,sequence_attribute,sequence_collection,sequence_feature";
-
private final static String LABEL_18N = MessageManager
.getString("label.label");
* parent of the current type
*/
SequenceOntologyI so = SequenceOntologyFactory.getInstance();
- String[] roots = Cache.getDefault("SO_ROOTS", SO_ROOTS).split(",");
- rootSOTerm = null;
- for (String root : roots)
- {
- if (so.isA(featureType, root.trim()))
- {
- rootSOTerm = root;
- break;
- }
- }
- if (rootSOTerm == null)
+ List<String> roots = so.getRootParents(featureType);
+ if (roots == null || roots.size() > 1)
{
/*
- * feature type is not an SO term
+ * feature type is not an SO term, or has ambiguous root
*/
return peers;
}
+ rootSOTerm = roots.get(0);
List<String> types = fr.getRenderOrder();
for (String type : types)