-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path90-lab.Rmd
77 lines (32 loc) · 2.17 KB
/
90-lab.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
---
title: "Questions for Lab 1, 2 and 3"
author: "Leo lahti & Rajesh Shigdel"
date: "`r Sys.Date()`"
output: html_document
---
# Tutorial Aims
In this tutorial we will learn feature selection, dimension reduction, clustering, visualization, analysis and interpretation using
miaverse (mia = MIcrobiome Analysis) and miaViz - (Microbiome Analysis Plotting and Visualization) to explore patterns in human gut microbiome datasets.
The examples in this tutorial are mainly based on this online book
[Orchestrating Microbiome Analysis](https://microbiome.github.io/OMA/)
In this tutorial we use data from [The Human Gut Microbiome Atlas (HGMA)](https://www.microbiomeatlas.org/)
# Lab 1
## unsupervised learning: Feature selection & dimension reduction
1. Make the tse (TreeSummarizedExperiment) Object for the further analysis (use the provided script to make a tse )
## Load the data
2. Aggregate the data to Phylum level (agglomerateByRank)
3. Subset the data at the Species level with only taking bacterial Species that are greater than 10% of prevalence in the total sample
4. Subset a tse object which consist only two phyla i.e Actinobacteria", "Cyanobacteria
5. Calculate relative abundances, and store the table to assays
6.Perform a centred log-ratio transformation (clr) (i.e. mia::transformSamples)
# Lab 2
## unsupervised learning: clustering & visualization
1. Visualize beta diversity using principal coordinate analysis (PCoA);based on the Bray-Curtis dissimilarities
2. Visualize beta diversity using principal coordinates analysis (PCoA); with Aitchison distance (clr transformation+ Euclidean distance)
3. Cluster the samples using Dirichlet- multinomial mixture model
4. Visualize the clusters in the PCoA plot
# Lab 3
## unsupervised learning:Analysis and interpretation
1. What taxa are driving the axis? Calculate the Spearman correlation between PC1 and the relative abundance of the bacteria and visualize the results in a bar plot.
2. Visualize the dominant taxonomic group of each sample by colour on PCoA plot
3. Visualize gender by colour on PCoA plot