How To Save A Mirbase Search Result Into A Fasta File
2
0
Entering edit mode
11.6 years ago

Hi every body

I need to save some search results from miRBase as a FASTA file .

I get the FASTA format html page ; but I don't know how to save it as a FASTA file

• 3.3k views
ADD COMMENT
1
Entering edit mode

what is a "search reason" ?

ADD REPLY
0
Entering edit mode

probably search results

ADD REPLY
0
Entering edit mode
11.6 years ago
David ▴ 740

If the HTML page store the FASTA sequence in a table you can easily scrap the html using R, for example. In the example below I grab the data about all the earthquake in the last 30 days.

library(XML)
eq <- readHTMLTable("http://www.iris.edu/seismon/last30.html")
# extract the second element of the list into a data.frame
eq <- eq[[2]]

Sorry for the irrelevance of the example but I could not find search result in miRBase that display fasta sequences...

You can also do that in Perl, Ruby, Python, Google Docs etc... Search Google for: scrape html table <your programming="" language="" here="">

ADD COMMENT
0
Entering edit mode

Thank you so much ; And what's your idea to do the same in Perl ?

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

You are right , thank you

ADD REPLY
0
Entering edit mode
11.6 years ago
Michael 55k

Do you mean the "Get sequence" button on the page for each entry? Look out for it. The result is actually already a text file, just save (right click, save link as) the result. The link is of the form: http://www.mirbase.org/cgi-bin/get_seq.pl?acc=MI0000223 You can also use wget or curl e.g. wget http://www.mirbase.org/cgi-bin/get_seq.pl?acc=MI0000223 should do it. That way you can also download multiple entries if you have the accessions.

ADD COMMENT
0
Entering edit mode

Thanks for helping

ADD REPLY

Login before adding your answer.

Traffic: 1980 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6