thanks SMK.
I need to download nucleotide sequences according to gene ID so I tried to make some changes but it is showing some error:
#!/bin/bash
# the accession numbers of protein sequences in all the pages
for p in {1..83}; do
curl -s "http://fungene.cme.msu.edu/hmm_detail.spr?hmm_id=721&page=${p}" \
| grep "gpnucldata.jsp?seqgi” \
| sed -r 's|.+>(.+)<\/a><\/td>|\1|' \
>> gi_nucl.txt
done
# Then download the nucleotide sequences, for example:
for gi in $(cat gi_nucl.txt); do
i wget -O ${gi}.fasta "http://www.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=nucleotide&retmode=text&rettype=fasta&id=${gi}"
done
error:
$bash download.sh
download.sh: line 16: unexpected EOF while looking for matching `"'
download.sh: line 18: syntax error: unexpected end of file
Not exactly sure what you are asking. If you
select all sequencesand clickbegin analysisthen it takes you to a new page where there is a download button to get "protein" or "nucleotide" sequence downloads.Edit: You can only download
10000sequences at a time so you will need to chunk through this multiple times.Thanks a lot for all your help SMK, Should I run the whole script like this again, do I also need to delete the previous nucl_urls.txt file.
Hi,
I used the above script and it only able to download 251 sequences and finished with some error:
Thanks
I would check if the URLs are correct by pasting the problematic URLs to the browser and see what the browser returns.