Initial commit

parents
Pipeline #16478 failed with stage
in 14 seconds
stages:
- buildimage
Build Image Master:
image:
name: gcr.io/kaniko-project/executor:debug-v0.21.0
entrypoint: [""]
stage: buildimage
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor --cache=true --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$(date +%Y%m%d%H%M)-$CI_COMMIT_SHORT_SHA
only:
refs:
- master
FROM rocker/shiny:3.6.1
RUN apt-get update && apt-get install -y libtiff-dev \
libjpeg-dev libfftw3-dev libhdf5-dev libssl-dev \
libxml2-dev libgmp3-dev
ADD etc/ /etc/shiny-server/
COPY ./packages.R packages.R
COPY global.R /srv/shiny-server/
COPY server.R /srv/shiny-server/
COPY ui.r /srv/shiny-server/
RUN Rscript packages.R
# Spacem viewer
Repo for the Spacem viewer app
# .libPaths("/home/shiny/rlibs")
#shiny: was shiny_0.12.2
#load("data/plotme.rda") #loads scaled data, required for tSNE
#load("data/001_clusterings.rda")
# load("data/LCM.rda")
# load("data/001_limma.rda")
# filterInfo$Sample.type[filterInfo$Sample.type %in% c("BIG VESSEL","ARTERIES SMALL","ARTERIES LOW")] <- "ARTERIES"
#Pos_seu<-readRDS("Data/BM_Mofa.rds")
#Idents(Pos_seu)<-Pos_seu$Prediction_All
#WhichCells(Luca_small,idents = 9,expression = ds =='U1')
require(ggplot2)
require(reshape2)
require(plyr)
require(gridExtra)
require(grid)
require(DT)
require(Seurat)
require(ggrepel)
require(RColorBrewer)
require(dplyr)
require(plotly)
require(shinycustomloader)
#saveRDS(Luca_small,"Data/LUCA_small.rds")
Luca_small<-readRDS("Data/LUCA_small.rds")
Simon_small<-readRDS("Data/Simon_small.rds")
Manuscript_small<-readRDS("Data/Manuscript_small.rds")
#Simon_small<-NormalizeData(Simon_small)
#Simon_small$Condition<-ifelse(Simon_small$ds %in% c("M0_2_low","M0_1_low"),"M0",
# ifelse(Simon_small$ds %in% c("M1_2_low","M1_1_low"),"M1","M2"))
#Simon_small$Condition<-Simon_small$ds
#saveRDS(Simon_small,"Data/Simon_small.rds")
g_legend <- function(a.gplot){
tmp <- ggplot_gtable(ggplot_build(a.gplot))
leg <- which(sapply(tmp$grobs, function(x) x$name) == "guide-box")
legend <- tmp$grobs[[leg]]
legend
}
#
# otsu <- function(h) {
# total = sum(h$counts)
# sumB = 0;
# wB = 0;
# maximum = 0.0;
# sum1 <- 0
# for (j in 1:(length(h$breaks)-1)) {
# sum1 <- sum1 + h$breaks[j] * h$counts[j]
# }
# for (ii in 1:(length(h$breaks)-1)) {
# wB = wB + h$counts[ii]
# wF = total - wB;
# if (wB == 0 || wF == 0) next;
# sumB = sumB + h$breaks[ii] * h$counts[ii];
# mF = (sum1 - sumB) / wF;
# between = wB * wF * ((sumB / wB) - mF) * ((sumB / wB) - mF);
# if ( between >= maximum ){
# level = h$breaks[ii];
# maximum = between;
# }
# }
# return(level)
# }
#
# Pos_seu<-readRDS("Data/BM1.rds")
# OtsuTresh<-NULL
# for(i in rownames(Pos_seu@assays$AB@data))
# {
# file <- try(otsu(hist(Pos_seu@assays$AB@data[i,],breaks=100)))
# if (class(file) == 'try-error') {
# OtsuTresh[i]<-0
# }
# else{OtsuTresh[i]<-file}
#
# }
# BM1<-Pos_seu
# OtsuTresh_BM1<-OtsuTresh
# rm(Pos_seu)
# rm(file)
# rm(i)
# rm(OtsuTresh)
# save.image('Data/BM1.rda')
# Pos_seu<-readRDS("Data/BM_Mofa.rds")
# Idents(Pos_seu)<-Pos_seu$Prediction_All
# OtsuTresh<-NULL
# for(i in rownames(Pos_seu@assays$AB@data))
# {
# file <- try(otsu(hist(Pos_seu@assays$AB@data[i,],breaks=100)))
# if (class(file) == 'try-error') {
# OtsuTresh[i]<-0
# }
# else{OtsuTresh[i]<-file}
#
# }
#
# BM123<-Pos_seu
# OtsuTresh_BM123<-OtsuTresh
# rm(Pos_seu)
# rm(file)
# rm(i)
# rm(OtsuTresh)
# save.image('Data/BM_123.rda')
#
# BM1@meta.data$Cell_Type3<-factor(x = BM1@meta.data$Cell_Type3, levels = order$X1)
# Idents(BM1)<-BM1@meta.data$Cell_Type3
# plot<-DimPlot(BM1, reduction = "MOFAUMAP",label = T)+NoLegend()
# BM1 <- CellSelector(plot = plot, object = BM1, ident = "Doublet and Triplets")
# BM1<-subset(BM1,idents = c("Doublet and Triplets","Doublet T and Neutrophils"),invert=T)
#
#
# BM123@meta.data$Prediction_All<-factor(x = BM123@meta.data$Prediction_All, levels = order$X1)
# Idents(BM123)<-BM123@meta.data$Prediction_All
# DimPlot(BM123, reduction = "MOFAUMAP",label = T)+NoLegend()
# save.image('Data/BM_123.rda')
This diff is collapsed.
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
# Application title
titlePanel(fluidRow(
column(9, "SpaceM Viewer"),
column(3, img(height = 50, width = 50, src = "logo.png"))
)),
tags$p("Contact:", tags$a("Sergio Triana", href = "mailto:triana@embl.de"), ", EMBL Heidelberg"),
fluidRow(
column(width=8,selectizeInput("Sample", "Sample to Use", choices = c("Manuscript","Hepatocytes","Macrophages Low Range")),options = list(placeholder = 'select a Sample '),selected="Manuscript")
#column(width=4,align='left',tags$img(src = "logo.png"))
),
tabsetPanel(type = "tabs",
tabPanel("Visualisation",
fluidRow(width = 9,
textOutput("dataset")
),
fluidRow(
column(width=10, radioButtons("umap.type", label="What UMAP to use", selected = "Integrated UMAP", choices = c("SpaceM-UMAP","Integrated UMAP","Non-Integrated UMAP","Features UMAP","MOFA-UMAP"),inline=T))
),
fluidRow(
column(width=5, radioButtons("tsne.type", label="What to highlight on the UMAP", selected = "Clusters", choices = c("Clusters","Datasets","Metabolites/Features"))),
column(width=5,uiOutput('columns'))
),
fluidRow(
column(width= 5, tags$strong("UMAP"), tags$br(),
tags$i("This UMAP was calculated using the metabolites"),verbatimTextOutput("hover_info")),
column(width= 4, tags$strong("Cell Distribution"), tags$br(),
tags$i("This plot show the distribution of cells by the selected variable")),
column(width=3,uiOutput('order'))
),
fluidRow(
tags$head(tags$script('
var dimension = [0, 0];
$(document).on("shiny:connected", function(e) {
dimension[0] = window.innerWidth;
dimension[1] = window.innerHeight;
Shiny.onInputChange("dimension", dimension);
});
$(window).resize(function(e) {
dimension[0] = window.innerWidth;
dimension[1] = window.innerHeight;
Shiny.onInputChange("dimension", dimension);
});
'))
,
#create rows / columns dynamically according to the number of plots
column(width=5,uiOutput('plotTsne'),style='padding:0px;',align="left"),
column(width=6,uiOutput('plotPie'),style='padding:0px;',align="left")
),
fluidRow(column(offset = 3,width=6,align="center",uiOutput('plotPseudo'),style='padding:-100px;')),
fluidRow(column(width=10,align="center",uiOutput('plotLegend'),style='padding:-100px;'))
)
,
tabPanel("Differential expression",
fluidRow(
column(width=4,uiOutput('Cell1')),
column(width=4,uiOutput('Cell2')),
column(width=4, radioButtons("AssayDE", label="Assay to use", selected = "Metabolites", choices = c("Metabolites","Features")))),
fluidRow(
column(width=4,uiOutput('Cond1')),
column(width=4,uiOutput('Cond2')),
column(width=4,align="left",actionButton("calculate", "Calculate",style='padding:10px; font-size:100%'))
),
fluidRow(
column(width = 6, tags$strong("Volcano Plot")),
column(width= 4, tags$strong("Differential expression result"), tags$br())
),
fluidRow(
#create rows / columns dynamically according to the number of plots
column(width=6,plotOutput("Voldano.pl",height="600px")),
column(width=4,withLoader(DTOutput("tableDE"),type='html',loader="dnaspin"))),
fluidRow(
column(width = 6, downloadButton("downloadData", "Download DE table")))
)
))
)
# Instruct Shiny Server to run applications as the user "shiny"
run_as shiny;
app_init_timeout 300;
app_idle_timeout 300;
# Define a server that listens on port 3838
server {
listen 3838;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
This diff is collapsed.
install.packages("aws.s3", repos = c("https://RForge.net", "https://cloud.R-project.org"))
install.packages("BIOMOD", repos="http://R-Forge.R-project.org")
install.packages("mclust")
install.packages("devtools")
library(devtools)
devtools::install_github("thomasp85/patchwork")
devtools::install_github(repo = "ebecht/hypergate")
install.packages("plotly")
install.packages("shinycustomloader")
install.packages("rpart")
install.packages("rpart.plot")
install.packages("xml2")
install.packages("rgeos", repos="http://R-Forge.R-project.org", type="source")
install.packages("ggplot2")
install.packages("reshape2")
install.packages("plyr")
install.packages("gridExtra")
install.packages("waiter")
install.packages("grid")
install.packages("DT")
install.packages("ggrepel")
install.packages("RColorBrewer")
install.packages("dplyr")
install.packages('Seurat')
##devtools::install_github(repo = 'satijalab/seurat', ref = 'develop')
install.packages(c("sp", "polyclip"))
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("flowCore")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment