A collection of R scripts to handle pre-processed metabarcoding data and produce meaningful visualizations.
The goal of this repository is to publish snippets of open source code that I regularly use for downstream processing of amplicon sequencing data. This type of data is often generated for microbiome and environmental DNA analysis. The typical bioinformatics pipelines that process raw sequencing data provide some integrated tools for vizualisation and inference, but those are often not flexible enough to accommodate diverse research needs. It's why many packages and libraries have been developped and published in higher-level programming languages to handle such tasks.
My goal here is to bridge the gap between one bioinformatics pipeline (QIIME2) and a handful of R packages to generate informative and flexible data visualizations.
The data used to create these scripts and vizualisations have been removed from the repo for confidentiality. When inputing your data, you will need to adapt these scripts to your character patterns and purposes.
*
Regularly vizualising your data with the R console as you run lines of code will help you diagnose issues and save headaches. *
This repository assumes as inputs amplicon sequencing data generated by an Illumina MiSeq platform and pre-processed within the QIIME2 environment, as outlined in https://github.com/LangilleLab/microbiome_helper. Amplicon sources, processing tools employed within QIIME2, and parameter settings along the pipeline will have an impact on results and can vary.
Data sources (not all necessary to each script and additional inputs can be integrated):
Metadata.tsv
- File imported into QIIME2 and used during pre-processing.
- First column is 'sampleid' (or a similar title accepted by the QIIME2 format) and must identically match columns of the feature (ASV) table.
ASV_table.qza
- 1st column 'Feature-ID' are the ASV IDs and must match ASV IDs of classification.qza.
- Next columns are samples with read counts for each ASV detected.
- Samples whose string must match strings of column 'sampleid' in Metadata.tsv.
Classification.qza
- 1st column 'Feature-ID' are the ASV IDs and must match ASV IDs of ASV_table.qza.
- 2nd column will be the taxonomic assignement which will vary depending on the classifier used within the QIIME2 environment.
The script 'downloading_libraries.R' located on the main directory shows the code necessary to install all required libraries for QIIME-2-plots scripts. Run lines as needed. Secondary options will be commented.