import jalview.io.gff.SequenceOntologyFactory;
import jalview.io.gff.SequenceOntologyI;
+import java.util.HashMap;
+import java.util.Map;
+
import com.stevesoft.pat.Regex;
/**
private static final Regex ACCESSION_REGEX = new Regex(
"(ENS([A-Z]{3}|)[TG][0-9]{11}$)" + "|" + "(CCDS[0-9.]{3,}$)");
+ private static Map<String, String> params = new HashMap<String, String>();
+
+ static
+ {
+ params.put("object_type", "transcript");
+ }
+
/*
* fetch exon features on genomic sequence (to identify the cdna regions)
* and cds and variation features (to retain)
return false;
}
+ /**
+ * Parameter object_type=cdna added to ensure cdna and not peptide is returned
+ * (JAL-2529)
+ */
+ @Override
+ protected Map<String, String> getAdditionalParameters()
+ {
+ return params;
+ }
+
}
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
/**
* Base class for Ensembl sequence fetchers
urlstring.append("?type=").append(getSourceEnsemblType().getType());
urlstring.append(("&Accept=text/x-fasta"));
+ Map<String, String> params = getAdditionalParameters();
+ if (params != null)
+ {
+ for (Entry<String, String> entry : params.entrySet())
+ {
+ urlstring.append("&").append(entry.getKey()).append("=")
+ .append(entry.getValue());
+ }
+ }
+
URL url = new URL(urlstring.toString());
return url;
}
/**
+ * Override this method to add any additional x=y URL parameters needed
+ *
+ * @return
+ */
+ protected Map<String, String> getAdditionalParameters()
+ {
+ return null;
+ }
+
+ /**
* A sequence/id POST request currently allows up to 50 queries
*
* @see http://rest.ensembl.org/documentation/info/sequence_id_post
Alignment ral = new Alignment(sqs);
for (SequenceI tr : trueSqs)
{
- // 12/05/2017 failing for EnsemblCdna which is returning protein
- // Ensembl helpdesk ticket 187998
SequenceI[] rseq;
Assert.assertNotNull(
rseq = ral.findSequenceMatch(tr.getName()),