Comments (3)
Thank you for pointing this out and the very detailed example! You are correct that the na's are dropped in the tax_glom function. We will work on making this more apparent to users and potentially disabling it.
In the meantime, the way around this issue is to perform all the functions that occur in prep_mdf independently rather than running the prep_mdf function (i.e. run tax_glom with NArm = FALSE, transform_sample_counts, and ps_melt).
Example
# perform custom mdf_prep
mdf <- ps %>%
# agglomerate at specified subgroup level (i.e. Genus)
speedyseq::tax_glom(subgroup_level, NArm = FALSE) %>%
# transform sample counts / normalize as desired
phyloseq::transform_sample_counts(function(x) { x/sum(x) }) %>%
# melt the phyloseq object
speedyseq::psmelt()
# Remove zeros
mdf_prep <- mdf[mdf$Abundance > 0, ]
from microshades.
Thanks for looking into the solution and sending the new prep_mdf
code!
from microshades.
Hi @sterrettJD,
The latest version of microshades now has the option to remove NAs and the default behavior is to NOT remove NAs. See this vignette for more details.
Thanks again for bringing this to our attention!
~Lisa
from microshades.
Related Issues (20)
- Reference Links
- re: no Microshades hexagon logo HOT 1
- Issue when generating a color object HOT 5
- inconsistent bar width HOT 10
- sink_abundant_groups not working HOT 1
- Add to CRAN & conda? HOT 1
- Custom legend below plot HOT 2
- [BUG/Version Control] `fct_explicit_na()` was deprecated in forcats 1.0.0. HOT 2
- Readme vignette links
- Install bug/fix HOT 1
- Error with plot_microshades() with R 4.3.0 HOT 4
- TreeSummarizedExperiment support
- sink most abundant group taxonomy
- custom legend configuration
- Reduce parameters
- microshades GP example
- reorder_samples_by() group level
- color_reassign()
- flip stack orientation HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from microshades.