Hi All,
I would like to know if there is a way of finding out the parameters of BWA aligned BAM/SAM file. I am aware that samtools might able to tell what is the version of BWA was used by using the following command:
samtools view -H File.bam | grep PG
However, what I am looking for is the parameters that were used in generating the BAM/SAM file such as the quality of the alignment (-q) and/or information about distance, gap and seed random number?
Cheers
2 answers
Two suggestions, ranked in order of increasing difficulty and decreasing sensibility:
1) Contact the producer of the bam and ask them.
2) Extract the reads from the bam and remap a subset of them using different combinations of parameters. Check the alignments against the original bam and try to match them up.
(Note - I didn't say 2 was a good idea, but if you have a lot of free time and CPU cycles and REALLY need the information, it might work).
Log in to answer this question.
This is a very good question. Projects like the 1000G have a comment on top of the files with the exact command-line used for generating the BAM file, but if such information is missing, there should be a way of estimating the parameters used from the list of hits. This would be very useful for reproducibility of results. Looking forward to the answers.