-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TreeSummarizedExperiment support #158
Comments
Hey, thanks for bringing up TSE. This has actually come up in some discussions, however, (I think) it is not straightforward to implement. Specifically, both TSE and SPE inherit from SCE, so that we cannot inherit slots from one or the other or both, when we like. Instead, SPE would have to inherit from TSE, which inherits from SCE. That said, it's certainly possible, but would add another layer of dependency (& potential instability). Plus extra "cluttering" for those fine without the tree extras... So, I have no strong opinion here, just wanted to clarify the development side of things... |
I see, this seems to be more complicated thing. I don't have direct experience with analyzing spatial microbiome data, so I'm unsure about the necessity of combining @antagomir might have more insights on this. |
It sounds potentially very interesting area for development but it also seems like a major undertaking if those updates should be implemented across the package ecosystem. TSE adds row and col trees to SCE (plus a sequence slot which might be less essential here). In principle, one could just add the same (or similar) tree capacity as an extra feature to SPE directly without the need to inherit TSE. This would not be optimal in terms of SPE vs. TSE interoperability but it would allow development and testing of methods that use feature or sample trees in the spatial context. |
Just throwing this out there... Have you checked out |
Hi Everyone, we already had on slack a similar conversation in 2020 and we already have a similar solution.
I hope this could be helpful. Ciao, edit: as you already know, in several programming languages it is possible to inherit from multiple classes. |
Thanks! I still feel these solutions are somewhat suboptimal and don't fully address the need. Ideally, the object should inherit from both TreeSE, since the entire microbiome ecosystem is built around it, and SpatialExperiment, to allow the use of spatial analysis tools. I'm not sure if there's an optimal solution, but if the inheritance issues could be resolved, there might be potential for a "TreeSpatialExperiment." That said, I'm not an expert in this area, so I'm unsure how necessary this feature is or how much effort should be invested in it. |
Just tried & this works...
...i.e., one could define a class that inherits from both, e.g., defined in an independent package. We could, in principle, also define such a class in SPE, granted it doesn't add any extra dependencies. A specialized show method is really all that'd take. (the other way around is probably suboptimal, since we got |
Cool! I quickly checked and seems to work with TreeSE demoset. If that's all it takes, I believe creating a new class would be beneficial. "Real" class would make microbiome and spatial tools closer to each other. It could be easy to just add to your existing package, but not sure if it is good to add TreeSummarizedExperiment as dependancy as it would be rarely used by most of the users (at least currently) |
I'll give it a try/some more thought... haven't seen it in action, but wondering if there's a way to cheat our way into defining a class using |
I think it would be better to start with a real-world analysis use case before embarking on potentially creating a new class / merging classes. We could also consider discussing this in the Classes working group. |
Agreed! Would be great to have this discussed as it did come up before. - could you perhaps clarify that last point? I am not (directly) spotting any duplication
|
Hi Helena, @HelenaLC Presumably if you have a composed class, you'd need one of each class to create a complete instance of Thanks Dario for creating the issue for the working group. |
Hello!
I want to open discussion about adding a support for TreeSummarizedExperiment (
TreeSE
) object.TreeSE
is a extension toSingleCellExperiment
(SCE
) object by adding slots for row and column trees. These trees are especially relevant in microbiome field where species relations are illustrated as phylogeny trees (rowTree
slot inTreeSE
). You can find more info on microbiome data science andTreeSE
class from here: https://microbiome.github.io/OMA/docs/devel/In microbiome field, large population cohorts are rather common. For instance, Ruuskanen et al., studied large Finnish cohort on how microbiome relates to fatty liver disease. They also studied geographical regions.
There might not be as many applications for images as in spatial transcriptomics, and coordinates (or location groups) can be stored in
colData
. However, I think supporting alsoTreeSE
might benefit both fields by allowing microbiome researchers to access tools used in spatial transcriptomics and vise versa. This might give us an additional synergy as it further extends theSummarizedExperiment
ecosystem, ultimately reducing redundant efforts and enhancing collaboration.Because
TreeSE
isSCE
, we can already coarseTreeSE
toSpatialExperiment
, however, we loseTreeSE
-specific slots.-Tuomas
The text was updated successfully, but these errors were encountered: