import com.stevesoft.pat.Regex;
+/**
+ * A client to fetch protein translated sequence for an Ensembl identifier
+ *
+ * @author gmcarstairs
+ *
+ */
public class EnsemblProtein extends EnsemblSeqProxy
{
- // TODO modify to accept other species e.g. ENSMUSPnnn
+ /*
+ * accepts ENSP with 11 digits
+ * or ENSMUSP or similar for other species
+ * or CCDSnnnnn.nn with at least 3 digits
+ */
private static final Regex ACCESSION_REGEX = new Regex(
- "(ENSP|CCDS)[0-9.]{3,}$");
+ "(ENS([A-Z]{3}|)P[0-9]{11}$)" + "|" + "(CCDS[0-9.]{3,}$)");
private static final List<String> CROSSREFS = Arrays.asList(new String[] {
"PDB", "Uniprot/SPTREMBL", "Uniprot/SWISSPROT" });
+ /**
+ * Default constructor (to use rest.ensembl.org)
+ */
public EnsemblProtein()
{
super();
}
+ /**
+ * Constructor given the target domain to fetch data from
+ *
+ * @param d
+ */
+ public EnsemblProtein(String d)
+ {
+ super(d);
+ }
+
@Override
public String getDbName()
{