I would like to have the output alignment file of bwa-meth in BAM format instead of SAM format. I think the easiest way is to convert SAM files in BAM files directly at the output of the bwameth.py command with samtools. I tried with the following command:
bwameth.py --threads 16 --reference ref.fa sample_R1.fq.gz sample_R2.fq.gz | samtools view -b -o align.bam
But I always get an error:
[W::sam_read1] Parse error at line 1[main_samview] truncated file.
If I do not convert the output of bwameth.py in BAM, I obtained a normal SAM file so I don't understand what this error means.
Hi,
I would like to have the output alignment file of bwa-meth in BAM format instead of SAM format. I think the easiest way is to convert SAM files in BAM files directly at the output of the bwameth.py command with samtools. I tried with the following command:
bwameth.py --threads 16 --reference ref.fa sample_R1.fq.gz sample_R2.fq.gz | samtools view -b -o align.bam
But I always get an error:[W::sam_read1] Parse error at line 1
[main_samview] truncated file.
If I do not convert the output of bwameth.py in BAM, I obtained a normal SAM file so I don't understand what this error means.Thanks in advance!