Sequencing of the full-length 16S rDNA gene library was completed for 12 samples, with each sample generating 50,000 raw sequences, and the sequencing amount for each sample was no less than 90% of the target data volume; standard amplicon bioinformatics analysis was completed.
Table 1 Basic Sample Information
Note: sampleId: Sample name submitted; analysisId: Analysis sample name, which will be displayed in subsequent reports; group1 : Group names.Amplicon sequencing technology is a widely used method for studying microbial community structure and diversity, which includes steps such as sample preparation, nucleic acid extraction quality control, target fragment amplification, library construction, sequencing, data quality control, and data analysis. These steps help researchers understand the structure, diversity, and function of microbial communities at the molecular level, thereby gaining deeper insights into the role of microorganisms in ecosystems.
Oxford Nanopore Technologies has become one of the important methods for studying microbial community structure. The process includes sample preparation, nucleic acid extraction quality control, amplification of target fragments, library construction, sequencing, data quality control, and data analysis. First, sample testing is conducted to ensure sample quality, followed by DNA extraction and nucleic acid testing to obtain high-quality DNA samples. Then, the target fragments are amplified using the corresponding primers; Subsequently, library construction is performed to convert DNA samples into libraries suitable for sequencing. Next, sequencing is carried out to obtain a large amount of sequence data; afterward, data quality control is performed to remove low-quality data and ensure accuracy. Finally, data analysis is conducted, including feature analysis (OTU/ASV analysis), species annotation, diversity analysis, inter-group difference analysis, correlation analysis, and functional prediction analysis.
Figure 1 Technical roadmap
Amplicon data analysis includes the following steps: data splitting and quality control, feature analysis (OTU/ASV), species annotation, alpha diversity analysis, beta diversity analysis, inter-group difference analysis, correlation analysis, and functional prediction analysis. Through these steps, researchers can gain insights into the diversity, composition, and functions of microorganisms in the samples, thereby providing important information for research in fields such as ecology, medicine, and agriculture.
1、The original sequences that passed the initial quality screening are divided into libraries and samples based on index and barcode information, with barcode sequences and primers removed;
2、A feature table is obtained through sequence clustering (OTU, ASV) or alignment;
3、The specific composition of each sample (group) at different taxonomic levels is presented to understand the overall profile;
4、The Alpha diversity level of each sample is assessed, and the sequencing depth is reflected through rarefaction curves to determine its adequacy;
5、A distance matrix for each sample is calculated, and various unsupervised ordination and clustering methods are employed to measure the beta diversity differences between different samples (groups);
6、Identify statistically significant biomarkers between different groups through inter-group differential significance analysis;
7、Study the relationship between microbial communities and environmental factors through correlation and association analysis;
8、Perform gene function or phenotype prediction on samples through functional prediction analysis.
Figure 2 Analysis Flowchart
Note: If a project is not suitable for a certain analysis content, that analysis content will not appear in the report.
12 samples were sequenced, resulting in a total of 359,243 full-length sequences identified through Barcode recognition, with each sample generating at least 29,538 full-length sequences, averaging 29,936 full-length sequences.
The data from sequencing, after barcode splitting, low-quality filtering, and primer identification and trimming, results in valid sequencing data.
Data statistics are shown in the table below:
Table 2 Sample sequencing data statistics
Note: Sample: Sample name; Raw Reads: Number of raw sequences; Clean Reads: Number of filtered sequences; Mean_len(bp): Average sequence length; Mean_Q: Average quality value.
Result file : 01.qc/data_stat.tsv
The clean sequencing data has been analyzed and aligned to the reference genome. The matrix of aligning results for each sample were summrized in the feature table below.
Table 3 Feature analysis statistics for each sample
Note: sample: sample name; input: number of input sequences; mapped: number of sequences that can be aligned to the reference database; filtered: number of sequences after removing low-abundance features; rared: number of sequences after rarefying to the minimum sequence count.
Result file : 01.qc/feature_stats.tsv
The statistics of the number of features for each sample are shown in the figure below.
Figure 3 Statistics of the number of features for each sample
Note: The x-axis represents samples, and the y-axis represents the number of features.
Result file : 02.asv/barplot/
Using Venn diagrams (suitable for 2-5 samples or groups; if the number of samples or groups exceeds 5, randomly select 5 samples or groups for analysis) or petal diagrams (when the number of samples or groups is greater than or equal to 2) can illustrate the number of shared and unique features between different samples or groups, visually representing the overlap of features among different samples or groups. By combining the features with the species they represent, it is possible to identify shared microorganisms in different environments. The results are shown in the figure below.
Figure 4 shows the Venn diagram of unique features
Note: The numbers in the overlapping areas between multiple colors in the figure represent the number of shared features among multiple samples, while the non-overlapping parts represent the number of unique features for each sample.
Figure 5 shows the Petal diagram of unique features
Note: The number in the central circle represents the count of features common to all samples. The numbers on the outer edges of the petals indicate the count of features unique to each individual sample. The numbers on the inner edges of the petals represent the count of features shared with a subset of other samples.
Result file : 02.asv/venn/
For each feature sequence, the corresponding reference database was selected for species annotation. To display the species annotation results, statistics were performed on the feature identification results, as shown in the table below.
Table 4 Number of Categories at Each Level
Note: Sample: Sample name; Kindom, Phylum, Class, Order, Family, Genus, and Species correspond to the number of species classified by boundary, phylum, class, order, family, genus, and species in each sample.
Table 5 Number of Features at Each Level
注:SamplNote: Sample: Sample name; Kindom, Phylum, Class, Order, Family, Genus, and Species correspond to the number of features in each sample that can be classified into different classes, phyla, classes, orders, families, genera, and species.
To ensure optimal visualization, only the top 10 taxa in abundance are displayed, while others are merged into “Others” in the figure. “Unclassified” represents species that lack taxonomic annotations.
Figure 6 phylum level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Figure 7 class level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Figure 8 order level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Figure 9 family level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Figure 10 genus level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Figure 11 species level species composition bar chart
Note: The horizontal axis represents the sample, and the vertical axis represents the relative abundance. Different colors represent different species.
Result file : 03.taxonomy/barplot/
A heatmap uses color gradients to represent the magnitude of values in a data matrix and clusters taxa or samples based on abundance similarity. High- and low-abundance taxa are grouped into blocks, reflecting similarities and differences in community composition across samples through color gradients and clustering patterns. In each sample (group), based on the abundance value, 50 top taxa were identified. Then, according to the detailed taxanomy information of each species, heatmap of each taxa (phylum, class, order, family, genus, species) were clustered.
Figure 12 phylum level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Figure 13 class level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Figure 14 order level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Figure 15 family level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Figure 16 genus level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Figure 17 species level species abundance heatmap (Z-Score Normalization)
Note: The horizontal axis represents the sample, the vertical axis represents the species, and different colors represent the abundance.
Result file : 03.taxonomy/heatmap/
A ternary phase diagram describes the ratio relationship of different attributes of three variables using an equilateral triangle. In analysis, the species composition of three or three groups of samples can be compared and analyzed based on species classification information. Through the triangle diagram, the specific gravity and relationship of different species in the sample can be intuitively displayed. This analysis is limited to comparative analysis between 3 samples or 3 groups of samples. The ternary phase diagrams of the A, B, and Zymo1 groups are shown below, and other results can be found in the results file.
Figure 18 Ternary Phase Diagram
Note: The three corners of the triangle represent three samples or groups, each represented by three colors. The three edges are used to measure the percentage of species from the three samples or groups (the relative abundance of species in a sample divided by the sum of the relative abundance of species in the three samples). The circles in the triangle represent a horizontal species, and the circle size represents the average relative abundance of the species. The circle color represents the phylum corresponding to the species, corresponding to the legend color.
Result file : 03.taxonomy/ternary/
Visualize the species annotation results using KRONA,where circles represent different classification levels from inside to outside, and the size of the fan represents the relative proportion of different classification annotation results. The results of sample A1 are presented here, and other samples can be found in the results file.
Note: From inside out represents from boundary to species, and sector size represents abundance; On the left side, there are options for selecting different samples, levels, etc.
Result file : 03.taxonomy/krona/
The statistics of Alpha diversity index values for each sample are shown in the table below.
Table 6 Alpha Diversity Index Table
Result file :04.alpha_div/alphaDiversityIndex.tsv
Use box plots to display the differences in alpha diversity between different groups and perform statistical tests using analysis of variance. The results are shown in the following figure:
Figure 19 ACE Box Chart
Note: The horizontal axis represents the group name, and the vertical axis represents the Alpha diversity index value.
Figure 20 Chao1 Box Chart
Note: The horizontal axis represents the group name, and the vertical axis represents the Alpha diversity index value.
Figure 21 Shannon Box Chart
Note: The horizontal axis represents the group name, and the vertical axis represents the Alpha diversity index value.
Figure 22 Simpson Box Chart
Note: The horizontal axis represents the group name, and the vertical axis represents the Alpha diversity index value.
Result file : 04.alpha_div/alpha_group_significance/
Rarefaction Curve randomly selects a certain number of sequences from the sample, counts the number of species represented by these sequences, and constructs a curve based on the number of sequences and species to verify whether the sequencing data is sufficient to reflect the species diversity in the sample, and indirectly reflects the richness of species in the sample. The following figure reflects the rate of emergence of new features (new species) under continuous sampling: within a certain range, as the number of sequencing lines increases, if the curve shows a sharp rise, it indicates that a large number of species have been discovered in the community; When the curve tends to flatten, it indicates that the species in this environment will not significantly increase with the increase of sequencing quantity. The dilution curve can be used as a judgment of whether the sequencing volume of each sample is sufficient. A sharp increase in the curve indicates insufficient sequencing volume and the need to increase the number of sequences; On the contrary, it indicates that the sample sequence is sufficient for data analysis.
Figure 23 between samples rarefaction curve
Note: The horizontal axis represents the number of randomly selected sequences, and the vertical axis represents the number of features obtained based on the number of sequencing sequences. Each curve represents a sample/group and is marked with different colors.
Figure 24 between groups rarefaction curve
Note: The horizontal axis represents the number of randomly selected sequences, and the vertical axis represents the number of features obtained based on the number of sequencing sequences. Each curve represents a sample/group and is marked with different colors.
Result file :04.alpha_div/rarefaction_curve/
Shannon Index Curve is plotted based on the Shannon index of each sample at different sequencing depths, reflecting the microbial diversity of each sample at different sequencing quantities. When the curve tends to flatten, it indicates that the sequencing data volume is large enough and the types of features will not increase with the increase of sequencing volume; If the curve does not flatten, it indicates unsaturation, and increasing the amount of data can reveal more features.
Figure 25 between samples shannon curve
Note: The horizontal axis represents the number of randomly selected sequences, and the vertical axis represents the Shannon index obtained based on the number of sequencing sequences. Each curve represents a sample/group and is marked with different colors.
Figure 26 between groups shannon curve
Note: The horizontal axis represents the number of randomly selected sequences, and the vertical axis represents the Shannon index obtained based on the number of sequencing sequences. Each curve represents a sample/group and is marked with different colors.
Result file :04.alpha_div/shannon_curve/
Unlike sparse curves, the Rank Abundance Curve arranges the features (ASV/OTU) in each sample in order of their abundance along the horizontal axis, with their respective abundance values as the vertical axis. The features are connected to each other using lines or curves to reflect the distribution pattern of feature abundance in each sample (see details) https://en.wikipedia.org/wiki/Rank_abundance_curve )For microbial community samples, this curve can intuitively reflect the number of high abundance and rare features in the community.
Figure 27 Rank Abundance Curve
Note: The horizontal axis is the sequence number sorted in descending order of feature abundance, and the vertical axis is the relative abundance of the corresponding feature.
Result file :04.alpha_div/rank_abund_curve/
Species accumulation curves, similar to sparse curves, are used to measure and predict the extent to which species richness in a community increases with sample size. They are widely used to determine whether the sample size is sufficient and estimate community richness. Generally speaking, when the sample size is small, there is a high possibility of discovering a large number of new species with the addition of new samples, and the curve will show a sharp upward trend; When the sample size is already large, the total number of ASVs in the community will no longer significantly increase with the addition of new samples, and the curve will tend to flatten out. Therefore, the species accumulation curve can be used to determine whether the sample size is large enough: if the curve always maintains an upward trend, it indicates that the sample size is insufficient and the sampling scale needs to be expanded; On the contrary, it indicates that the sample size is sufficient to reflect the species composition of the community.
Figure 28 Cumulative curve of species at the genus level
Note: The horizontal axis represents the sample size, the vertical axis represents the number of observed species at the genus level, core represents the number of shared species, and total represents the total number of species.
Result file :04.alpha_div/specaccum/
Principal Component Analysis (PCA) is a technique for analyzing and simplifying datasets by decomposing variance and reflecting the differences between multiple sets of data on a two-dimensional coordinate graph. By analyzing the distance between different samples, the differences in the samples can be reflected, PCA uses variance decomposition to reflect the differences between multiple sets of data on a two-dimensional coordinate graph, with the two eigenvalues that can reflect the maximum variance on the coordinate axis. The closer the distance between two samples, the more similar their compositions are.
Figure 29 PCA diagram based on binary jaccard algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups; The horizontal axis represents the first principal component, and the percentage represents the contribution of the first principal component to the sample differences; The vertical axis represents the second principal component, and the percentage represents the contribution of the second principal component to the sample differences.
Figure 30 PCA diagram based on bray curtis algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups; The horizontal axis represents the first principal component, and the percentage represents the contribution of the first principal component to the sample differences; The vertical axis represents the second principal component, and the percentage represents the contribution of the second principal component to the sample differences.
Result file :05.beta_div/PCA/
Principal coordinates analysis (PCoA) is a dimensionality reduction and sorting method similar to PCA. The principle is to assume that there is data measuring the differences or distances between N samples, and use this method to find a Cartesian coordinate system to represent N samples as N points, so that the square of the Euclidean distance between points is exactly equal to the original difference data, achieving quantitative transformation of qualitative data and extracting the most important elements and structures from multidimensional data. Principal coordinate analysis can be used to classify multiple samples and further demonstrate differences in species diversity among them. Based on the Beta diversity analysis, four distance matrices were obtained, and PCoA analysis was drawn using R language tools. The closer the samples are on the coordinate graph, the greater the similarity.
Figure 31 PCoA diagram based on binary jaccard algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups; The horizontal axis represents the first principal component, and the percentage represents the contribution of the first principal component to the sample differences; The vertical axis represents the second principal component, and the percentage represents the contribution of the second principal component to the sample differences.R2 represents the explanatory power of different groups for sample differences. The larger the R2, the higher the explanatory power of the groups for differences, and the greater the inter group differences. When the P value is less than 0.05, it indicates that the reliability of the test is high.
Figure 32 PCoA diagram based on bray curtis algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups; The horizontal axis represents the first principal component, and the percentage represents the contribution of the first principal component to the sample differences; The vertical axis represents the second principal component, and the percentage represents the contribution of the second principal component to the sample differences.R2 represents the explanatory power of different groups for sample differences. The larger the R2, the higher the explanatory power of the groups for differences, and the greater the inter group differences. When the P value is less than 0.05, it indicates that the reliability of the test is high.
Result file :05.beta_div/PCoA/
Non Metric Multi Dimensional Scaling (NMDS) is a sorting method suitable for ecological research, which mainly simplifies the research objects (samples or variables) in multidimensional space to low dimensional space for localization, analysis, and classification, while retaining the original relationships between objects in data analysis. Similar to PCA or PCoA, differences between or within groups can be observed through the distribution of samples. The original design purpose of NMDS was to overcome the shortcomings of previous sorting methods, including PCA and PCoA, namely linear models. The NMDS model is nonlinear and can better reflect the nonlinear structure of ecological data. Some studies suggest that NMDS performs better than PCA/PCoA. When not grouped, it is recommended to have a sample size of no less than 10; When there are multiple sets of samples, the number of samples in each set should not be less than 5. The NMDS analysis results are shown in the following figure: the points in the figure represent each sample, different colors represent different groups, and the distance between points represents the degree of difference. The closer the samples are on the coordinate graph, the higher the similarity.
Figure 33 NMDS diagram based on binary jaccard algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups. When the stress is less than 0.2, it indicates that NMDS analysis has a certain level of reliability.
Figure 34 NMDS diagram based on bray curtis algorithm
Note: Points represent each sample separately; Different colors and shapes represent different groups. When the stress is less than 0.2, it indicates that NMDS analysis has a certain level of reliability.
Result file :05.beta_div/NMDS/
UPGMA(Unweighted Pair-group Method with Arithmetic Mean) Namely, non weighted group averaging method, also known as sample level clustering, is a commonly used clustering analysis method. The principle is that the assumed prerequisite is that in the process of evolution, each lineage undergoes the same number of mutations, that is, the rate of nucleotide or amino acid substitution is equal and constant. The phylogenetic tree generated by the UPGMA method can be regarded as a simple manifestation of the species tree. After each divergence occurs, the length of the branch from the common ancestor node to the two features is the same. Therefore, this method is more commonly used for the reconstruction of plants and trees. Based on the Beta diversity analysis, four distance matrices were obtained, and the R language tool was used to perform hierarchical clustering of samples using the unweighted paired average method (UPGMA) to determine the similarity of species composition among the samples. The hierarchical clustering tree of samples is shown in the following figure: the closer the samples are, the shorter the branch length, indicating that the species composition of the two samples is more similar.
Figure 35 UPGMA diagram based on binary jaccard algorithm
Note: Different colors represent different groups.
Figure 36 UPGMA diagram based on bray curtis algorithm
Note: Different colors represent different groups.
Result file :05.beta_div/UPGMA/
Clustering tree combined with bar plot analysis integrates a UPGMA clustering tree with a species abundance bar plot to illustrate similarities between samples. The left panel shows the sample clustering tree, and the right panel displays the top 10 genus-level abundance bar plots for each sample. Closer sample proximity and shorter branch lengths indicate greater similarity in species composition. Combined with dominant species bar plots, this highlights differences between samples.
Figure 37 UPGMA diagram based on binary jaccard algorithm
Note: The color legend on the lower left represents group colors for samples in the clustering tree, while the legend on the right corresponds to the top 10 genus in abundance.
Figure 38 UPGMA diagram based on bray curtis algorithm
Note: The color legend on the lower left represents group colors for samples in the clustering tree, while the legend on the right corresponds to the top 10 genus in abundance.
Result file :05.beta_div/UPGMA/
The sample distance heatmap is based on a distance algorithm to obtain the distance matrix between samples, and then uses the Pheatmap tool in R language to draw the sample heatmap. The differences between two samples can be visually observed based on the changes in color gradients.
Figure 39 Distance heatmap based on binary jaccard algorithm
Note: The rows and columns in the figure represent samples, and the color gradient from blue to red indicates the distance between samples from near to far.
Figure 40 Distance heatmap based on bray curtis algorithm
Note: The rows and columns in the figure represent samples, and the color gradient from blue to red indicates the distance between samples from near to far.
Result file :05.beta_div/HeatMap/
Similarity analysis (ANOSIM) is a non parametric test used to examine whether the differences between groups (two or more groups) are significantly greater than the differences within groups, in order to determine whether grouping is meaningful. The closer the R value is to 1, the greater the difference between groups than within groups. The smaller the R value, the less significant the difference between groups or within groups. A p-value less than 0.05 indicates high reliability of this test.
Figure 41 Anosim diagram based on binary jaccard algorithm
Note: There are a total of N+1 boxes on the diagram, where N represents the number of groups. The ‘Between’ box refers to the differences between groups, while the others represent the differences within their respective groups. The vertical axis represents the distance value.
Figure 42 Anosim diagram based on bray curtis algorithm
Note: There are a total of N+1 boxes on the diagram, where N represents the number of groups. The ‘Between’ box refers to the differences between groups, while the others represent the differences within their respective groups. The vertical axis represents the distance value.
Result file :05.beta_div/ANOSIM/
PLS-DA (Partial Least Squares Discriminant Analysis) analysis is currently one of the most commonly used pattern recognition methods in omics data analysis. It sorts samples in a new low dimensional coordinate system by finding the maximum covariance between the species abundance matrix and the given grouping information. The PLS-DA analysis results are shown in the following figure: the points in the figure represent each sample, different colors represent different groups, and the distance between points represents the degree of difference. The closer the samples are on the coordinate graph, the higher the similarity.
Figure 43 PLS-DA diagram
Note: Points represent each sample separately; Different colors and shapes represent different groups.
Result file :05.beta_div/PLS-DA/
Species difference analysis (default analysis includes at least 2 groups and analysis when the number of samples in each group is greater than 2) includes analysis of variance, rank sum test, and metagenomeSeq analysis. In addition, Lefse analysis and random forest analysis are also commonly used for querying tagged species.
ANOVA (Analysis of Variance), also known as F-test. Mainly used to test whether the means of multiple samples are equal, in order to determine the significance of the difference in means between two or more samples. The ANOVA bar chart between horizontal groups is shown below, and the bar charts for other levels can be viewed in the results file.
Figure 44 Bar chart of species with differences in genus
Note: The vertical axis represents taxa (showing the top 15 genus with the highest average abundance), and the horizontal axis represents the average relative abundance of taxa. Bars of different colors denote different groups.
Result file :06.diffience/Anova/
Rank sum test is a method of non parametric testing. Among them, “rank” is also known as rank, which is the sum of the above ordinal numbers called “rank sum”. Rank sum test is a method of hypothesis testing using rank sum as a statistical measure. When encountering situations in practice where the overall distribution type is unknown or where the overall distribution type is known but does not follow a normal distribution; Or some variables may not be accurately measured; When the variance is uneven, rank sum test can be used for analysis. The bar chart for rank sum test analysis is as follows. Please refer to the results file for bar charts at other levels.
Figure 45 Bar chart of species with differences in genus
Note: The horizontal axis lists species (showing the top 20 genus with the smallest p-values), and the vertical axis indicates relative abundance. Bars of different colors represent different groups.
Result file :06.diffience/RankSumTest/
The following table shows the comparison results between the B and D in genus level at group1. Please refer to the analysis results for other results.
Table 7 Analysis of metagenomeSeq
Note: level: Species classification name; logFC: The logarithmic value of the fold difference between two groups of species; se: Standard error; pvalues: The p-value of statistical testing; adjPvalues: The corrected p-value.
Result file :06.diffience/MetagenomeSeq/
LEfSe(Line Discriminant Analysis (LDA) Effect Size) can search for biomarkers with statistical differences between different groups. The following figure shows the LDA value distribution bar chart and LEfSe analysis evolutionary branching chart:
Figure 46 LDA Bar Chart
Note: The figure shows species with LDA Score greater than the set value of 2. The length of the bar chart represents the impact of different species (i.e. LDA Score), and different colors represent species in different groups.
Figure 47 LEfSe evolutionary branching diagram
Note: The circles radiating from inside to outside in the evolutionary branching diagram represent the classification levels from phylum to species; Each small circle at different classification levels represents a classification at that level, and the diameter of the small circle is proportional to the relative abundance; The coloring principle is to uniformly color the species with no significant differences in color as yellow, and color other species with differences according to the group with the highest abundance of that species. Different colors represent different groups, and nodes of different colors represent the microbial communities that play an important role in the group represented by that color.
Result file :06.diffience/Lefse/
Random Forests is a classic and efficient machine learning algorithm based on decision trees, belonging to the category of nonlinear classifiers, The ability to deeply explore complex nonlinear interdependencies between variables is particularly suitable for microbial community data that often presents discrete and discontinuous distributions. In recent years, research has shown that this algorithm can effectively, robustly, and accurately classify microbial community samples.
Figure 48 Top 20 Species Importance Bar Chart
Note: The horizontal axis represents the importance of the species, and the larger the value, the greater the impact of the species on inter group classification; The vertical axis represents species.
Result file :06.diffience/RandomForest/
A network diagram visualizes correlation analysis. Spearman rank correlation analysis is performed on the top 50 genus-level abundant taxa across all samples. Data with correlations >0.6 or <-0.6 and p-values <0.05 are selected to construct the correlation network.
Figure 49 A
Note: Each point represents a genus, and the line connecting points represents their correlation. Red represents positive correlation, and green represents negative correlation.
Figure 50 Zymo1
Note: Each point represents a genus, and the line connecting points represents their correlation. Red represents positive correlation, and green represents negative correlation.
Figure 51 D
Note: Each point represents a genus, and the line connecting points represents their correlation. Red represents positive correlation, and green represents negative correlation.
Figure 52 B
Note: Each point represents a genus, and the line connecting points represents their correlation. Red represents positive correlation, and green represents negative correlation.
By conducting topological analysis on the network, indicators such as number of nodes, number of edges, modularity, network diameter and density, average shortest path, and average clustering coefficient can be obtained, which reflect some characteristics of the network. The statistical results of network indicators are shown in the following table:
Table 8 Indicators of Correlation Network
Result file :07.association/NetWork/
FAPROTAX is a prokaryotic functional database that integrates multiple published articles on cultivable bacteria. The database contains over 7600 functional annotation information for more than 4600 species, which are categorized as nitrate respiration, There are over 80 functional groups, including methanogenesis, fertilization, and plant pathology. FAPROTAX is particularly suitable for ecological environment research, especially for geochemical substance cycling analysis. The bubble plots of different functions in the samples are as follows:
Figure 53 FAPROTAX bubble diagram
Note: The horizontal axis in the figure represents samples or groups, the vertical axis represents functions, different colors represent different samples or groups, and bubble size represents the relative abundance of functions in the samples or groups.
Result file :08.function/FAPROTAX/
If the project is not suitable for a certain analysis content, the analysis content will not appear in the result file.
The raw image data files obtained from high-throughput sequencing are converted into raw reads or raw data through base calling analysis, and the results are stored in FASTQ (abbreviated as fq) file format, which includes the base information of sequencing sequences (reads) and their corresponding sequencing quality information. The Fastq file contains sequence information of sequencing data and corresponding quality values. Each read contains 4 lines of information, as shown below. The first line starts with “@” and represents the sequence name; The second line is the base sequence, composed of uppercase letters “ACGTN”, where N represents unknown bases for sequencing; The third line starts with a “+”; The fourth line is the sequencing quality of the corresponding sequence, represented by ASCII values, with each letter corresponding to each base in the second line.
Table 9 Example of FASTQ Format
| @ST-E00600:415:HFV5LALXX:1:1101:21486:1031 1:N:0:TGACAGGT |
| TGGGGAATATTGGTCAATGGAGGCAACTCTGAACCAGCCATGCCGCGTG |
| + |
| FFFFFF,FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF |
Note: The first line starts with “@” and consists of the sequence identifier and descriptive text (optional part), which is equivalent to the reads ID; The second line is the base sequence; The third line starts with a “+” followed by the sequencing identifier. Generally, to save storage space, the sequencing identifier after the “+” is omitted; The fourth line is the sequencing quality of the corresponding base. Subtracting 33 from the ASCII value of each character in this line gives the sequencing quality value of each base in the second line.
There may be a certain error rate during the sequencing process, and the sequencing quality value can measure the probability of incorrect detection of bases. If the sequencing error rate is represented by P and the sequencing quality value is represented by Q score, the following relationship exists:
\[Q_{-score} = -10 * log_{10}P\]
The sequencing error rate for each base is obtained by converting the sequencing quality value into a formula, while the sequencing error rate is calculated through a predictive base calling error probability model during the base calling process. The corresponding relationship is shown in the following table:
Table 10 Correspondence between Sequencing Error Rate and Phred Score
| Phred Quality Score | Probability of Incorrect Base Call | Base Call Accuracy |
|---|---|---|
| Q10 | 1/10 | 90% |
| Q20 | 1/100 | 99% |
| Q30 | 1/1000 | 99.9% |
| Q40 | 1/10000 | 99.99% |
Note: Phred Quality Score: Q value; Probability of Incorrect Base Call: The possibility of base misidentification; Base Call Accuracy: The probability of correct identification of bases.
The higher the base quality value, the more reliable the base recognition and the lower the possibility of base sequencing errors. For example, for base recognition with a base quality value of Q20, 1 out of 100 bases will be recognized incorrectly; For base recognition with a quality value of Q30, 1 out of 1000 bases will be recognized incorrectly; Q40 indicates that only 1 out of 10000 bases will be recognized incorrectly.
Due to the possibility of low-quality sequences, adapter sequences, etc. in the raw sequencing data, in order to ensure the reliability of information analysis results, the raw sequencing data needs to be filtered to obtain clean reads, which are still stored in FASTQ format (this sequence file can be directly used for publication, public database submission, etc., and subsequent analysis is based on this data). The data filtering method for this project is as follows:
The raw data for Nanopore sequencing is a fast5 file, which is processed through dorado for base calling and barcode recognition. After conversion to fastq format, there are three main steps:
1、Remove connector sequence: Use Poreecho to remove the connector and barcode sequence;
2、Sequence quality filtering: Use NanoFilt to filter sequences with quality values less than 10;
3、Primer sequence identification: Use cutadapt software to identify and remove primer sequences, obtaining Clean sequences that do not contain primer sequences.
For the 16S rRNA genes of bacteria and archaea, as well as the 18S rRNA genes of eukaryotic microorganisms, the Silva database was selected; For fungal ITS sequences, UNITE database was selected as the reference database.
The sequences generated by ONT sequencing are more suitable for species annotation analysis based on alignment methods in the amplicon analysis process due to their specificity. The sequences are compared with the reference database using the Last software, and the sequence with the highest score is selected for the optimal comparison of the results and a feature table is constructed. After obtaining the feature table, the features with abundance less than or equal to 1 in each sample are filtered by default. Then, all samples are flattened with the minimum number of sequences to obtain the feature sequence and feature table for subsequent analysis.
The species composition bar chart and ternary phase diagram were drawn using the matplotlib package in Python; Use R package pheatmap to plot the species abundance clustering heatmap; The evolutionary tree of the system is constructed using the align to tree make fast tree of the phylogeny module in QIIME2 for multiple sequence alignment, and then plotted using the R package ggtree.
Alpha diversity reflects the richness and diversity of individual sample species, and has multiple measurement indicators: ACE、Chao1、Shannon、Simpson。 The ACE and Chao1 indices measure species abundance, i.e. the number of species; The Shannon and Simpson indices are used to measure species diversity, which is influenced by the abundance and community evenness of species in the sample community. Under the same species abundance, the greater the evenness of each species in the community, the greater the diversity of the community. The larger the values of the Shannon and Simpson indices, the higher the species diversity of the sample.
Beta diversity analysis mainly uses binary Jaccard Two algorithms, Bray Curtis, calculate the distance between samples to obtain the beta value between samples. These two algorithms are mainly divided into two categories: weighted (Bray Curtis) and unweighted (Jaccard). The use of non weighted calculation methods mainly compares the presence or absence of species, while weighted methods require consideration of both the presence or absence of species and species abundance. Overall, if the beta diversity of two populations is smaller, it indicates that the species composition of the two populations is more similar.
The Alpha diversity index and Beta diversity distance were analyzed using the diversity module in QIIME2. Use T-test (between two groups) and Anova (analysis of variance, between multiple groups) methods respectively to test the differences in alpha diversity index and draw box plots using the matplotlib package in Python; The dilution curve, aroma index curve, grade abundance curve, species accumulation curve, PCA, PCoA, NMDS, and PLS-DA were all plotted using R package ggplot2; The UPGMA clustering tree and ANOSIM boxplot were drawn using the matplotlib package in Python.
The commonly used statistical methods are divided into two types: parametric statistical methods and non parametric statistical methods. Parameter statistics refers to a statistical analysis method that uses sample indicators to infer or perform hypothesis testing on population parameters with known distribution types; Non parametric statistics refers to a statistical method that does not consider whether the population distribution type is known or not, does not compare population parameters, and only compares whether the positions of the population distribution are the same.
ANOVA (Analysis of Variance), also known as F-test, is a parametric testing method. Mainly used to test whether the means of multiple samples are equal, in order to determine the significance of the difference in means between two or more samples. This analysis uses the stats method in the Scipy package of Python for statistical testing.
Rank sum test is a method of non parametric testing. Among them, “rank” is also known as rank, which is the sum of the above ordinal numbers called “rank sum”. Rank sum test is a method of hypothesis testing using rank sum as a statistical measure. When encountering situations in practice where the overall distribution type is unknown or where the overall distribution type is known but does not follow a normal distribution; Or some variables may not be accurately measured; When the variance is uneven, rank sum test can be used for analysis. This analysis uses the stats method in the Scipy package of Python for statistical testing.
LEfSe (Linear Discriminant Analysis Effect Size), also known as LDA Effect Size analysis, is an analytical tool used to discover and interpret biomarkers (taxonomic units, pathways, genes) in high-dimensional data. It enables comparisons between two or more groups, as well as comparisons between subgroups within each group, in order to identify species with significant differences in abundance between groups (i.e. biomakers). This analysis first uses non parametric Kruskal Wallis rank sum to detect species with significant differences in abundance between different groups. Then, Wilcoxon rank sum is used to test the consistency of differences between different subgroups of different species in the previous step. Finally, linear regression analysis (LDA) is used to estimate the magnitude of the impact of each component (species) abundance on the difference effect;
The basic idea of MetagenomeSeq is to first standardize the data, then use a Zero inflated Gaussian distribution to handle the impact of sequencing depth, and finally identify differences based on a linear model. Mainly used for comparing the differences between two groups of samples, and whether the number of samples in each group is consistent has no effect on the results. This analysis uses the fitEigenModel method from the metagenomeSeq package in R.
Random forest is a classic and efficient machine learning algorithm based on decision trees, belonging to the category of nonlinear classifiers, The ability to deeply explore complex nonlinear interdependencies between variables is particularly suitable for microbial community data that often presents discrete and discontinuous distributions. In recent years, research has shown that this algorithm can effectively, robustly, and accurately classify microbial community samples. This analysis uses the RandomForestClassifier package in sklearn.exe package in Python, and the matplotlib package in Python for plotting;
Species correlation network: Use the Spearman function (default) in the scipy.stats package of Python to calculate the Spearman correlation between two species. Use the networkx package to construct a network graph, calculate network related properties, and draw the network graph;
RDA/CCA analysis: RDA stands for Redundancy Analysis, which is a constrained PCA analysis that can reflect samples and environmental factors on the same two-dimensional ranking graph. From the graph, the relationship between sample distribution and environmental factors can be visually observed. CCA is a ranking method developed based on correspondence analysis, which combines correspondence analysis with multiple regression analysis. Each step of the calculation is regressed with environmental factors, also known as multiple direct gradient analysis. RDA/CCA is mainly used to analyze the relationship between species or functions and environmental factors. RDA is based on a linear model, while CCA is based on a unimodal model. The selection principle of RDA or CCA models: First, use species sample abundance data for DCA analysis, and check the size of the first axis of Length of Grade in the analysis results. If it is greater than 4.0, CCA should be selected. If it is between 3.0-4.0, both RDA and CCA can be selected. If it is less than 3.0, RDA’s results are better than CCA’s. This time, the rda/cca functions in the Vegan package of R were used for analysis, requiring that the number of environmental factors be less than the number of samples. The ggplot2 package in R was used for visualization.
Mantel Test Analysis: Conventional correlation analysis can only test the correlation between a single environmental factor and a single microbial community (such as a single genus), while Mantel Test based on distance matrix can test the correlation between a set of environmental factors and the entire microbial community. The ecological significance is to verify whether the species composition is similar in places with similar environments, and whether the species composition is not similar in places with dissimilar environments. The greater the correlation calculated and the smaller the p-value, the greater the impact of environmental factors on microbial communities. This time, the skbio.stats.statince.mante function in Python is used to calculate the correlation, and then the matplotlib package in Python is used to draw the fitting curve graph.
PICRUSt2 Function Prediction: PICRUSt2 (Phylogenetic Investigation of Communities by Reconstruction of Unobserved States) is a tool for predicting microbial community function based on 16S rRNA gene amplicon sequencing data. The core principle is to predict the genomic content of each OTU or ASV through the phylogenetic tree method, in order to infer the functional potential of microbial communities. Its working principle includes the following key steps: placing OTU or ASV sequences into a reference phylogenetic tree, which contains 16S rRNA genes from bacterial and archaeal genomes integrated from the Microbial Genome (IMG) database; Inferring the genomic content of each sequence inserted into the phylogenetic tree through predictive algorithms and correcting the copy number of 16S rRNA genes; The predicted genomic abundance is combined with the abundance of functional gene families to generate a predicted genomic functional abundance table.
Table 11 Summary of Software, Database, and References
| Analysis | Soft/Database | Version | References |
| Data quality control | Porechop | 0.2.3 | https://github.com/rrwick/Porechop |
| Data quality control | Trimmomatic | 0.39 | Bolger AM, Lohse M, Usadel B. Trimmomatic: a flexible trimmer for Illumina sequence data. Bioinformatics. 2014 Aug 1;30(15):2114-20. http://www.usadellab.org/cms/index.php?page=trimmomatic |
| Data quality control | cutadapt | 3.5 | Martin, Marcel. “Cutadapt removes adapter sequences from high-throughput sequencing reads.” EMBnet.journal 17 (2011): 10-12. https://cutadapt.readthedocs.io/en/stable/index.html |
| Feature analysis | qiime2 | 2022.2 | Bolyen E, Rideout JR, Dillon MR, et al. Reproducible, interactive, scalable and extensible microbiome data science using QIIME 2 [published correction appears in Nat Biotechnol. 2019 Sep;37(9):1091. https://qiime2.org/ |
| Feature analysis | lastal | lastal 1268 | Kiełbasa SM, Wan R, Sato K, et al. Adaptive seeds tame genomic sequence comparison. Genome Res. 2011;21(3):487-493. https://github.com/mcfrith/last-genome-alignments |
| Feature analysis | dada2 | 1.22.0 | Callahan, B., McMurdie, P., Rosen, M. et al. DADA2: High-resolution sample inference from Illumina amplicon data. Nat Methods 13, 581–583 (2016). https://github.com/benjjneb/dada2 |
| Feature analysis | vsearch | 2.7.0 | Rognes T, Flouri T, Nichols B, et al. VSEARCH: a versatile open source tool for metagenomics. PeerJ. 2016;4:e2584. https://github.com/torognes/vsearch |
| Taxonomic Analysis | Krona | 2.8.1 | Ondov, B.D., Bergman, N.H. & Phillippy, A.M. Interactive metagenomic visualization in a Web browser. BMC Bioinformatics 12, 385 (2011). https://github.com/marbl/Krona |
| Statistics and Data Visualization | R | 4.1.2 | https://www.r-project.org/ |
| Statistics and Data Visualization | python | 3.8.12 | https://www.python.org/ |
| Visualization | pheatmap | 1.0.12 | https://cran.r-project.org/web/packages/pheatmap/index.html |
| Visualization | ggplot2 | 3.4.4 | https://github.com/tidyverse/ggplot2 |
| Visualization | matplotlib | 3.5.1 | https://matplotlib.org/ |
| Tree | ggtree | v3.10.0 | https://www.bioconductor.org/packages/release/bioc/html/ggtree.html |
| Difference Analysis | metagenomeSeq | 1.36.0 | Paulson JN, Stine OC, Bravo HC, et al. Differential abundance analysis for microbial marker-gene surveys. Nat Methods. 2013;10(12):1200-1202. https://bioconductor.org/packages/release/bioc/html/metagenomeSeq.html |
| Difference Analysis | LEfSe | 1.1.2 | Segata N, Izard J, Waldron L, et al. Metagenomic biomarker discovery and explanation. Genome Biol. 2011;12(6):R60. https://github.com/SegataLab/lefse |
| Association Analysis | vegan | 2.6.4 | https://cran.r-project.org/web/packages/vegan/index.html |
| Statistics Analysis | scipy | 1.8.0 | https://scipy.org/ |
| Statistics Analysis | sklearn | 0.24.1 | https://scikit-learn.org/stable/index.html |
| Function prediction | PICRUSt2 | 2 | Douglas, G.M., Maffei, V.J., Zaneveld, J.R. et al. PICRUSt2 for prediction of metagenome functions. Nat Biotechnol 38, 685–688 (2020). https://huttenhower.sph.harvard.edu/picrust/ |
| Function prediction | FAPROTAX | 1.2.1 | Louca S, Parfrey LW, Doebeli M. Decoupling function and taxonomy in the global ocean microbiome. Science. 2016;353(6305):1272-1277. http://www.loucalab.com/archive/FAPROTAX/lib/php/index.php?section=Home |
| Function prediction | FUNGuild | 1.1 | Nguyen, Nhu H. et al. “FUNGuild: An open annotation tool for parsing fungal community datasets by ecological guild.” Fungal Ecology 20 (2016): 241-248. http://www.funguild.org/ |
| Taxonomy Aanlysis | silva | 138 | Quast C, Pruesse E, Yilmaz P, et al. The SILVA ribosomal RNA gene database project: improved data processing and web-based tools. Nucleic Acids Res. 2013;41(Database issue):D590-D596. https://www.arb-silva.de/ |
| Taxonomy Aanlysis | UNITE | 8.2 | Abarenkov K, Nilsson RH, Larsson KH, et al. The UNITE database for molecular identification and taxonomic communication of fungi and other eukaryotes: sequences, taxa and classifications reconsidered. Nucleic Acids Res. 2024;52(D1):D791-D797. https://unite.ut.ee/ |
| Taxonomy Aanlysis | NT | 2024.7 | https://ftp.ncbi.nlm.nih.gov/blast/db/ |
1、The analysis results directory includes a “readme.pdf” document that provides detailed explanations of each file’s contents. Most uploaded result data files are in text formats (such as .fa, .txt, .detail, and .xls files). On Windows systems, it is recommended to use EditPlus or UltraEdit for viewing text files, or PilotEdit Lite for opening very large text files. On Unix or Linux systems, you can browse large text files using commands like less.
2、The report contains SVG image files, which are vectorized images that can be scaled without loss of quality. To view SVG files, please install an SVG plugin (e.g., Adobe Illustrator).
3、Result files are best opened with Excel or professional text editors like EditPlus.
Amplification analysis can identify species types and community structures in samples. Further research could include:Metagenomic studies to analyze differences in microbial community functions; Identification and analysis of viral sequences and mobile genetic elements in samples;Screening and analysis of genes potentially related to antibiotic resistance to understand the spread of resistance within microbial communities;Integration of metabolomics data to study the physiological roles of microbial communities, their metabolites, and metabolic functions, as well as their involvement in various metabolic regulatory pathways.
See the list of software and databases used.