import jalview.io.FileParse;
import jalview.io.gff.SequenceOntologyFactory;
import jalview.io.gff.SequenceOntologyI;
+import jalview.util.Comparison;
import jalview.util.DBRefUtils;
import jalview.util.MapList;
{
private static final String ALLELES = "alleles";
- protected static final String CONSEQUENCE_TYPE = "consequence_type";
-
protected static final String PARENT = "Parent";
protected static final String ID = "ID";
GENOMIC("genomic"),
/**
- * type=cdna to fetch dna including UTRs
+ * type=cdna to fetch coding dna including UTRs
*/
CDNA("cdna"),
{
complement.append(",");
}
- if ("HGMD_MUTATION".equalsIgnoreCase(allele))
+
+ /*
+ * some 'alleles' are actually descriptive terms
+ * e.g. HGMD_MUTATION, PhenCode_variation
+ * - we don't want to 'reverse complement' these
+ */
+ if (!Comparison.isNucleotideSequence(allele, true))
{
complement.append(allele);
}
else
{
- char[] alleles = allele.toCharArray();
- for (int i = alleles.length - 1; i >= 0; i--)
+ for (int i = allele.length() - 1; i >= 0; i--)
{
- complement.append(Dna.getComplement(alleles[i]));
+ complement.append(Dna.getComplement(allele.charAt(i)));
}
}
}