Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amine GHOZLANE
shaman
Commits
c774dd66
Commit
c774dd66
authored
May 19, 2017
by
svolant
Browse files
modif curdir
parent
3f989bb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Rfunctions/DiagPlot.R
View file @
c774dd66
...
@@ -541,6 +541,7 @@ PCAPlot_meta <-function(input,dds, group_init, n = min(500, nrow(counts(dds))),
...
@@ -541,6 +541,7 @@ PCAPlot_meta <-function(input,dds, group_init, n = min(500, nrow(counts(dds))),
else
Kval
=
val
else
Kval
=
val
ind_kept
=
which
(
as.character
(
group
)
%in%
Kval
)
ind_kept
=
which
(
as.character
(
group
)
%in%
Kval
)
# save(val,Kval,dds,group_init,type.trans,VarInt,ind_kept,file="testLDA")
## Get the group corresponding to the modalities
## Get the group corresponding to the modalities
group
=
group
[
ind_kept
]
group
=
group
[
ind_kept
]
nb
=
length
(
unique
((
group
)))
nb
=
length
(
unique
((
group
)))
...
...
Rfunctions/VisuPlot.R
View file @
c774dd66
...
@@ -812,5 +812,3 @@ Plot_Visu_Tree <- function(input,resDiff,CT_Norm_OTU,taxo_table)
...
@@ -812,5 +812,3 @@ Plot_Visu_Tree <- function(input,resDiff,CT_Norm_OTU,taxo_table)
return
(
res
)
return
(
res
)
}
}
server.R
View file @
c774dd66
...
@@ -30,7 +30,7 @@ shinyServer(function(input, output,session) {
...
@@ -30,7 +30,7 @@ shinyServer(function(input, output,session) {
## Reactive target
## Reactive target
values
<-
reactiveValues
(
TargetWorking
=
target
,
labeled
=
NULL
,
fastq_names_only
=
NULL
,
R1fastQ
=
NULL
,
R2fastQ
=
NULL
,
values
<-
reactiveValues
(
TargetWorking
=
target
,
labeled
=
NULL
,
fastq_names_only
=
NULL
,
R1fastQ
=
NULL
,
R2fastQ
=
NULL
,
json_name
=
json_name
,
num
=
0
,
pass
=
pass
,
login_email
=
NULL
,
is.valid
=
NULL
,
json_name
=
json_name
,
num
=
0
,
pass
=
pass
,
login_email
=
NULL
,
is.valid
=
NULL
,
biom_masque
=
NULL
,
tree_masque
=
NULL
,
masque_key
=
NULL
,
paths_fastq_tmp
=
NULL
)
biom_masque
=
NULL
,
tree_masque
=
NULL
,
masque_key
=
NULL
,
paths_fastq_tmp
=
NULL
,
curdir
=
curdir
)
## Counts file
## Counts file
dataInputCounts
<-
reactive
({
dataInputCounts
<-
reactive
({
...
@@ -719,7 +719,7 @@ shinyServer(function(input, output,session) {
...
@@ -719,7 +719,7 @@ shinyServer(function(input, output,session) {
CMP
=
CheckMasque
(
input
,
values
)
CMP
=
CheckMasque
(
input
,
values
)
Error
=
CMP
$
Error
Error
=
CMP
$
Error
isJSONalreadyExist
=
file.exists
(
paste
(
curdir
,
"www"
,
"masque"
,
"doing"
,
basename
(
json_name
),
sep
=
.Platform
$
file.sep
))
isJSONalreadyExist
=
file.exists
(
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"doing"
,
basename
(
json_name
),
sep
=
.Platform
$
file.sep
))
if
(
is.null
(
Error
)
&&
!
isJSONalreadyExist
)
if
(
is.null
(
Error
)
&&
!
isJSONalreadyExist
)
{
{
...
@@ -1139,7 +1139,7 @@ shinyServer(function(input, output,session) {
...
@@ -1139,7 +1139,7 @@ shinyServer(function(input, output,session) {
Error
=
CMP
$
Error
Error
=
CMP
$
Error
if
(
is.null
(
Error
)
&&
isolate
(
values
$
num
)
<
100
){
if
(
is.null
(
Error
)
&&
isolate
(
values
$
num
)
<
100
){
progress_file
=
paste
(
curdir
,
"www"
,
"masque"
,
"doing"
,
paste
(
basename
(
file_path_sans_ext
(
json_name
)),
"_progress"
,
".txt"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
progress_file
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"doing"
,
paste
(
basename
(
file_path_sans_ext
(
json_name
)),
"_progress"
,
".txt"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
if
(
file.exists
(
progress_file
))
if
(
file.exists
(
progress_file
))
{
{
pf
=
read_lines
(
progress_file
)
pf
=
read_lines
(
progress_file
)
...
@@ -1170,7 +1170,7 @@ shinyServer(function(input, output,session) {
...
@@ -1170,7 +1170,7 @@ shinyServer(function(input, output,session) {
#
#
# passOK = FALSE;status = NULL;file = NULL
# passOK = FALSE;status = NULL;file = NULL
# print("OK")
# print("OK")
# json_files = list.files(paste(curdir,"www","masque",sep= .Platform$file.sep),pattern = "json",recursive = TRUE)
# json_files = list.files(paste(
values$
curdir,"www","masque",sep= .Platform$file.sep),pattern = "json",recursive = TRUE)
# allpass = gsub(gsub(json_files,pattern = ".*file",replacement = ""),pattern = ".json",replacement = "")
# allpass = gsub(gsub(json_files,pattern = ".*file",replacement = ""),pattern = ".json",replacement = "")
#
#
# print(allpass)
# print(allpass)
...
@@ -1179,7 +1179,7 @@ shinyServer(function(input, output,session) {
...
@@ -1179,7 +1179,7 @@ shinyServer(function(input, output,session) {
# passOK = any(isolate(input$password)==allpass)
# passOK = any(isolate(input$password)==allpass)
# if(passOK){
# if(passOK){
# ind = which(isolate(input$password)==allpass)
# ind = which(isolate(input$password)==allpass)
# file = paste(curdir,"www","masque",json_files[ind],sep= .Platform$file.sep)
# file = paste(
values$
curdir,"www","masque",json_files[ind],sep= .Platform$file.sep)
# status = gsub(json_files[ind],pattern = "/.*",replacement = "")
# status = gsub(json_files[ind],pattern = "/.*",replacement = "")
# }
# }
# }
# }
...
@@ -1194,7 +1194,7 @@ shinyServer(function(input, output,session) {
...
@@ -1194,7 +1194,7 @@ shinyServer(function(input, output,session) {
#
#
# passOK = FALSE;status = NULL;file = NULL
# passOK = FALSE;status = NULL;file = NULL
#
#
# json_files = list.files(paste(curdir,"www","masque",sep= .Platform$file.sep),pattern = "json",recursive = TRUE)
# json_files = list.files(paste(
values$
curdir,"www","masque",sep= .Platform$file.sep),pattern = "json",recursive = TRUE)
# allpass = gsub(gsub(json_files,pattern = ".*file",replacement = ""),pattern = ".json",replacement = "")
# allpass = gsub(gsub(json_files,pattern = ".*file",replacement = ""),pattern = ".json",replacement = "")
#
#
# print(allpass)
# print(allpass)
...
@@ -1203,7 +1203,7 @@ shinyServer(function(input, output,session) {
...
@@ -1203,7 +1203,7 @@ shinyServer(function(input, output,session) {
# passOK = any(isolate(values$pass)==allpass)
# passOK = any(isolate(values$pass)==allpass)
# if(passOK){
# if(passOK){
# ind = which(values$pass==allpass)
# ind = which(values$pass==allpass)
# file = paste(curdir,"www","masque",json_files[ind],sep= .Platform$file.sep)
# file = paste(
values$
curdir,"www","masque",json_files[ind],sep= .Platform$file.sep)
# status = gsub(json_files[ind],pattern = "/.*",replacement = "")
# status = gsub(json_files[ind],pattern = "/.*",replacement = "")
# }
# }
# }
# }
...
@@ -1215,7 +1215,7 @@ shinyServer(function(input, output,session) {
...
@@ -1215,7 +1215,7 @@ shinyServer(function(input, output,session) {
observeEvent
(
input
$
Check_project
,{
observeEvent
(
input
$
Check_project
,{
values
$
masque_key
=
input
$
password
values
$
masque_key
=
input
$
password
resbox
=
Project_box_result
(
values
$
masque_key
,
curdir
)
resbox
=
Project_box_result
(
values
$
masque_key
,
values
$
curdir
)
PS
=
resbox
$
PS
PS
=
resbox
$
PS
passOK
=
PS
$
passOK
passOK
=
PS
$
passOK
...
@@ -1245,7 +1245,7 @@ shinyServer(function(input, output,session) {
...
@@ -1245,7 +1245,7 @@ shinyServer(function(input, output,session) {
observeEvent
(
input
$
Check_project_over
,{
observeEvent
(
input
$
Check_project_over
,{
values
$
masque_key
=
values
$
pass
values
$
masque_key
=
values
$
pass
resbox
=
Project_box_result
(
values
$
masque_key
,
curdir
)
resbox
=
Project_box_result
(
values
$
masque_key
,
values
$
curdir
)
PS
=
resbox
$
PS
PS
=
resbox
$
PS
passOK
=
PS
$
passOK
passOK
=
PS
$
passOK
...
@@ -1292,7 +1292,7 @@ shinyServer(function(input, output,session) {
...
@@ -1292,7 +1292,7 @@ shinyServer(function(input, output,session) {
# folder_name = basename(file_path_sans_ext(json_file))
# folder_name = basename(file_path_sans_ext(json_file))
# print(folder_name)
# print(folder_name)
# ### Paste file name as folder
# ### Paste file name as folder
# annot_process = paste(curdir,"www","masque","done",folder_name,"shaman_annotation_process.tsv",sep= .Platform$file.sep)
# annot_process = paste(
values$
curdir,"www","masque","done",folder_name,"shaman_annotation_process.tsv",sep= .Platform$file.sep)
#
#
# if(file.exists(annot_process))
# if(file.exists(annot_process))
# {
# {
...
@@ -1323,7 +1323,7 @@ shinyServer(function(input, output,session) {
...
@@ -1323,7 +1323,7 @@ shinyServer(function(input, output,session) {
# hideElement("project_over",anim=TRUE)
# hideElement("project_over",anim=TRUE)
#
#
# json_file = PS$file
# json_file = PS$file
# error_file = paste(curdir,"www","masque","error",paste(basename(file_path_sans_ext(json_file)),"_error",".txt",sep=""),sep= .Platform$file.sep)
# error_file = paste(
values$
curdir,"www","masque","error",paste(basename(file_path_sans_ext(json_file)),"_error",".txt",sep=""),sep= .Platform$file.sep)
# print(error_file)
# print(error_file)
# if(file.exists(error_file)){error_message = read_lines(error_file)}
# if(file.exists(error_file)){error_message = read_lines(error_file)}
#
#
...
@@ -1372,7 +1372,7 @@ shinyServer(function(input, output,session) {
...
@@ -1372,7 +1372,7 @@ shinyServer(function(input, output,session) {
output
$
masque_status_key
<-
renderUI
({
output
$
masque_status_key
<-
renderUI
({
res
=
NULL
res
=
NULL
resbox
=
Project_box_result
(
values
$
masque_key
,
curdir
)
resbox
=
Project_box_result
(
values
$
masque_key
,
values
$
curdir
)
# if(resbox$PS$status=='done') showElement("MasqueToShaman",anim=TRUE)
# if(resbox$PS$status=='done') showElement("MasqueToShaman",anim=TRUE)
# if(resbox$PS$status!='done') hideElement("MasqueToShaman",anim=TRUE)
# if(resbox$PS$status!='done') hideElement("MasqueToShaman",anim=TRUE)
...
@@ -1388,7 +1388,7 @@ shinyServer(function(input, output,session) {
...
@@ -1388,7 +1388,7 @@ shinyServer(function(input, output,session) {
# folder_name = basename(file_path_sans_ext(json_file))
# folder_name = basename(file_path_sans_ext(json_file))
# print(folder_name)
# print(folder_name)
# ### Paste file name as folder
# ### Paste file name as folder
# annot_process = paste(curdir,"www","masque","done",folder_name,"shaman_annotation_process.tsv",sep= .Platform$file.sep)
# annot_process = paste(
values$
curdir,"www","masque","done",folder_name,"shaman_annotation_process.tsv",sep= .Platform$file.sep)
#
#
# if(file.exists(annot_process))
# if(file.exists(annot_process))
# {
# {
...
@@ -1417,7 +1417,7 @@ shinyServer(function(input, output,session) {
...
@@ -1417,7 +1417,7 @@ shinyServer(function(input, output,session) {
# if(PS$status=="error"){
# if(PS$status=="error"){
#
#
# json_file = PS$file
# json_file = PS$file
# error_file = paste(curdir,"www","masque","error",paste(basename(file_path_sans_ext(json_file)),"_error",".txt",sep=""),sep= .Platform$file.sep)
# error_file = paste(
values$
curdir,"www","masque","error",paste(basename(file_path_sans_ext(json_file)),"_error",".txt",sep=""),sep= .Platform$file.sep)
# print(error_file)
# print(error_file)
# if(file.exists(error_file)){error_message = read_lines(error_file)}
# if(file.exists(error_file)){error_message = read_lines(error_file)}
#
#
...
@@ -1445,7 +1445,7 @@ shinyServer(function(input, output,session) {
...
@@ -1445,7 +1445,7 @@ shinyServer(function(input, output,session) {
res
=
NULL
res
=
NULL
if
(
PS
$
status
==
"doing"
){
if
(
PS
$
status
==
"doing"
){
json_file
=
PS
$
file
json_file
=
PS
$
file
progress_file
=
paste
(
curdir
,
"www"
,
"masque"
,
"doing"
,
paste
(
basename
(
file_path_sans_ext
(
json_file
)),
"_progress"
,
".txt"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
progress_file
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"doing"
,
paste
(
basename
(
file_path_sans_ext
(
json_file
)),
"_progress"
,
".txt"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
if
(
file.exists
(
progress_file
))
if
(
file.exists
(
progress_file
))
{
{
pf
=
read_lines
(
progress_file
)
pf
=
read_lines
(
progress_file
)
...
@@ -1464,7 +1464,7 @@ shinyServer(function(input, output,session) {
...
@@ -1464,7 +1464,7 @@ shinyServer(function(input, output,session) {
output
$
build_process_table
<-
DT
::
renderDataTable
({
output
$
build_process_table
<-
DT
::
renderDataTable
({
folder_name
=
paste
(
'file'
,
values
$
masque_key
,
sep
=
""
)
folder_name
=
paste
(
'file'
,
values
$
masque_key
,
sep
=
""
)
build_process
=
paste
(
curdir
,
"www"
,
"masque"
,
"done"
,
folder_name
,
"shaman_build_process.tsv"
,
sep
=
.Platform
$
file.sep
)
build_process
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"done"
,
folder_name
,
"shaman_build_process.tsv"
,
sep
=
.Platform
$
file.sep
)
if
(
file.exists
(
build_process
))
if
(
file.exists
(
build_process
))
{
{
bp
=
read.csv
(
build_process
,
sep
=
"\t"
,
header
=
TRUE
)
bp
=
read.csv
(
build_process
,
sep
=
"\t"
,
header
=
TRUE
)
...
@@ -1588,8 +1588,8 @@ shinyServer(function(input, output,session) {
...
@@ -1588,8 +1588,8 @@ shinyServer(function(input, output,session) {
observeEvent
(
input
$
RunResMasque
,{
observeEvent
(
input
$
RunResMasque
,{
updateSelectInput
(
session
,
"FileFormat"
,
""
,
selected
=
"fileBiom"
)
updateSelectInput
(
session
,
"FileFormat"
,
""
,
selected
=
"fileBiom"
)
reset
(
"fileBiom"
);
reset
(
"fileTree"
)
reset
(
"fileBiom"
);
reset
(
"fileTree"
)
values
$
biom_masque
=
paste
(
curdir
,
"www"
,
"masque"
,
"done"
,
basename
(
file_path_sans_ext
(
json_name
)),
paste
(
"shaman_"
,
input
$
masque_database
,
".biom"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
values
$
biom_masque
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"done"
,
basename
(
file_path_sans_ext
(
json_name
)),
paste
(
"shaman_"
,
input
$
masque_database
,
".biom"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
values
$
tree_masque
=
paste
(
curdir
,
"www"
,
"masque"
,
"done"
,
basename
(
file_path_sans_ext
(
json_name
)),
paste
(
"shaman_tree_"
,
input
$
masque_database
,
".nhx"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
values
$
tree_masque
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"done"
,
basename
(
file_path_sans_ext
(
json_name
)),
paste
(
"shaman_tree_"
,
input
$
masque_database
,
".nhx"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
})
})
...
@@ -1598,7 +1598,7 @@ shinyServer(function(input, output,session) {
...
@@ -1598,7 +1598,7 @@ shinyServer(function(input, output,session) {
output
$
Download_masque_zip
<-
downloadHandler
(
output
$
Download_masque_zip
<-
downloadHandler
(
filename
=
function
()
{
paste
(
"SHAMAN_"
,
values
$
masque_key
,
'.zip'
,
sep
=
""
)},
filename
=
function
()
{
paste
(
"SHAMAN_"
,
values
$
masque_key
,
'.zip'
,
sep
=
""
)},
content
=
function
(
file
){
content
=
function
(
file
){
zip_file
=
paste
(
curdir
,
"www"
,
"masque"
,
"done"
,
paste
(
"file"
,
values
$
masque_key
,
".zip"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
zip_file
=
paste
(
values
$
curdir
,
"www"
,
"masque"
,
"done"
,
paste
(
"file"
,
values
$
masque_key
,
".zip"
,
sep
=
""
),
sep
=
.Platform
$
file.sep
)
if
(
file.exists
(
zip_file
)){
file.copy
(
zip_file
,
file
)}
if
(
file.exists
(
zip_file
)){
file.copy
(
zip_file
,
file
)}
}
}
)
)
...
...
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