In that case, Pierre's solution is the best. Since you use Perl, you might like to look at the Bioperl EUtils Cookbook.
Hi everyone,
As input files, I use swissprot files.
I have a perl script which parses all the files to retrieve all the EMBL ids and GeneID from the DR features line for each protein. I would like to know if there's an automatic way to retrieve all the corresponding DNA squences for each protein on the list. Thanks for your help.
Best,
Kirsley
3 answers
From a geneid you can get the information as XML from the NCBI with EFetch. e.g. for GeneId=2.
http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=gene&id=2&retmode=xml
and you can then get the accession of each RNA sequence under: (...)/Gene-commentary_products/Gene-commentary/Gene-commentary_type[@value='mRNA']/Gene-commentary_accession (use XSLT/XPATH to extract this information)
and for each accession you get the DNA sequence with EFetch.
Yes there is if your organism is in Ensembl - BioMart. Here is how you'd use the web interface, assuming that you want human sequences:
- Go to BioMart and click MARTVIEW
- Select database = Ensembl Genes 57
- Select dataset = Homo sapiens genes
- Click "Filters" to the left and open the "Gene" selection
- From the dropdown box, select the IDs that you want to use (e.g. UniProt/TrEMBL)
- Either paste your list in the box or upload the file
- Click "Attributes" to the left, select the "Sequences" radio button and open the "Sequences" tab
- Select what type of sequence (e.g. unspliced transcript)
- Click "Results" (in menu bar, top-left of page)
This will return the first 10 sequences. You can download the rest as a file. There is also programmatic access to Ensembl: Perl API, biomaRt for R Bioconductor.
If this doesn't work for you, the Bioperl library should be able to retrieve sequences given IDs.
Thanks for your answers! I could not try with BioMart as my organism is not present on Ensembl. I forgot to precise that I am working on Chlamydiales.
Log in to answer this question.