igraph-help
[Top][All Lists]
Advanced

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

[igraph] Creating a snp-network with respect to position


From: Hermann Norpois
Subject: [igraph] Creating a snp-network with respect to position
Date: Thu, 14 Nov 2013 21:53:56 +0100

Hello,


I just beginn to use igraph and I am really impressed. I was successful to create an igraph object zu.network (see dput (zu.network)) from zu. I am interested to display how the SNPs of SNP_A and SNP_B are connected with respect to their position and R2.

I started with
plot (zu.network)
but I was not able to find the syntax that satiesfies my needs.

1) How can I position the SNP_A with respect to position (position of SNP_A).
2) How can I display the strengh of the connection (expressed by R2) by the thickness of the connecting line?

Thanks
Hermann


> zu
       SNP_A     SNP_B       R2 position
2  rs4822747 rs4820690 0.695642 27001689
3  rs4822747 rs5761627 0.695642 27001689
4  rs4822747 rs5752355 0.687861 27001689
5  rs4822747 rs4822748 0.682715 27001689
6  rs4822747 rs4820691 0.695642 27001689
7  rs4822747 rs4822749 0.695642 27001689
9  rs4820690 rs4822747 0.695642 27002392
11 rs4820690 rs5761627 1.000000 27002392
12 rs4820690 rs5752355 0.988681 27002392
13 rs4820690 rs4822748 0.988655 27002392
14 rs4820690 rs4820691 1.000000 27002392
15 rs4820690 rs4822749 1.000000 27002392
16 rs4820690 rs4822750 0.988655 27002392
17 rs4820690 rs5761629 0.695642 27002392
19 rs5761627 rs4822747 0.695642 27004298
20 rs5761627 rs4820690 1.000000 27004298
22 rs5761627 rs5752355 0.988681 27004298
23 rs5761627 rs4822748 0.988655 27004298
24 rs5761627 rs4820691 1.000000 27004298
25 rs5761627 rs4822749 1.000000 27004298

> dput (zu.network)
structure(list(9, TRUE, c(0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 2), c(1, 2, 3, 4, 5, 6, 0, 2, 3, 4, 5, 6,
7, 8, 0, 1, 3, 4, 5, 6), c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19), c(6, 14, 0, 15, 1, 7, 2,
8, 16, 3, 9, 17, 4, 10, 18, 5, 11, 19, 12, 13), c(0, 6, 14, 20,
20, 20, 20, 20, 20, 20), c(0, 2, 4, 6, 9, 12, 15, 18, 19, 20),
    list(c(1, 0, 1), structure(list(), .Names = character(0)),
        structure(list(name = c("rs4822747", "rs4820690", "rs5761627",
        "rs5752355", "rs4822748", "rs4820691", "rs4822749", "rs4822750",
        "rs5761629")), .Names = "name"), structure(list(R2 = c(0.695642,
        0.695642, 0.687861, 0.682715, 0.695642, 0.695642, 0.695642,
        1, 0.988681, 0.988655, 1, 1, 0.988655, 0.695642, 0.695642,
        1, 0.988681, 0.988655, 1, 1), position = c(27001689L,
        27001689L, 27001689L, 27001689L, 27001689L, 27001689L,
        27002392L, 27002392L, 27002392L, 27002392L, 27002392L,
        27002392L, 27002392L, 27002392L, 27004298L, 27004298L,
        27004298L, 27004298L, 27004298L, 27004298L)), .Names = c("R2",
        "position")))), class = "igraph")
>

reply via email to

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