# HG changeset patch # User scottx611x # Date 1532530751 14400 # Node ID 716e406ce6ea30f25db9876093cc3a8ca919bbb7 # Parent d00bc4d82e90a70b40f2658d43043f3647d2ea9e planemo upload for repository https://github.com/scottx611x/qualimap2 commit 2e9620ea29d3a146e8669ec0037932d9a2135c79-dirty diff -r d00bc4d82e90 -r 716e406ce6ea qualimap_bamqc.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/qualimap_bamqc.py Wed Jul 25 10:59:11 2018 -0400 @@ -0,0 +1,46 @@ +#!/usr/bin/env python +from __future__ import print_function +import argparse +from subprocess import check_call, CalledProcessError +import sys +import logging + +log = logging.getLogger(__name__) + + +def qualimap_bamqc(bam_filename, genomecov_file, out_dir, jv_mem_size): + qualimap_command = [ + "qualimap", "bamqc", + "-bam " + bam_filename, + "-oc " + genomecov_file, + "-outdir " + out_dir, + "--java-mem-size=" + jv_mem_size + ] + + try: + check_call(qualimap_command) + except CalledProcessError: + print("Error running the qualimap bamqc", file=sys.stderr) + + +def main(): + parser = argparse.ArgumentParser( + description="Generate Bam Quality Statistics" + ) + parser.add_argument('--input_file') + parser.add_argument('--out_genome_file', default="genome_results.txt") + parser.add_argument('--out_dir') + parser.add_argument('--java_mem_size', default="8G") + + args = parser.parse_args() + + qualimap_bamqc( + args.input_file, + args.out_genome_file, + args.out_dir, + args.java_mem_size + ) + + +if __name__ == "__main__": + main() diff -r d00bc4d82e90 -r 716e406ce6ea test-data/test.bam Binary file test-data/test.bam has changed