diff options
-rw-r--r-- | wqflask/wqflask/wgcna/wgcna_analysis.py | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/wqflask/wqflask/wgcna/wgcna_analysis.py b/wqflask/wqflask/wgcna/wgcna_analysis.py index 824b943c..45c87d3f 100644 --- a/wqflask/wqflask/wgcna/wgcna_analysis.py +++ b/wqflask/wqflask/wgcna/wgcna_analysis.py @@ -1,3 +1,33 @@ +# WGCNA analysis for GN2 +# Author / Maintainer: Danny Arends <Danny.Arends@gmail.com> + +from numpy import * +from pandas import * + +import scipy as sp # SciPy +import rpy2.robjects as ro # R Objects +import pandas.rpy.common as com # R common functions + +from rpy2.robjects.packages import importr +utils = importr("utils") + +## Get pointers to some common R functions +r_library = ro.r["library"] # Map the library function +r_options = ro.r["options"] # Map the options function +r_read_csv = ro.r["read.csv"] # Map the read.csv function +r_dim = ro.r["dim"] # Map the dim function +r_c = ro.r["c"] # Map the c function +r_seq = ro.r["seq"] # Map the seq function +r_table = ro.r["table"] # Map the table function +r_names = ro.r["names"] # Map the names function +r_png = ro.r["png"] # Map the png function for plotting +r_dev_off = ro.r["dev.off"] # Map the dev.off function + + +#TODO: This should only be done once, since it is quite expensive +print(r_library("WGCNA")) # Load WGCNA +print(r_options(stringsAsFactors = False)) + class WGCNA(object): |