Skip to content

Commit

Permalink
Create PC_regression_analysis_plots.R
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Catherine authored Jun 10, 2020
1 parent 8d6f539 commit 258dabe
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PC_regression_analysis_plots.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
################
# Principal component regression analysis plots
###############
# select variables of interest
head(pData(fun_filtered))
pData2 <- data.frame(pData(fun_filtered))
pData2$sentrix_id = as.factor(pData2$sentrix_id)

lev = apply(pData2,2,function(x) table(x))
pData2 = pData2[,(sapply(lev,max,na.rm=T)>1)&(sapply(lev,nrow)>1) ]

#svg("PCA.svg",h=6,w=6)
pcrplot(minfi::getBeta(fun_filtered), cov= pData2, npc=20)
#dev.off()

# write session info
writeLines(capture.output(sessionInfo()), "sessionInfo.txt")

0 comments on commit 258dabe

Please sign in to comment.