Skip to content

Commit

Permalink
minor fixes outrider summary
Browse files Browse the repository at this point in the history
  • Loading branch information
vyepez88 committed Sep 9, 2022
1 parent 4ed37e2 commit 9d9acc1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drop/modules/aberrant-expression-pipeline/OUTRIDER/Summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ plotAberrantPerSample(ods, main = dataset_title,
#+ countCorHeatmap, fig.height=8, fig.width=8
plotCountCorHeatmap(ods, normalized = FALSE, colGroups = "isExternal", colColSet = "Dark2",
main = paste0('Raw Counts (', dataset_title, ')'))
plotCountCorHeatmap(ods, normalized = TRUE, ,colGroups = "isExternal", colColSet = "Dark2",
plotCountCorHeatmap(ods, normalized = TRUE, colGroups = "isExternal", colColSet = "Dark2",
main = paste0('Normalized Counts (', dataset_title, ')'))


Expand Down Expand Up @@ -110,10 +110,12 @@ ggplot(bcv_dt, aes(when, BCV)) +
#' ## Results
res <- fread(snakemake@input$results)

#' Total number of expression outliers: `r nrow(res)`
#' Samples with at least one outlier gene: `r res[, uniqueN(sampleID)]`

#'
#' ### Aberrant samples
#' An aberrant sample is one that has more than 0.1% of the total genes called as outliers.
#' An aberrant sample is one that has more than 0.1% of the expressed genes called as outliers.
if (nrow(res) > 0) {
ab_table <- res[AberrantBySample > nrow(ods)/1000, .("Outlier genes" = .N), by = .(sampleID)] %>% unique
if (nrow(ab_table) > 0) {
Expand All @@ -127,9 +129,9 @@ if (nrow(res) > 0) {
}


#' ## Results table
#' ### Results table

## Save results table in the html folder and provide link to download
## Save the results table in the html folder and provide link to download
file <- snakemake@output$res_html
fwrite(res, file, sep = '\t', quote = F)
#+ echo=FALSE, results='asis'
Expand Down

0 comments on commit 9d9acc1

Please sign in to comment.