DADA 2 16 S analysis pipeline Metagenomics and

  • Slides: 42
Download presentation
DADA 2 16 S analysis pipeline Metagenomics and the 16 S analysis pipeline SANBI

DADA 2 16 S analysis pipeline Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control • Before analyzing generated sequence to draw biological conclusions, a quality control

Quality Control • Before analyzing generated sequence to draw biological conclusions, a quality control check should be performed to make sure there is no biases in the data. • QC gives a quick impression of whether your data has any problems of which you should be aware before doing any analysis. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Potential problems: • Low confidence bases (Ns) • Sequence specific bias •

Quality Control Potential problems: • Low confidence bases (Ns) • Sequence specific bias • Sequence contamination • Adapters • … Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Software packages for QC: • Fast. QC • Multi. QC • Fast.

Quality Control Software packages for QC: • Fast. QC • Multi. QC • Fast. X-Toolkit • PRINSEQ • Tag. Cleaner • NGS QC Tool-Kit • … Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control FASTQ format What is a Fast. Q file? FASTQ= FASTA + Quality

Quality Control FASTQ format What is a Fast. Q file? FASTQ= FASTA + Quality Fast. Q format is a text-based format for storing both a biological sequence and its corresponding quality scores. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control FASTQ format • Each Fast. Q file contains hundreds of millions of

Quality Control FASTQ format • Each Fast. Q file contains hundreds of millions of rows. • Each block of 4 lines, starting with " @" represents a read. Line 1 begins with a '@' character and is followed by a sequence identifier and an optional description (like a FASTA title line). Line 2 is the raw sequence letters (ATCG). Line 3 begins with a '+' character and is optionally followed by the same sequence identifier (and any description). Line 4 encodes the quality values for the sequence in Line 2, and must contain the same number of symbols as letters in the sequence. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control FASTQ format A Fast. Q file containing a single sequence might look

Quality Control FASTQ format A Fast. Q file containing a single sequence might look like this: @read_ID GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATT TGTTCAACTCACAGTTT + !''*((((***+))%%%++)(%%%%). 1***+*''))**55 CCFtititi. CCCCCCC 65 The character '!' represents the lowest quality while '~' is the highest. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Quality measurements Base-calling error probabilities are reported by sequencers. Usually in Phred

Quality Control Quality measurements Base-calling error probabilities are reported by sequencers. Usually in Phred (quality) score. Usually coded by ASCII characters Phred score Q = -10 log 10 P Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Quality measurements Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena

Quality Control Quality measurements Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control What is Fast. QC? Fast. QC aims to provide a QC report

Quality Control What is Fast. QC? Fast. QC aims to provide a QC report which can spot problems which originate either in the sequencer or in the library material. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Metagenomics and the 16 S analysis pipeline SANBI 2020

Quality Control Fast. QC reports Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Metagenomics and the 16 S analysis pipeline SANBI 2020

Quality Control Fast. QC reports Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Per Base Sequence Quality Metagenomics and the 16 S

Quality Control Fast. QC reports Per Base Sequence Quality Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Per Base Sequence Quality Good quality Fast. QC report:

Quality Control Fast. QC reports Per Base Sequence Quality Good quality Fast. QC report: Bad quality Fast. QC report Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Per Sequence Quality Scores Good quality Fast. QC report:

Quality Control Fast. QC reports Per Sequence Quality Scores Good quality Fast. QC report: Bad quality Fast. QC report Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Quality Control Fast. QC reports Per Base Sequence Content DNA library RNA library Metagenomics

Quality Control Fast. QC reports Per Base Sequence Content DNA library RNA library Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background Divisive Amplicon Denoising Algorithm 2 (DADA 2) is an open source

DADA 2 background Divisive Amplicon Denoising Algorithm 2 (DADA 2) is an open source algorithm implemented in R, which uses a statistical inference to correct amplicon errors. It intends to simplify the study of microbial communities by allowing to reconstruct ampliconsequenced communities at the highest resolution. Callahan et al. , 2016 Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background DADA 2 implements a complete workflow that takes raw amplicon sequencing

DADA 2 background DADA 2 implements a complete workflow that takes raw amplicon sequencing data in fastq files as input. It produces an error-corrected table of the abundances of amplicon sequence variants in each sample (ASV table). Callahan et al. , 2016 Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background Benefits to DADA 2: • Compatible with all amplicon types 16

DADA 2 background Benefits to DADA 2: • Compatible with all amplicon types 16 S, 18 S, ITS, … • Works on different next generation sequencing platforms Illumina, Ion Torrent, 454 pyrosequencing • Provides single-nucleotide resolution • Lower false-positive rate Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background • R or RStudio. • QIIME 2 – Simplified and condensed

DADA 2 background • R or RStudio. • QIIME 2 – Simplified and condensed the dada 2 workflow Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background Errors Benjamin Callahan Metagenomics and the 16 S analysis pipeline SANBI

DADA 2 background Errors Benjamin Callahan Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 background Errors Benjamin Callahan Metagenomics and the 16 S analysis pipeline SANBI

DADA 2 background Errors Benjamin Callahan Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Raw FASTQ files Chimera checking and removal Assignment taxonomy & phylogeny

DADA 2 workflow Raw FASTQ files Chimera checking and removal Assignment taxonomy & phylogeny Sort F and R reads Quality inspection Merge reads Sample inference Trim and filter reads Error rate estimation Diversity analysis and visualization Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Raw FASTQ files Chimera checking and removal Assignment taxonomy & phylogeny

DADA 2 workflow Raw FASTQ files Chimera checking and removal Assignment taxonomy & phylogeny Sort F and R reads Quality inspection Merge reads Sample inference Trim and filter reads Error rate estimation Diversity analysis and visualization Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Before running the pipeline: • Barcodes, adapters should be removed –

DADA 2 workflow Before running the pipeline: • Barcodes, adapters should be removed – Cutadapt, Trimmomatic, … • Samples should be demultiplexed – FASTX-Toolkit, idemp, … • For paired-end data, forward and reverse reads must be in the same order. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow The data: • The data can be accessed here. • Stool

DADA 2 workflow The data: • The data can be accessed here. • Stool samples. • Paired-end 300 bp reads. • Barcodes/Adapters have been removed. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Getting Ready Load the dada 2 package in your R/RStudio If

DADA 2 workflow Getting Ready Load the dada 2 package in your R/RStudio If you do not already have it, see the dada 2 installation instructions Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Getting Ready Set the path, it points to the dog samples

DADA 2 workflow Getting Ready Set the path, it points to the dog samples directory: Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Getting Ready Sort the forward and reverse reads Extract sample names

DADA 2 workflow Getting Ready Sort the forward and reverse reads Extract sample names Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Quality Control - The quality plot of three forward samples. -

DADA 2 workflow Quality Control - The quality plot of three forward samples. - Scores never really go below 30. 16 Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Quality Control -The reverse reads are slightly different. -The scores are

DADA 2 workflow Quality Control -The reverse reads are slightly different. -The scores are good but they drop off right around 275 bp. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim Set filtered subdirectory and rename files Metagenomics and

DADA 2 workflow Filter and Trim Set filtered subdirectory and rename files Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim trunc. Len truncates your reads at specific base.

DADA 2 workflow Filter and Trim trunc. Len truncates your reads at specific base. trunc. Len=c(290, 275) The amplicon length. The length of your overlap, by default is 20 for DADA 2. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim max. N maximum number of ambiguous nucleotides. max.

DADA 2 workflow Filter and Trim max. N maximum number of ambiguous nucleotides. max. N=0 DADA 2 requires no Ns. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim max. EE maximum number of estimated errors allowed

DADA 2 workflow Filter and Trim max. EE maximum number of estimated errors allowed in your reads. max. EE=c(2, 2) The quality of your sequences. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim trunc. Q truncates the read at the first

DADA 2 workflow Filter and Trim trunc. Q truncates the read at the first nucleotide with a specific quality score. trunc. Q=2 Score of 2 means that the probability of the base being incorrect is 63%. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim rm. phix removes reads that match against the

DADA 2 workflow Filter and Trim rm. phix removes reads that match against the phi. X genome. rm. phix=TRUE Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Filter and Trim Compress if you want to fastq files to

DADA 2 workflow Filter and Trim Compress if you want to fastq files to be gzipped. Multithread if you want your files to run in parallel. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Learn the Error Rates It will create an error model that

DADA 2 workflow Learn the Error Rates It will create an error model that will be used by the DADA 2 algorithm. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Learn the Error Rates -The error rates for each possible transition

DADA 2 workflow Learn the Error Rates -The error rates for each possible transition (A -> C). -As quality score increases, the expected error rate decreases. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

DADA 2 workflow Sample Inference Set filtered subdirectory and rename files It uses the

DADA 2 workflow Sample Inference Set filtered subdirectory and rename files It uses the error model that was created earlier. p-value high -> sequence likely caused by errors. p-value low -> sequence is real. Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras

Practical The practical is available here: https: //iallali. github. io/DADA 2_pipeline/16 Sr. RNA_DADA 2_pipeline.

Practical The practical is available here: https: //iallali. github. io/DADA 2_pipeline/16 Sr. RNA_DADA 2_pipeline. html Metagenomics and the 16 S analysis pipeline SANBI 2020 Verena Ras