Commit d8eb2eec authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion
Browse files

start rule for prodigal

parent 0669a295
Prodigal manual
Usage: prodigal [-a trans_file] [-c] [-d nuc_file] [-f output_type]
[-g tr_table] [-h] [-i input_file] [-m] [-n] [-o output_file]
[-p mode] [-q] [-s start_file] [-t training_file] [-v]
-a: Write protein translations to the selected file.
-c: Closed ends. Do not allow genes to run off edges.
-d: Write nucleotide sequences of genes to the selected file.
-f: Select output format (gbk, gff, or sco). Default is gbk.
-g: Specify a translation table to use (default 11).
-h: Print help menu and exit.
-i: Specify FASTA/Genbank input file (default reads from stdin).
-m: Treat runs of N as masked sequence; don't build genes across them.
-n: Bypass Shine-Dalgarno trainer and force a full motif scan.
-o: Specify output file (default writes to stdout).
-p: Select procedure (single or meta). Default is single.
-q: Run quietly (suppress normal stderr output).
-s: Write all potential genes (with scores) to the selected file.
-t: Write a training file (if none exists); otherwise, read and use
the specified training file.
-v: Print version number and exit.
__prodigal_exec_command = config.get(
'prodigal', {}
).get('exec_command', 'prodigal')
__prodigal_modules = config.get('prodigal', {}).get('modules')
rule prodigal:
fasta_genes = __prodigal_fasta_genes
genes = __prodigal_genes
exec_command = __prodigal_exec_command,
modules = __prodigal_modules
options = __prodigal_options
command = []
if params.modules:
command.append("module load {params.modules}")
command.append("{params.exec_command} {params.options} -i {input} -d {output.fasta_genes} -o {output.genes}")
shell(" && ".join(command))
configfile: "config.yaml"
# ==== Snakefile path ====
__prodigal_rules = config.get("snakefiles", {}).get("prodigal")
__main_output_dir = config.get('output_dir', 'output')
# ==== Main config ====
SAMPLES = config.get('samples')
__input_dir = config.get('input_dir', 'data')
# ==== Run prodigal ====
__prodigal_output_dir = f"{__main_output_dir}/prodigal"
__prodigal_input = "{dir}/{{sample}}.fa".format(dir=__input_dir, sample="{sample}")
__prodigal_fasta_genes = "{dir}/{{sample}}.fa".format(dir=__prodigal_output_dir, sample="{sample}")
__prodigal_genes = "{dir}/{{sample}}.gbk".format(dir=__prodigal_output_dir, sample="{sample}")
include: __prodigal_rules
rule all:
fasta_genes = expand("{dir}/{{sample}}.fa".format(dir=__prodigal_output_dir), sample=SAMPLES)
genes = expand("{dir}/{{sample}}.gbk".format(dir=__prodigal_output_dir), sample=SAMPLES)
prodigal: /pasteur/zeus/projets/p02/metasig/gitlab/snakemake/tools/prodigal/Snakefile
input_dir: /some/input/directory
output_dir: /some/output/directory
- test_00000
- test_00001
- test_00002
exec_command: prodigal
modules: prodigal
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment