Thilini Maddegoda Vidanelage
2017-Mar-13 05:52 UTC
[R] Principle Coordinate Analysis of unweighted UniFrac distances on R
Dear all, First of all, I am so grateful if you can help me in analyzing principle coordinate analysis of unweighted UniFrac distances on R. I am analyzing microbial species profile of an individual (BA) versus reference population (HMP) and want to generate a PCoA graph to see whether there any clusters of OTUs related to my samples. In a table, I have OTUs (percentages) for 6 replicates of one subject (BA) and 2910 reference subjects. Below is the format [it has only 9 subjects (including 6 replicates of one subject and 3 reference subjects) in rows and 5 microbial species in columns]. The second column shows the type of sample whether it a BA or HMP. SampleName Group g__Abiotrophia g__Acetanaerobacterium g__Acetatifactor g__Acetivibrio g__Acetobacter 1970_I BA 0 0.038857 0.003473 0 0 1970_III BA 0 0.035763 0 0 0 1970_IV BA 0 0.021248 0 0 0 2016_I BA 0 0.015537 0 0 0 2016_II BA 0 0.02313 0 0 0 2016_III BA 0 0.021606 0 0 0 X700110831 HMP 0 0 0 0 0 X700021898 HMP 0 0 0 0 0 X700113546 HMP 0 0 0 0 0 I have been trying to generate the graph for 5-6 days by looking at different tutorials but I am not succeeded in generating the graph that I wanted yet. After doing some tutorials, I installed these packages such as Ggplot2, dplyr, dendextend, RColorBrewer, vegan, GUniFrac, labdsv in R. Is there anyone who can guide me in this or suggest a tutorial which helps me to do the analysis step by step. I am a newbie to R. Any help is much more appreciated. Many thanks and best regards, *Thilini Jayasinghe* PhD Candidate Liggins Institute The University of Auckland Building 503/201, 85 Park Road, Grafton, Auckland 2023 Mobile: +64 220211604 Email: tmad109 at aucklanduni.ac.nz [[alternative HTML version deleted]]
Bert Gunter
2017-Mar-13 17:39 UTC
[R] Principle Coordinate Analysis of unweighted UniFrac distances on R
Please read and follow the posting guide. Plain text only + code that you tried + reproducible exam (google it). In general, we do not do tutorials here, but someone may indeed be able to refer you to one on the web. Googling "principal coordinates analysis tutorial R" appeared to bring up relevant hits, including a tutorial using the vegan package functionality. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Mar 12, 2017 at 10:52 PM, Thilini Maddegoda Vidanelage <tmad109 at aucklanduni.ac.nz> wrote:> Dear all, > > First of all, I am so grateful if you can help me > in analyzing principle coordinate analysis of unweighted UniFrac distances > on R. > > > I am analyzing microbial species profile of an individual (BA) versus > reference population (HMP) and want to generate a PCoA graph to see whether > there any clusters of OTUs related to my samples. > > > > In a table, I have OTUs (percentages) for 6 replicates of one subject (BA) > and 2910 reference subjects. Below is the format [it has only 9 subjects > (including 6 replicates of one subject and 3 reference subjects) in rows > and 5 microbial species in columns]. The second column shows the type of > sample whether it a BA or HMP. > > > > SampleName > > Group > > g__Abiotrophia > > g__Acetanaerobacterium > > g__Acetatifactor > > g__Acetivibrio > > g__Acetobacter > > 1970_I > > BA > > 0 > > 0.038857 > > 0.003473 > > 0 > > 0 > > 1970_III > > BA > > 0 > > 0.035763 > > 0 > > 0 > > 0 > > 1970_IV > > BA > > 0 > > 0.021248 > > 0 > > 0 > > 0 > > 2016_I > > BA > > 0 > > 0.015537 > > 0 > > 0 > > 0 > > 2016_II > > BA > > 0 > > 0.02313 > > 0 > > 0 > > 0 > > 2016_III > > BA > > 0 > > 0.021606 > > 0 > > 0 > > 0 > > X700110831 > > HMP > > 0 > > 0 > > 0 > > 0 > > 0 > > X700021898 > > HMP > > 0 > > 0 > > 0 > > 0 > > 0 > > X700113546 > > HMP > > 0 > > 0 > > 0 > > 0 > > 0 > > > > I have been trying to generate the graph for 5-6 days by looking at > different tutorials but I am not succeeded in generating the graph that I > wanted yet. After doing some tutorials, I installed these packages such as > Ggplot2, dplyr, dendextend, RColorBrewer, vegan, GUniFrac, labdsv in R. > > Is there anyone who can guide me in this or suggest a tutorial which helps > me to do the analysis step by step. I am a newbie to R. > > Any help is much more appreciated. > > > > Many thanks and best regards, > *Thilini Jayasinghe* > PhD Candidate > Liggins Institute > The University of Auckland > Building 503/201, 85 Park Road, Grafton, Auckland 2023 > Mobile: +64 220211604 > Email: tmad109 at aucklanduni.ac.nz > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.
Martin Maechler
2017-Mar-14 08:03 UTC
[R] Principal Coordinate Analysis of unweighted UniFrac distances on R
>>>>> Bert Gunter <bgunter.4567 at gmail.com> >>>>> on Mon, 13 Mar 2017 10:39:49 -0700 writes:> Please read and follow the posting guide. Plain text only > + code that you tried + reproducible exam (google it). > In general, we do not do tutorials here, but someone may > indeed be able to refer you to one on the web. Googling > "principal coordinates analysis tutorial R" appeared to > bring up relevant hits, including a tutorial using the > vegan package functionality. > Cheers, Bert Bert Gunter [....] and *PLEASE* do spell it correctly : "principal", *NOT* 'principle' (I've corrected it in the 'Subject' as I don't want to create another google hit for the wrong spelling ...) Martin Maechler