Skip to content

Commit

Permalink
Merge pull request #23 from liuzan-info/p2a
Browse files Browse the repository at this point in the history
debug ui and Matrix version
  • Loading branch information
liuzan-info authored Dec 13, 2023
2 parents 8ea0f4c + 41ac410 commit 9aaf47d
Show file tree
Hide file tree
Showing 6 changed files with 29,470 additions and 29,307 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ RUN unset ALI_TOKEN

# Install dependencies
RUN R -e "devtools::install_github(c('evocellnet/ksea', 'omarwagih/rmotifx', 'ecnuzdd/PhosMap'))"
RUN R -e "devtools::install_version('Matrix', version='1.5-3')"
RUN sudo apt-get install -y libgtk-3-dev cmake build-essential libcurl4-gnutls-dev libxml2 libxml2-dev libodbc1 libssl-dev libv8-dev libsodium-dev&& apt-get clean
RUN Rscript /srv/shiny-server/r_packages_install.R

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ This tool is developed with R, so if you want to run it locally, you may do some
install.packages('devtools')
require(devtools)
install_version('Matrix', version = '1.5-3')
install_github('evocellnet/ksea')
install_github('ecnuzdd/PhosMap')
```
Expand Down
41,994 changes: 20,994 additions & 21,000 deletions examplefile/diann/report_mini.tsv

Large diffs are not rendered by default.

88 changes: 45 additions & 43 deletions server.R
Original file line number Diff line number Diff line change
Expand Up @@ -1088,13 +1088,14 @@ server<-shinyServer(function(input, output, session){

if(!is.null(filenames)) {
diann_df <- diann_df %>% filter(Run %in% filenames$Experiment_Code)

fasta_file = 'PhosMap_datasets/fasta_library/uniprot/human/human_uniprot_fasta.txt'
PHOSPHATE_LIB_FASTA_DATA = utils::read.table(file=fasta_file, header=TRUE, sep="\t")

diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value")
diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value", "PTM.Site.Confidence")
diann_df <- diann_df[diann_df_var]

diann_df <- diann_df[which((diann_df$PTM.Q.Value <= input$diannptmqvalue)&(diann_df$PTM.Site.Confidence >= input$diannconfidence)),]
# diann_df <- diann_df[diann_df_var]

# Dont filter in module 'sample check'
# diann_df <- diann_df[which(diann_df$PTM.Q.Value <= input$diannptmqvalue),]

Expand Down Expand Up @@ -1467,14 +1468,14 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -1595,7 +1596,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2053,7 +2054,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2126,7 +2127,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2200,7 +2201,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2394,7 +2395,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2424,10 +2425,10 @@ server<-shinyServer(function(input, output, session){
fasta_file = 'PhosMap_datasets/fasta_library/uniprot/human/human_uniprot_fasta.txt'
PHOSPHATE_LIB_FASTA_DATA = utils::read.table(file=fasta_file, header=TRUE, sep="\t")

diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value")
diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value", "PTM.Site.Confidence")
diann_df <- diann_df[diann_df_var]

diann_df <- diann_df[which(diann_df$PTM.Q.Value <= input$diannptmqvalue),]
diann_df <- diann_df[which((diann_df$PTM.Q.Value <= input$diannptmqvalue)&(diann_df$PTM.Site.Confidence >= input$diannconfidence)),]

for (i in 1:nrow(diann_df)) {
if(!(i %% 5000)) {
Expand Down Expand Up @@ -2621,7 +2622,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2840,7 +2841,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -2964,7 +2965,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 2",
value = "usermaxnoprostep2val",
h4("Phosphorylation data frame: "),
h4("PhosMap Matrix: "),
dataTableOutput("usermaxnoproresult2motif"),
column(11,dataTableOutput("usermaxnoproresult2")),
column(1,downloadBttn(
Expand Down Expand Up @@ -3000,7 +3001,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 2",
value = "usermaxstep2val",
h4("Phosphorylation data frame: "),
h4("PhosMap Matrix: "),
column(11,dataTableOutput("usermaxresult2")),
column(1,downloadBttn(
outputId = "usermaxresult2_dl",
Expand All @@ -3013,7 +3014,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 3",
value = "usermaxstep3val",
h4("Phosphorylation data frame: "),
h4("PhosMap Matrix: "),
column(11,dataTableOutput("usermaxresult3")),
column(1,downloadBttn(
outputId = "usermaxresult3_dl",
Expand Down Expand Up @@ -3057,7 +3058,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 2",
value = "usermaxdropprostep2val",
h4("Phosphorylation data frame: "),
h4("PhosMap Matrix: "),
column(11,dataTableOutput("usermaxdropproresult2")),
column(1,downloadBttn(
outputId = "usermaxdropproresult2_dl",
Expand Down Expand Up @@ -3295,7 +3296,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand All @@ -3306,7 +3307,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -3429,7 +3430,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -3801,7 +3802,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand All @@ -3812,7 +3813,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -3926,7 +3927,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 4",#normalization1
value = "usermascotnoprostep4val",
h4("Phosphorylation data frame:"),
h4("PhosMap Matrix:"),
column(11,dataTableOutput("viewednorm14nopro")),
column(1,downloadBttn(
outputId = "viewednorm14nopro_dl",
Expand Down Expand Up @@ -3980,7 +3981,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 4",
value = "usermascotstep4val",
h4("Phosphorylation data frame:"),
h4("PhosMap Matrix:"),
column(11,dataTableOutput("viewednorm14")),
column(1,downloadBttn(
outputId = "viewednorm14_dl",
Expand All @@ -3993,7 +3994,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(
"Step 5",
value = "usermascotstep5val",
h4("Phosphorylation data frame:"),
h4("PhosMap Matrix:"),
column(11,dataTableOutput("viewednorm15")),
column(1,downloadBttn(
outputId = "viewednorm15_dl",
Expand Down Expand Up @@ -4055,7 +4056,7 @@ server<-shinyServer(function(input, output, session){
tabPanel(#normalization 1
"Step 4",
value = "usermascotdropprostep4val",
h4("Phosphorylation data frame:"),
h4("PhosMap Matrix:"),
column(11,dataTableOutput("viewednorm14droppro")),
column(1,downloadBttn(
outputId = "viewednorm14droppro_dl",
Expand Down Expand Up @@ -4133,7 +4134,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -4319,7 +4320,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -4551,7 +4552,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -4589,10 +4590,11 @@ server<-shinyServer(function(input, output, session){
fasta_file = paste0('PhosMap_datasets/fasta_library/uniprot/', input$diannspecies, '/', input$diannspecies, '_uniprot_fasta.txt')
PHOSPHATE_LIB_FASTA_DATA = utils::read.table(file=fasta_file, header=TRUE, sep="\t")

diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value")
diann_df_var <- c("Run", "Protein.Group", "Genes", "PG.MaxLFQ", "Modified.Sequence", "Stripped.Sequence", "PTM.Q.Value", "PTM.Site.Confidence")
diann_df <- diann_df[diann_df_var]

diann_df <- diann_df[which(diann_df$PTM.Q.Value <= input$diannptmqvalue),]
diann_df <- diann_df[which((diann_df$PTM.Q.Value <= input$diannptmqvalue)&(diann_df$PTM.Site.Confidence >= input$diannconfidence)),]


for (i in 1:nrow(diann_df)) {
if(!(i %% 5000)) {
Expand Down Expand Up @@ -4781,7 +4783,7 @@ server<-shinyServer(function(input, output, session){
sendSweetAlert(
session = session,
title = "All Done",
text = "You can now download the ‘Phosphorylation data frame’ for further analysis.",
text = "You can now download the ‘PhosMap Matrix’ for further analysis.",
type = "success",
btn_labels = "OK"
)
Expand Down Expand Up @@ -4839,7 +4841,7 @@ server<-shinyServer(function(input, output, session){
session = session,
title = "Tip",
text = HTML("Due to the fact that there are only <u>two sample groups</u> in the data
and the 'Phosphorylation data frame' does <u>not contain sequence information</u>,
and the 'PhosMap Matrix' does <u>not contain sequence information</u>,
<br><span style='color:red'>some of the tools have been disabled</span>."),
type = "info",
html = TRUE
Expand Down Expand Up @@ -4935,7 +4937,7 @@ server<-shinyServer(function(input, output, session){
)
observeEvent(
input$viewanalysisexamdf,{
output$viewedfileanalysisui <- renderUI(h4("2. Phosphorylation data frame:"))
output$viewedfileanalysisui <- renderUI(h4("2. PhosMap Matrix:"))
output$viewedfileanalysis <- renderDataTable(summarydf)
}
)
Expand Down Expand Up @@ -4984,7 +4986,7 @@ server<-shinyServer(function(input, output, session){
file1_v = paste0(mascotdemopreloc, "DemoPreNormImputeSummary_v.csv")
}
output$viewedfileanalysis <- renderDataTable(df <- read.csv(file1_v))
output$viewedfileanalysisui <- renderUI({h4("2. Phosphorylation data frame:")})
output$viewedfileanalysisui <- renderUI({h4("2. PhosMap Matrix:")})
}
)
observeEvent(
Expand Down Expand Up @@ -5057,7 +5059,7 @@ server<-shinyServer(function(input, output, session){
file1_v = paste0(mascotuserpreloc, "PreNormBasedProSummary_v.csv")
}
output$viewedfileanalysis <- renderDataTable(df <- read.csv(file1_v))
output$viewedfileanalysisui <- renderUI({h4("2. Phosphorylation data frame:")})
output$viewedfileanalysisui <- renderUI({h4("2. PhosMap Matrix:")})
}
)

Expand Down Expand Up @@ -5128,7 +5130,7 @@ server<-shinyServer(function(input, output, session){
file1_v = paste0(maxdemopreloc, "DemoPreNormImputeSummary_v.csv")
}
output$viewedfileanalysis <- renderDataTable(df <- read.csv(file1_v))
output$viewedfileanalysisui <- renderUI({h4("2. Phosphorylation data frame:")})
output$viewedfileanalysisui <- renderUI({h4("2. PhosMap Matrix:")})
}
)
observeEvent(
Expand Down Expand Up @@ -5200,7 +5202,7 @@ server<-shinyServer(function(input, output, session){
file1_v = paste0(maxuserpreloc, "PreNormBasedProSummary_v.csv")
}
output$viewedfileanalysis <- renderDataTable(df <- read.csv(file1_v))
output$viewedfileanalysisui <- renderUI({h4("2. Phosphorylation data frame:")})
output$viewedfileanalysisui <- renderUI({h4("2. PhosMap Matrix:")})
}
)
observeEvent(
Expand Down Expand Up @@ -5311,7 +5313,7 @@ server<-shinyServer(function(input, output, session){
observeEvent(
input$viewanalysispipedf, {
output$viewedfileanalysis <- renderDataTable(summarydf_v)
output$viewedfileanalysisui <- renderUI({h4("2. Phosphorylation data frame:")})
output$viewedfileanalysisui <- renderUI({h4("2. PhosMap Matrix:")})
}
)
observeEvent(
Expand Down Expand Up @@ -5427,15 +5429,15 @@ server<-shinyServer(function(input, output, session){
# display profilingfile by dataframe in main
observeEvent(
input$analysisupload12,{
output$viewedfileanalysisuiuser <- renderUI(h4("2. Phosphorylation data frame:"))
output$viewedfileanalysisuiuser <- renderUI(h4("2. PhosMap Matrix:"))
output$viewanalysisyourexpre <- renderUI({actionButton("viewanalysisyourdfbt", "view")})
output$viewedfileanalysisuser <- renderDataTable({profilingfile_analysis()})
}
)

observeEvent(
input$viewanalysisyourdfbt, {
output$viewedfileanalysisuiuser <- renderUI(h4("2. Phosphorylation data frame:"))
output$viewedfileanalysisuiuser <- renderUI(h4("2. PhosMap Matrix:"))
output$viewedfileanalysisuser <- renderDataTable({profilingfile_analysis()})
}
)
Expand Down Expand Up @@ -5647,7 +5649,7 @@ server<-shinyServer(function(input, output, session){
col.ind = as.factor(pca()[[2]]),
pointshape = 16,
# config color
palette = "aaas",
palette = 'lancet',
# palette = grDevices::rainbow(length(pca()[[2]])),
# Concentration ellipses
addEllipses = FALSE,
Expand Down
Loading

0 comments on commit 9aaf47d

Please sign in to comment.