Created
February 3, 2016 12:23
-
-
Save stianlagstad/d009961e0eda737b3126 to your computer and use it in GitHub Desktop.
Extract specific sequences from a fastq file with this bash oneliner
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
egrep -A 3 '@readid1|readid2|readid3' reads.fastq | sed '/^--$/d' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-A 3
fetches the matching line and the next three lines.sed '/^--$/d'
will remove the "--" separator lines added automatically by using the-A
parameter withegrep
.