From a23cc416cd520ac6dec6052591575b264f5d25bc Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Sun, 28 Jun 2015 18:46:25 +0100 Subject: [PATCH] JAl-1705 ENSEMBL cDNA type cannot be queried with peptide IDs --- src/jalview/ext/ensembl/EnsemblCdna.java | 14 ++++++++++++++ src/jalview/ext/ensembl/SeqFetcher.java | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/jalview/ext/ensembl/EnsemblCdna.java b/src/jalview/ext/ensembl/EnsemblCdna.java index 4fc80ca..757b3c8 100644 --- a/src/jalview/ext/ensembl/EnsemblCdna.java +++ b/src/jalview/ext/ensembl/EnsemblCdna.java @@ -2,6 +2,8 @@ package jalview.ext.ensembl; import jalview.ext.ensembl.SeqFetcher.EnsemblSeqType; +import com.stevesoft.pat.Regex; + public class EnsemblCdna extends EnsemblSeqProxy { @@ -22,4 +24,16 @@ public class EnsemblCdna extends EnsemblSeqProxy return EnsemblSeqType.CDNA; } + @Override + public Regex getAccessionValidator() + { + return new Regex("((ENST|ENSG|CCDS)[0-9.]{3,})"); + } + + @Override + public String getTestQuery() + { + return "ENST00000288602"; + } + } diff --git a/src/jalview/ext/ensembl/SeqFetcher.java b/src/jalview/ext/ensembl/SeqFetcher.java index b246d0d..9258558 100644 --- a/src/jalview/ext/ensembl/SeqFetcher.java +++ b/src/jalview/ext/ensembl/SeqFetcher.java @@ -125,7 +125,7 @@ public class SeqFetcher arg = "cds"; break; case CDNA: - arg = "CDNA"; + arg = "cdna"; break; case PROTEIN: arg = "protein"; -- 1.7.10.2