Adjusting BAM compression level

mjlarsenmjlarsen Posts: 2Member

Is it possible to adjust the compression level of the BAM-files (like i picard etc). To optimize speed/disk long term disk usage, this would be advantageous when producing temporary/final BAM files, e.g. using the indelrealigner and printreads tools, respectively.

Answers

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,279Administrator, GATK Dev admin

    I'm not aware of any functions within GATK to do that, sorry.

    Geraldine Van der Auwera, PhD

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,279Administrator, GATK Dev admin

    Correction: my colleague points out that you can actually do that with the --bam_compression engine argument.

    Geraldine Van der Auwera, PhD

  • Johan_DahlbergJohan_Dahlberg Posts: 93Member ✭✭✭

    Is this information still correct? I've been looking around for --bam_compression in the engine arguments, but I can't find it.

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,279Administrator, GATK Dev admin

    Hmm, I'm not finding it in any of the engine argument collections either. I see it as a standalone in walkers like SplitSamFile, but my understanding was that it was available to any bam writer. Let me check with the team.

    Geraldine Van der Auwera, PhD

  • Geraldine_VdAuweraGeraldine_VdAuwera Posts: 8,279Administrator, GATK Dev admin

    OK, here's the lowdown. The --bam_compression is not listed anywhere easily accessible; it's one of these arguments that is buried deep inside the code and doesn't show up in the automated docs (because it predates the sane argument collection system). But it is enabled anytime a walker uses a SAMFileWriter (or whatever it is called) as an @Output argument.

    We have a to-do item to refactor that whole bunch of arguments into the engine's argument collection...

    Geraldine Van der Auwera, PhD

  • Johan_DahlbergJohan_Dahlberg Posts: 93Member ✭✭✭

    Great that it's there - since it seems to me that in many case the operations of GATK are IO-bound I want to experiment with a higher compression ratio to reduce writing over the network.

Sign In or Register to comment.