Question: Network plot
0
gravatar for Hernando Martínez
9.5 years ago by
Hernando Martínez100 wrote:
Hi list, I am working with a network, in a table form like this: Gene1 Gene5 0.76 Gene1 Gene79 0.89 Gene2 Gene8 0.97 ... Basically, each row represents two genes that interact, and their pearson correlation coefficient (from 0.7 to 1). What I want to get is a plot representing how the number of nodes and edges (separately) decrease when the pearson correlation cut off increases (from 0.7 to 1). What I have in mind is creating a loop and generate values for the plot, but I have never done anything similar in R and I am not quite sure how to do it or it that would work. Any ideas? Help is much appreciated, thanks, -- Hernando Martínez Vergara [[alternative HTML version deleted]]
network • 586 views
ADD COMMENTlink modified 9.5 years ago by Sean Davis21k • written 9.5 years ago by Hernando Martínez100
Answer: Network plot
0
gravatar for Sean Davis
9.5 years ago by
Sean Davis21k
United States
Sean Davis21k wrote:
On Thu, Jul 1, 2010 at 4:18 AM, Hernando Martínez <hernybiotec@gmail.com>wrote: > Hi list, > I am working with a network, in a table form like this: > > Gene1 Gene5 0.76 > Gene1 Gene79 0.89 > Gene2 Gene8 0.97 > ... > > Basically, each row represents two genes that interact, and their pearson > correlation coefficient (from 0.7 to 1). > What I want to get is a plot representing how the number of nodes and edges > (separately) decrease when the pearson correlation cut off increases (from > 0.7 to 1). > What I have in mind is creating a loop and generate values for the plot, > but > I have never done anything similar in R and I am not quite sure how to do > it > or it that would work. > Any ideas? Help is much appreciated, thanks, > > Hi, Hernando. You might want to look at the ecdf function given the problem you describe. Sean [[alternative HTML version deleted]]
ADD COMMENTlink written 9.5 years ago by Sean Davis21k
Answer: Network plot
0
gravatar for Sole Acha, Xavi
9.5 years ago by
Sole Acha, Xavi110 wrote:
You just need to build a matrix with two rows (one for nodes and one for edges), and as many columns as correlations cutoffs you want (e.g. if you have 0.7, 0.8, 0.9 and 1 it will have 4 columns). Then you just need to do a barplot for that matrix. As an example, if you have 4 correlation cutoffs: a<-matrix(8:1,2,4) #Matrix with number of nodes and edges for each PCC barplot(a,beside=TRUE,names.arg=c("0.7","0.8","0.9","1"),xlab="PCC threshold",ylab="Network parameters",col=c("blue","gray")) legend("topright",legend=c("nodes","edges"),fill=c("blue","gray")) To build the matrix there are some alternatives, and certainly one of them is a loop. Besides that, this is more an R question than a Bioconductor one, so maybe you should consider posting this to the R list. Best, Xavi. -----Mensaje original----- De: bioconductor-bounces at stat.math.ethz.ch [mailto:bioconductor- bounces at stat.math.ethz.ch] En nombre de Hernando Mart?nez Enviado el: jueves, 01 de julio de 2010 10:19 Para: Bioconductor at stat.math.ethz.ch Asunto: [BioC] Network plot Hi list, I am working with a network, in a table form like this: Gene1 Gene5 0.76 Gene1 Gene79 0.89 Gene2 Gene8 0.97 ... Basically, each row represents two genes that interact, and their pearson correlation coefficient (from 0.7 to 1). What I want to get is a plot representing how the number of nodes and edges (separately) decrease when the pearson correlation cut off increases (from 0.7 to 1). What I have in mind is creating a loop and generate values for the plot, but I have never done anything similar in R and I am not quite sure how to do it or it that would work. Any ideas? Help is much appreciated, thanks, -- Hernando Mart?nez Vergara [[alternative HTML version deleted]]
ADD COMMENTlink written 9.5 years ago by Sole Acha, Xavi110
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 171 users visited in the last hour