Entering edit mode
Leo J. LEE
▴
20
@leo-j-lee-2619
Last seen 10.4 years ago
Dear all,
I am new to Bioconductor and R (having the latest version,
Bioconductor 2.1
and R 2.6.1, installed) so please bear with me if I ask something
naive/stupid. Anyway, the most important reason why I come to
Bioconductor
is to use the vsn package, and after trying it a bit, I have the
following
questions:
1. It is clear from the documentation (and a previous email from
Wolfgang)
that the real computation of vsn2 is written in C. Is it possible for
me to
access the C source code (and compile and run it myself)? If yes,
this will
be truly great since I have to do other computational analysis outside
of R
anyway.
2. I am trying to follow the computation performed by VSN as
documented in
the "Introduction to VSN" vignette. Loading the kidney dataset, I
have the
following data before and after VSN:
> exprs(kidney)[1:10,]
channels
spots green red
1 815.32 937.02
2 671.66 765.03
3 713.93 713.59
4 703.97 656.70
5 493.59 472.10
6 477.92 453.13
7 346.55 385.47
8 377.34 421.86
9 132.80 121.77
10 148.65 130.41
> fit = vsn2(kidney)
vsn: 8704 x 2 matrix (1 stratum). 100% done.
> fit at hx[1:10,]
channels
spots green red
1 9.711781 9.870624
2 9.453765 9.597638
3 9.533994 9.506128
4 9.515436 9.398666
5 9.067212 8.995503
6 9.028838 8.948561
7 8.673814 8.771463
8 8.762664 8.868634
9 7.957576 7.926483
10 8.016070 7.957696
Now I am trying to reproduce the result from parameters estimated by
VSN
using
> coef(fit)[1,,]
[,1] [,2]
[1,] -0.08444849 -5.927967
[2,] -0.06787093 -5.957545
> offset <- coef(fit)[1,,1];
> scale <- exp(coef(fit)[1,,2]);
> ynorm_my = asinh(exprs(kidney)*scale + offset);
> ynorm_my[1:10,]
channels
spots green red
1 1.4820851 1.6139176
2 1.2851048 1.4029668
3 1.3588520 1.3584152
4 1.3272734 1.2650499
5 1.0353039 0.9986861
6 0.9954236 0.9530607
7 0.7626212 0.8400535
8 0.8148209 0.8976601
9 0.2661626 0.2376892
10 0.3115130 0.2662458
which is clearly different from the result produced by VSN. Could
anybody
tell me what I have done wrong? Thank you so much!
-- Leo
http://www.psi.toronto.edu/~ljlee/