Skip to content

Commit

Permalink
Merge pull request #43 from LeaSeep/develop
Browse files Browse the repository at this point in the history
release 0.1.0
  • Loading branch information
PaulJonasJost authored Nov 10, 2022
2 parents 2a18eea + 6b5817c commit dd20571
Show file tree
Hide file tree
Showing 35 changed files with 5,142 additions and 3,879 deletions.
21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Release notes
=============


0.1 series
..........


0.1.0 (2022-10-25)
-------------------
* General:
* Renamed `Project to lower Dimension` to `PCA` (#10)
* Modularization (#11, #13, #24, #25, #27, #28, #26, #38)
* bug fixes(#14, #16, #33, #34, #36, #39)
* Coding Style (#20, #21)
* Added changelog (#49)
* Sample Correlation:
* New Module (#35)
* Enrichment Analysis:
* Additional Gene set allowed + selection (#41 , #22 )
* fixed ORA (#48)
26 changes: 26 additions & 0 deletions program/renv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,17 @@
"Hash": "50c838a310445e954bc13f26f26a6ecf",
"Requirements": []
},
"babelgene": {
"Package": "babelgene",
"Version": "22.9",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "8288e81d0c2c3272603f6ef394ffa6fd",
"Requirements": [
"dplyr",
"rlang"
]
},
"backports": {
"Package": "backports",
"Version": "1.4.1",
Expand Down Expand Up @@ -1845,6 +1856,21 @@
"Rcpp"
]
},
"msigdbr": {
"Package": "msigdbr",
"Version": "7.5.1",
"Source": "Repository",
"Repository": "CRAN",
"Hash": "2def1d52dfe1044f82e75d25fb5dd2e5",
"Requirements": [
"babelgene",
"dplyr",
"magrittr",
"rlang",
"tibble",
"tidyselect"
]
},
"munsell": {
"Package": "munsell",
"Version": "0.5.0",
Expand Down
20 changes: 20 additions & 0 deletions program/shinyApp/R/C.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Global Constants will be saved here

NOTES_PlACEHOLDER <- "Notes you want to take alongside the Plot (will be saved in the report) \nYou may want to use markdown syntay for structering the notes "
NOTES_HELP <- "Notes: For structure reasons you should start with Heading Level 4 (hence #### My personal Title)"

CODE_DOWNLOAD_PREFACE <- "# ShinyOmics R Code Download\n# Load necassary packages (if errors please install respective packages)
library(ggplot2)
library(ggpubr)
library(rstudioapi)
# if not run in RStudio you need to specify the directory fo the file yourself!
direcoty_of_files=dirname(rstudioapi::getSourceEditorContext()$path)
envList=readRDS(paste0(direcoty_of_files,'/','Data.rds'))
list2env(envList,envir = globalenv())
# loads the varaibles directly into global env
# if you want to combine multiple plots use the `with` notation instead e.g.
# plot <- with(envList, {ggplot(..)+geom_point()})
# Happy Adjusting! :)"
117 changes: 117 additions & 0 deletions program/shinyApp/R/data_selection/ui.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
data_selection_sidebar_panel <- sidebarPanel(
id = "sidebar_data_selection",
div(class = "omicType",
selectInput(
inputId = "omicType", # RNAorLIPID
label = "Omic Type that is uploaded",
choices = c("Transcriptomics", "Lipidomics", "Metabolomics"),
selected = ""
)
),
div(
class = "AddGeneSymbols_ui",
uiOutput(outputId = "AddGeneSymbols_ui"),
uiOutput(outputId = "AddGeneSymbols_organism_ui")
),
#uiOutput("AddGeneSymbols_organism_ui"),
actionButton(
inputId = "refresh1",
label = "Do"
),
div(
class = "LineToDistinguish",
hr(style = "border-top: 1px solid #000000;")
),
div(
class = "DataSelection",
h4("Row selection - biochemical entities"),
uiOutput(outputId = "providedRowAnnotationTypes_ui"),
uiOutput(outputId = "row_selection_ui"),
uiOutput(outputId = "propensityChoiceUser_ui")
),
# Outlier Selection -> for fixed removal pre-processing needs to be redone!
div(
class = "SampleSelection",
h4("Sample selection"),
uiOutput(outputId = "providedSampleAnnotationTypes_ui"),
uiOutput(outputId = "sample_selection_ui")),
uiOutput(outputId = "NextPanel_ui")
)


data_selection_main_panel <- mainPanel(
id = "mainPanel_DataSelection",
tabsetPanel(
type = "pills",
tabPanel(
title = "Upload section",
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("85%", "10%", "5%"),
NULL,
actionButton(
inputId = "Reset",
label = "Reset"
),
NULL
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("50%", "50%"),
uiOutput(outputId = "data_matrix1_ui"),
uiOutput(outputId = "data_sample_anno1_ui")
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("50%", "50%"),
uiOutput(outputId = "data_row_anno1_ui"),
uiOutput(
outputId = "data_preDone_ui"
) %>% helper(type = "markdown", content = "SummarizedExp_help")
),
hr(style = "border-top: 2px solid #cbedca;"),
uiOutput(outputId = "metadataInput_ui"),
hr(style = "border-top: 2px solid #cbedca;"),
downloadButton(
outputId = "SaveInputAsList",
label = "Save file input to upload later"
) %>% helper(type = "markdown", content = "compilation_help"),
htmlOutput(outputId = "debug", container = pre),
HTML(text = "<br>"),
HTML(text = "<br>")),
tabPanel(
title = "Upload visual inspection",
helpText("If you have uploaded your data, you might want to visually check the tables to confirm the correct data format. If you notice irregualarities you will need to correct the input data - this cannot be done in ShinyOmics, See the help on how your data is expected."),
actionButton(
inputId = "DoVisualDataInspection",
label = "Upload data for visual inspection"
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
DT::dataTableOutput("DataMatrix_VI"),
htmlOutput(outputId = "DataMatrix_VI_Info", container = pre)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
DT::dataTableOutput("SampleMatrix_VI"),
htmlOutput(outputId = "SampleMatrix_VI_Info", container = pre)
),
splitLayout(
style = "border: 1px solid silver:", cellWidths = c("70%", "30%"),
DT::dataTableOutput("EntitieMatrix_VI"),
htmlOutput(outputId = "EntitieMatrix_VI_Info", container = pre)
),
htmlOutput(outputId = "OverallChecks", container = pre)
)
)
)


data_selection_panel <- tabPanel(
title = "Data selection",
id = "Data_selection",
fluid = T,
h4("Data Selection"),
################################################################################
# Data Selection
################################################################################
data_selection_sidebar_panel,
data_selection_main_panel
)
39 changes: 39 additions & 0 deletions program/shinyApp/R/enrichment_analysis/check_annotation.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
check_annotation_enrichment_analysis <- function(){
# allowed annotations
ensembl_opt <- c(
"ensembl", "Ensembl", "ensembl_id", "Ensembl_ID", "Ensemble ID", "ENSEMBL"
)
entrez_opt <- c(
"entrez", "Entrez", "entrez_id", "Entrez_ID", "Entrez ID", "Entrez Gene ID", "ENTREZID"
)
symbol_opt <- c(
"symbol", "Symbol", "gene_symbol", "Gene_Symbol", "Gene Symbol", "Nomenclature", "SYMBOL"
)
# check if annotation is in row-annotation
no_ann <- TRUE # TRUE if no annotation is found
entrez_ann <- FALSE # TRUE if no entrez annotation is found
base_annotation <- NULL # annotation to be used in translation
if (any(entrez_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows))){
names(processedData_all$Transcriptomics$annotation_rows)[names(processedData_all$Transcriptomics$annotation_rows) == entrez_opt[entrez_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows)]] <<- "ENTREZID"
no_ann <- FALSE
entrez_ann <- FALSE
base_annotation <- "ENTREZID"
}
if (any(ensembl_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows))){
names(processedData_all$Transcriptomics$annotation_rows)[names(processedData_all$Transcriptomics$annotation_rows) == ensembl_opt[ensembl_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows)]] <<- "ENSEMBL"
no_ann <- FALSE
base_annotation <- "ENSEMBL"
}
if (any(symbol_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows))){
names(processedData_all$Transcriptomics$annotation_rows)[names(processedData_all$Transcriptomics$annotation_rows) == symbol_opt[symbol_opt %in% colnames(processedData_all$Transcriptomics$annotation_rows)]] <<- "SYMBOL"
no_ann <- FALSE
base_annotation <- "SYMBOL"
}
no_ann <- TRUE
# if no annotation is found, add popup asking for annotation
return(list(
"no_ann" = no_ann,
"entrezid_ann" = entrez_ann,
"base_annotation" = base_annotation
))
}
Loading

0 comments on commit dd20571

Please sign in to comment.