AJWillsey — Mar 19, 2013, 4:44 PM
setwd("/Users/Canadia/Dropbox/SSC_July_2012/Co-expression/coexp_paper_Nov-12/newest_analysis/03-19-2013_dnmisVsK")
#load data
conn=read.table("class_gene_conn.txt", head=T, sep="\t")
conn=na.omit(conn)
#all brain regions all periods of time
#test significance
t=wilcox.test(conn$all.all[conn$class=="proband"], conn$all.all[conn$class=="sibling"], paired=F, alternative="greater", conf.int=TRUE)
t
Wilcoxon rank sum test with continuity correction
data: conn$all.all[conn$class == "proband"] and conn$all.all[conn$class == "sibling"]
W = 80040, p-value = 0.297
alternative hypothesis: true location shift is greater than 0
95 percent confidence interval:
-1.645 Inf
sample estimates:
difference in location
0.7303
#make df that holds proband as 1, sibling as 2
rank=cbind(rank(conn$all.all), conn$class)
rownames(rank)=conn$gene
#plot boxplot, output as eps file for input to AI
setEPS()
postscript(file="connRank_all-all.eps", height=3, width=3.5, colormodel='cmyk')
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)
dev.off()
pdf
2
#plot for window
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)
#Periods 3-5 Frontal Cortex
#test significance
t=wilcox.test(conn$p3.5.fc[conn$class=="proband"], conn$p3.5.fc[conn$class=="sibling"], paired=F, alternative="greater", conf.int=TRUE)
t
Wilcoxon rank sum test with continuity correction
data: conn$p3.5.fc[conn$class == "proband"] and conn$p3.5.fc[conn$class == "sibling"]
W = 85856, p-value = 0.009781
alternative hypothesis: true location shift is greater than 0
95 percent confidence interval:
0.9418 Inf
sample estimates:
difference in location
3.183
#make df that holds proband as 1, sibling as 2
rank=cbind(rank(conn$p3.5.fc), conn$class)
rownames(rank)=conn$gene
#plot boxplot, output as eps file for input to AI
setEPS()
postscript(file="connRank_P3-5_FC.eps", height=3, width=3.5, colormodel='cmyk')
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)
dev.off()
pdf
2
#plot for window
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)
#Periods 4-6 Frontal Cortex
#test significance
t=wilcox.test(conn$p4.6.fc[conn$class=="proband"], conn$p4.6.fc[conn$class=="sibling"], paired=F, alternative="greater", conf.int=TRUE)
t
Wilcoxon rank sum test with continuity correction
data: conn$p4.6.fc[conn$class == "proband"] and conn$p4.6.fc[conn$class == "sibling"]
W = 81958, p-value = 0.1299
alternative hypothesis: true location shift is greater than 0
95 percent confidence interval:
-0.7937 Inf
sample estimates:
difference in location
1.792
#make df that holds proband as 1, sibling as 2
rank=cbind(rank(conn$p4.6.fc), conn$class)
rownames(rank)=conn$gene
#plot boxplot, output as eps file for input to AI
setEPS()
postscript(file="connRank_P4-6_FC.eps", height=3, width=3.5, colormodel='cmyk')
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)
dev.off()
pdf
2
#plot for window
par(mai=c(0.5,1,0.5,0.5), ps=12, font.lab=2)
boxplot(rank[,1][rank[,2]==1], rank[,1][rank[,2]==2], notch=T, cex.main=1, cex.lab=1, cex.axis=1, lwd=2,
col=c("#ce2037", "#6FCCDD"), main="", ylab="Rank of connectivity", xlab="", names=c("Proband", "Sibling"))
mtext(paste("p=", signif(t$p.value, digits=1), sep=""), side=3)