Getting Nucleotide Based From Ucsc Or Ensembl?
Possible Duplicate:
How to get the sequence of a genomic region from UCSC?
Hi all, I wanted to know if there was a way to query UCSC or Ensembl to get the nucleotide at a specific chromosomal location such as
Chromosome 11: 123524481
Thanks in advance.
Ashwin
• 3,373 views
•
link
1 answer
You can use the UCSC DAS server like so (for hg19, as an example):
curl "http://genome.ucsc.edu/cgi-bin/das/hg19/dna?segment=chr11:123524481,123524481"
Which will return:
http://www.biodas.org/dtd/dasdna.dtd">
<DASDNA>
<SEQUENCE id="chr11" start="123524481" stop="123524481" version="1.00">
<DNA length="1">
a
</DNA>
</SEQUENCE>
</DASDNA>
See the UCSC DAS server FAQ for details.
If you have many of these queries, you are better off downloading the fasta sequence and using libraries for R, python, perl, or java that can randomly query fasta files.
• 0 views
•
link
Log in to answer this question.
I see this is closed, but I can't find the duplicate question. You can do this with the Ensembl Perl API: define a 'slice' of one nucleotide, and get the sequence- see this tutorial:
http://www.ensembl.org/info/docs/api/core/core_tutorial.html#slices
Alternatively, 'Export Data' from the Location Tab of the Ensembl browser. You can change your location and export the sequence in the window once you click 'Export Data':
http://www.ensembl.org/Homo_sapiens/Location/View?r=6:133017695-133161157
Of course the Perl API will be the better solution is you have many locations!