Skip to content

Instantly share code, notes, and snippets.

@renzok
Last active October 7, 2015 13:14
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renzok/c34eea06a86c78c52366 to your computer and use it in GitHub Desktop.
Save renzok/c34eea06a86c78c52366 to your computer and use it in GitHub Desktop.
fasta to TSV
awk 'BEGIN{RS=">"}NR>1{sub("\n","\t"); gsub("\n",""); print $0}'
sed -e ':a;/^>/!N; /\n>/!s/\n//; ta' ncbi |cut -d '|' -f 2 | sed -e :a -e '/[0-9]$/N; s/\n/,/; ta'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment