Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified .Rbuildignore
100644 → 100755
Empty file.
Empty file modified .github/.gitignore
100644 → 100755
Empty file.
Empty file modified .github/workflows/R-CMD-check.yaml
100644 → 100755
Empty file.
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .pre-commit-config.yaml
100644 → 100755
Empty file.
Empty file modified DESCRIPTION
100644 → 100755
Empty file.
Empty file modified DeconvExplorer.Rproj
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified LICENSE.md
100644 → 100755
Empty file.
Empty file modified NAMESPACE
100644 → 100755
Empty file.
Empty file modified NEWS.md
100644 → 100755
Empty file.
Empty file modified R/BenchmarkingPlots.R
100644 → 100755
Empty file.
Empty file modified R/DeconvExplorer-pkg.R
100644 → 100755
Empty file.
38 changes: 21 additions & 17 deletions R/DeconvExplorer.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
column(
width = 4,
selectInput("deconvMethod", "Deconvolution Method",
choices = c('MuSiC'='music', omnideconv::deconvolution_methods[-10])
choices = c("MuSiC" = "music", omnideconv::deconvolution_methods[-10])
)
),
column(
Expand All @@ -220,8 +220,10 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
column(
width = 3,
div(
shinyBS::popify(shinyWidgets::actionBttn("deconvolute", "Deconvolute", style = 'simple', icon = icon('triangle-exclamation'), color = 'warning'),
"Attention", "Some methods are considerably slower than others; please keep this in mind when using DeconvExplorer for deconvolution."),
shinyBS::popify(
shinyWidgets::actionBttn("deconvolute", "Deconvolute", style = "simple", icon = icon("triangle-exclamation"), color = "warning"),
"Attention", "Some methods are considerably slower than others; please keep this in mind when using DeconvExplorer for deconvolution."
),
style = "margin-top:1.7em"
)
),
Expand All @@ -234,7 +236,7 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
title = "",
content = "Select a deconvolution method to run. If required and supported by the deconvolution method you can additionally select a custom signature to be used in computation. Please note this is an advanced feature and should be used with caution. "
)


deconv_plot_box <- shinydashboard::box(
id = "tour_deconvPlot",
Expand Down Expand Up @@ -511,43 +513,45 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
title = span("Clustered Signature", icon("question-circle", id = "sigHeatmapQ")),
status = "info", solidHeader = TRUE,
width = 12,
fluidRow(
fluidRow(
column(
width = 4,
selectInput("signatureToHeatmap", "Select a Signature", choices = NULL)
),
column(
width = 2,
selectInput("signatureAnnotationScore", "Select an annotation score",
choices = c("Entropy" = "entropy", "Gini Index" = "gini")
choices = c("Entropy" = "entropy", "Gini Index" = "gini")
)
),
column(
width = 2,
selectInput("signatureAnnotationPlotType", "Annotation Type",
choices = c("Bars" = "bar", "Lines" = "line")
choices = c("Bars" = "bar", "Lines" = "line")
)
),
column(
width = 2,
selectInput("clusterCelltypes", "Order rows (cell types)",
choices = c(".. by cell-type similarity" = "cluster", ".. alphabetically" = "no_cluster")
choices = c(".. by cell-type similarity" = "cluster", ".. alphabetically" = "no_cluster")
)
),
column(
width = 2,
selectInput("clusterGenes", "Order columns (genes)",
choices = c(".. by maximal z-score per cell type" = "z-score cutoff",
".. hierarchically based on euclidean distance" = "hierarchical clustering",
".. alphabetically" = "alphabetical")
choices = c(
".. by maximal z-score per cell type" = "z-score cutoff",
".. hierarchically based on euclidean distance" = "hierarchical clustering",
".. alphabetically" = "alphabetical"
)
)
)
),
fluidRow(
column(
width = 12,
InteractiveComplexHeatmap::originalHeatmapOutput("clusteredHeatmapOneSignature",
width = "1250px", height = "450px", containment = TRUE
width = "1250px", height = "450px", containment = TRUE
)
)
),
Expand Down Expand Up @@ -725,7 +729,7 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
column(
width = 7,
sliderInput("refinePercentZero", "Maximum percentage of zeroes allowed for each gene",
min = 0, max = 100, value = 90, step = 1, post = "%"
min = 0, max = 100, value = 90, step = 1, post = "%"
)
),
column(
Expand Down Expand Up @@ -759,7 +763,7 @@ DeconvExplorer <- function(deconvexp_bulk = NULL,
)
)

refUnspecificPopover <-
refUnspecificPopover <-
shinyBS::bsPopover(
id = "refUnspecificQ",
title = "",
Expand Down Expand Up @@ -817,8 +821,8 @@ refUnspecificPopover <-
shinyBS::bsPopover(
id = "refManuallyQ",
title = "",
content =
)
content =
)

# Info Boxes --------------------------------------------------------------
info_overview <- shinydashboard::box(
Expand Down Expand Up @@ -1661,7 +1665,7 @@ refUnspecificPopover <-
scoring_method = input$signatureAnnotationScore,
annotation_type = input$signatureAnnotationPlotType,
color_palette = input$globalColor,
order_rows = input$clusterCelltypes,
order_rows = input$clusterCelltypes,
order_columns = input$clusterGenes
),
"clusteredHeatmapOneSignature",
Expand Down
Empty file modified R/Global.R
100644 → 100755
Empty file.
13 changes: 5 additions & 8 deletions R/SignatureExplorationPlots.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -253,22 +253,19 @@ plot_signatureClustered <- function(signature_mat,
cell.types.ordered <- order(colnames(mat))
}

if(order_columns == 'z-score cutoff'){
if (order_columns == "z-score cutoff") {
genes <- c()
for (c in cell.types.ordered) {
highly.expr.genes <- names(which(mat[, c] > threshold))
genes <- union(genes, highly.expr.genes)
}

genes <- union(genes, rownames(mat))
}else if(order_columns == 'hierarchical clustering'){

} else if (order_columns == "hierarchical clustering") {
# use hierarchical ward D2 clustering based on euclidean distance
clustering <- hclust(dist(mat), method = 'ward.D2')
clustering <- hclust(dist(mat), method = "ward.D2")
genes <- rownames(mat)[clustering$order]

}else if(order_columns == 'alphabetical'){

} else if (order_columns == "alphabetical") {
genes <- sort(rownames(mat))
}

Expand Down
14 changes: 7 additions & 7 deletions R/SignatureRefinements.R
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -116,26 +116,26 @@ removeUnspecificGenes <- function(signature_mat,

signature_mat <- as.matrix(signature_mat)

to_keep <- sapply(1:nrow(signature_mat), function(i){
to_keep <- sapply(1:nrow(signature_mat), function(i) {
row <- signature_mat[i, ] # has colnames! drop FALSE is mandatory !!!!!

# calculate bins to prevent error
breaks <- seq(floor(min(row)), ceiling(max(row)), length.out = number_of_bins + 1)

# cut into bins, seperate for each gene
bins <- cut(row, breaks = breaks, labels = labels, include.lowest = TRUE)

nHighBins <- sum(bins == "high") # not working when labels is something else

# this value needs to be greater than one, depending of the step in the pipeline there arent
# any rows producing zeros left but that is not the case for all signatures
if (nHighBins <= max_count & nHighBins > 0) {
return(TRUE)
}else{
} else {
return(FALSE)
}
})


refinedSignature <- signature_mat[to_keep, ]

Expand Down
Empty file modified R/zzz.R
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/app/CIBERSORT.R
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions inst/deconvexplorer-webserver/app/Dockerfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ RUN apt-get update && apt-get install -y \
# omnideconv and DeconvExplorer
#RUN install2.r --error textshaping

RUN R -e "install.packages('pak')"
RUN R -e "install.packages(c('pak','devtools'))"
RUN R -e "pak::pkg_install(c('car', 'matlib', 'remotes'))"
RUN R -e "remotes::install_github('omnideconv/omnideconv', dependencies=TRUE)"
RUN R -e "remotes::install_github('renozao/NMF@devel', auth_token='TOKEN')"
RUN R -e "remotes::install_github('omnideconv/BayesPrism', auth_token='TOKEN')"
RUN R -e "remotes::install_github('omnideconv/omnideconv', dependencies=TRUE, auth_token='TOKEN')"
RUN R -e "pak::pkg_install('omnideconv/DeconvExplorer', dependencies=TRUE)"

#RUN R -e "reticulate::install_miniconda()" # will not install automatically
Expand Down
Empty file modified inst/deconvexplorer-webserver/app/app.R
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/app/shiny-server.conf
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/app/shiny-server.sh
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/docker-compose.yml
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/nginx/nginx.conf
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/shinyproxy/Dockerfile
100644 → 100755
Empty file.
Empty file modified inst/deconvexplorer-webserver/shinyproxy/application.yml
100644 → 100755
Empty file.
Empty file modified inst/extdata/app_information.Rmd
100644 → 100755
Empty file.
Empty file modified inst/extdata/app_information.md
100644 → 100755
Empty file.
Empty file modified inst/extdata/data_info.md
100644 → 100755
Empty file.
Empty file modified inst/extdata/deconvolution_example.rds
100644 → 100755
Empty file.
Empty file modified inst/extdata/signature_example.rds
100644 → 100755
Empty file.
Empty file modified inst/extdata/tour_intro.txt
100644 → 100755
Empty file.
Empty file modified inst/www/batch.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified inst/www/bulk.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified inst/www/cell_anno.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified inst/www/deconv.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed inst/www/deconvExplorer.png
Binary file not shown.
Empty file modified inst/www/markers.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading