[R] Igraph library: How to calculate APSP (shortest path matrix) matrix for a subset list of nodes.

2008-08-24 Thread dinesh kumar
Dear R Users,

I have a network of 25000 total nodes and a list of 500 node which is a
subset of all nodes. Now I want to calculate the APSP (all pair shortest
path) matrix only for these 500 nodes.
I would appreciate any help.
Thanks in advance

Dinesh

-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Subset of matrix

2008-03-24 Thread dinesh kumar
Dear  R users

I have a big matrix like

  6021118879029011741015199066136288
100714
602110.6580.6880.4740.2620.1630.1370.32
0.2520.206
11880.65810.9170.2450.3310.1220.1480.194
0.1680.171
7900.6880.91710.2430.310.1220.150.19
0.1710.174
2900.4740.2450.24310.390.3190.1870.4
0.3110.235
11740.2620.3310.310.3910.2950.3520.345
0.3060.308
10150.1630.1220.1220.3190.29510.4210.343
0.4420.435
19900.1370.1480.150.1870.3520.42110.313
0.380.395
66130.320.1940.190.40.3450.3430.31310.58
0.429
62880.2520.1680.1710.3110.3060.4420.380.58
10.723
1007140.2060.1710.1740.2350.3080.4350.395
0.4290.7231
59510.220.1680.1710.2670.3180.4780.4090.478
0.8440.85
59600.2320.1830.1860.2720.3240.420.3830.522
0.6860.711
2360.2590.2130.2180.2830.3570.3820.40.549
0.6550.608
649560.1990.1720.1750.250.3550.4440.4750.523
0.6330.614
2390.1880.1690.1730.2370.3620.4630.50.469
0.5960.692
330320.250.1670.1690.3080.3010.4070.3460.486
0.6550.64
62620.2540.1780.1820.3140.3290.3960.360.459
0.6790.633
59610.2620.1890.1940.3110.3420.3620.3770.468
0.6210.574
59620.2430.1770.180.2980.3240.3890.3530.453
0.6670.62
63060.2260.1680.1710.2740.3060.3890.380.514
0.6980.62
61060.2260.1680.1710.2740.3060.3890.380.514
0.6980.62
62870.2080.1750.1780.250.3280.4290.4220.529
0.7710.689
59500.1930.1750.1790.230.3440.4650.50.448
0.7330.816
8330.3120.2440.2420.4080.4440.3280.3170.526
0.5620.517
7500.1680.1550.1570.2080.3390.5140.5150.385
0.5780.722
61370.2010.1680.1710.2390.3060.3890.380.453
0.6980.62
1457420.3170.2290.2360.3490.3250.3390.305
0.5190.5810.534
58100.3640.2160.2210.4110.2940.3380.2690.603
0.6310.47
8250.3640.2160.2210.4110.2940.3380.2690.603
0.6310.47
74050.3130.2460.2440.3550.3670.290.3170.537
0.5070.484
10450.1330.1240.1350.1980.3330.4410.3440.277
0.3620.341
11230.110.1060.1040.1570.2620.4150.3680.227
0.3040.333
5880.2810.3120.340.3030.4190.2780.40.287
0.3120.316

with more than thousand number of rows and column
I want to extract or subset a child matrix from above with specific row
names or col names.
e.g.
For above matrix I need only rows which has following row names.
5951 236 6306 5950 145742 1123

I would appreciate if you can use this matrix as input.

Thanks in advance.

Dinesh




-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Alignment and Reshaping of the matrix

2008-03-29 Thread dinesh kumar
Dear R users,

I have a matrix like

85 .90 86 .89 87 .98 86 .87
88 .98 90 .78 88 .76 89 .56
90 .67 95 .67 89 .89 90 .87
91 .56 96 .87 90 .76 92.98

each pair of columns present a variable name and next  the value. I have
matrix with more than 500 rows and column.

Now I want to convert this matrix in to.

85  .90   00   .00   00
86  .00  .89   .00  .87
87  .00   00   .98   00
88  .98   00   .76   00
89  .00   00   .89  .56
90  .67  .78   .76  .87
91  .56   00   .00   00
92  .00  .00   .00  .98
93  .00  .0000   00
94  .00  .0000   00
95  .00  .6700   00
96  .00  .8700   00

Where first column represent the Variable name.

And if the first matrix is transposed, then how to get the output in which
First raw present the variable name.

It will be great help for my research.

Dinesh

-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Two Colored Heatmap

2008-04-14 Thread dinesh kumar
Hi All

I have matrix Like:-
  10   20 40  60 100
Glucose  UP  Down UP No UP
Fructose UP  UP Down UP No
Sucrose  UP  Down UP No Down
Taurine   No   No No No  UP
Cellobiose   Up   NoUp Down   No
TrehaloseNo   UpUp  Down   Up

First raw and first column are labels. Each column present a condition.
I want to create a heatmap which colored UP = RED, Down= Blue and No= White.


Thanks in Advance.

Dinesh



-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] For Subset or Reshaping the Table

2008-02-14 Thread dinesh kumar
Hi  R users
I am a new user in the field of R.
I want to subset or reshape a data.frame.
For example I have a matrix like

   A  B  C  D  E  F  G
a  1  2  3   4  5   6  7
b  4  6  8   9  5   5  6
c  3  4  4   4  3   3  6
d  1  2  4   6  8   8  9
e  5  6  7   8  9   2  3

I want to reshape the matrix in this format

Row  Col  Value
a   D 4
a   E 5
a   F 6
..  ..
e   E 9

I want only the  pair which pass a threshold for example >3.

Please help me.

Dinesh





-- 
Dinesh Kumar Barupal
Research Associate
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Reshape a matrix

2008-11-05 Thread dinesh kumar
Dear R users,

I have a matrix like

A  X1
B  Y2
C  Z3

I want to reshape this matrix into this format

X  Y  Z
A  1
B 2
C 3



Thanks in advance for your help.


Dinesh

-- 
Dinesh Kumar Barupal
Junior Specialist
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] similarity matrix to dendrogram (GML format)

2008-11-25 Thread dinesh kumar
Dear R users
I have a similarity matrix of 100X100 (chemical similarity). Now I want to
create a dendrogram from it and export this dendrogram as GML format
network. Can you please reply How I can do this stuff?
Thanks in advance.

Dinesh

-- 
Dinesh Kumar Barupal
Junior Specialist
Metabolomics Fiehn Lab
UCD Genome Center
451 East Health Science Drive
GBSF Builidng
University of California
DAVIS
95616
http://fiehnlab.ucdavis.edu/staff/kumar

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.