Skip to content

Instantly share code, notes, and snippets.

@terrymun
Last active August 18, 2022 09:32
Show Gist options
  • Save terrymun/889f28314643d429496881adbdd40039 to your computer and use it in GitHub Desktop.
Save terrymun/889f28314643d429496881adbdd40039 to your computer and use it in GitHub Desktop.
Making batch request to EMBL-EBI InterPro REST service
#!/bin/bash
i=1
waitevery=30
mkdir -p out
for j in $(find `pwd` -type f -name "*.fa")
do
echo "Iteration: $i; File: $j"
filename=$(basename "$j")
python3 iprscan5_urllib3.py \
--goterms \
--pathways \
--email=<youremail@domain.com> \
--outfile=out/${filename} \
--outformat=tsv \
--quiet \
$j & (( i++%waitevery==0 )) && wait
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment