Query STRING

gene="$1" limit="$3" score="$2"

mscore=`echo $score  \ | awk -v search="$score" \ '{print search*1000}'`

wget "http://string-db.org/api/tsv/resolve?identifier=$gene&species=9606" \ -O $gene.ID

id=`cat $gene.ID        \ | grep -P "\t$gene\t" \ | cut -f 1`

wget "http://string-db.org/api/psi-mi-tab/interactionsList? identifiers=$id&required_score=$mscore&limit=$limit&network_flavor=evidence&species=9606" \ -O $gene.STRING.all

cat $gene.STRING.all \ | grep $gene     \ | cut -f 3,4,15  \ | cut -f 1 -d'|' \ > $gene.STRING.txt

rm -f             \ $gene.STRING.all \ $gene.ID

perl -0777 -i -pe "s/score://g" $gene.STRING.txt