Skip to content

Instantly share code, notes, and snippets.

@jwaageSnippets
Created December 6, 2012 12:40
Show Gist options
  • Save jwaageSnippets/4224188 to your computer and use it in GitHub Desktop.
Save jwaageSnippets/4224188 to your computer and use it in GitHub Desktop.
Convert bed with sequences to fasta
# substitute cut -f 20 with column containing sequence. Sed bit removes last line
cat file_with_sequences.bed | cut -f 20 | awk '{print; if (FNR % 1 == 0 ) printf ">" NR "\n";}' | sed -n '$!p' > sequences.fasta
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment