Skip to content

Instantly share code, notes, and snippets.

@jrherr
Created May 18, 2015 17:47
Show Gist options
  • Save jrherr/b81199694fe0fe9c6512 to your computer and use it in GitHub Desktop.
Save jrherr/b81199694fe0fe9c6512 to your computer and use it in GitHub Desktop.
remove redundant sequences from fasta file
sed -e '/^>/s/$/@/' -e 's/^>/#/' name.fasta | tr -d '\n' | tr "#" "\n" | tr "@" "\t" | sort -u -t ' ' -f -k 2,2 | sed -e 's/^/>/' -e 's/\t/\n/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment