This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to build a graph from the microarray gene expression values using correlation functions?

How to build a graph from the microarray gene expression values using correlation functions? I need a tutorial in R language and Python/Ruby/Java. I tried to use ReactomeFI and a recipe from R bioinformatics cookbook.

Thank you

gene r

"How to build a graph" and you mention 4 different languages? Try to pick a single language and specify what kind of graph.

2 answers

I imagine you want a weighted graph based on correlation coefficients.

If your rows are gene names, you can simply do :

my_microarray_mat = as.matrix(whatever_data_frame_I_loaded_my_file_into)
my_cor_mat = cor(t(my_microarray_mat),method = "pearson")

method is by default "pearson" and you can change it to anything. Type ?cor.

See igraph documentation if you want to convert it to R graph object: http://igraph.org/r/

Source this file and use

myDendrogram <- dendrogramSamples(yourData)
plot(myDendrogram)

I need a graph with nodes as gene names and edges as significant correlations, not dendrogram, but THANKS, FOLKS

Log in to answer this question.