Created
December 6, 2012 12:40
-
-
Save jwaageSnippets/4224188 to your computer and use it in GitHub Desktop.
Convert bed with sequences to fasta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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