Skip to content

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metabee

This repository contains all the scripts and conda environments to assemble high quality genomes from Oxford Nanopore and Illumina reads.

Installation

Requirements:

  • conda version >= 23.10.0
  • mamba version >= 1.5.6
    The following tools installed in their own conda environment:
  • snakemake v7.32.4
  • R v.4.3.2
    • r-ggplot2
    • r-tidyverse
    • r-reshape2
    • r-ggrepel
  • seqkit v.2.6.1
  • fastqc v0.11.8
  • multiqc v1.6
  • bbmap v39.01
  • nanoq v0.10.0
  • filtlong v0.2.1
  • hybracter v.0.9.0
  • bandage v0.8.1
  • samtools v1.21 + bowtie2 v2.5.4 (Illumina_mapping.yaml
  • checkm v1.2.2 with the database downloaded, decompressed and dearchived. The path to this database must be put in the environment yaml file at the end, so that it is stored in an environment variable.
  • gtdb-tk v2.4.0 with the database downloaded and decompressed. The path to this database must be put in the environment yaml file at the end, so that it is stored in an environment variable.
  • dram v1.4.6
  • macsyfinder v2.1.4
  • rgi v6.0.3

All environment YAML files can be found in /envs.

Usage

Note: the resources directive in each rule of the snakefile is written for execution on the slurm cluster of UNIL.

  1. Create a directory with the following sub-directories:
.
│
└─── benchmarks
│   
└─── data
│
└─── logs
│   
└─── results
│
└─── workflow
  1. Clone this repository in workflow.
  2. Move the adapters folder to data.
  3. Make sure you have all required databases downloaded and uncompressed (CheckM, GTDB-Tk, DRAM). Add the path to those databases in the yaml file of the environments (checkM, GTDB-Tk) or in the config file (DRAM). Databases for RGI and macsyfinder are installed directly by the snakefile.
  4. Set up the metadata.tsv file in config with the following columns:
  • sample
  • Illumina_avail: 1 if Illumina reads are available, 0 if not
  • estimated_genome_size in bp
  1. If needed, concatenate the reads from different lanes into a single file for each sample (or two files for Illumina) using scripts/concat_fastq.sh.
  2. Upload raw Illumina and ONT reads to data and add the paths to config/config.yaml.
  3. Activate your snakemake conda environment and run the snakefile.

Important note If the Illumina and ONT reads were not generated from the same DNA sample (i.e., someone else sequenced that strain in the past and you reuse their Illumina reads), you need to check if they are not contaminated. This is why I included a step to assemble the Illumina reads and run checkM on the assembly to make sure the sample was not contaminated. Afterwards you also need to check the Global_Analysis.html report to make sure the reads mapped correctly to the ONT assembly.

If snakemake raises issues with conflicting versions when creating the conda environments, it helps to (temporarily) set the channel priority to flexible.

Check points requiring manual input:

  • after running fastqc, add column 'Illumina_adapter' to metadata.tsv file indicating which adapter was found in each sample
  • after running checkM on the Illumina assembly, add column 'Illumina_reads_OK' to metadata.tsv file indicating whether if are usable - e.g. assembly complete and not contaminated - (1) or not (0)
  • if hybracter cannot assemble contigs, it will exit without producing an output, which will cause snakemake to consider it as failed - you need to check the log file
  • if hybracter cannot assemble a genome of size somewhat close to the estimated_genome_size, it will flag the output as incomplete
  • after running hybracter, add column 'genome_assembled' to metadata.tsv file indicating if hybracter could assemble a genome (1) or not (0)
  • in rule all, comment the line requesting the hybracter output for all samples, otherwise snakemake will keep trying to run hybracter on the samples for which contigs cannot be assembled
  • after running the genomes QC until CheckM, add column 'include_downstream' to indicate if you wish to pursue the analysis of the genome (1) or not (0). If the genome is less than 95% complete (CheckM) it might not be worth it.

Contributions

This pipeline was built by Meline Garcia using previous work from Malick N'Diaye.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages