This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Batch Download Enzymes by EC Number

Hi, I have many lists of EC numbers, that look like this:

ec:1.13.11.1; ec:1.14.12.10; ec:1.14.12.13; ec:1.14.13.50; ec:1.21.1.2; ec:1.3.1.25; ec:1.3.1.32; ec:3.1.1.45; ec:3.5.5.6; ec:3.8.1.7; ec:4.2.1.84; ec:5.5.1.1; ec:5.5.1.7; ec:6.2.1.33

And I'd like to download all the corresponding sequences from UniProt (it could be another database, but I like the annotation quality of SwissProt). I've looking for a way to batch download these, but I couldn't find any. It's really easy to do it via website, but it gets annoying when you have many EC numbers.

Is there any script or tool to do it automatically?

Thank you!

ec number uniprot sequence

2 answers

I found a way to do with BASH:

while read line; do
    wget "http://www.uniprot.org/uniprot/?sort=&desc=&compress=no&query="$line"&fil=&format=fasta&force=yes"
done < "list.txt"

But I don't know if there's another, more efficient way to do it

I think you may find useful infos here Convert kegg ids to uniprot ids

Log in to answer this question.