1
$\begingroup$

I'm trying to get all C. elegans genes from Wormbase programmatically, as well as all of their alternative gene names. To do this, I'm using intermine.

I was able to obtain all genes, but not ALL alternative names. The code below retrieves the genes' primary identifiers, and their "secondary identifiers."

from intermine.webservice import Service
service = Service("http://intermine.wormbase.org/tools/wormmine/service")

query=service.new_query("Gene")
# 6239 is the taxonId for C. elegans
query.add_constraint("organism.taxonId","=","6239")
query.select("*")

all_wormbase_genes_symbol = list()
all_wormbase_genes_sID = list()

for row in query.rows(start=0):
    # get primary symbol/ID
    all_wormbase_genes_symbol.append(row["symbol"])
    # get secondary ID
    all_wormbase_genes_sID.append(row["secondaryIdentifier"])

I tried to look for other keys in row that might contain this information by first retrieving the list of all possible keys:

k = set()
for row in query.rows(start=0):
    k.update(row.keys())

but none have what I want:

{'Gene.automatedDescription',
 'Gene.biotype',
 'Gene.briefDescription',
 'Gene.description',
 'Gene.geneticPosition',
 'Gene.id',
 'Gene.lastUpdated',
 'Gene.length',
 'Gene.name',
 'Gene.operon',
 'Gene.primaryIdentifier',
 'Gene.score',
 'Gene.scoreType',
 'Gene.secondaryIdentifier',
 'Gene.symbol'}
$\endgroup$
1
  • $\begingroup$ I don't know via intermine, but you can download a file with this information from the FTP at /pub/wormbase/releases/WS287/species/c_elegans/PRJNA13758/annotation/c_elegans.PRJNA13758.WS287.geneOtherIDs.txt.gz (changing to the appropriate WSxxx version) $\endgroup$
    – Alexlok
    Mar 30 at 19:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.