This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Retrieving Gene Sequence

Is there any program codes to retrieve a gene sequence just passing organism name and gene name as argument variables?

perl gene sequence

You tagged this question 'perl'. Do you want to use Perl for this purpose?

You tagged this question 'perl'. Do you want to use Perl for this purpose? The answer is yes, but there are lots of ways to do this - many of which have been covered by other questions here.

Yes i want to use perl for this. This is what I want to do

Ex. I want to retrieve the gene sequence of the 'pvpA' gene in 'Mycoplasma gallisepticum Rlow' by just passing the gene name and organism name as command line arguments.

Thanks much

Then you need to write a script, based around the Ensembl or Bioperl libraries, as explained in the answers given.

4 answers

Check out biomart.

There are some good questions/answers on this site with further info. for example, this one has an example close to what you are requesting.

It has a perl api and good docs (pdf)

There are dozens of ways to retrieve sequences using search terms, both programmatically and via web interfaces. When asking this kind of question, you need to think about:

  • what type of sequence to retrieve; by "gene sequence", do you mean a full transcript (introns, UTRs), just the coding mRNA or the genomic coordinates?
  • what you mean by "gene name"; there are many identifiers that can be used e.g. HGNC symbols, RefSeq IDs...

One of the best solutions, as mentioned by Brent, is BioMart. If you're using Perl, you may also want to look at a Bioperl solution. A good starting point is "Accessing sequence data from local and remote databases" in the Bioperl tutorial.

If you are happy to do this using an api then ensembl and their public databases (either via mysql or amazon AWS) might be a good starting point

You can get a lot more than the gene sequences this way to

http://www.ensembl.org/info/data/api.html

Hi,

I am just wanted to know, whether we can retrieve a single gene sequence from the genbank or any database by simply querying the name of organism and the gene name for Ex. I want to retrieve the gene sequence of the 'gapA' gene in Mycoplasma gallisepticum Rlow

Any thoughts?

Log in to answer this question.