I have a bam file of roughly 75GB size. I wanted to check the read quality and so I split it using bedtools bamtofastq command.
bedtools bamtofastq -i t.bam -fq r1.fq -fq2 r2.fq
Now after checking the sizes of the fastq files, I found out that they are of 1.2GB size each. Isn't this unexpected? I was expecting larger file sizes. Where am I going wrong? Thanks!
You don't need to convert the file. The BAM file includes the quality info.
Most common way to check quality is with FastQC and that will accept BAM files.
I wanted to realign my bam files with hg38 reference. Hence I am splitting
Can you try
reformat.sh in=your.bam out1=R1.fq.gz out2=R2.fq.gz
to see if you get files of the right size (from BBMap suite)? You could have a lot of secondary alignments etc and the fastq files you get may look much smaller since reads would be present more than once in your BAM file.Thanks for your reply. I got fasta files after using samtools that were of proper sizes.(~108GB each). So those who encounter this problem please try to use samtools instead.