Biostar Beta. Not for public use.
Check BAMs are complete and clean
1
Entering edit mode
15 months ago
John 12k
Germany

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.9k views
ADD COMMENTlink
2
Entering edit mode
15 months ago
John 12k
Germany

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
2
Entering edit mode
12 months ago
France/Nantes/Institut du Thorax - INSE…

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
0
Entering edit mode

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

ADD REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1