Giter VIP home page Giter VIP logo

genetonic's Introduction

GeneTonic

R build status Lifecycle: stable Codecov.io coverage status

The goal of GeneTonic is to analyze and integrate the results from Differential Expression analysis and functional enrichment analysis.

This package provides a Shiny application that aims to combine at different levels the existing pieces of the transcriptome data and results, in a way that makes it easier to generate insightful observations and hypothesis - combining the benefits of interactivity and reproducibility, e.g. by capturing the features and gene sets of interest highlighted during the live session, and creating an HTML report as an artifact where text, code, and output coexist.

GeneTonic can be found on Bioconductor (https://www.bioconductor.org/packages/GeneTonic).

If you use GeneTonic in your work, please refer to the original publication 📄 on BMC Bioinformatics (https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-021-04461-5, doi: 10.1186/s12859-021-04461-5).

A preprint 📄 on GeneTonic is available on bioRxiv at https://www.biorxiv.org/content/10.1101/2021.05.19.444862v1.

Installation

You can install the development version of GeneTonic from GitHub with:

library("remotes")
remotes::install_github("federicomarini/GeneTonic", 
                        dependencies = TRUE, build_vignettes = TRUE)

Example

This is a basic example which shows you how to use GeneTonic on a demo dataset (the one included in the macrophage package).

library("GeneTonic")
example("GeneTonic")

# which will in the end run
library("macrophage")
library("DESeq2")
library("org.Hs.eg.db")
library("AnnotationDbi")

# dds object
data("gse", package = "macrophage")
dds_macrophage <- DESeqDataSet(gse, design = ~line + condition)
rownames(dds_macrophage) <- substr(rownames(dds_macrophage), 1, 15)
dds_macrophage <- estimateSizeFactors(dds_macrophage)

# annotation object
anno_df <- data.frame(
  gene_id = rownames(dds_macrophage),
  gene_name = mapIds(org.Hs.eg.db,
                     keys = rownames(dds_macrophage),
                     column = "SYMBOL",
                     keytype = "ENSEMBL"),
  stringsAsFactors = FALSE,
  row.names = rownames(dds_macrophage)
)

# res object
data(res_de_macrophage, package = "GeneTonic")
res_de <- res_macrophage_IFNg_vs_naive

# res_enrich object
data(res_enrich_macrophage, package = "GeneTonic")
res_enrich <- shake_topGOtableResult(topgoDE_macrophage_IFNg_vs_naive)

GeneTonic(dds = dds_macrophage,
          res_de = res_de,
          res_enrich = res_enrich,
          annotation_obj = anno_df,
          project_id = "my_first_genetonic")

Usage overview

You can find the rendered version of the documentation of GeneTonic at the project website https://federicomarini.github.io/GeneTonic, created with pkgdown.

Sneak peek?

Please visit http://shiny.imbei.uni-mainz.de:3838/GeneTonic/ to see a small demo instance running, on the macrophage dataset.

Development

If you encounter a bug, have usage questions, or want to share ideas and functionality to make this package better, feel free to file an issue.

Code of Conduct

Please note that the GeneTonic project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

MIT © Federico Marini

genetonic's People

Contributors

annekathrinsilvia avatar federicomarini avatar jwokaty avatar nturaga avatar simontstahl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

genetonic's Issues

[Question]: Standing up GeneTonic on a shiny server

Hi

Thanks a lot for the great and cool work.

Is it easy enough to have GeneTonic as a shiny server a la ideal and pcaExplorer

When I do this below within RStudio, a browser does open up with the loaded dataset similar to what you have at http://shiny.imbei.uni-mainz.de:3838/GeneTonic/

library(GeneTonic)
GeneTonic()
example("GeneTonic", ask = FALSE)

Is there a way to replace the datasets etc via the browser - functionalities seen in ideal/pcaExplorer shiny server editions?

Thanks in advance

column names in gs_heatmap cutoff

I have long sample names and when I run gs_heatmap in GeneTonic the column names are cut off from the resulting heatmap. I cannot find the command to adjust the height of the column names, similar to column_names_max_height in ComplexHeatmap. Is there a similar argument to adjust the column name height?

"get_aggrscores" function produces "NAs"

Dear Federico,

I want to apply "GeneTonic" to my dataset. When I used the "get_aggrscores," it returned "NAs" without generating error messages. I have attempted to debug the code but have been unable to identify the root cause of this issue.
I would greatly appreciate your advice on resolving this issue.

Thank you in advance for your help and support.

Best regards,
Anita

sessionINFO

res_enrich

Subset gs_heatmap

It would be nice to have the option to subset the gs_heatmap only to specific samples/conditions.

Subset summary heatmap

It would be nice to be able to subset/zoom in the summary heatmap. Maybe we can do someting with ComplexInteractiveHeatmap here?

export plotly objects as vectorial elements

Hi Federico, i am already enjoying the GeneTonic.

I would like to know if theres is a proper way to export the plotly objects, such as gs_radar graph, as a vectorial image (.svg or .pdf).

Kind regards,
Luciano

How to best share output with collaborators?

Hi,
I just saw your publication in BMC Bioinformatics on GeneTonic, and I would like to say thanks for developing such nice project!

I am playing now with the sample files and code you provided, and everything is working nicely.

In the end I obviously would like to use it with my own data sets. I also analyze datasets for coworkers (that are not very familiar with R/Bioconductor etc). Therefore I was wondering what the best way is to share the interactive GeneTonic output with them. Ideally I would like to send them e.g. the HTML file (+ associated content) so they can interactively explore the results themselves on their own computer. So as a test I naively saved the 'Shiny session' in Firefox as HTML, and then opened it in Chrome, to find out that this is not working...
So, do you have any suggestions on how to do this?

Please note that I don't know anything about Shiny apps.... so it might very well be that (hopefully!) I missed something obvious, or that what I want is rather not possible...

Thanks!
G

Code not shown

The code modal is currently not show in the deployed server

error with enrichment_map()

Hi there,
I am writing because I keep finding an error while trying to produce an enrichment_map.
When I call the enrichment_map like this:

emg <- enrichment_map(
  res_enrich = res_enrich,
  res_de = DEseqdata$DESeq2_results,
  annotation_obj = annotation,
  n_gs = 100, #number of gene sets to be considered.
  overlap_threshold = 0.5,
  scale_edges_width = 200,
  color_by = 'gs_pvalue'
)

I get the following error:

Error in `stop_subscript()`:
! Can't subset columns that don't exist.
x Locations 99 and 100 don't exist.
ℹ There are only 98 columns.
Run `rlang::last_error()` to see where the error occurred.

If I type rlang::last_error() I get:

Backtrace:
  1. GeneTonic::enrichment_map(...)
  3. tidyr:::pivot_longer.data.frame(om_df, seq_len(length(gs_to_use)))
  4. tidyr::build_longer_spec(...)
  5. tidyselect::eval_select(enquo(cols), data[unique(names(data))])
  6. tidyselect:::eval_select_impl(...)
 14. tidyselect:::vars_select_eval(...)
 15. tidyselect:::loc_validate(pos, vars)
 16. vctrs::vec_as_location(pos, n = length(vars))
 17. vctrs `<fn>`()
 18. vctrs:::stop_subscript_oob(...)
 19. vctrs:::stop_subscript(...)
Run `rlang::last_trace()` to see the full context.

The majority of the remaining functions do work, so I cannot really explain why this error. Any suggestion would really help!
Thanks
Luca

bg_ids datatype and creation

Hi I'm working on using your package on my own data but I'm running into an issue with the bg_ids object. My dds object and res object look just like the one in the example but when I run my version of res_macrophage_IFNg_vs_naive$SYMBOL <- rowData(dds_macrophage)$SYMBOL I only get the symbols back

Thanks!
Dani

Genetonic unable to install

Hi,

I have used the package before and love it but this was on a different computer. I am struggling to install the package because of this error:
Error: object ‘universal’ is not exported by 'namespace:backbone'
Backbone package I have is the latest version 2.1.2

Is there a different version of this package i need to use?

Thanks!

Associate annotation information - bg_ids NULL

Hi Federico, thanks for your app which can really make my work a lot easier!
For the first time I am approaching RNAseq data analysis and I am adapting my data to the documentation workflow. Once I get to the re_enrich part, when I create bg_ids it returns me a NULL value. How can I solve this problem?
I tried adding the annotation to the dds object but I get no results. I'll write to you below my code.

colData <- read.table('DATI_GeneTonic/samples_table.txt', sep='\t', row.names = 1,header = T)
files <- file.path('DATI_GeneTonic', colData$seqname_quant, "quant.sf")
names(files) <- rownames(colData)
tx2gene <- readRDS("DATI_GeneTonic/tx2gene.gencode.v38.annotation.RDS")
head(tx2gene)

txi <- tximport(files, type="salmon", tx2gene=tx2gene)
ddsTxi <- DESeqDataSetFromTximport(txi,
colData = colData,
design = ~kit+condition)
dds <- ddsTxi
dds$symbol <- mapIds(org.Hs.eg.db,
keys=gene_ids,
column="SYMBOL",
keytype="ENSEMBL")
rownames(dds) <- substr(rownames(dds), 1, 15)
keep <- rowSums(counts(dds)) > 0
dds <- dds[keep,]
dds <- DESeq(dds)
res_control_mutant <- results(dds, contrast = c("condition", "control", "mutant"), lfcThreshold = 1, alpha = 0.05)
res_control_mutant$symbol <- mapIds(org.Hs.eg.db,
keys=ens.str,
column="SYMBOL",
keytype="ENSEMBL",
multiVals="first")
de_symbols_control_mutant <- deseqresult2df(res_control_mutant, FDR = 0.05)$symbol

bg_ids <- rowData(dds)$symbol[rowSums(counts(dds)) > 0]
NULL

Thanks
Marco

GeneTonic with EdgeR

Hi Federico,
First of all, thanks for the great package. It is a very useful and interesting tool. Really a great job! Thanks

I was wondering if you could adopt your library to accomodate also people that use edgeR for DE calling. I was thinking maybe at some sort of shake function that would take a DGEList object from edgeR and create a "fake" DEseqResult object, with just the minimal info needed for GeneTonic to work. Would that be possible?

Thanks a lot
Luca

Making standalone Desktop app from GeneTonic

Hi all,

Not so much an issue, but a heads-up that I am experimenting with making a standalone desktop app from GeneTonic using "Electron". People have used this approach to distribute Shiny apps previously without having to setup a Shiny server etc.

e.g.
https://towardsdev.com/converting-a-shiny-app-into-a-standalone-desktop-app-for-windows-ca3656da8468

I don't know if it's common knowledge that Shiny apps can be packaged in this way? Would people be interested in hearing more once I get a working version?

GeneTonic does not load

Hi!

I was using GeneTonic, and now I get this message in R:

> library("GeneTonic")

Registered S3 method overwritten by 'htmlwidgets':
  method           from         
  print.htmlwidget tools:rstudio
Error: package or namespace load failed for ‘GeneTonic’:
 object ‘bs4TabPanel’ is not exported by 'namespace:bs4Dash'

And in the bs4Dash I cannot see any package called bs4TabPanel

...
bs4SidebarUserPanel Create a Boostrap 4 dashboard main sidebar
bs4SocialCard AdminLTE3 social card
bs4Sortable BS4 sortable section
bs4Stars AdminLTE3 stars
bs4TabCard Create a Boostrap 4 tabCard
bs4TabItem Boostrap 4 dashboard body
bs4TabItems Boostrap 4 dashboard body
bs4Timeline AdminLTE3 timeline block
bs4TimelineEnd AdminLTE3 timeline block
bs4TimelineItem AdminLTE3 timeline block
bs4TimelineItemMedia AdminLTE3 timeline block
...

Could the package have been renamed?

error with gs_scores()

Hello! I am having issues creating the heatmap that comes with the gs_scoresheat() function and this is because when I run gs_scores() I get the error:

Error in colMeans(thisset_zs) :
'x' must be an array of at least two dimensions

here is the code I'm using:

vst_macrophage <- varianceStabilizingTransformation(kid_dds_trt)
scores_mat <- gs_scores(
se = vst_macrophage,
res_de = kid_res_trt,
res_enrich = res_enrich,
annotation_obj = anno_df
)
gs_scoresheat(scores_mat,
n_gs = 30)

I know this is not the most reproducible problem as you don't have any of the other objects so let me know what else you might need!! Thank you!

GeneTonic stopped working after packages update

GeneTonic shiny app was working fine, but when i tried to make a heatmap following the tutorial the whole R session crashed. I tried updating packages in R and now GeneTonic is broken and I can't reinstall. I get the following error:

library("GeneTonic")

Error: package or namespace load failed for ‘GeneTonic’:
object ‘bs4TabPanel’ is not exported by 'namespace:bs4Dash'

Any help will be highly appreciated. Thanks

Vignette cannot be built

I was not able to build the vignette of the package. I also tried to execute each step manually, but it seems like some data is missing.

gs_horizon

Hi Federico, I would like to know if the gs_horizon is meant to compare enrichment analyses resulting from independent DEG analyses. In my case I am performing three different pairwise comparisons between clones of the same cultivar grown under the same conditions, therefore most enriched processes are shared among the three comparisons.

For each pairwise comparison i have performed independent deseq2 analysis. Afterwards I have performed a geneProfiler analysis, followed by the GeneTonic shaker and aggregate scores functions.

My question is: Is it possible to summarize these three pairwise comparisons into a gs_horizon graph?

I was not able to adapt the instructions shown here: https://federicomarini.github.io/GeneTonic/reference/gs_horizon.html to my datasets..

Thanks in advanced,
Luciano

error installing

Hi, I am trying to use GenTonic in our local server, however I am getting the following error which I cannot find a solution for:

> BiocManager::install("GeneTonic")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details

replacement repositories:
    CRAN: https://cran.rstudio.com/

Bioconductor version 3.15 (BiocManager 1.30.18), R 4.2.0 (2022-04-22)
Installing package(s) 'GeneTonic'
trying URL 'https://bioconductor.org/packages/3.15/bioc/src/contrib/GeneTonic_2.0.2.tar.gz'
Content type 'application/x-gzip' length 9023925 bytes (8.6 MB)
==================================================
downloaded 8.6 MB

* installing *source* package ‘GeneTonic’ ...
** using staged installation
** R
** data
** inst
** byte-compile and prepare package for lazy loading
Error: object ‘universal’ is not exported by 'namespace:backbone'
Execution halted
ERROR: lazy loading failed for package ‘GeneTonic’
* removing ‘/home/user/jmontenegro/R/x86_64-pc-linux-gnu-library/4.2/GeneTonic’

The problem seems to be the object "universal" is not exported, Any suggestions to fix this?

Best regards,

Juan D.

divergent colorBar in DT table centred on 0.5

Amazing resource! My JS is a little rusty but would it be possible to create a divergent colorbar that is centred on 0.5 and ranges [0,1]?

I am not sure how to adapt the sprintf JS lines in the function to do that?

pandoc-citeproc is not available!

When I try the example code below, I got this error "Error in .check_pandoc(ignore_pandoc) : pandoc-citeproc is not available!".

library("GeneTonic")
library("macrophage")
happy_hour(dds = dds_macrophage,
           res_de = res_de,
           res_enrich = res_enrich,
           annotation_obj = anno_df,
           project_id = "examplerun",
           mygenesets = res_enrich$gs_id[c(1:5,11,31)],
           mygenes = c("ENSG00000125347",
                       "ENSG00000172399",
                       "ENSG00000137496")
)

Error in .check_pandoc(ignore_pandoc) : pandoc-citeproc is not available!

I have installed pandoc. But pandoc-citeproc is discontinued. I am using Windows 10. Any suggestions?

> Sys.which("pandoc-citeproc")
pandoc-citeproc 
             "" 

How to deal with NA data for non model species?

Hi Federico,
Thank you for this really nice and helpful package. It is really useful.
I used it for agronomical species (pig and bovine).
I encountered a problem when trying to use enhance_table function. I have the following error :

p <- enhance_table(res_enrich_pig,

  •                res,
    
  •                n_gs = 30,
    
  •                gtl<-gtl_pig,
    
  •                annotation_obj = resannot_Pig,
    
  •                chars_limit = 60)
    

Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, :
les noms de lignes contiennent des valeurs manquantes
I guess the trouble came from the fact that I use ENSEMBLID, convert it in HGNC symbol but as not all genes are identified , I have some missing data (valeurs manquantes in french). Could it be possible to allow missing values in this function ?
Thank you in advance
Regards
Carine

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.