RSEQC BAM_STAT.PY
Summarizing mapping statistics of a BAM or SAM file.
URL: https://rseqc.sourceforge.net/#bam-stat-py
Example
This wrapper can be used in the following way:
rule test_rseqc_bam_stat:
input:
"a.bam",
output:
"a.stats",
threads: 1
params:
extra="--mapq 5",
log:
"bastat.log",
wrapper:
"v5.8.0/bio/rseqc/bam_stat"
Note that input, output and log file paths can be chosen freely.
When running with
snakemake --use-conda
the software dependencies will be automatically deployed into an isolated environment before execution.
Notes
Only mapping quality can be provided as optional parameters, since –help and –version do not produce summary.
Software dependencies
rseqc=5.0.4
Input/Output
Input:
Path to BAM/SAM file(s) to summarize.
Output:
Path to summary
Params
extra
: Optional argument basides –input-file
Code
# coding: utf-8
__author__ = "Thibault Dayris"
__mail__ = "thibault.dayris@gustaveroussy.fr"
__copyright__ = "Copyright 2024, Thibault Dayris"
__license__ = "MIT"
from snakemake import shell
extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=False, stderr=True)
shell("bam_stat.py --input-file {snakemake.input[0]} > {snakemake.output} {log}")