Hi guys =) I'm sorry if this is a repeat but I haven't been able to find an answer using the search field or google.
I am trying to edit a fastq file that has a corrupt line. The read in question is VH00362:5:AAAV5KTHV:1:1210:64850:6869 where the read is just a massive repeat – not the expected 110bp. I am trying to remove two lines from this file and asking around I've been told to use sed
as in
gzip -c file.fastq.gz | sed "45500973,45500974d" > new.fastq.gz
but when I run wc -l
to check the number of lines the results are incoherent, as if it has deleted much more than the two lines I asked. Another issue that I'm seeing with this file is that every time I run gzip
I get a invalid compressed data--format violated
error, which tells me the file is corrupted but I'm doing my best to salvage whatever I can from the file as it is an irreplaceable sample.
Is there another way to simply delete these two lines? Any tool or command you could recommend? Any help is deeply appreciated.
gzip -k file.fastq.gz
report an error? If so, I would first try togunzip
the file, orzcat file.fastq.gz > file.fastq
and then operate on the decompressed one. I am not sure, but I suspect that a corrupted archive might notcat
as expected and I would feel safer getting as much of the file decompressed as I can first. I am not even sure you will get anything, please try and report back. $\endgroup$