Commit 297362bf authored by Amine  GHOZLANE's avatar Amine GHOZLANE

solved merging

parents ed1db183 391bf3cc
...@@ -46,7 +46,7 @@ Plot_Visu_Heatmap_FC <- function(input, BaseContrast, resDiff, ContrastListDebou ...@@ -46,7 +46,7 @@ Plot_Visu_Heatmap_FC <- function(input, BaseContrast, resDiff, ContrastListDebou
############################## ##############################
## P VALUE DENSITY PLOT ## P VALUE DENSITY PLOT
############################## ##############################
Plot_pValue_Density <- function(input, BaseContrast, resDiff, ContrastListDebounce, alphaVal){ Plot_pValue_Density <- function(input, BaseContrast, resDiff, ContrastListDebounce, alphaVal, InputpValueDensityfocus){
res = NULL res = NULL
#SelContrast = input$ContrastList_table_FC #SelContrast = input$ContrastList_table_FC
SelContrast = ContrastListDebounce() SelContrast = ContrastListDebounce()
...@@ -64,8 +64,10 @@ Plot_pValue_Density <- function(input, BaseContrast, resDiff, ContrastListDeboun ...@@ -64,8 +64,10 @@ Plot_pValue_Density <- function(input, BaseContrast, resDiff, ContrastListDeboun
data <- rbind(data, data_cont) data <- rbind(data, data_cont)
} }
data$contrast <- factor(data$contrast, levels = SelContrast) data$contrast <- factor(data$contrast, levels = SelContrast)
# uncomment to zoom (X axis between 0 and input$alphaVal) (use "+ xlim(0,as.numeric(alphaVal))" instead, to redraw geom_density with only data under threshold) p <- ggplot(data, aes(x = padj, color = contrast, fill = contrast)) + theme_minimal()
p <- ggplot(data, aes(x = padj, color = contrast, fill = contrast)) + geom_density(alpha = input$fillOpacity, size = input$lineWidth) + theme_minimal() #+ coord_cartesian(xlim = c(0,as.numeric(alphaVal))) InputpValueDensityfocus() # for reactivity
if(isolate(input$adaptBWtoFocus)){p <- p + geom_density(alpha = input$fillOpacity, size = input$lineWidth, adjust = as.numeric(alphaVal), n = 2 ^ (input$numberPoints))}else{p <- p + geom_density(alpha = input$fillOpacity, size = input$lineWidth, adjust = 1, n = 2 ^ (input$numberPoints))}
if(isolate(input$focusUnderThreshold)){p <- p + coord_cartesian(xlim = c(0,as.numeric(alphaVal)))}
p <- p + theme(axis.title = element_text(size = input$FontSizepValueDensity), p <- p + theme(axis.title = element_text(size = input$FontSizepValueDensity),
axis.text = element_text(size = input$FontSizepValueDensity), axis.text = element_text(size = input$FontSizepValueDensity),
legend.title = element_text(size = input$FontSizepValueDensity), legend.title = element_text(size = input$FontSizepValueDensity),
...@@ -130,8 +132,6 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo ...@@ -130,8 +132,6 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo
ylab = paste("logit p value", input$Contrast2), ylab = paste("logit p value", input$Contrast2),
hover_opacity = 1, hover_opacity = 1,
tooltip_text = row.names(padj), tooltip_text = row.names(padj),
# xlim = xlimits,
# ylim = ylimits,
lines = if (input$showSignifThresholdsLogitPlot) { lines = if (input$showSignifThresholdsLogitPlot) {
if(input$showDiagonal){ if(input$showDiagonal){
data.frame( data.frame(
...@@ -180,8 +180,6 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo ...@@ -180,8 +180,6 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo
# dom_id_reset_zoom = "scatterD3-reset-zoomLogit", # dom_id_reset_zoom = "scatterD3-reset-zoomLogit",
# dom_id_svg_export = "scatterD3-svg-exportLogit", # dom_id_svg_export = "scatterD3-svg-exportLogit",
# menu = FALSE, # menu = FALSE,
# height = input$heightVolcanoPlot,
# width=if(input$modifwidthVolcano){input$widthVolcanoPlot},
# disable_wheel = TRUE # disable_wheel = TRUE
) )
} }
...@@ -219,13 +217,20 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo ...@@ -219,13 +217,20 @@ Plot_Comp_Logit <- function(input, BaseContrast, resDiff, SelectTaxoPlotCompDebo
############################## ##############################
Plot_Visu_Venn <- function(input,BaseContrast,resDiff, ContrastListVennDebounce, export=FALSE){ Plot_Visu_Venn <- function(input,BaseContrast,resDiff, ContrastListVennDebounce, export=FALSE){
res = NULL res = NULL
contrasts_without_diff = NULL
#SelContrast = input$ContrastList_table_FCVenn #SelContrast = input$ContrastList_table_FCVenn
SelContrast = ContrastListVennDebounce() SelContrast = ContrastListVennDebounce()
if(length(SelContrast)>=2 & length(SelContrast)<=4){ if(length(SelContrast)>=2 & length(SelContrast)<=4){
data = GetData_venn(input,SelContrast,BaseContrast,resDiff)$res gotData = GetData_venn(input,SelContrast,BaseContrast,resDiff)
data2 = gotData$df.tot
if(length(SelContrast) - length(colnames(data2[sapply(data2,function(x) all(is.na(x)))])) < 2){contrasts_without_diff = colnames(data2[sapply(data2,function(x) all(is.na(x)))])
}
else{
data = gotData$res
res = venn_tooltip(d3vennR(data=data)) res = venn_tooltip(d3vennR(data=data))
} }}
return(res) return(list(res = res, contrasts_without_diff=contrasts_without_diff))
} }
############################## ##############################
...@@ -234,10 +239,16 @@ Plot_Visu_Venn <- function(input,BaseContrast,resDiff, ContrastListVennDebounce, ...@@ -234,10 +239,16 @@ Plot_Visu_Venn <- function(input,BaseContrast,resDiff, ContrastListVennDebounce,
Plot_UpSet <- function(input,BaseContrast, resDiff, ContrastListDebounce, export=FALSE){ Plot_UpSet <- function(input,BaseContrast, resDiff, ContrastListDebounce, export=FALSE){
plot = NULL plot = NULL
df = NULL df = NULL
contrasts_without_diff = NULL
#SelContrast = input$ContrastList_table_FC #SelContrast = input$ContrastList_table_FC
SelContrast = ContrastListDebounce() SelContrast = ContrastListDebounce()
if(length(SelContrast)>=2){ if(length(SelContrast)>=2){
data = GetData_venn(input,SelContrast,BaseContrast,resDiff)$df.tot gotData = GetData_venn(input,SelContrast,BaseContrast,resDiff)
data = gotData$df.tot
if(length(SelContrast) - length(colnames(data[sapply(data,function(x) all(is.na(x)))])) < 2){contrasts_without_diff = colnames(data[sapply(data,function(x) all(is.na(x)))])
}
else{
listInput <- list() listInput <- list()
n <- ncol(data) n <- ncol(data)
for(i in 1:n){ for(i in 1:n){
...@@ -274,19 +285,27 @@ Plot_UpSet <- function(input,BaseContrast, resDiff, ContrastListDebounce, export ...@@ -274,19 +285,27 @@ Plot_UpSet <- function(input,BaseContrast, resDiff, ContrastListDebounce, export
maxRow = max(apply(df,2,FUN=function(x) length(which(!is.na(x))))) maxRow = max(apply(df,2,FUN=function(x) length(which(!is.na(x)))))
df = df[1:max(maxRow,1),] df = df[1:max(maxRow,1),]
df = df[,which(apply(!is.na(df),2,any))] df = df[,which(apply(!is.na(df),2,any))]
} }}
return(list(plot=plot,table=df)) return(list(plot=plot,table=df, contrasts_without_diff=contrasts_without_diff))
} }
############################## ##############################
## MULTIPLE VENN COMPAIR ## Contrasts comparison
############################## ##############################
Plot_MultipleVenn <- function(input,BaseContrast, resDiff, ContrastListDebounce){ Plot_MultipleVenn <- function(input,BaseContrast, resDiff, ContrastListDebounce){
plot = NULL plot = NULL
contrasts_without_diff = NULL
SelContrast = ContrastListDebounce() SelContrast = ContrastListDebounce()
if(length(SelContrast)>=2){ if(length(SelContrast)>=2){
data = GetData_venn(input,SelContrast,BaseContrast,resDiff)$res_multiple_venn gotData = GetData_venn(input,SelContrast,BaseContrast,resDiff)
data2 = gotData$df.tot
if(length(SelContrast) - length(colnames(data2[sapply(data2,function(x) all(is.na(x)))])) < 2){contrasts_without_diff = colnames(data2[sapply(data2,function(x) all(is.na(x)))])
}
else{
data = gotData$res_multiple_venn
plot <- ggplot(data,aes(x=x,y=y)) + geom_point() + theme_bw() + plot <- ggplot(data,aes(x=x,y=y)) + geom_point() + theme_bw() +
geom_label_repel(aes(label=name), size = input$labelSizemultipleVenn) + xlim(c(0,1)) + ylim(c(0,1)) + geom_label_repel(aes(label=name), size = input$labelSizemultipleVenn) + xlim(c(0,1)) + ylim(c(0,1)) +
...@@ -294,8 +313,8 @@ Plot_MultipleVenn <- function(input,BaseContrast, resDiff, ContrastListDebounce) ...@@ -294,8 +313,8 @@ Plot_MultipleVenn <- function(input,BaseContrast, resDiff, ContrastListDebounce)
ylab(bquote(Contrast1 *intersect(Contrast2) ~ "/ Contrast2")) ylab(bquote(Contrast1 *intersect(Contrast2) ~ "/ Contrast2"))
plot <- plot + theme(axis.title = element_text(size = input$FontSizeMultipleVenn), plot <- plot + theme(axis.title = element_text(size = input$FontSizeMultipleVenn),
axis.text = element_text(size = input$FontSizeMultipleVenn - 2)) axis.text = element_text(size = input$FontSizeMultipleVenn - 2))
} }}
return(plot) return(list(plot = plot, contrasts_without_diff=contrasts_without_diff))
} }
...@@ -342,20 +361,17 @@ Get_log2FC_padj <-function(input,BaseContrast,resDiff, info = NULL) ...@@ -342,20 +361,17 @@ Get_log2FC_padj <-function(input,BaseContrast,resDiff, info = NULL)
independentFiltering=input$IndFiltering,alpha=alpha) independentFiltering=input$IndFiltering,alpha=alpha)
} }
log2FC = as.matrix(round(result[[SelContrast[1]]][, "log2FoldChange"], 3)) log2FC = as.matrix(round(result[[SelContrast[1]]][, "log2FoldChange"], 3))
#padj = as.matrix(round(result[[SelContrast[1]]][, "padj"], 3))
padj = as.matrix((result[[SelContrast[1]]][, "padj"])) padj = as.matrix((result[[SelContrast[1]]][, "padj"]))
if(nbCont>1) if(nbCont>1)
{ {
for(i in 2:nbCont) for(i in 2:nbCont)
{ {
log2FC = cbind(log2FC,round(result[[SelContrast[i]]][, "log2FoldChange"], 3)) log2FC = cbind(log2FC,round(result[[SelContrast[i]]][, "log2FoldChange"], 3))
#padj = cbind(padj,round(result[[SelContrast[i]]][, "padj"], 7))
padj = cbind(padj,(result[[SelContrast[i]]][, "padj"])) padj = cbind(padj,(result[[SelContrast[i]]][, "padj"]))
} }
}# }
colnames(log2FC) = names(result) colnames(log2FC) = names(result)
colnames(padj) = names(result) colnames(padj) = names(result)
#}
rownames(log2FC) = rownames(result[[SelContrast[1]]]) rownames(log2FC) = rownames(result[[SelContrast[1]]])
rownames(padj) = rownames(result[[SelContrast[1]]]) rownames(padj) = rownames(result[[SelContrast[1]]])
...@@ -429,7 +445,7 @@ venn_tooltip <- function(venn){ ...@@ -429,7 +445,7 @@ venn_tooltip <- function(venn){
} }
## Transform the data for the venn diagram ## Transform the data for the venn diagram and the "contrasts comparison"
GetData_venn <-function(input,SelContrast,BaseContrast,resDiff) GetData_venn <-function(input,SelContrast,BaseContrast,resDiff)
{ {
res = list() res = list()
...@@ -506,7 +522,7 @@ GetData_venn <-function(input,SelContrast,BaseContrast,resDiff) ...@@ -506,7 +522,7 @@ GetData_venn <-function(input,SelContrast,BaseContrast,resDiff)
} }
} }
} }
# For 'Multiple Venn Compair' # For 'Contrasts comparison'
if(i!=j) { if(i!=j) {
if (is.null(res_multiple_venn)) if (is.null(res_multiple_venn))
{res_multiple_venn <- data.frame(name = c(rownames_multiple_venn, paste(names.df[i],names.df[j], sep = " vs ")), {res_multiple_venn <- data.frame(name = c(rownames_multiple_venn, paste(names.df[i],names.df[j], sep = " vs ")),
......
...@@ -154,13 +154,6 @@ Volcano_Plot <- function(input, data, export = FALSE) { ...@@ -154,13 +154,6 @@ Volcano_Plot <- function(input, data, export = FALSE) {
} else{ } else{
"" ""
}) })
# labels <-
# sapply(names, function(name)
# if (is.element(name, points_to_label)) {
# name
# } else{
# ""
# })
if(!export){ if(!export){
plot <- plot <-
scatterD3( scatterD3(
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#@ visualisation plots of SHAMAN #@ visualisation plots of SHAMAN
########################### ## ##
## Barplot ## Barplot ####
########################### ## ##
Plot_Visu_Barplot <- function(input,resDiff) Plot_Visu_Barplot <- function(input,resDiff)
{ {
...@@ -76,9 +76,9 @@ Plot_Visu_Barplot <- function(input,resDiff) ...@@ -76,9 +76,9 @@ Plot_Visu_Barplot <- function(input,resDiff)
################################## ## ##
## Same plot in ggplot2 for export ## Same plot in ggplot2 for export
################################## ## ##
tax.colors=rep(c("#1f77b4","#aec7e8","#ff7f0e","#ffbb78", "#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b", tax.colors=rep(c("#1f77b4","#aec7e8","#ff7f0e","#ffbb78", "#2ca02c","#98df8a","#d62728","#ff9896","#9467bd","#c5b0d5","#8c564b",
"#c49c94","#e377c2","#f7b6d2","#7f7f7f", "#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"),ceiling(nbKept/20)) "#c49c94","#e377c2","#f7b6d2","#7f7f7f", "#c7c7c7","#bcbd22","#dbdb8d","#17becf","#9edae5"),ceiling(nbKept/20))
...@@ -99,9 +99,9 @@ Plot_Visu_Barplot <- function(input,resDiff) ...@@ -99,9 +99,9 @@ Plot_Visu_Barplot <- function(input,resDiff)
############################## ## ##
## HEATMAP ## HEATMAP ####
############################## ## ##
Plot_Visu_Heatmap <- function(input,resDiff,export=FALSE){ Plot_Visu_Heatmap <- function(input,resDiff,export=FALSE){
VarInt = input$VisuVarInt VarInt = input$VisuVarInt
...@@ -144,9 +144,9 @@ Plot_Visu_Heatmap <- function(input,resDiff,export=FALSE){ ...@@ -144,9 +144,9 @@ Plot_Visu_Heatmap <- function(input,resDiff,export=FALSE){
############################## ## ##
## BOXPLOTS ## BOXPLOTS ####
############################## ## ##
Plot_Visu_Boxplot <- function(input,resDiff,alpha=0.7){ Plot_Visu_Boxplot <- function(input,resDiff,alpha=0.7){
gg = NULL gg = NULL
...@@ -219,9 +219,9 @@ Plot_Visu_Boxplot <- function(input,resDiff,alpha=0.7){ ...@@ -219,9 +219,9 @@ Plot_Visu_Boxplot <- function(input,resDiff,alpha=0.7){
return(gg) return(gg)
} }
############################## ## ##
## KRONA ## KRONA ####
############################## ## ##
Plot_Visu_Krona <- function(input,resDiff,CT_OTU,taxo_table){ Plot_Visu_Krona <- function(input,resDiff,CT_OTU,taxo_table){
res = NULL res = NULL
...@@ -256,9 +256,9 @@ Plot_Visu_Krona <- function(input,resDiff,CT_OTU,taxo_table){ ...@@ -256,9 +256,9 @@ Plot_Visu_Krona <- function(input,resDiff,CT_OTU,taxo_table){
return(res) return(res)
} }
############################## ## ##
## Phylo PLOT ## Phylo PLOT ####
############################## ## ##
Plot_Visu_Phylotree = function(input, resDiff, CT_OTU, taxo_table, treeseq){ Plot_Visu_Phylotree = function(input, resDiff, CT_OTU, taxo_table, treeseq){
res = NULL res = NULL
VarInt = input$VisuVarInt VarInt = input$VisuVarInt
...@@ -296,9 +296,9 @@ Plot_Visu_Phylotree = function(input, resDiff, CT_OTU, taxo_table, treeseq){ ...@@ -296,9 +296,9 @@ Plot_Visu_Phylotree = function(input, resDiff, CT_OTU, taxo_table, treeseq){
} }
############################## ## ##
## SCATTER PLOT ## SCATTER PLOT ####
############################## ## ##
Plot_Visu_Scatterplot<- function(input,resDiff,export=FALSE,lmEst = FALSE,CorEst=FALSE){ Plot_Visu_Scatterplot<- function(input,resDiff,export=FALSE,lmEst = FALSE,CorEst=FALSE){
plot = NULL plot = NULL
...@@ -410,9 +410,9 @@ Plot_Visu_Scatterplot<- function(input,resDiff,export=FALSE,lmEst = FALSE,CorEst ...@@ -410,9 +410,9 @@ Plot_Visu_Scatterplot<- function(input,resDiff,export=FALSE,lmEst = FALSE,CorEst
############################## ## ##
## Diversity ## Diversity ####
############################## ## ##
Plot_Visu_Diversity <- function(input,resDiff,ForScatter=FALSE){ Plot_Visu_Diversity <- function(input,resDiff,ForScatter=FALSE){
gg = NULL gg = NULL
dataTmp = NULL dataTmp = NULL
...@@ -528,9 +528,9 @@ Plot_Visu_Diversity <- function(input,resDiff,ForScatter=FALSE){ ...@@ -528,9 +528,9 @@ Plot_Visu_Diversity <- function(input,resDiff,ForScatter=FALSE){
} }
############################## ## ##
## RAREFACTION ## RAREFACTION ####
############################## ## ##
Plot_Visu_Rarefaction <- function(input,resDiff,xlim,ylim,ylab="Species"){ Plot_Visu_Rarefaction <- function(input,resDiff,xlim,ylim,ylab="Species"){
PlotRare = NULL PlotRare = NULL
...@@ -558,11 +558,11 @@ Plot_Visu_Rarefaction <- function(input,resDiff,xlim,ylim,ylab="Species"){ ...@@ -558,11 +558,11 @@ Plot_Visu_Rarefaction <- function(input,resDiff,xlim,ylim,ylab="Species"){
############################################################## ## ##
## ##
## Useful functions ## Useful functions ####
## ##
############################################################## ## ##
## Get the non-zero taxo by sample ## Get the non-zero taxo by sample
TaxoNumber <- function (x, groups, mar = 1) TaxoNumber <- function (x, groups, mar = 1)
...@@ -795,9 +795,9 @@ CreateTableTree <- function(input,resDiff,CT_Norm_OTU,taxo_table,VarInt,ind_taxo ...@@ -795,9 +795,9 @@ CreateTableTree <- function(input,resDiff,CT_Norm_OTU,taxo_table,VarInt,ind_taxo
########################### ## ##
## Tree ## Tree
########################### ## ##
## The count matrix must be given at the leaf level. ## The count matrix must be given at the leaf level.
...@@ -833,9 +833,9 @@ Plot_Visu_Tree <- function(input,resDiff,CT_Norm_OTU,taxo_table) ...@@ -833,9 +833,9 @@ Plot_Visu_Tree <- function(input,resDiff,CT_Norm_OTU,taxo_table)
return(res) return(res)
} }
############################# ## ##
## NETWORK ## NETWORK
############################# ## ##
Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, export = FALSE){ Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, export = FALSE){
plot = NULL plot = NULL
...@@ -864,19 +864,19 @@ Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, e ...@@ -864,19 +864,19 @@ Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, e
adjacency <- matrix(mapply(function(a,b) {mapply(function(x,y){x*y}, x=a, y=b)}, a=pval_bool, b=cor_sgn), nrow = n) adjacency <- matrix(mapply(function(a,b) {mapply(function(x,y){x*y}, x=a, y=b)}, a=pval_bool, b=cor_sgn), nrow = n)
rownames(adjacency) <- colnames(countsMatrix) rownames(adjacency) <- colnames(countsMatrix)
colnames(adjacency) <- colnames(countsMatrix) colnames(adjacency) <- colnames(countsMatrix)
# ### Remove rows and columns with only NA # ### Remove rows and columns with only NA # this way, elements with the same count in all sample (often 0 in this case) will not appear
# adjacency <- adjacency[apply(adjacency, 1, function(y) !all(is.na(y))),] # adjacency <- adjacency[apply(adjacency, 1, function(y) !all(is.na(y))),]
# adjacency <- t(adjacency) # adjacency <- t(adjacency)
# adjacency <- adjacency[apply(adjacency, 1, function(y) !all(is.na(y))),] # adjacency <- adjacency[apply(adjacency, 1, function(y) !all(is.na(y))),]
# adjacency <- t(adjacency) # adjacency <- t(adjacency)
### Replace NA by zeros (ie "no correlation") ### Replace NA by zeros (ie "no correlation") # this way, those elements will appear as single nodes
adjacency[is.na(adjacency)] <- 0 adjacency[is.na(adjacency)] <- 0
adjacency <- adjacency[,ind_taxo] adjacency <- adjacency[,ind_taxo]
adjacency <- adjacency[ind_taxo,] adjacency <- adjacency[ind_taxo,]
igraphGraph <- graph_from_adjacency_matrix(adjacency, diag = FALSE, mode = "upper" , weighted = TRUE) # "upper" for adjusted p-value, lower for p-value not adjusted igraphGraph <- graph_from_adjacency_matrix(adjacency, diag = FALSE, mode = "upper" , weighted = TRUE) # mode = "upper" for adjusted p-value, mode = "lower" for p-value not adjusted
list_to_label <- isolate(input$ToLabelNetwork) list_to_label <- isolate(input$ToLabelNetwork)
dataVN <- toVisNetworkData(igraphGraph) dataVN <- toVisNetworkData(igraphGraph)
...@@ -898,7 +898,7 @@ Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, e ...@@ -898,7 +898,7 @@ Plot_network <- function(input,resDiff,availableTaxo, ind_taxo, qualiVariable, e
plot <- visNetwork(nodes = dataVN$nodes, edges = dataVN$edges) plot <- visNetwork(nodes = dataVN$nodes, edges = dataVN$edges)
plot <- visIgraphLayout(plot, layout = "layout_nicely", physics = FALSE, smooth = FALSE) plot <- visIgraphLayout(plot, layout = "layout_nicely", physics = FALSE, smooth = FALSE)
plot <- visNodes(plot, size = 20) #, scaling = list(label = list(min = 30, max = 30, maxVisible = 30))) plot <- visNodes(plot, size = 20)
plot <- visEdges(plot, width = 1) plot <- visEdges(plot, width = 1)
plot <- visOptions(plot, width = if(isolate(input$modifwidthVisu)){isolate(input$widthVisu)}, height = isolate(input$heightVisu), autoResize = FALSE) plot <- visOptions(plot, width = if(isolate(input$modifwidthVisu)){isolate(input$widthVisu)}, height = isolate(input$heightVisu), autoResize = FALSE)
#plot <- visLegend(plot, addEdges = data.frame(color = c("red", "blue"), label = c("Positive correlation","Negative correlation"))) #plot <- visLegend(plot, addEdges = data.frame(color = c("red", "blue"), label = c("Positive correlation","Negative correlation")))
......
...@@ -2,11 +2,11 @@ shinyServer(function(input, output,session) { ...@@ -2,11 +2,11 @@ shinyServer(function(input, output,session) {
hide(id = "loading-content", anim = TRUE, animType = "fade",time=1.5) hide(id = "loading-content", anim = TRUE, animType = "fade",time=1.5)
hide(id = "loading-content-bar", anim = TRUE, animType = "fade",time=1.5) hide(id = "loading-content-bar", anim = TRUE, animType = "fade",time=1.5)
##################################################### ### ###
## ##
## LOAD FILES #### LOAD FILES ####
## ##
##################################################### ### ###
...@@ -519,11 +519,11 @@ shinyServer(function(input, output,session) { ...@@ -519,11 +519,11 @@ shinyServer(function(input, output,session) {
## output of plot_filter is ggplot class ## output of plot_filter is ggplot class
plot_filter(counts,input$SliderThSamp,input$SliderThAb,type="Scatter") plot_filter(counts,input$SliderThSamp,input$SliderThAb,type="Scatter")
}) })
##################################################### ### ###
## ##
## DYNAMIC MENU ## DYNAMIC MENU ####
## ##
##################################################### ### ###
...@@ -557,11 +557,11 @@ shinyServer(function(input, output,session) { ...@@ -557,11 +557,11 @@ shinyServer(function(input, output,session) {
##################################################### ### ###
## ##
## DATA TABLE ## DATA TABLE ####
## ##
##################################################### ### ###
## Counts Table ## Counts Table
output$DataCounts <- DT::renderDataTable( output$DataCounts <- DT::renderDataTable(
...@@ -716,11 +716,10 @@ shinyServer(function(input, output,session) { ...@@ -716,11 +716,10 @@ shinyServer(function(input, output,session) {
return(res) return(res)
}) })
##################################################### ### ###
## ##
## TARGET FILE ## TARGET FILE ####
## ### ###
#####################################################
observe({ observe({
counts = dataInput()$data$counts counts = dataInput()$data$counts
data = dataInput()$data$target data = dataInput()$data$target
...@@ -811,11 +810,11 @@ shinyServer(function(input, output,session) { ...@@ -811,11 +810,11 @@ shinyServer(function(input, output,session) {
############################################################# ### ###
## ##
## MASQUE ## MASQUE ####
## ##
############################################################# ### ###
<