Skip to content

Instantly share code, notes, and snippets.

@macmanes
Created June 25, 2013 16:25
Show Gist options
  • Save macmanes/5859922 to your computer and use it in GitHub Desktop.
Save macmanes/5859922 to your computer and use it in GitHub Desktop.
code to remove reads whose QUAL != SEQ length
#!/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