Entering edit mode
Enter the body of text here
I am trying to run ConsensusClusterPlus in a Jupyter notebook with code below. And I can't find the output file anywhere. I tried pdf and png options.
to set environmet, I use:
import os os.environ['R_HOME'] = 'C:\Folder\R' import rpy2.robjects as ro from rpy2.robjects import pandas2ri pandas2ri.activate() %load_ext rpy2.ipython %cd D:\Coding\Workdir
# here is the data preparation
data_for_cluster <- read.csv('data_log2_centered.csv', header = TRUE)
data_for_cluster <- data.frame(data_for_cluster[,-1], row.names = data_for_cluster[,1])
# get 1500 most variable genes, measured by median absolute deviation
mads=apply(data_for_cluster,1,mad)
# write.csv(mads, 'mads.csv', row.names = TRUE)
data_for_cluster <- data_for_cluster[rev(order(mads))[1:1500],]
# convert dataframe to matrix
data_for_cluster_mat <- data.matrix(data_for_cluster)
data_for_cluster_mat[0:3, 0:3]
# run CCP
library("ConsensusClusterPlus")
title=tempdir()
results = ConsensusClusterPlus(data_for_cluster, maxK=5,reps=50, pItem=0.8, pFeature=1,
title=title,clusterAlg="hc", distance="pearson", seed=42, plot='png')
Thank you!