BAMTOOLS STATS¶
Use bamtools to collect statistics from a BAM file. For more information about bamtools see bamtools documentation and bamtools source code.
Example¶
This wrapper can be used in the following way:
rule bamtools_stats:
input:
"{sample}.bam"
output:
"{sample}.bamstats"
params:
"-insert" # optional summarize insert size data
log:
"logs/bamtools/stats/{sample}.log"
wrapper:
"0.68.0/bio/bamtools/stats"
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.
Software dependencies¶
bamtools==2.5.1
Authors¶
- Antonie Vietor
Code¶
__author__ = "Antonie Vietor"
__copyright__ = "Copyright 2020, Antonie Vietor"
__email__ = "antonie.v@gmx.de"
__license__ = "MIT"
from snakemake.shell import shell
log = snakemake.log_fmt_shell(stdout=False, stderr=True)
shell(
"(bamtools stats {snakemake.params} -in {snakemake.input[0]} > {snakemake.output[0]}) {log}"
)