Commit c1cd12c5 authored by Jakob Wirbel's avatar Jakob Wirbel
Browse files

enforce tab limit for bioconductor.

parent 724e37b3
...@@ -186,8 +186,8 @@ check.associations <- function(siamcat, fn.plot=NULL, color.scheme = "RdYlBu", ...@@ -186,8 +186,8 @@ check.associations <- function(siamcat, fn.plot=NULL, color.scheme = "RdYlBu",
# check that each entry in "paired" has two samples associated with # check that each entry in "paired" has two samples associated with
# a different label, filter out the rest # a different label, filter out the rest
groups <- unique(meta[[paired]]) groups <- unique(meta[[paired]])
if (verbose > 2) message("+++ Starting with ", length(groups), if (verbose > 2) message("+++ Starting with ",
" pairings") length(groups), " pairings")
groups.red <- groups[vapply(groups, FUN = function(x){ groups.red <- groups[vapply(groups, FUN = function(x){
temp <- label$label[rownames(meta[meta[[paired]]==x,])] temp <- label$label[rownames(meta[meta[[paired]]==x,])]
if (length(unique(temp))!=2){ if (length(unique(temp))!=2){
...@@ -1372,17 +1372,17 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors, ...@@ -1372,17 +1372,17 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors,
} else { } else {
pairing.info <- sort(pairing.info) pairing.info <- sort(pairing.info)
x.pos <- x[names(which(label$label[names(pairing.info)] == x.pos <- x[names(which(label$label[names(pairing.info)] ==
positive.label))] positive.label))]
x.neg <- x[names(which(label$label[names(pairing.info)] == x.neg <- x[names(which(label$label[names(pairing.info)] ==
negative.label))] negative.label))]
if (take.log == TRUE){ if (take.log == TRUE){
fc <- mean(log10(x.pos + detect.lim) - fc <- mean(log10(x.pos + detect.lim) -
log10(x.neg + detect.lim)) log10(x.neg + detect.lim))
} else { } else {
fc <- mean(x.pos-x.neg) fc <- mean(x.pos-x.neg)
} }
p.val <- wilcox.test(x.pos, x.neg, exact=FALSE, p.val <- wilcox.test(x.pos, x.neg, exact=FALSE,
paired=TRUE)$p.value paired=TRUE)$p.value
# AU-ROC # AU-ROC
temp <- roc(cases = x.pos, temp <- roc(cases = x.pos,
controls = x.neg, controls = x.neg,
...@@ -1397,7 +1397,6 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors, ...@@ -1397,7 +1397,6 @@ analyse.binary.marker <- function(feat, label, detect.lim, colors,
} }
if (verbose) if (verbose)
pb$tick() pb$tick()
return(c('fc' = fc, 'p.val' = p.val, 'auc' = aucs[2], return(c('fc' = fc, 'p.val' = p.val, 'auc' = aucs[2],
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment