gagneurlab/OUTRIDER

change labels for gene statistics plot

Closed this issue · 2 comments

add cumulative to the labels where we have cumulative data.

@vyepez88 do you think we still should add cumulative to the labels? Would be in the plotExpressedGenes function. If you do not think so please close the issue.

OUTRIDER/R/method-plot.R

Lines 1067 to 1095 in 5d1c18c

plotExpressedGenes <- function(ods, main='Statistics of expressed genes'){
# labels and col names
exp_genes_cols <- c(
'sampleID' = 'sampleID',
'Expressed\ngenes' = 'expressedGenes',
'Union of\nexpressed genes' = 'unionExpressedGenes',
'Intersection of\nexpressed genes' = 'intersectionExpressedGenes',
'Genes passed\nfiltering' = 'passedFilterGenes',
'Rank' = 'expressedGenesRank')
# validate input
if(!all(exp_genes_cols %in% names(colData(ods)))){
stop('Compute expressed genes first by executing \n\tods <- ',
'filterExpression(ods, addExpressedGenes=TRUE)')
}
dt <- as.data.table(colData(ods)[, exp_genes_cols])
colnames(dt) <- names(exp_genes_cols)
melt_dt <- melt(dt, id.vars = c('sampleID', 'Rank'))
ggplot(melt_dt, aes(Rank, value)) +
geom_point(aes(col = variable), size=1) +
geom_line(aes(col = variable)) +
theme_bw(base_size = 14) +
ylim(0, NA) +
theme(legend.position = 'top', legend.title = element_blank()) +
labs(y = 'Number of genes', x = 'Sample rank', title = main) +
scale_color_brewer(palette = 'Set1')
}

I'd say we don't need cumulative