Comments (8)
Should the issue be closed?
from miaviz.
You can do: plotAbundance(se, add_x_text=TRUE)
I have now added an example on function manpage in a forthcoming PR.
See help("mia-plot-args") for more options (mentioned in function manpage but yep, perhaps a bit difficult to find).
from miaviz.
Thank you! But is it also possible to display the group names (of the grouping variable that it is used in order_sample_by
) instead of the individual sample names? Otherwise it is difficult to fit all the individual names in the plot.
from miaviz.
Do you something like
plotAbundance(se, features = "SampleType")
from miaviz.
Yes, but this does indeed generate another barplot for the groups, right? And I could then merge both together using wrap_plots
. But I was trying to add only the group names (once for all the samples belonging to the same group) to the X axis of the abundance plots (as samples have already been ordered by groups) or add something that indicates the different groups of the samples without the need of adding this additional plot generated by features = "SampleType"
.
from miaviz.
Right. I am not sure if this is easily possible currently. It is rather complicated scenario to have in a general case, where the group sizes and numbers of groups can potentially vary a lot. Also not sure how good ggplot support there is to this feature. Ideally, this could utilize already existing ggplot techniques. If there are pointers, we could have a look.
from miaviz.
Yes, thank you very much! I guess this is a rather specific case.
from miaviz.
Can you provide a workable example descibing your case?
I think the easiest solution would be to create a temporary object and rename the colnames. SOmething like this;
tmp <- se
colnames(tmp) <- colData(tmp)$whatever
plotAbundance(se, add_x_text=TRUE)
Depending on your number of samples, this might look ok, but I would try to optimize the wrapping of the two objects. The example give in https://microbiome.github.io/miaViz/reference/plotAbundance.html
Can be tweaked using the patchwork functions. For example you can remove labels from the second object and print it 1/10th of hight of the first object. FOr more details have a look here https://patchwork.data-imaginist.com/
from miaviz.
Related Issues (20)
- plotAbundance problem HOT 2
- Boxplots significance HOT 4
- plotAbundanceDensity colors
- Plot by group HOT 1
- plotAbundanceDensity not working when counts assay is missing HOT 2
- Replace abund_values with assay_name
- print x-axis label in plotAbundance HOT 2
- Update the pkg in Bioc devel HOT 1
- Check fails HOT 2
- Ordination plots with trajectories: add examples HOT 3
- Enable examples and tests
- Update Bioc devel HOT 1
- argument names
- Default ranks HOT 3
- RDA influences from microViz
- plotAbundanceDensity options
- plotRDA, plot loadings HOT 1
- plotRowTree error
- sysreqs error
- Strange example 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 miaviz.