### Author: Franck Soubès ### Bioinformatics Master Degree - University of Bordeaux, France ### Link: https://github.com/GeT-TRiX/MA_Trix_App/ ### Where: GET-TRiX's facility ### Application: MATRiX is a shiny application for Mining and functional Analysis of TRanscriptomics data ### Licence: GPL-3.0 observe({ req(Venncluster()) updateSliderInput(session, "clusterNumber", max = nrow(summary(Venncluster()$mygodavid))) }) callModule(downoutputfiles, "saveclustvenn", projectname = projectname , suffix=paste0( '_venn', input$clusterNumber , "cluster.", sep='' ), data = acyclgo , w =12, h = 12 , clustvenn = T) output$clusterPlot <- renderPlot({ validate( need(csvf(), 'You need to import data to visualize this plot!') %next% need(choix_cont(), 'Set your thresholds and then select your comparison to display the Venn diagram!')%next% need(input$selcontjv ,'You need to click on a number (Venn diagram) to display the data table!')) req(Venncluster()) plot2D(Venncluster()$mygodavid, input$clusterNumber) }) #' davidtag is a reactive function that return an induced GO DAG generated by the DAVID Functional Annotation Chart report #' #' @param Venncluster A reactive dataframe #' @param clusterNumber A reactive numeric value to select your cluster #' @param catvenn A reactive character to select your category #' #' @return A graph object as returned by inducedTermGraph or termGraphs #' #' @export davidtag<- reactive({ req(Venncluster()) davidGODag<-DAVIDGODag(members(Venncluster()$mygodavid)[[input$clusterNumber]], pvalueCutoff=0.1, input$catvenn ) }) #' acyclgo is a function that Create a plot using Rgraphviz of a graph object as returned by either termGraphs or inducedTermGraph. #' If a GOHyperGResult object is provided, then the nodes will be colored according to significance (based on the result object's pvalueCutoff) and counts will be added to show the size of the categories. #' #' @param davidtag A graph object as returned by inducedTermGraph or termGraphs #' #' @return GOHyperGResult object #' #' @export acyclgo <- function() { req(davidtag()) result = plotGOTermGraph(g=goDag(davidtag()),r=davidtag(), max.nchar=40, node.shape="ellipse") return(result) } Venncluster <- callModule(queryDavid, "vennanalysis", data = reactive(vennfinal()[[1]]$GeneName) , parent_session = session, tabsetpanid= "Vennd", tabPanel= "venngopanel")