In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
Today, I will talk to you about what MRPP analysis in R language is like. Many people may not know much about it. In order to make you understand better, the editor summarized the following content for you. I hope you can get something according to this article.
Whether it is field environmental samples or indoor test samples, generally we will set up sample or parallel samples to enhance the accuracy of analysis, and block design will be carried out if necessary, so it is necessary to compare and distinguish the differences between groups in data analysis. However, for microbial community data, because there are many species and different sensitive environmental factors, the parameter test based on normal distribution is difficult to meet the needs of analysis. To carry out multivariate nonparametric test (non-parametric multivariate statistical tests) to calculate significance, R language vegan contains a variety of non-parametric test methods, including Anosim, Adonis, MRPP and so on. Different methods have differences in the selection of statistics and zero model.
Today we will continue to introduce MRPP analysis. MRPP analysis, that is, multiple response permutation program (Multiple ResponsePermutation Procedure), is similar to Anosim, and is used to analyze whether there are significant differences in microbial community structure between groups. It can usually be used with dimensionality reduction maps such as PCA, PCoA, NMDS, etc. The research principle of MRPP is to divide all observation objects into various possible combinations by permutation, and construct statistics δ:
Then calculate the value of the statistics under each group and count the distribution of the statistics, where n is the number of groups, Ci is the weight of the first group, generally the proportion of the reorganization observation to the total observation, and ξ I is the average object distance of the first group. it can be imagined that if the smaller the statistic δ, the more effective the grouping is, and then calculate the statistics according to the actual observations to test. It can be seen that the concept of MRPP is completely different from that of Anosim and Adonis. Anosim and Adonis aim to compare intra-group and inter-group differences, while MRPP aims to search for the grouping scheme with the smallest distance within a group without considering the distance between groups, that is, it firmly believes that there must be a significant grouping. In R, you can use the mrpp () function in vegan package for analysis. The default distance is distance= "euclidean". You can first calculate the distance matrix and then analyze it. Examples are as follows: # read species and environmental factor information data=read.csv ("otu_table.csv", header=TRUE, row.names=1) envir=read.table ("environment.txt", header=TRUE) rownames (envir) = envir [, 1] env=envir [,-1] # screen high abundance species means=apply (data, 1, mean) otu=data [names (meansmeans > 10],] otu=t (otu) # calculate distance matrix library (vegan) dist=vegdist (otu, method= "bray", diag=TRUE, upper=TRUE) # Cluster kms=kmeans (env, centers=3) based on geographical distance Nstart=22) Position=factor (kms$cluster) # MRPP analysis mrpp=mrpp (dist, Position, permutations=999) mrpp
Results the number of samples in each group, the average object distance within the group (class delta) and the distance ratio explained by the group (A) were given. You can use the meandist () function to calculate the average distance between groups, as follows: # calculate the average distance between groups meandist (dist, Position)
MRPP analysis is also often used to identify and test the degree of differences between different groups on the sequencing chart, using the main sorting axis data (Euclidean distance is required! And grouped data to verify that the sorting results are as expected For example, the PCoA sort is as follows:
We want to determine whether there is a significant difference in the sequencing coordinates of intestinal microbial communities between the two animals: dist=read.table ("new.weighted.phylip.subsample.dist", header=FALSE) rownames (dist) = dist [, 1] dist=dist [,-1] colnames (dist) = t (rownames (dist)) dist=as.dist (dist, diag=TRUE) # PCoA analysis otu_pca=prcomp (dist, scal=FALSE) pc12=otu_pca$x [, 1:2] # check the ranking results fish=c (rep ("Bp", 10), rep ("Ci") 10) mrpp2=mrpp (pc12, fish, distance= "euclidean", permutations=999) mrpp2 test results are significant In other words, the ranking results are consistent with the experimental design grouping. After reading the above, do you have any further understanding of MRPP analysis in R language? If you want to know more knowledge or related content, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.