.. _`bio/filtlong`: FILTLONG ======== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/filtlong?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/filtlong Quality filtering tool for long reads. Example ------- This wrapper can be used in the following way: .. code-block:: python rule filtlong: input: reads = "{sample}.fastq" output: "{sample}.filtered.fastq" params: extra=" --mean_q_weight 5.0", target_bases = 10 log: "logs/filtlong/test/{sample}.log" wrapper: "v3.0.1/bio/filtlong" Note that input, output and log file paths can be chosen freely. When running with .. code-block:: bash snakemake --use-conda the software dependencies will be automatically deployed into an isolated environment before execution. Software dependencies --------------------- * ``filtlong=0.2.1`` Authors ------- * Michael Hall Code ---- .. code-block:: python """Snakemake wrapper for filtlong.""" __author__ = "Michael Hall" __copyright__ = "Copyright 2019, Michael Hall" __email__ = "michael@mbh.sh" __license__ = "MIT" from snakemake.shell import shell # Placeholder for optional parameters extra = snakemake.params.get("extra", "") target_bases = int(snakemake.params.get("target_bases", 0)) if target_bases > 0: extra += " --target_bases {}".format(target_bases) # Formats the log redrection string log = snakemake.log_fmt_shell(stdout=False, stderr=True) # Executed shell command shell("filtlong {extra}" " {snakemake.input.reads} > {snakemake.output} {log}") .. |nl| raw:: html