Question: Predict/Estimate/Find Bwa Parameters From Bam Or Sam File
0
gravatar for Houkto
8.0 years ago by
Houkto210
Houkto210 wrote:

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

bam sam bwa • 2.4k views
ADD COMMENTlink modified 5.8 years ago by Biostar ♦♦ 20 • written 8.0 years ago by Houkto210

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 REPLYlink written 7.7 years ago by Arelicorlaior50
2
gravatar for Damian Kao
8.0 years ago by
Damian Kao15k
USA
Damian Kao15k wrote:

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 COMMENTlink written 8.0 years ago by Damian Kao15k
1
gravatar for Chris Miller
7.7 years ago by
Chris Miller21k
Washington University in St. Louis, MO
Chris Miller21k wrote:

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 COMMENTlink written 7.7 years ago by Chris Miller21k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1214 users visited in the last hour