I see several issues in your post:
- first of all if you want to remove a entire read from a fastq file, you have to remove 4 lines and not only 2, because the base qualities are also encoded in the file (see here for a description of the fastq format: FASTQ format - Wikipedia).
-
Code:
gzip -c file
Code:
gzip -d file
Code:
gunzip file
- The 'sed' command should be written with single quotation mark like this:
Code:
sed '45500973,45500974d'
Code:
sed '45500973,45500976' file.fastq
I would rather perform the decompression and compression steps separately from the editing as the piping can sometimes lead to issues.
Hope that'll help and good luck!
Leave a comment: