();
- for (String base1 : codonVariants[0])
- {
- for (String base2 : codonVariants[1])
- {
- for (String base3 : codonVariants[2])
- {
- String codon = base1 + base2 + base3;
- // TODO: report frameshift/insertion/deletion
- // and multiple-base variants?!
- String peptide = codon.contains("-") ? "-" : ResidueProperties
- .codonTranslate(codon);
- if (peptide != null && !result.contains(peptide)
- && !peptide.equals(residue))
- {
- result.add(peptide);
- }
- }
- }
- }
return result;
}
/**
* Answers true if the feature type is either 'NMD_transcript_variant' or
- * 'transcript' or one of its sub-types in the Sequence Ontology. This is
- * needed because NMD_transcript_variant behaves like 'transcript' in Ensembl
+ * 'transcript' (or one of its sub-types in the Sequence Ontology). This is
+ * because NMD_transcript_variant behaves like 'transcript' in Ensembl
* although strictly speaking it is not (it is a sub-type of
* sequence_variant).
+ *
+ * (This test was needed when fetching transcript features as GFF. As we are
+ * now fetching as JSON, all features have type 'transcript' so the check for
+ * NMD_transcript_variant is redundant. Left in for any future case arising.)
*
* @param featureType
* @return
*/
public static boolean isTranscript(String featureType)
{
- return NMD_VARIANT.equals(featureType)
- || SequenceOntology.getInstance().isA(featureType, SequenceOntology.TRANSCRIPT);
+ return SequenceOntologyI.NMD_TRANSCRIPT_VARIANT.equals(featureType)
+ || SequenceOntologyFactory.getInstance().isA(featureType,
+ SequenceOntologyI.TRANSCRIPT);
}
}