Created
June 25, 2013 16:25
-
-
Save macmanes/5859922 to your computer and use it in GitHub Desktop.
code to remove reads whose QUAL != SEQ length
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
#!/bin/bash | |
cat test.fastq | awk 'BEGIN{OFS="\n"} { | |
a[NR % 4] = $0; | |
if(NR % 4 == 0 && length(a[2]) == length(a[0])){ | |
print a[1],a[2],a[3],a[0] | |
} | |
}' > sim.fastq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment