changeset 1:716e406ce6ea draft

planemo upload for repository https://github.com/scottx611x/qualimap2 commit 2e9620ea29d3a146e8669ec0037932d9a2135c79-dirty
author scottx611x
date Wed, 25 Jul 2018 10:59:11 -0400
parents d00bc4d82e90
children 5b36882f6455
files qualimap_bamqc.py test-data/test.bam
diffstat 2 files changed, 46 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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()
Binary file test-data/test.bam has changed