/** * This just returns sf.getBioType() (capitalized) unless its a transcript. For transcript it only * returns "Transcript" if its part of a Gene. Otherwise it returns its parent's bio type + * transcript. (should it not tack on the transcript?) Thus a tRNA's transcript would display * "tRNA transcript", where a gene's transcript would display just "Transcript". Should it * actually display "Gene transcript"? rename getTypeForDisplay? */ public String getBioTypeForDisplay(SeqFeatureI sf) { String typeDisplay; if (sf instanceof AnnotatedFeatureI) { typeDisplay = sf.getTopLevelType(); typeDisplay = capitalize(typeDisplay); if (!sf.getTopLevelType().equalsIgnoreCase(sf.getFeatureType())) typeDisplay += " " + capitalize(sf.getFeatureType()); } else { String db = sf.getDatabase(); // Don't bother showing db name if it is "dummy" if (db != null && !db.equals("") && !db.equals("dummy")) typeDisplay = sf.getProgramName() + ":" + sf.getDatabase(); // yet again, the users have requested a change // Now instead of an enumeration it is the range of the feature else { typeDisplay = (sf.getProgramName() + ":" + sf.getStart() + "-" + sf.getEnd()); } } return typeDisplay; }
public boolean keep(SeqFeatureI f) { FeatureProperty fp = Config.getPropertyScheme().getFeatureProperty(f.getTopLevelType()); return displayType.equalsIgnoreCase(fp.getDisplayType()); }