If you convert a BAM file to FASTQ that you know has unmapped reads, will it contain all of the original raw sequence data including the unmapped reads? Is there a chance you can lose some of the unmapped reads that was originally present in the FASTQ file? If so is dependent on whoever processed it and how can you find out that this might have occurred?
To verify if reads were lost in the extraction process, I think you should be able to use
samtools view -c
to count the number of reads in the BAM andwc -l
to count the number of lines in FASTQ. The latter should be 4 * the former, as FASTQ has 4 lines per read.Yes/No/Maybe. It simply depends on the parameters used by the software converting it.