sandragodinhosilva/melange

Melange - Snakemake workflow for genome annotation

Overview

Topics: genomics snakemake-workflows snakemake workflow

Latest release: None, Last update: 2023-05-17

Linting: linting: failed, Formatting:formatting: failed

Deployment

Step 1: Install Snakemake and Snakedeploy

Snakemake and Snakedeploy are best installed via the Mamba package manager (a drop-in replacement for conda). If you have neither Conda nor Mamba, it is recommended to install Miniforge. More details regarding Mamba can be found here.

When using Mamba, run

mamba create -c conda-forge -c bioconda --name snakemake snakemake snakedeploy

to install both Snakemake and Snakedeploy in an isolated environment. For all following commands ensure that this environment is activated via

conda activate snakemake

Step 2: Deploy workflow

With Snakemake and Snakedeploy installed, the workflow can be deployed as follows. First, create an appropriate project working directory on your system and enter it:

mkdir -p path/to/project-workdir
cd path/to/project-workdir

In all following steps, we will assume that you are inside of that directory. Then run

snakedeploy deploy-workflow https://github.com/sandragodinhosilva/melange . --tag None

Snakedeploy will create two folders, workflow and config. The former contains the deployment of the chosen workflow as a Snakemake module, the latter contains configuration files which will be modified in the next step in order to configure the workflow to your needs.

Step 3: Configure workflow

To configure the workflow, adapt config/config.yml to your needs following the instructions below.

Step 4: Run workflow

The deployment method is controlled using the --software-deployment-method (short --sdm) argument.

To run the workflow with automatic deployment of all required software via conda/mamba, use

snakemake --cores all --sdm conda

Snakemake will automatically detect the main Snakefile in the workflow subfolder and execute the workflow module that has been defined by the deployment in step 2.

For further options such as cluster and cloud execution, see the docs.

Step 5: Generate report

After finalizing your data analysis, you can automatically generate an interactive visual HTML report for inspection of results together with parameters and code inside of the browser using

snakemake --report report.zip

Configuration

The following section is imported from the workflow’s config/README.md.

Melange Configuration

To adapt Melange to your needs, change the default parameters in the configuration file config.yaml:

Input

By default, Melange looks for the input files in the 'example_data' directory. You can either change these definitions or transfer your data to this folder (delete example data so that it doesn't appear in the final output).

# --- Input
inputdir: "example_data"

Melange can accept three file formats: Fasta nucleotide files, Fasta amino acid files and Fastq files. To be recognisable by Melange, make sure the following extensions are correct or change them accordingly:

  nucleotide_extension: "{genome}.fa"
  aminoacid_extension: "{genome}.faa" 
  fastq_extension: "{genome}.fastq"

Finally, specify what kind of files Melange should start with.

  file_type: "nucleotide" # OPTIONS: "nucleotide" "aminoacid" "fastq"

Output

Directories where your output files will appear.

outdir: "results" 
outdir_anno: "results/Annotation" 

Predefined expectation value thresholds. Only change this if you know what you are doing.

# --- Evalues:
cog_evalue: "1e-5" #for rpsblast
pfam_evalue: "1e-5" #for hmmsearch
merops_evalue: "1e-5" #for blastp
kegg_evalue: "1e-5" #for hmmsearch 

Linting and formatting

Linting results

Lints for rule ensure_faa (line 1, /tmp/tmp8i8jzhap/workflow/rules/ensure_faa.smk):
    * No log directive defined:
      Without a log directive, all output will be printed to the terminal. In
      distributed environments, this means that errors are harder to discover.
      In local environments, output of concurrent jobs will be mixed and become
      unreadable.
      Also see:
      https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#log-files


Formatting results

[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/cazymes.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/cog.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/ensure_faa.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/join_all.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/Snakefile":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/pfam.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/ensure_download.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/common.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] In file "/tmp/tmp8i8jzhap/workflow/rules/merops.smk":  Formatted content is different from original
[DEBUG] 
[DEBUG] 

... (truncated)