Predict/Estimate/Find Bwa Parameters From Bam Or Sam File
2
0
Entering edit mode
13.0 years ago
Houkto ▴ 220

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

bwa bam sam • 3.5k views
ADD COMMENT
0
Entering edit mode

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.

ADD REPLY
2
Entering edit mode
13.0 years ago

The PG header line can optionally contain a CL field with the command line that was used to run the mapper. If you don't see a CL field in the PG header, then BWA probably doesn't output it. I am afraid there really is no way to obtain the exact command used to run BWA.

ADD COMMENT
1
Entering edit mode
12.7 years ago

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).

ADD COMMENT

Login before adding your answer.

Traffic: 1505 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6