[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] Using iGraph for correlated abundances

From: Tim Richter-Heitmann
Subject: Re: [igraph] Using iGraph for correlated abundances
Date: Thu, 14 Aug 2014 14:33:12 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0

Hi again!

Thank you for replying that quickly. You helpfully pointed out i could just 
manipulate my correlation matrix before i carry out my plotting.
That was very helpful on its own.

Currently, as i have just started with network analysis, i use rather 
easy-to-grasp approaches.
iGraph seems to be much more powerful than qGraph, but it seems like i need a 
while to get an idea how to get my graphs out. For example:

qgraph(cor(df, method="spearman", use="pairwise.complete.obs"), layout="spring", 
minimum=0.4, shape="circle",  label.cex=0.4, vsize=0.4
, groups=list, legend=TRUE, border.width=0.1, color=c25, filetype="pdf", 
filename="1", height=80, width=80, legend.cex=5, usePCH=TRUE)

gives me a non-circular, spring-outlaid network of spearman rank correlation 
from my input dataframe, in which i could control node sizes/shapes, could 
colourize by a vector with group IDs according to my own palette,
and which ignored correlations not meeting my treshold of 0.4.
I need now to translate this into iGraph, which seems very untrivial to do, for 
example, i have yet to find out how to control graphical parameters with 
But i hope i can get back to you later once i developed some expertise with 
iGraph. Thanks again!


 Message: 2
Date: Tue, 12 Aug 2014 10:53:59 -0400
From: G?bor Cs?rdi<address@hidden>
To: Help for igraph users<address@hidden>
Subject: Re: [igraph] Using iGraph for correlated abundances
Content-Type: text/plain; charset=UTF-8

Hi Tim,

yes, you can delete any edges from an you want from an igraph object
with delete.edges.

Maybe you want to set some elements of a matrix zero, then do it like this:

M[ condition ] <- 0

E.g. if you have pairwise p values in another matrix, then you can say:

M [ p > p_threshold ] <- 0

To say something more specific, you need to tell us more precisely
what you are doing. E.g. see
for advice on how to ask questions about R and R packages.


On Tue, Aug 12, 2014 at 10:37 AM, Tim Richter-Heitmann
<address@hidden>  wrote:

Hi there,

i have a very basic question. I want to plot my large abundance data
according to simple pairwise x,y pearson and/or spearman correlation.
I have used qgraph so far, but it cannot filter for non-significant p-values
(it can either display significant observations or correlation strengths,
but not both).
My question is, can iGraph do that by omitting non significant values at
I just recently delved into network analysis, from what ive seen on the net,
the graph.adjacency is the most common way to do so, and ive seen examples
deleting edges not meeting tresholds, but ive not seen the significancy
covered yet.
Also fine would be coloring according to cor-strength, label width according
to significancy level (or vice versa).
Any example code is very welcome. Thank you very much!


igraph-help mailing list


igraph-help mailing list

End of igraph-help Digest, Vol 97, Issue 5

Tim Richter-Heitmann (M.Sc.)
PhD Candidate

International Max-Planck Research School for Marine Microbiology
University of Bremen
Microbial Ecophysiology Group (AG Friedrich)
FB02 - Biologie/Chemie
Leobener Straße (NW2 A2130)
D-28359 Bremen
Tel.: 0049(0)421 218-63062
Fax: 0049(0)421 218-63069

reply via email to

[Prev in Thread] Current Thread [Next in Thread]