EnsemblFeatureType.exon, EnsemblFeatureType.cds,
EnsemblFeatureType.variation };
+ /**
+ * Default constructor (to use rest.ensembl.org)
+ */
+ public EnsemblGene()
+ {
+ super();
+ }
+
+ /**
+ * Constructor given the target domain to fetch data from
+ *
+ * @param d
+ */
+ public EnsemblGene(String d)
+ {
+ super(d);
+ }
+
@Override
public String getDbName()
{
- return "ENSEMBL (GENE)";
+ return "ENSEMBL";
}
@Override
if (isTranscriptIdentifier(query))
{
// we are assuming all transcripts have the same gene parent here
- query = new EnsemblLookup().getParent(queries[0]);
+ query = new EnsemblLookup(getDomain()).getParent(queries[0]);
if (query == null)
{
return null;
*/
if (!isGeneIdentifier(query))
{
- List<String> geneIds = new EnsemblSymbol().getIds(query);
+ List<String> geneIds = new EnsemblSymbol(getDomain()).getIds(query);
if (geneIds.isEmpty())
{
return null;
*/
protected String getGeneIdentifiersForName(String query)
{
- List<String> ids = new EnsemblSymbol().getIds(query);
+ List<String> ids = new EnsemblSymbol(getDomain()).getIds(query);
if (ids != null)
{
for (String id : ids)
List<int[]> mapTo = new ArrayList<int[]>();
mapTo.add(new int[] { 1, transcriptLength });
MapList mapping = new MapList(mappedFrom, mapTo, 1, 1);
- new EnsemblCdna().transferFeatures(gene.getSequenceFeatures(),
- transcript.getDatasetSequence(), mapping, parentId);
+ new EnsemblCdna(getDomain()).transferFeatures(
+ gene.getSequenceFeatures(), transcript.getDatasetSequence(),
+ mapping, parentId);
/*
* fetch and save cross-references
/*
* and finally fetch the protein product and save as a cross-reference
*/
- new EnsemblCdna().addProteinProduct(transcript);
+ new EnsemblCdna(getDomain()).addProteinProduct(transcript);
return transcript;
}