Correlation.R # ============================================================ # Tutorial on drawing a correlation map using ggplot2 # by Umer Zeeshan Ijaz (http://userweb.eng.gla.ac.uk/umer.ijaz) # ============================================================= abund_table<- read.csv ( "SPE_pitlatrine.csv" , row.names = 1 , check.names= FALSE ) #Transpose the data to have sample names on rows abund_table<- t ( abund_table ) meta_table<- read.csv ( "ENV_pitlatrine.csv" , row.names = 1 , check.names= FALSE ) #Filter out samples with fewer counts abund_table<-abund_table [ rowSums ( abund_table ) > 200 , ] #Extract the corresponding meta_table for the samples in abund_table meta_table<-meta_table [ rownames ( abund_table ) , ] I changed the parameters #You can use sel_env to specify the variables you want to use and sel_env_label to specify the labes for the pannel sel_env<- c ( "pH" , "Temp" , "TS...
So this works for my data! I had started with the commands under the section NMDS from http://userweb.eng.gla.ac.uk/umer.ijaz/bioinformatics/ecological.html the sample and data samples were prepared according to the above. and proceed with the following: library("vegan", lib.loc="~/R/win-library/3.2") library("lattice", lib.loc="C:/Program Files/R/R-3.2.5/library") set.seed(2) abund_table<-read.csv("Sample.csv",row.names=1,check.names=FALSE) #Transpose the data to have sample names on rows abund_table<-t(abund_table) abund_table<-t(abund_table) example_NMDS=metaMDS(abund_table, k=2) plot(example_NMDS) ordiplot(example_NMDS,type="n") orditorp(example_NMDS,display="species",col="red",air=0.01) orditorp(example_NMDS,display="sites",cex=1.25,air=0.01) And I changed "Treatment 1" and "Treatment 2" to: treat=c(rep("pH",5),rep("Cond...
So, we have tried. From SILVA NGS, RDP Pipeline, MG-RAST to MEGA, and MEGAN...6. Two made the cut with my data so far; MEGAN and R. As a note, I would say the data choose the analysis software. R yet again gave a beautiful taxa plot. abund_table<- read.csv ( "SPE_pitlatrine.csv" , row.names = 1 , check.names= FALSE ) #Transpose the data to have sample names on rows abund_table<- t ( abund_table ) meta_table<- read.csv ( "ENV_pitlatrine.csv" , row.names = 1 , check.names= FALSE ) #Just a check to ensure that the samples in meta_table are in the same order as in abund_table meta_table<-meta_table [ rownames ( abund_table ) , ] #Get grouping information grouping_info<- data.frame ( row.names = rownames ( abund_table ) , t ( as.data.frame ( strsplit ( rownames ( abund_table ) , "_" ) ) ) ) # > head(grouping_info) # X1 X2 X3 # T_2_1 T 2 1 # T_2_10 T 2 10 # T_2_12 T 2 12 # T_2_2 T 2 2 # T_2_3 ...