public SeqSpan getSpan(BioSeq bs) { if (bs.equals(this.seq)) { return this; } else { return null; } }
public boolean getSpan(BioSeq bs, MutableSeqSpan span) { if (bs.equals(this.seq)) { if (forward) { span.set(txMin, txMax, seq); } else { span.set(txMax, txMin, seq); } return true; } else { return false; } }
@Override public Map<String, Object> cloneProperties() { HashMap<String, Object> tprops = new HashMap<>(); tprops.put("id", name); tprops.put("type", type); tprops.put("gene name", geneName); tprops.put("seq id", seq.getID()); tprops.put("forward", forward); if (props != null) { tprops.putAll(props); } return tprops; }
@Override public Object getProperty(String key) { // test for standard gene sym props if (key.equals("id")) { return name; } else if (key.equals("type")) { return getType(); } else if (key.equals("gene name") || key.equals("gene_name")) { return geneName; } else if (key.equals("seq id")) { return seq.getID(); } else if (key.equals("forward")) { return forward; } else if (key.equals("cds min")) { return cdsMin; } else if (key.equals("cds max")) { return cdsMax; } else if (props != null) { return props.get(key); } else { return null; } }