Heat tree is not correctly displaying read abundance

134 views
Skip to first unread message

scruffyth...@googlemail.com

unread,
Mar 8, 2017, 11:00:49 AM3/8/17
to MetacodeR, johns...@cardiff.ac.uk
Hi,

I'm plotting heat trees for subsets of my data, with node colour dictated by read abundance per taxon (calculated using the function in the Tara oceans vignette). However, the trees are coming out with subtaxa that have 'hotter' colours than their parent taxa. The read abundance column appears to be correct, but for some reason the supertaxa are coming out with the wrong colours relative to their value in the abundance column. Any ideas what could be causing this? The same thing happens if node size is used instead of node colour.

Thanks!

Sarah

Zachary Foster

unread,
Mar 8, 2017, 11:50:23 AM3/8/17
to MetacodeR, johns...@cardiff.ac.uk, scruffyth...@googlemail.com
Hi Sarah,

Thanks for reporting this. I don't remember ever coming across something like that. Can you send me a reproducible example of this so I can figure out what is going on? For example, can you reproduce the issue with a small subset of the data and send me the code and data? Thanks,

-Zach

scruffyth...@googlemail.com

unread,
Mar 8, 2017, 12:03:28 PM3/8/17
to MetacodeR, johns...@cardiff.ac.uk, scruffyth...@googlemail.com
Hi Zach,

Thanks for the swift reply. I'll e-mail you an example directly, as my data is currently unpublished so I can't upload it. In the meantime, I seem to have stumbled across a solution (although I'm not sure how it differs from what I had before). I had been using node_color = subset$taxon_data$read_counts, but replacing that with node_color = read_counts produces much more sensible plots - although it seems to be plotting read counts from the full dataset, rather than the subset.

Thanks again,

Sarah

Zachary Foster

unread,
Mar 9, 2017, 11:45:32 AM3/9/17
to MetacodeR, johns...@cardiff.ac.uk, scruffyth...@googlemail.com
Hi Sarah,

So I figured it out. It was a bug I never noticed since I always use the variable name by itself. I have fixed it in the development version and the next CRAN version will have the fix. If you want, you can install the development version using the following:

devtools::install_github("grunwaldlab/metacoder")

Thanks for emailing the example!


Reply all
Reply to author
Forward
0 new messages