Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add "qualimap bamqc" wrapper (#533)
* first commit of bamqc wrapper * first commit of bamqc wrapper * remove annoation, not used for bamqc * make clear what the output is * state target in call * use only minor version * use snakemake wrapper utils for JAVA OPTS * Update bio/qualimap/bamqc/meta.yaml Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com> * Removed URL and added extra Co-authored-by: Fritjof Lammers <f.lammers@dkfz-heidelberg.de> Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com>
- Loading branch information
1 parent
0486745
commit 3af38c8
Showing
7 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- qualimap =2.2 | ||
- snakemake-wrapper-utils =0.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: qualimap rnaseq | ||
description: | | ||
Run qualimap bamqc to create a QC report for aligned NGS data data. It can be | ||
used for WGS, WES, RNA, ChIP-Seq, etc. | ||
url: http://qualimap.conesalab.org/doc_html/analysis.html#bam-qc | ||
authors: | ||
- Fritjof Lammers | ||
- Brett Copeland | ||
input: | ||
- BAM file of data aligned to genome | ||
output: | ||
- QC report in TXT format (genome_results.txt) | ||
notes: | | ||
* The `extra` param allows for additional program arguments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
rule qualimap: | ||
input: | ||
# BAM aligned, splicing-aware, to reference genome | ||
bam="mapped/a.bam", | ||
output: | ||
directory("qc/a"), | ||
log: | ||
"logs/qualimap/bamqc/a.log", | ||
# optional specification of memory usage of the JVM that snakemake will respect with global | ||
# resource restrictions (https://snakemake.readthedocs.io/en/latest/snakefiles/rules.html#resources) | ||
# and which can be used to request RAM during cluster job submission as `{resources.mem_mb}`: | ||
# https://snakemake.readthedocs.io/en/latest/executing/cluster.html#job-properties | ||
wrapper: | ||
"master/bio/qualimap/bamqc" |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
__author__ = "Fritjof Lammers" | ||
__copyright__ = "Copyright 2022, Fritjof Lammers" | ||
__email__ = "f.lammers@dkfz.de" | ||
|
||
__license__ = "MIT" | ||
|
||
|
||
import os | ||
|
||
from snakemake.shell import shell | ||
from snakemake_wrapper_utils.java import get_java_opts | ||
|
||
java_opts = get_java_opts(snakemake) | ||
|
||
if java_opts: | ||
java_opts_str = f'JAVA_OPTS="{java_opts}"' | ||
else: | ||
java_opts_str = "" | ||
|
||
# unset DISPLAY environment variable to avoid X11 error message issued by qualimap | ||
if os.environ.get("DISPLAY"): | ||
del os.environ["DISPLAY"] | ||
|
||
extra = snakemake.params.get("extra", "") | ||
log = snakemake.log_fmt_shell(stdout=True, stderr=True) | ||
shell( | ||
"{java_opts_str} qualimap bamqc {extra} " | ||
"-bam {snakemake.input.bam} " | ||
"-outdir {snakemake.output} " | ||
"{log}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters