Create multimedia.qmd - #768
Conversation
There was a problem hiding this comment.
Thanks!
Check the suggestions and the following:
-
increase support for the mia and (Tree)SummarizedExperiment methods when possible, this is very useful for compatibility with many other methods; I added suggestions. Also multimedia seems to support SE so this should be done.
-
Let us try to avoid repetition in the code; this has now two almost identical parts. Shall we prepare example data that is readily usable for the examples?
-
I am wondering if there would be a way to combine the two mediation chapters into one?
-
If we consider these methods widely usable we should consider providing wrappers for the interpretation, summaries, and visualizations of the results; either as contributions to "multimedia" package, or into mia or some other pkg (doesn't matter which pkg as long as it works)
|
Could you resolve the cases you have closed (from the "Resolve" buttons)? |
|
Fixed most of the detailed comments, still working on the more genral ones like creating pkg. Will finish this asap |
|
Can you resolve the completed suggestions above and confirm if this is ready to merge? |
Just fixed some minor inconsistence in the name of variables
|
To be checked in more detail before merge, regarding the following:
|
Hi Leo, thank you for the suggestions. I have added some wrapper functions, especially to where you indicated. For the data cleanning steps, do you mean we can remove those part, and add some texts to explain instead? |
|
The data cleaning part would work best if we include a suitable cleaned demo data in the R pkg, then we can skip the data cleaning steps in OMA. The problem is that if we could do this with every single method but then more than half of the book might easily be data cleaning examples, and this is also shifting the focus from the actual method to general data processing steps -> can we include demo data set/s in the multimedia, mia, or other pkg, or can we use already existing demo data sets? |
|
Regarding the wrappers, we could see if we can include these in a package if they would be generally useful anyway. |
|
Hi Leo – just wanted to quickly chime in here. This dataset is a special case where we don’t have a conventional, well-defined outcome for mediation analysis. Instead, the outcome is a dysbiosis score derived from taxonomic profiles, as described by Lloyd-Price et al. (2019), which, to my knowledge, hasn’t been implemented elsewhere. We are already drawing the data from curatedMetagenomicData, but creating the dysbiosis score is a necessary step to showcase the mediation analysis. |
|
Thanks. I think that dysbiosis score could then stay there. Let's check @TuomasBorman feedback. |
TuomasBorman
left a comment
There was a problem hiding this comment.
Thanks, looks very good! However, there are couple points to discuss.
This book is intended as teaching material to demonstrate specific analyses and tasks. The main focus is on the underlying ideas and concepts rather than implementation details. Therefore, the code is kept as simple as possible to achieve the intended outcomes. More polished analyses, including advanced plots, are better suited for workflow packages (we are also considering creating workflow package to showcase more complex analyses).
There are couple lengthy code chunks that do operations to results. Having these long chunks have opposite effect as readers are exhausted by the amount of code and they cannot focus on the main points. Everything that is not relevant for the main point should be removed even though plots or names would not be optimal.
Ideally, these wrappers will be implemented in a package, but of course it takes some time. At least, we should have plan to implement them. If we just leave it here, these will be never implemented as we are very busy with everything.
|
Can you @YihanLiu4023 confirm when you're ready with the updates? Can you also press the "Update branch" button above to ensure that this PR is in sync with the latest devel branch. |
|
Updated file submitted! |
antagomir
left a comment
There was a problem hiding this comment.
Thanks - some points to clarify still.
Overall this looks good but it will be essential to consider the following:
-
Data cleaning operations should be either ignored, or readily cleaned demo data set should be used (it can be placed to one of our packages). Otherwise OMA would be primarily a data cleaning example collection..
-
We need to check if any ready-made functionality is available to fetch and visualize results from mediation analyses. Now this is done with custom code. Maybe multimedia package has some utilities and if not, we should see if some tasks are so central that they should be standardized (either into multimedia package as contributed PR, or into mia).
|
This seems nearly complete. I picked the following points from above. Can you confirm this is OK @YihanLiu4023 ?
|
|
|
@YihanLiu4023 can you resolve the remaining comments, then we approach completion? |
|
@YihanLiu4023 kindly confirm when this is complete based on the feedback. |
|
@RiboRings you commented, could you resolve responses that are ok? |
|
Hi @YihanLiu4023! I opened a pull request with some adjustments to your branch: YihanLiu4023#1 Please accept it so the changes are reflected here, and check that the code still runs correctly. |
|
Two main considerations: I am not getting what exactly is multi-omic about multimedia. In the chapter, microbiome and pathway experiments are analysed separately (with identical pipelines). In my understanding this isn't considered multi-omics since it isn't combining different omics into a single analysis. If the idea is to study mediation using several features together (from a single omic type), multivariate would be the correct term to use here. But it should not be called multi-omic or multimodal. Also, the chapter is relatively computationally intensive. To keep the book deployment short, reduce bootstrap iterations to the minimum where you still get similar results, and comment that ideally some N iterations should be run. |
Refine multimedia chapter
|
Accepted! |
|
|
Thanks a lot @YihanLiu4023! This is ready from my side. @antagomir @himelmallick @TuomasBorman any other thoughts on the last few comments above or just in general? |
Sounds great, thanks! I'm happy to work on any further comments. |
antagomir
left a comment
There was a problem hiding this comment.
Thanks! Could you clarify the necessity of the second case (pathways)? At a quick look it seems very similar to the first part (taxa).
|
|
||
| # Scale counts to [0, 1] | ||
| assay(se) <- assay(se) / 100 | ||
|
|
There was a problem hiding this comment.
@TuomasBorman should we add this as ready-made demo data set? This processing code takes quite some space.
There was a problem hiding this comment.
Yes we should. This takes space, but also readers focusing capacity. Can we add it, e.g. to microbiomeDataSets
| the outcome, but pathways abundances as the mediation variables instead of the | ||
| relative species abundance. | ||
|
|
||
| ## Performing multivariate mediation analysis for pathways abundances {#sec-pathways-abundances} |
There was a problem hiding this comment.
This part seems very much like repetition of what was already above.
Is this just a different data type (e.g. pathways), or is there a genuine difference so that it is justified to include this full second example workflow starting here?
There was a problem hiding this comment.
I had a discussion with Dr. Mallick with about the pathway section before, and we originally decided to include both of them because species-level analyses capture different aspects of microbiome data and can yield different mechanistic insights. But I totally understand your concerns and I'm double checking this with Dr. Mallick again.
|
Would it make sense to combine the multimedia chapter with the existing mediation chapter? Then we can split it into a univariate and a multivariate section. |
|
OK to me if this can be added fast - keeping in mind that our priority is to get this PR merged soon and we can then continue to reorganize material. @RiboRings and @YihanLiu4023 can you see how to do it unless there are other comments (@himelmallick @TuomasBorman ) |
I can remove the pathway section as Dr. Mallick also agrees on this to keep things simple. Please let me know whether we need to merge this part to the mediation chapter, do I need to pull request on that chapter? |
|
I would suggest not merging with the current mediation chapter, as we will expand this one with Zentangler (https://github.com/himelmallick/Zentangler/) later on when it's on Bioconductor. This also keeps the two very different chapters separate: 1) single mediator, and 2) multiple mediators, with the latter being extensible to the multimodal case. Thanks, all, for the long discussion on this! We are almost there. |
|
Ok with me. |
|
@TuomasBorman yet to confirm |
| ``` | ||
|
|
||
| Building upon the concepts and workflows presented in the previous chapter on | ||
| mediation analysis, here we demonstrate how to perform **multivariate** |
There was a problem hiding this comment.
There could be a link to the previous chapter
There was a problem hiding this comment.
Do you mean adding a hyperlink to the previous chapter?
|
Sorry for long delay. There has been little bit too much work going on. I am fine with separate chapters especially as Himel explained as there are major differences. We can also in the future see how to improve the topic linking between chapters. I would still remove the data wrangling related stuff and add the example dataset for instance to |
|
I agree about the data.
Could we add this data set as a standard package example data set in e.g. The preparation scripts in the package should go to See here for more instructions on adding data in packages: Can you open the PR @YihanLiu4023 or how shall we proceed? |
Yes, I can follow your instructions to add the data and script to |
No description provided.