Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • a78cb8f
  • /
  • global.R
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:a51fd96e69572ad51af5a5c7e02d269c89c4baa9
directory badge
swh:1:dir:a78cb8f1c0fca114d6fc7fcdcf6659545570da1b

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
global.R
### 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



# increase loading files
options(shiny.maxRequestSize=128000000)
options(shiny.reactplot=TRUE)

options(digits=3)

userId <- Sys.getenv("SHINYPROXY_USERNAME")
# userId <- "gettrix";
ifelse(userId != "", root <- c(data=paste0("data/", userId),example_data="data_example"), root <- c(example_data="data_example"))
print(root)


cutheatmlist = list( Boxplot = c( `True` = 'Boxplot'), Heatmap=c(`True` = "Heatmap"),
                     Stripchart=c(`Without boxplot`="LB", `With boxplot` = "WB"))


categoerygen = c( `BP`= "GOTERM_BP_ALL", `MF` = "GOTERM_MF_ALL", `CC`=  "GOTERM_CC_ALL", `Kegg`= "KEGG_PATHWAY")

# Loading packages

#sudo apt-get install libv8-dev for V8 package

#~ list.of.packages <- c("AnnotationDbi","shiny","shinythemes","shinyjs","ggplot2","shinyBS","plyr","shinyFiles","xlsx","stringr",
#~                       "BH","data.table","DT","readr","colourpicker","shinydashboard","heatmaply",
#~                       "tools","R.devices","FactoMineR","factoextra","gplots","V8","RColorBrewer","foreach","doParallel",
#~                       "gridExtra","plotly","dplyr","reticulate","Hmisc", "devEMF")

list.of.packages <- c("shiny","shinythemes","shinyjs","ggplot2","shinyBS","plyr","shinyFiles","xlsx","stringr",
                      "BH","data.table","DT","readr","colourpicker","shinydashboard","heatmaply",
                      "tools","R.devices","FactoMineR","factoextra","gplots","V8","RColorBrewer","foreach","doParallel",
                      "gridExtra","plotly","dplyr","reticulate","Hmisc", "devEMF")



new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages,function(x){
suppressPackageStartupMessages(library(x,character.only=TRUE))})

source("css/csstips.R")
source("function/PCA.R")
source("function/heatmtruncated.R")
source("function/formatingtables.R")
source("function/decideTestTrix.R")
source("function/ggstrip_groups.r")
source("function/vennplot.R")
source("function/create_forked_task.R")
source("function/cutheat.R")
source("function/gosearch.R")
source("function/highchartconverter.R")
source("function/EnhancedVolcano.R")
source("./module/csvmodules.R")
source("./module/savemodules.R")
source("./module/Selgroup.R")
source("./module/enrichmodule.R")
source("./module/groupcol.R")
source("./module/magnificentables.R")
source("./module/Savemoduletable.R")
source("./module/getdegenes.R")




################################
######## Chat env             ##
################################

# Globally define a place where all users can share some reactive data.
vars <- reactiveValues(chat=NULL, users=NULL)

# Restore the chat log from the last session.

if (file.exists("chat.Rds") && userId == ""){
  vars$chat <- readRDS("chat.Rds")
} else if(file.exists("./chat/chat.Rds") && userId != ""){
    vars$chat <- readRDS("./chat/chat.Rds")
} else {
  vars$chat <- "Welcome to MATRiX Chat!"
}



#' Get the prefix for the line to be added to the chat window. Usually a newline
#' character unless it's the first line.
linePrefix <- function(){
  if (is.null(isolate(vars$chat))){
    return("")
  }
  return("<br />")
}

################################
######## Variables env        ##
################################


firstcol = "green"
intercol = "black"
lastcol = "red"
wd_path= getwd()
firstdim = 1
secdim = 2


# `%next%` <- shiny:::`%OR%`
`%next%` <- function(a, b) {
  if (is.null(a)) b else a
}


  jsCode <- 'shinyjs.hideSidebar = function(params) { $("body").addClass("sidebar-collapse");
                $(window).trigger("resize"); }';
  jsCode <- 'shinyjs.showSidebar = function(params) { $("body").removeClass("sidebar-collapse");
                $(window).trigger("resize"); }';

palette = brewer.pal(8,"Dark2") %>%
  list(brewer.pal(10,"Paired")) %>%
  unlist()



textInputRow<-function (inputId, label, value = "") {
  div(style="display:inline-block",
      tags$label(label, `for` = inputId),
      tags$input(id = inputId, type = "text", value = value,class="input-small"))
}

back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API