Is the tool compares Bam to fasta/q ?
Is there an existing tool to verify that a FASTQ file and a BAM file possess the same reads?
1 answer
Use BamHash designed for this exact operation.
Thank you! Do you happen to know if this tool is meant to take in processed or un-processed bams as input? Also, the result of this tool produces two separate hashes - should both hashes match when comparing to another file? Or is it sufficient for only one of the hashes to match?
What do you mean by processed or un-processed bams? Do you BAM files contain unaligned reads as well or are they excluded?
By processed bams, I mean bams that have been sorted, deduped, and recalibrated. By unprocessed, I mean just a sorted bam file (produced by Picard SortSam). And no, my bam files contain only aligned reads.
If you have removed reads because they did not map, or because they were duplicates, you do not need software to tell you that your bam file does not contain all the reads of the original fastq.
Log in to answer this question.
Maybe you can convert from bam to fastq
bedtools bamtofastqand compare the result with the fastq file usingcomm -12you have that will gave you the reads that exists in both files. Count them and compare the number with each file that will gave you an idea If they are the same.Are you trying to confirm that the fastq and bam are an exact match, or is spotchecking a few entries good enough? Would agreement in the # of reads be sufficient?