.. _`bio/kallisto/index`: KALLISTO INDEX ============== .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/kallisto/index?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/kallisto/index Index a transcriptome using kallisto. **URL**: https://github.com/pachterlab/kallisto Example ------- This wrapper can be used in the following way: .. code-block:: python rule kallisto_index: input: fasta="{transcriptome}.fasta", output: index="{transcriptome}.idx", params: extra="", # optional parameters log: "logs/kallisto_index_{transcriptome}.log", threads: 1 wrapper: "v3.0.4/bio/kallisto/index" 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 --------------------- * ``kallisto=0.50.1`` Input/Output ------------ **Input:** * ``fasta``: FASTA file to index **Output:** * ``index``: indexed file Params ------ * ``extra``: Additional parameters Authors ------- * Joël Simoneau Code ---- .. code-block:: python """Snakemake wrapper for Kallisto index""" __author__ = "Joël Simoneau" __copyright__ = "Copyright 2019, Joël Simoneau" __email__ = "simoneaujoel@gmail.com" __license__ = "MIT" from snakemake.shell import shell # Creating log log = snakemake.log_fmt_shell(stdout=True, stderr=True) # Placeholder for optional parameters extra = snakemake.params.get("extra", "") # Allowing for multiple FASTA files fasta = snakemake.input.get("fasta") assert fasta is not None, "input-> a FASTA-file is required" fasta = " ".join(fasta) if isinstance(fasta, list) else fasta shell( "kallisto index" # Tool " --threads {snakemake.threads}" " {extra}" # Optional parameters " --index {snakemake.output.index}" # Output file " {fasta}" # Input FASTA files " {log}" # Logging ) .. |nl| raw:: html