Open emankhalaf opened 6 years ago
Thank you for your suggestion with Heatmap but what does it means "scaleyellowred" thanks
emankhalaf I am having the same issue.... OTU IDs instead of taxonomic classification.
Does someone know how to solve it????
Thanks!
I added the taxonomy (at genus level) manually. If you came up with a solution, please pass it to the forum! Thanks
On Fri, Oct 4, 2019 at 3:01 PM nataliagaeta29 notifications@github.com wrote:
emankhalaf I am having the same issue.... OTU IDs instead of taxonomic classification.
Does someone know how to solve it????
Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joey711/phyloseq/issues/970?email_source=notifications&email_token=AGJ2WVY6DPDLLUMXJBRRCLDQM6OH7A5CNFSM4FLMNFJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAMXUWQ#issuecomment-538540634, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJ2WVYUUJWAHORBOVREJIDQM6OH7ANCNFSM4FLMNFJA .
-- Eman M Khalaf (PhD) Post doctoral fellow, University of Guelph, ON, Canada. Lecturer of Microbiology, Faculty of Pharmacy Damanhour University, Egypt e.mail: eimanpharmacist@gmail.com Cell Phone: 002-01005043084
Hi!
I found a code that worked for me! (Using a top20 phyloseq object)
Initially I had the same problem using the following code:
plot_heatmap(top20_phyloseq_object, species.lable="Genus", sample.label = "V4")
But, this one: plot_heatmap(physeq_top20_object, taxa.label = "Genus", sample.label = "V4") worked.
(Apparently, my problem was the absence of "taxa.label")
I hope it works for you too!
Sorry, it is okay for the heatmap, I am using the following: p1 <- plot_heatmap(rhizo.gen_top50r, "NMDS", "bray", "Treatment", "Genus", taxa.order="Genus", sample.order="Treatment", low="#FFFFCC", high="#000033", na.value="white") print(p1) + theme(legend.position = "right", legend.direction = "vertical")
I assume you mean relative abundance bar charts??
On Fri, Oct 4, 2019 at 3:29 PM nataliagaeta29 notifications@github.com wrote:
Hi!
I found a code that worked for me! (Using a top20 phyloseq object)
Initially I had the same problem using the following code:
plot_heatmap(top20_phyloseq_object, species.lable="Genus", sample.label = "V4")
[image: image] https://user-images.githubusercontent.com/54448811/66236941-c2a23e00-e6c1-11e9-85ae-a305f0a91eea.png
But, this one: plot_heatmap(physeq_top20_object, taxa.label = "Genus", sample.label = "V4") worked.
(Apparently, my problem was the absence of "taxa.label")
[image: image] https://user-images.githubusercontent.com/54448811/66237401-fd58a600-e6c2-11e9-8b5d-b8e871fabf91.png
I hope it works for you too!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/joey711/phyloseq/issues/970?email_source=notifications&email_token=AGJ2WV52NRLKEEGPV34SKF3QM6RQXA5CNFSM4FLMNFJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEAMZUJY#issuecomment-538548775, or mute the thread https://github.com/notifications/unsubscribe-auth/AGJ2WV6YX2IBRP5SUGMZL3DQM6RQXANCNFSM4FLMNFJA .
-- Eman M Khalaf (PhD) Post doctoral fellow, University of Guelph, ON, Canada. Lecturer of Microbiology, Faculty of Pharmacy Damanhour University, Egypt e.mail: eimanpharmacist@gmail.com Cell Phone: 002-01005043084
Hello, I have used two different methods to generate a heatmap with dendogram. The first and easiest one using Phyloseq tutorial: heatmap(otu_table(physeq)) print.pdf
The second using the following code:
Extract abundance matrix from phyloseq object
OTU = as(otu_table(physeq), "matrix")
coerce to data frame
OTUdf = as.data.frame(OTU)
transform the raw counts of reads to proportions
OTUdf.prop <- OTUdf/rowSums(OTUdf) OTUdf.prop[1:3, 1:3] heatmap(as.matrix(OTUdf.prop), Rowv = NA, Colv = NA, col = scaleyellowred)
heatmap(as.matrix(OTUdf.prop), Rowv = NA, Colv = NA, col = scaleyellowred, margins = c(10, 2))
row.clus <- hclust(OTUdf.dist, "aver")
add a column dendrogram to cluster the genera that occur more often together
OTUdf.dist.g <- vegdist(t(OTUdf.prop), method = "bray") col.clus <- hclust(OTUdf.dist.g, "aver")
but as shown in the attached graph, the otus are displayed by their IDs and I would like to show them by their taxonomic classification (genus level).
One more question, I don't know how to group variables in the regular heatmap (pathogen-treated together and control samples together)?
Thanks in advance Eman