SEQKIT STATS

https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/seqkit/stats?label=version%20update%20pull%20requests

Run SeqKit stats to get simple statistics of FASTA/Q files.

URL: https://bioinf.shenwei.me/seqkit/usage/#stats

Example

This wrapper can be used in the following way:

rule seqkit_stats:
    input:
        fastx="reads/{sample}.fastq",
    output:
        stats="out/stats/{sample}.tsv",
    log:
        "logs/stats/{sample}.log",
    params:
        extra="--all --tabular",
    threads: 2
    wrapper:
        "v1.25.0/bio/seqkit/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

  • The extra param allows for additional program arguments.

Software dependencies

  • seqkit=2.3.1

Input/Output

Input:

  • fastx: Input FASTA/Q file

Output:

  • stats: Output stats file

Params

  • extra: Optional parameters

Authors

  • Filipe G. Vieira

Code

__author__ = "Filipe G. Vieira"
__copyright__ = "Copyright 2023, Filipe G. Vieira"
__license__ = "MIT"

from snakemake.shell import shell

extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)


shell(
    "seqkit stats"
    " --threads {snakemake.threads}"
    " {extra}"
    " --out-file {snakemake.output.stats}"
    " {snakemake.input.fastx}"
    " {log}"
)