ASSEMBLY-STATS
Generates report of summary statistics for a genome assembly
URL: https://github.com/sanger-pathogens/assembly-stats
Example
This wrapper can be used in the following way:
rule run_assembly_stats:
input:
#Input assembly
assembly="{sample}.fasta",
output:
#Assembly statistics
assembly_stats="{sample}_stats.txt",
params:
# Tab delimited output, with a header, is set as the default. Other options are available:
# -l <int>
# Minimum length cutoff for each sequence.
# Sequences shorter than the cutoff will be ignored [1]
# -s
# Print 'grep friendly' output
# -t
# Print tab-delimited output
# -u
# Print tab-delimited output with no header line
# If you want to add multiple options just delimit them with a space.
# Note that you can only pick one output format
# Check https://github.com/sanger-pathogens/assembly-stats for more details
extra="-t",
log:
"logs/{sample}.assembly-stats.log",
threads: 1
wrapper:
"v5.8.0-3-g915ba34/bio/assembly-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.
Notes
This tool/wrapper does not handle multi threading
Software dependencies
assembly-stats=1.0.1
Input/Output
Input:
assembly
: Genomic assembly (fasta format)
Output:
assembly_stats
: Assembly statistics (format of your choosing, default = tab-delimited)
Params
extra
: Optional parameters, see assembly-stats official documentation
Code
__author__ = "Max Cummins"
__copyright__ = "Copyright 2021, Max Cummins"
__email__ = "max.l.cummins@gmail.com"
__license__ = "MIT"
from snakemake.shell import shell
from os import path
log = snakemake.log_fmt_shell(stdout=False, stderr=True)
shell(
"assembly-stats"
" {snakemake.params.extra}"
" {snakemake.input.assembly}"
" > {snakemake.output.assembly_stats}"
" {log}"
)