VG SIM

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

Samples sequences from the xg-indexed graph.

Example

This wrapper can be used in the following way:

rule sim:
    input:
        xg="x.xg"
    output:
        reads="reads/x.seq"
    params:
        "--read-length 100 --num-reads 100 -f"
    log:
        "logs/vg/sim/x.log"
    threads:
        4
    wrapper:
        "v4.6.0/bio/vg/sim"

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

  • vg=1.59.0

Authors

  • Ali Ghaffaari

Code

__author__ = "Ali Ghaffaari"
__copyright__ = "Copyright 2018, Ali Ghaffaari"
__email__ = "ghaffari@mpi-inf.mpg.de"
__license__ = "MIT"


from snakemake.shell import shell

log = snakemake.log_fmt_shell(stdout=False)

shell(
    "(vg sim {snakemake.params} --xg-name {snakemake.input.xg}"
    " --threads {snakemake.threads} > {snakemake.output.reads}) {log}"
)