Commit f7c791f7 authored by Morgan Essex's avatar Morgan Essex

chose better data structure for boxplot

parent 6b03b28c
......@@ -121,13 +121,12 @@ confounder.check <- function(siamcat, fn.plot){
# X boxplot
par(mar=c(2.5, 4.5, 2.5, 1.5))
#combine <- list(mvar[siamcat@label@n.idx], mvar[siamcat@label@p.idx])
combine <- data.frame(mvar[lgr], c(mvar[smlr], rep(NA, len.diff)))
#boxplot(cbind(mvar[siamcat@label@n.idx], mvar[siamcat@label@p.idx]), use.cols=TRUE, names=c(siamcat@label@n.lab, siamcat@label@p.lab),
# ylab = mname, main=paste('Boxplot for', mname),col=histcolors,outpch=8)
boxplot(combine[,1], na.omit(combine[,2]), use.cols=TRUE, names=bp.labs,
ylab = mname, main=paste('Boxplot for', mname),col=histcolors)
#stripchart(combine, vertical=TRUE, add=TRUE, method="jitter", pch=20)
combine <- list(mvar[siamcat@label@n.idx], mvar[siamcat@label@p.idx])
#combine <- data.frame(mvar[lgr], c(mvar[smlr], rep(NA, len.diff)))
boxplot(combine, use.cols=TRUE, names=c(siamcat@label@n.lab, siamcat@label@p.lab),
ylab = mname, main=paste('Boxplot for', mname),col=histcolors,outpch=8)
#boxplot(combine[,1], na.omit(combine[,2]), use.cols=TRUE, names=bp.labs,
# ylab = mname, main=paste('Boxplot for', mname),col=histcolors)
stripchart(combine, vertical=TRUE, add=TRUE, method="jitter", pch=20)
# Y histogram
......@@ -143,7 +142,8 @@ confounder.check <- function(siamcat, fn.plot){
# transform heatmap values
colnames(hmap) <- c(siamcat@label@n.lab, siamcat@label@p.lab)
hmap.ratios <- as.matrix(log(hmap[,2]/hmap[,1])) - log(sum(as.numeric(unlist(siamcat@phyloseq@sam_data[,index]))>1)/sum(siamcat@phyloseq@sam_data[,index]<=1))
hmap.ratios <- as.matrix(log(hmap[,2]/hmap[,1])) -
log(sum(as.numeric(unlist(siamcat@phyloseq@sam_data[,index]))>1) / sum(siamcat@phyloseq@sam_data[,index]<=1))
rownames(hmap.ratios) <- as.matrix(rownames(hmap))
# plot as labeled barplot...
......
Markdown is supported
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