GithubHelp home page GithubHelp logo

microbiome / iseetree Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 654 KB

extension of iSEE for TreeSE

Home Page: https://microbiome.github.io/iSEEtree/

R 98.15% CSS 1.85%
microbiome shiny-apps visualisation

iseetree's Introduction

iSEEtree

issues pulls R-CMD-check codecov codefactor

The goal of iSEEtree is to provide panels related to TreeSummarizedExperiment objects which facilitate the interactive visualisation of microbiome data in iSEE.

Installation instructions

The release version of iSEEtree can be installed from Bioconductor as follows:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

BiocManager::install("iSEEtree")

Contributors or users interested in the latest functionality can install the devel version of iSEEtree as follows:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")

# The following initializes usage of Bioc devel
BiocManager::install(version='devel')

BiocManager::install("iSEEtree")

Example

The basic functionality of iSEEtree can be explored as follows:

library(iSEEtree)
library(mia)
library(scater)

# Import TreeSE
data("Tengeler2020", package = "mia")
tse <- Tengeler2020

# Add relabundance assay
tse <- transformAssay(tse, method = "relabundance")

# Add reduced dimensions
tse <- runMDS(tse, assay.type = "relabundance")

# Launch iSEE
if (interactive()) {
  iSEE(tse)
}

Code of Conduct

Please note that the iSEEtree project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms. Contributions are welcome in the form of feedback, issues and pull requests. You can find the contributor guidelines of the miaverse here.

Acknowledgements

Please note that iSEEtree was only made possible thanks to many other R and bioinformatics software authors, which are cited either in the vignettes and/or the paper(s) describing this package. In particular, iSEEtree implements the miaViz package for microbiome data visualisation to create panels that are specific for TreeSummarizedExperiment objects. Not surprisingly, it also depends on the generic panels from iSEE.

This package was developed using the following resources:

  • usethis to generate an initial template.
  • Continuous code testing is performed on GitHub actions and include R CMD check, BiocCheck and testthat.
  • Code coverage assessment is possible thanks to codecov.
  • The documentation website is automatically updated thanks to pkgdown.
  • The documentation is formatted thanks to devtools and roxygen2.
  • All the actions above are made reproducible by rworkflows

iseetree's People

Contributors

riborings avatar elyseraidarian avatar antagomir avatar

Stargazers

 avatar Federico Marini avatar Sean Davis avatar

Watchers

 avatar  avatar

Forkers

elyseraidarian

iseetree's Issues

Error in get: object '.SigLength'

Listening on http://127.0.0.1:6564
Warning in .refineParameters(extra[[idx]], se) :
no 'reducedDims' with non-zero dimensions for 'ReducedDimensionPlot'
Warning: Error in get: object '.SigLength' not found
48: get
47: .findNextFromTable
46: addNextMethod
44: callNextMethod
43: .createObservers
41: .initialize_server
40: server
3: runApp
2: print.shiny.appobj
1:

Add panel tours to current classes

Panel tours work as a sort of interactive documentation that explain the observers in the parameter boxes. Click the question mark while the app is on and you'll find out. While RowTreePlot already has a few tours, it would be nice adding tours for its remaining parameters, and then add tours to all the other panels:

  • finish tours in RowTreePlot
  • add tours to AbundancePlot
  • add tours to AbundanceDensityPlot
  • add tours to RDAPlot

There are two types of tours, a general tour for the param boxes (which can be defined with the method .definePanelTour) and specific tours for every observer (defined with .addSpecificTour function inside .defineInterface method). Examples of how to implement these two types of tours are in class-RowTreePlot.R.

Deploy app on a server

What if iSEEtree was continuously deployed on a server? This would be a great resource for users to get familiar with the interface without having to run the app from R. shinyapps.io offers 25 hours of active deployment per month. However, if we deployed iSEEtree on the utu datascience server it would be always active (even though sometimes the server is rebooted).

Things to do:

  • consider which deployment options are available (shinyapps.io, utu datascience server, ...)
  • test if iSEEtree can be run on the chosen server (for example, with Tengeler2020)
  • track changes and update app with GitHub Actions
  • make it accessible to users and add links to iSEEtree documentation and maybe OMA

Package website

Consider whether a website should be generated with pkgdown, similar to mia and miaViz packages, or if the iSEE website could be a more appropriate place for the introduction to this package.

Fix row/column selection

Even though the selection parameters box appears in the current panels, the selection is not received from transmitting panels like RowDataTable. It is important to figure out why this is the case.

You can test in the following example by activating row selection from the row data plot. While this works for the complex heatmap (after turning off custom row selection in the data params box), it doesn't work for the abundance density plot.

library(iSEEtree)
library(mia)

# Import TreeSE
data("GlobalPatterns", package = "mia")
tse <- GlobalPatterns

# Agglomerate TreeSE by Genus
tse_genus <- mergeFeaturesByRank(tse,
                                 rank = "Order",
                                 onRankOnly = TRUE)

# Add relabundance assay
tse_genus <- transformAssay(tse_genus, method = "relabundance")

# Add PCA
tse_genus <- scater::runPCA(tse_genus, assay.type = "counts")

# Launch iSEE
if (interactive()) {
  iSEE(tse_genus, initial = c(ColumnDataTable(), ComplexHeatmapPlot(), AbundanceDensityPlot()))
}

Add RowTreePlot to default panels for TreeSummarizedExperiment objects

Given the following example, we see that RowTreePlot has to be specified in initial so that it is included in the panels to visualise.

library(mia)
data("GlobalPatterns", package = "mia")
tse <- GlobalPatterns

tse_genus <- mergeFeaturesByPrevalence(tse,
                                       rank = "Genus",
                                       prevalence = 50/100)

tse_genus <- addTaxonomyTree(tse_genus)
tse_genus <- transformAssay(tse_genus, method = "relabundance")

if (interactive()) {
  iSEE(tse_genus, initial=list(ColumnDataPlot(PanelId=1L),
                               RowTreePlot()))
}

Ideally, RowTreePlot should be made default panel for TreeSummarizedExperiment class so that it is returned automatically by this code:

if (interactive()) {
  iSEE(tse_genus)
}

Add parameters to data boxes of current panels

Most of the data boxes of the current panels are still empty. Meaningful data parameters should be discussed and added.

The main difference between data box and visualisation box is that data boxes should contain parameters that significantly change the data in a plot (number of points, values of the axes, measured metric, transformations, etc.), whereas visualisation parameters just change aesthetics (shape by, colour by, etc.).

Implement new methods for the current panels

These 3 methods are usually found in iSEE panels. It would be useful to understand what they do, if relevant add them to iSEEtree panels and make sure they work as expected:

  • .cacheCommonInfo
  • .refineParameters
  • .exportOutput

It might also be worth checking if there are other iSEE methods that are still missing in iSEEtree panels.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.