Commit c7feeae1 authored by svolant's avatar svolant
Browse files

cosmetic changes + bug corrige export

parent 3163642e
......@@ -11,14 +11,13 @@ TableDiff_print <- function(input,BaseContrast,resDiff, info = NULL)
if(length(VarInt)>1) for(i in VarInt){ group = paste(group,target[,i], sep="-") }
else group = target[,VarInt]
conds = unique(group)
result = list()
alpha = as.numeric(input$AlphaVal)
cooksCutoff = ifelse(input$CooksCutOff!='Auto',ifelse(input$CooksCutOff!=Inf,input$CutOffVal,Inf),TRUE)
result[[input$ContrastList_table]] <- results(dds,contrast=BaseContrast[,input$ContrastList_table],pAdjustMethod=input$AdjMeth,
cooksCutoff=cooksCutoff,
independentFiltering=input$IndFiltering,alpha=alpha,parallel = TRUE)
independentFiltering=input$IndFiltering,alpha=alpha)
print(result[[input$ContrastList_table]])
#names(result) <- gsub("_", " ", names(result))
if (is.null(info)) info <- data.frame(Id = rownames(result[[1]]))
else names(info)[1] <- "Id"
......
......@@ -516,7 +516,7 @@ shinyServer(function(input, output,session) {
res=NULL
if(!is.null(tree))
{
res = tabBox(id="id_tabboxdata",style=" visibility: hidden;",width = NULL, selected = "Count table",
res = tabBox(width = NULL, selected = "Count table",
tabPanel("Count table",DT::dataTableOutput("DataCounts")),
tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo")),
tabPanel("Summary",h5(strong("Percentage of annotation")),htmlOutput("SummaryView"),
......@@ -527,7 +527,7 @@ shinyServer(function(input, output,session) {
}
else if(is.null(tree))
{
res = tabBox(id="id_tabboxdata",width = NULL, selected = "Count table",
res = tabBox(width = NULL,selected = "Count table",
tabPanel("Count table",DT::dataTableOutput("DataCounts")),
tabPanel("Taxonomy",DT::dataTableOutput("DataTaxo")),
tabPanel("Summary",h5(strong("Percentage of annotation")),htmlOutput("SummaryView"),
......@@ -1762,13 +1762,13 @@ shinyServer(function(input, output,session) {
output$ExportCounts <- downloadHandler(
filename = function() { 'NormCounts.csv' },
#content = function(file){write.csv(dataMergeCounts()$counts, file)}
content = function(file){write.csv(dataMergeCounts()$CT_Norm, file)}
content = function(file){write.csv(round(counts(ResDiffAnal()$dds,normalized=TRUE)), file)}
)
## Export in .csv
output$ExportRelative <- downloadHandler(
filename = function() { 'RelativeAb.csv' },
content = function(file){write.csv(sweep(dataMergeCounts()$CT_Norm,2,colSums(dataMergeCounts()$CT_Norm),`/`), file)}
content = function(file){write.csv(sweep(round(counts(ResDiffAnal()$dds,normalized=TRUE)),2,colSums(round(counts(ResDiffAnal()$dds,normalized=TRUE))),`/`), file)}
)
## Export size factors
......
......@@ -13,7 +13,7 @@ sidebar <- dashboardSidebar(
menuItem("Home", tabName = "Home", icon = icon("home")),
menuItem("Tutorial", tabName = "Tutorial", icon = icon("book")),
menuItem("Download/Install", tabName = "Download", icon = icon("download")),
menuItem("Raw data", tabName = "RawData", icon = icon("upload")),
# menuItem("Raw data", tabName = "RawData", icon = icon("upload")),
menuItem("Upload your data", tabName = "Upload", icon = icon("upload")),
# bookmarkButton(),
menuItemOutput("dymMenu"),
......@@ -207,20 +207,20 @@ body <- dashboardBody(
),
tabPanel("R install (RC)",
p("SHAMAN is available for R>3.1.2. The installation, download and execution can all be performed with a small R script :",style = "font-family: 'times'; font-si16pt"),
wellPanel(div(style = 'max-width: 900px',"# Load shiny packages",br(),
wellPanel(style = 'width: 50%; word-wrap: break-word;',"# Load shiny packages",br(),
"if(!require('shiny')){",br()," install.packages('shiny')",br()," library(shiny)",br(),"}",br(),
"system(\"Rscript -e 'library(\\\"shiny\\\");runGitHub(\\\"pierreLec/KronaRShy\\\",port=5438)'\",wait=FALSE)",
br(),"# Install dependencies,",br(),"# download last version from github,",br(),"# and run SHAMAN in one command:",br(),"runGitHub('aghozlane/shaman')")),
br(),"# Install dependencies,",br(),"# download last version from github,",br(),"# and run SHAMAN in one command:",br(),"runGitHub('aghozlane/shaman')"),
p("This script can also be dowloaded", a("here", target="_blank", href="shamanapp.R"), "and executed as following :"),
wellPanel(div(style = 'max-width: 900px',"chmod +x ./shamanapp.R && Rscript ./shamanapp.R")),
wellPanel(style = 'width: 50%; word-wrap: break-word;',"chmod +x ./shamanapp.R && Rscript ./shamanapp.R")),
p("Of note, the R version has an impact on the contrast definition. DESeq2 contrast are harder to define on R>3.2."),
p("Contribution to SHAMAN code are always welcome and can be performed with the", a("github deposit.",href="https://github.com/aghozlane/shaman"))
p("Contribution to SHAMAN code are always welcome and can be performed with the", a("github deposit.",href="https://github.com/aghozlane/shaman")
))
)
)
)
),
tabItem(tabName = "RawData",
tabItem(id="rawdatatab",tabName = "RawData",
tags$style(type='text/css', ".well { max-width: 20em; }"),
# tags$head(tags$style(HTML(InfoBoxCSS))),
tags$head(tags$script("$(function() { $(\"[data-toggle='popover']\").popover(); })")),
......@@ -584,7 +584,7 @@ body <- dashboardBody(
fluidRow(
column(width=3,
checkboxInput("AddFilter","Add a filtering step",value = FALSE),
bsTooltip("AddFilter", "If your count matrix is very sparse, you can add a filter on your data","bottom",trigger = "click", options = list(container = "body"))
bsTooltip("AddFilter", "If your count matrix is very sparse, you can add a filter on your data","bottom",trigger = "hover", options = list(container = "body"))
)
),
fluidRow(
......
Supports Markdown
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