Skip to content
/ FLARE Public

FLARE: A Snakemake-based workflow for comprehensive metagenomics and antimicrobial resistance (AMR) analysis.

Notifications You must be signed in to change notification settings

stalbrec/FLARE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLARE – Metagenomics Snakemake Workflow

This repository contains FLARE, a Snakemake-based workflow for metagenomics and AMR (antimicrobial resistance) analysis.

1) Installation

Clone the repository and enter it:

git clone https://github.com/stalbrec/FLARE && cd FLARE

Create and activate the Snakemake environment (replace the name if you prefer):

conda env create -f workflow/envs/snakemake.yaml -n snakemake
conda activate snakemake

Note: the workflow uses --use-conda so Snakemake will create per-rule envs from workflow/envs/ when needed.

2) Minimal configuration

Edit config/config.yaml and set at least:

  • samples: path to your FASTQ folder or a samples.tsv file
  • output_dir: directory for results

Filenames should include R1 and R2 (e.g. sample1_R1.fastq.gz).

You can use this dummy config as a starting point (this is the repository's default config/config.yaml):

# kraken2
kraken2_db: "/home/common-data/databases/kraken2_old"
kraken2_memory_mapping: true
# deeparg
deeparg_data: "/home/common-data/databases/deeparg"
# individual runs
samples: "/home/common-data/seq/testfiles/"
output_dir: "results-test"

Short explanation of the keys:

  • kraken2_db: path to a Kraken2 database used for taxonomic classification.
  • kraken2_use_tmpfs: if true, copy Kraken2 DB to tmpfs for speed (requires enough RAM).
  • kraken2_tmpfs_path: path to tmpfs mount point for Kraken2 database.
  • kraken2_memory_mapping: use memory-mapped files if supported.
  • deeparg_data: path to DeepARG data directory.
  • samples: path to your FASTQ folder or samples.tsv file (required).
  • output_dir: directory where results will be written (required).

Edit the file with:

nano config/config.yaml

3) Simple run

# activate conda environment if not active already:
conda activate snakemake

# run the workflow
snakemake

Re-run the same command after fixing errors — Snakemake will skip completed steps.

5) Troubleshooting

General tips:

  • Check logs/ for rule-specific logs.
  • If conda envs fail, ensure conda activate snakemake succeeded.

missing input files inside the container

If Snakemake complains about missing input files, make sure any paths you added in your config are also bound to the singularity runtime in workflow/profiles/default/config.yaml:

singularity_args: "--bind /absolute/path/to/some/data/path"

The docker image is not accessible/gone and I need to switch to installing the conda environment on the system

Just go through all rules (i.e. in workflow/Snakefile and in all files in workflow/rules) and replace:

    container:
        "docker://ghcr.io/stalbrec/flare:latest"

with:

    conda:
        "../envs/metagen.yaml"

About

FLARE: A Snakemake-based workflow for comprehensive metagenomics and antimicrobial resistance (AMR) analysis.

Topics

Resources

Stars

Watchers

Forks

Packages