.. _`bio/paladin/index`: PALADIN INDEX ============= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/paladin/index?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/paladin/index Index a protein fasta file for mapping with paladin. PALADIN is a protein sequence alignment tool designed for the accurate functional characterization of metagenomes. Example ------- This wrapper can be used in the following way: .. code-block:: python rule paladin_index: input: "prot.fasta", output: "index/prot.fasta.bwt" log: "logs/paladin/prot_index.log" params: reference_type=3 wrapper: "v3.0.1/bio/paladin/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 --------------------- * ``paladin=1.4.6`` * ``samtools=1.18`` Input/Output ------------ **Input:** * protein fasta file **Output:** * file indexed for paladin mapping Authors ------- * N. Tessa Pierce Code ---- .. code-block:: python """Snakemake wrapper for Paladin Index.""" __author__ = "N. Tessa Pierce" __copyright__ = "Copyright 2019, N. Tessa Pierce" __email__ = "ntpierce@gmail.com" __license__ = "MIT" # this wrapper temporarily copies your assembly into the output dir # so that all the paladin output files end up in the desired spot from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=True, stderr=True) extra = snakemake.params.get("extra", "") input_assembly = snakemake.input annotation = snakemake.input.get("gff", "") paladin_index = str(snakemake.output) reference_type = snakemake.params.get("reference_type", "3") assert int(reference_type) in [1, 2, 3, 4] ref_type_cmd = "-r" + str(reference_type) output_base = paladin_index.rsplit(".bwt")[0] shell("cp {input_assembly} {output_base}") shell("paladin index {ref_type_cmd} {output_base} {annotation} {extra} {log}") shell("rm -f {output_base}") .. |nl| raw:: html