Skip to content

Instantly share code, notes, and snippets.

@ilevantis
Last active August 29, 2015 14:21
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 ilevantis/44e37817b385105893f0 to your computer and use it in GitHub Desktop.
Save ilevantis/44e37817b385105893f0 to your computer and use it in GitHub Desktop.
Split a multi fasta from uniprot into sensibly named indidvual entry fasta files
awk 'BEGIN{ FS = "|"}/>/{FS = "|"; filename = substr($3,1,12) }{print $0 > "<output-dir-path>" filename ".fa"}' <multi-fasta-2bsplit>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment