geneIds.add(geneId);
}
}
+ else if (isProteinIdentifier(acc))
+ {
+ String tscriptId = new EnsemblLookup(getDomain()).getParent(acc);
+ if (tscriptId != null)
+ {
+ String geneId = new EnsemblLookup(getDomain())
+ .getParent(tscriptId);
+ if (geneId != null && !geneIds.contains(geneId))
+ {
+ geneIds.add(geneId);
+ }
+ }
+ }
/*
* if given a gene or other external name, lookup and fetch
* the corresponding gene for all model organisms
private final static long VERSION_RETEST_INTERVAL = 1000L * 3600; // 1 hr
+ private static final Regex PROTEIN_REGEX = new Regex(
+ "(ENS)([A-Z]{3}|)P[0-9]{11}$");
+
private static final Regex TRANSCRIPT_REGEX = new Regex(
"(ENS)([A-Z]{3}|)T[0-9]{11}$");
/**
* Answers true if the query matches the regular expression pattern for an
+ * Ensembl protein stable identifier
+ *
+ * @param query
+ * @return
+ */
+ public boolean isProteinIdentifier(String query)
+ {
+ return query == null ? false : PROTEIN_REGEX.search(query);
+ }
+
+ /**
+ * Answers true if the query matches the regular expression pattern for an
* Ensembl gene stable identifier
*
* @param query