Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amine GHOZLANE
shaman
Commits
a2cb61f7
Commit
a2cb61f7
authored
Aug 28, 2019
by
Amine GHOZLANE
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Activate export button
parent
62b15d53
Pipeline
#14016
passed with stage
in 48 minutes and 36 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
21 deletions
+37
-21
LoadPackages.R
LoadPackages.R
+7
-7
server.R
server.R
+29
-14
ui.R
ui.R
+1
-0
No files found.
LoadPackages.R
View file @
a2cb61f7
...
...
@@ -51,13 +51,13 @@ if (!require(circlize)) {
if
(
!
require
(
BiocManager
)){
install.packages
(
"BiocManager"
)
}
if
(
!
require
(
genefilter
))
{
BiocManager
::
install
(
"genefilter"
,
ask
=
FALSE
)
}
if
(
!
require
(
"SummarizedExperiment"
)){
BiocManager
::
install
(
"SummarizedExperiment"
,
ask
=
FALSE
)
}
#
if (!require(genefilter)) {
#
BiocManager::install("genefilter", ask=FALSE)
#
}
#
#
if(!require("SummarizedExperiment")){
#
BiocManager::install("SummarizedExperiment", ask=FALSE)
#
}
if
(
!
require
(
googleVis
))
{
install.packages
(
'googleVis'
,
repos
=
"https://cran.univ-paris1.fr/"
)
...
...
server.R
View file @
a2cb61f7
...
...
@@ -14,6 +14,7 @@ shinyServer(function(input, output,session) {
file.create
(
namesfile
,
showWarnings
=
FALSE
)
target
=
NULL
taxo
=
NULL
proxy
=
dataTableProxy
(
'DataTaxo'
)
## JSON name for masque
curdir
=
getwd
()
...
...
@@ -264,6 +265,7 @@ shinyServer(function(input, output,session) {
Counts
=
NULL
inputData
=
NULL
target
=
NULL
if
(
input
$
FileFormat
==
"fileCounts"
)
{
Counts
=
dataInputCounts
()
...
...
@@ -319,7 +321,6 @@ shinyServer(function(input, output,session) {
# percent = inputData$percent
# }
# }
return
(
list
(
data
=
data
,
check
=
check
,
percent
=
percent
))
})
...
...
@@ -364,11 +365,6 @@ shinyServer(function(input, output,session) {
return
(
list
(
Check
=
Check
,
Error
=
Error
,
normFactors
=
normFactors
))
})
## Merge counts data
dataMergeCounts
<-
reactive
({
input
$
RunDESeq
...
...
@@ -626,11 +622,7 @@ shinyServer(function(input, output,session) {
options
=
list
(
lengthMenu
=
list
(
c
(
10
,
50
,
-1
),
c
(
'10'
,
'50'
,
'All'
)),
pageLength
=
10
,
scrollX
=
TRUE
,
processing
=
FALSE
)
)
# "table.on('click', '#DataTaxo button', function () {
# Shiny.onInputChange('lastClickId',this.id);
# Shiny.onInputChange('lastClick', Math.random())
# );")
proxy
=
dataTableProxy
(
'DataTaxo'
)
observeEvent
(
input
$
DataTaxo_cell_edit
,
{
info
=
input
$
DataTaxo_cell_edit
str
(
info
)
...
...
@@ -652,7 +644,7 @@ shinyServer(function(input, output,session) {
res
=
tabBox
(
width
=
NULL
,
selected
=
"Count table"
,
tabPanel
(
"Count table"
,
DT
::
dataTableOutput
(
"DataCounts"
)),
tabPanel
(
"Taxonomy"
,
DT
::
dataTableOutput
(
"DataTaxo"
),
actionButton
(
"deleteTax"
,
"Delete annotation"
),
actionButton
(
"deleteTax
o
"
,
"Delete annotation"
),
downloadButton
(
'ExportTaxo'
,
'Export taxonomy file'
)),
tabPanel
(
"Summary"
,
h5
(
strong
(
"Percentage of annotation"
)),
htmlOutput
(
"SummaryView"
),
br
(),
h5
(
strong
(
"Number of features by level:"
)),
plotOutput
(
"SummaryViewBarplot"
,
width
=
1200
,
height
=
500
)),
...
...
@@ -665,7 +657,7 @@ shinyServer(function(input, output,session) {
res
=
tabBox
(
width
=
NULL
,
selected
=
"Count table"
,
tabPanel
(
"Count table"
,
DT
::
dataTableOutput
(
"DataCounts"
)),
tabPanel
(
"Taxonomy"
,
DT
::
dataTableOutput
(
"DataTaxo"
),
actionButton
(
"deleteTax"
,
"Delete annotation"
),
actionButton
(
"deleteTax
o
"
,
"Delete annotation"
),
downloadButton
(
'ExportTaxo'
,
'Export taxonomy file'
)),
tabPanel
(
"Summary"
,
h5
(
strong
(
"Percentage of annotation"
)),
htmlOutput
(
"SummaryView"
),
br
(),
h5
(
strong
(
"Number of features by level:"
)),
plotOutput
(
"SummaryViewBarplot"
,
width
=
1200
,
height
=
500
))
...
...
@@ -2005,7 +1997,7 @@ shinyServer(function(input, output,session) {
######################## END MASQUE #################################
observeEvent
(
input
$
deleteTax
,{
observeEvent
(
input
$
deleteTax
o
,{
if
(
is.null
(
values
$
TaxoWorking
))
values
$
TaxoWorking
=
dataInput
()
$
data
$
taxo
if
(
!
is.null
(
input
$
DataTaxo_rows_selected
))
{
...
...
@@ -2077,6 +2069,25 @@ shinyServer(function(input, output,session) {
return
(
res
)
})
# ## Vis button
# output$VisButton <- renderUI({
#
# res = NULL
# ChTM = "Error"
# target = values$TargetWorking
# labeled = values$labeled
# CT = dataInput()$data$counts
# taxo = input$TaxoSelect
# VarInt = input$InterestVar
#
# ## Return NULL if there is no error
# if(!is.null(CT) && length(VarInt)>=1) ChTM = CheckTargetModel(input,target,labeled,CT)$Error
#
# if(!is.null(target) && taxo!="..." && is.null(ChTM) && length(VarInt)>=1) res = actionButton("RunDESeq",strong("Run analysis"),icon = icon("caret-right"))
#
# return(res)
# })
## Var for normalization
output
$
SelectVarNorm
<-
renderUI
({
...
...
@@ -2196,6 +2207,10 @@ shinyServer(function(input, output,session) {
observation_metadata
=
dataInput
()
$
data
$
taxo_biom
),
file
)}
)
output
$
ExportTaxo
<-
downloadHandler
(
filename
=
function
()
{
'SHAMAN_taxo.csv'
},
content
=
function
(
file
){
write.csv
(
dataInput
()
$
data
$
taxo
,
file
)}
)
## Export in .csv
output
$
ExportCounts
<-
downloadHandler
(
filename
=
function
()
{
'NormCounts.csv'
},
...
...
ui.R
View file @
a2cb61f7
...
...
@@ -632,6 +632,7 @@ function(request) {
fluidRow
(
column
(
width
=
6
,
uiOutput
(
'ButtonBiom'
)),
#column(width=6,downloadButton('ExportBiom', 'Export BIOM')),
#uiOutput("VisButton"),
column
(
width
=
6
,
uiOutput
(
"RunButton"
))
)
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment