Skip to content

Instantly share code, notes, and snippets.

@rec3141
Created April 24, 2018 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rec3141/e2e91e92504260c75921aedc7b57efe2 to your computer and use it in GitHub Desktop.
Save rec3141/e2e91e92504260c75921aedc7b57efe2 to your computer and use it in GitHub Desktop.
extract specific HMMs from FOAM
#!/bin/bash
Search=$1
grep -i $Search FOAM-onto_rel1.tsv > $Search.ont
grep -i $Search FOAM-onto_rel1.tsv | cut -f5 > $Search.ko
wc -l $Search.ko
rm $Search.acc
grep -A1 -f $Search.ko ./../FOAM/FOAM-hmm_rel1a_switch.hmm | grep NAME | tr -s ' ' | cut -f2 -d' ' | sort -u > $Search.acc
wc -l $Search.acc
~/apps/hmmer/binaries/hmmfetch -f ./../FOAM/FOAM-hmm_rel1a_switch.hmm $Search.acc > $Search.hmm
wc -l $Search.hmm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment