I align forward and reverse fastq reads to a fasta reference using bwa, then sort the alignment file:
bwa mem -M -t 16 ref_galr2a_AA.fa E01_S49_L001_R1_001.fastq.gz E01_S49_L001_R2_001.fastq.gz | samtools sort > test.bam
Now say I want to convert back this bam to fastq files; I am used to doing:
bedtools bamtofastq -i test.bam -fq forward.fastq -fq2 reverse.fastq
Then put the result in a gunzip
gzip forward.fastq
It creates file forward.fastq.gz
On macOS, I can typically double-click a file like this, and I'll get the fastq file inside (it uses Archive Utility by default).
However, with this one I get:
Unable to expand "forward.fastq.gz" into "folder". (Error 79 - Inappropriate file type or format.)
This does not happen if I unzip/put back in a gzip the original fastq directly.
i.e. say I unzip E01_S49_L001_R1_001.fastq.gz by double-clicking it (Archive Utility), then run:
gzip E01_S49_L001_R1_001.fastq
It generates back E01_S49_L001_R1_001.fastq.gz, which I am able to open with Archive Utility.
So that tells me bedtools bamtofastq is not innocent? What is going on?
what is the output of
and the output of
gives
Does not give anything at all, weirdly.
Of note;
Works fine. It gives
forward.fastq
, which I can read in a text editor.So the issue is somehow related to Archive Utility? But only on fastq.gz generated from fastq generated from
bedtools bamtofastq
? Awkwardmy interest perked up - I'd like to see that file that cannot be decompressed -
it would be quite the achievement and a world first -
if true - however unlikely that is - I find fitting that a bioinformatics program would create that file
Haha, thanks for your interest.
Can you download it here?