Created
November 7, 2017 16:52
-
-
Save yannickwurm/45d9c6ed5af34c6902af8f219beeb9e8 to your computer and use it in GitHub Desktop.
fastq into 2 files, separating orphans from paired
This file contains hidden or 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 '^@' in.fq | cut -f 1 -d ' ' | sort | uniq -c > in.fq.counts | |
cat in.fq.counts | egrep " 1 " | ruby -pe 'gsub(/ +1 @/, "")' > in.fq.orphan_ids | |
cat in.fq.counts | egrep " 2 " | ruby -pe 'gsub(/ +2 @/, "")' > in.fq.paired_ids | |
then subseq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment