.. _`bio/barrnap`: BARRNAP ======= .. image:: https://img.shields.io/github/issues-pr/snakemake/snakemake-wrappers/bio/barrnap?label=version%20update%20pull%20requests :target: https://github.com/snakemake/snakemake-wrappers/pulls?q=is%3Apr+is%3Aopen+label%3Abio/barrnap BAsic Rapid Ribosomal RNA Predictor **URL**: https://github.com/tseemann/barrnap Example ------- This wrapper can be used in the following way: .. code-block:: python rule barrnap: input: fasta="{sample}.fasta", output: gff="{sample}.gff", fasta="{sample}_hits.fasta", params: kingdom="bac", extra="", threads: 1 log: "logs/barrnap/{sample}.log", wrapper: "v3.0.1/bio/barrnap" 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. Notes ----- Multiple threads can be used during nhmmer search. Software dependencies --------------------- * ``barrnap=0.9`` Input/Output ------------ **Input:** * ``fasta``: query fasta file **Output:** * ``gff``: The rRNA locations in GFF3 format. * ``fasta``: Optional. Fasta file with the hit sequences. Params ------ * ``extra``: additional parameters * ``kingdom``: database to use, either Bacteria:`bac`, Archaea:`arc`, Eukaryota:`euk` or Metazoan Mitochondria:`mito`. Authors ------- * Curro Campuzano Jiménez Code ---- .. code-block:: python """Snakemake wrapper for barrnap.""" __author__ = "Curro Campuzano Jiménez" __copyright__ = "Copyright 2023, Curro Campuzano Jiménez" __email__ = "campuzanocurro@gmail.com" __license__ = "MIT" from snakemake.shell import shell log = snakemake.log_fmt_shell(stdout=False, stderr=True) extra = snakemake.params.get("extra", "") kingdom = snakemake.params.get("kingdom", "bac") fasta_out = snakemake.output.get("fasta") if fasta_out: extra += f" -o {fasta_out}" shell( "barrnap" " --threads {snakemake.threads}" " -k {kingdom}" " {extra}" " < {snakemake.input.fasta}" " > {snakemake.output.gff}" " {log}" ) .. |nl| raw:: html