Question: Check BAMs are complete and clean
1
gravatar for John
3.0 years ago by
John12k
Germany
John12k wrote:

Hello all :)

Is there anyway to check if a BAM file is complete and obeys all the BAM standards?
I have created 100 processed BAMs from 100 unprocessed BAMs, and  before I delete the unprocessed data, i'd like to make sure my processed data is OK :)

Of course, there are some things it would be impossible to know was wrong - like I might have mapped all these BAMs to the wrong genome, etc. Im not looking for those sorts of errors. I'm mainly looking for truncated BAMs, or BAMs where the header doesn't match the read data. It might also be nice to know the reads are sorted properly, but it's not a huge concern.

Alternatively, taking a totally different approach, something like a diff of the BAMs (input/output) to tell me what changed during processing. I can then see if that matches up with what i'd expect.

All the best :)

bam • 1.7k views
ADD COMMENTlink modified 3.0 years ago by Pierre Lindenbaum116k • written 3.0 years ago by John12k
2
gravatar for Pierre Lindenbaum
3.0 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum116k wrote:

picard ValidateSamFile

Validates a SAM or BAM file. This tool reports on the validity of a SAM or BAM file relative to the SAM format specification (see http://samtools.github.io/hts-specs/SAMv1.pdf), which is useful for troubleshooting errors encountered with other tools that may be caused by improper formatting.

By default, the tool runs in VERBOSE mode and will exit after finding 100 errors and output them to the console (stdout). It is often practical to start by running this tool with the SUMMARY mode option, which summarizes the "errors" and "warnings". Consequently, specific validation warnings or errors that are of lesser concern can be ignored using the IGNORE and/or IGNORE_WARNINGS arguments in order to focus on blocking errors.

ADD COMMENTlink modified 5 months ago by RamRS20k • written 3.0 years ago by Pierre Lindenbaum116k

Oh thats perfect, since I'm already using Picard for everything else :) Thanks Pierre!

ADD REPLYlink modified 5 months ago by RamRS20k • written 3.0 years ago by John12k
1
gravatar for John
3.0 years ago by
John12k
Germany
John12k wrote:

Although I did search the forum first, I just googled "BAM diff" and BamUtils popped up. I really should have done that before posting, sorry -_-

Hopefully someone else will find this in a forum search now :)

ADD COMMENTlink modified 5 months ago by RamRS20k • written 3.0 years ago by John12k
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: 1333 users visited in the last hour