Skip to content

Commit

Permalink
0202_2ed
Browse files Browse the repository at this point in the history
  • Loading branch information
mugpeng committed Feb 2, 2024
1 parent 5042b96 commit f5f15a0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
# dir
/Input
/Output
/Log
/图片
/rsconnect
2 changes: 1 addition & 1 deletion Modules/DrugOmicPair.R
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ serverDrugOmicPair <- function(input, output, session){
}
p_list <- p_list[!sapply(p_list, is.null)]
# Warning
validate(
shiny::validate(
need(length(p_list) > 0, "You have not chosen yet, or there is no result for this drug-omic pair.")
)
p <- wrap_plots(p_list, ncol = 3)
Expand Down
4 changes: 2 additions & 2 deletions Modules/FeatureAcrossType.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ serverFeatureAcrossType <- function(input, output, session){
# Preprocess
select_features <- input$select_features
if(select_features == "mRNA") select_features <- "exp"
profile <- base::get(paste0(x, "_", select_features), envir = globalenv())
profile <- base::get(paste0(x, "_", select_features), envir = parent.env(environment()))
intersected_cells <- intersect(cell_anno$Name, colnames(profile))
sel_profile <- profile[rownames(profile) %in% input$select_specific_feature,
match(intersected_cells, colnames(profile))]
Expand Down Expand Up @@ -158,7 +158,7 @@ serverFeatureAcrossType <- function(input, output, session){
}
p_list <- p_list[!sapply(p_list, is.null)]
# Warning
validate(
shiny::validate(
need(length(p_list) > 0, "You have not chosen yet, or there is no result for this feature.")
)
if(length(p_list) > 1){
Expand Down
10 changes: 5 additions & 5 deletions Modules/FeatureDatabaseSig_singlethread.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ serverFeatureDatabaseSig <- function(input, output, session){
# Prepare
select_features1_2 <- input$select_features1
if(select_features1_2 == "mRNA") select_features1_2 <- "exp"
profile1 <- base::get(paste0(profile_comb[index,1], "_", select_features1_2), envir = globalenv())
profile1 <- base::get(paste0(profile_comb[index,1], "_", select_features1_2), envir = parent.env(environment()))
select_features2_2 <- input$select_features2
if(select_features2_2 == "mRNA") select_features2_2 <- "exp"
profile2 <- base::get(paste0(profile_comb[index,2], "_", select_features2_2), envir = globalenv())
profile2 <- base::get(paste0(profile_comb[index,2], "_", select_features2_2), envir = parent.env(environment()))
# Select specific feature and all features data
# con vs con ----
if(input$select_features1 %in% c("drug", "cnv",
Expand Down Expand Up @@ -265,7 +265,7 @@ serverFeatureDatabaseSig <- function(input, output, session){
re_list[[index]] <- re
incProgress(1/nrow(profile_comb), detail = paste0("Doing part ", index, "(Total ", nrow(profile_comb), ")"))
# Warning
validate(
shiny::validate(
need(length(profile_comb) > 0, "You have not chosen yet, or there is no result for this feature-database pair.")
)
}
Expand All @@ -283,7 +283,7 @@ serverFeatureDatabaseSig <- function(input, output, session){
x$fea
})
# Warning
validate(
shiny::validate(
need(length(re_name_list1) > 0, "You have not chosen yet, or there is no result for this feature-database pair.")
)
# message(class(re_list()))
Expand Down Expand Up @@ -311,7 +311,7 @@ serverFeatureDatabaseSig <- function(input, output, session){
# Result Table ----
output$re_table <- DT::renderDataTable({
re_df <- do.call(rbind, re_list())
validate(
shiny::validate(
need(length(re_df) > 0, "You have not chosen yet, or there is no result for this feature-database pair.")
)
rownames(re_df) <- NULL
Expand Down
2 changes: 2 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OmicsPharDB
A database that includes the largest published studies investigating the cancer cell lines to chemical compound treatment, and the association between drug sensitivity and multi-omics.



# Contact with me

Feel free to talk with me if you find any bugs or have any suggestions. :)
Expand Down

0 comments on commit f5f15a0

Please sign in to comment.