vsn with a reference set
1
0
Entering edit mode
@roumyana-yordanova-2681
Last seen 10.3 years ago
Dear Wolfgang, Thank you. My version of R was old and vsn2 did not work with AffyBatch objects. However, when I run it with 2.6.2 I got very small numbers (also negative) for x2 = exprs(justvsn(a2, ref=refvsn)). Are x2 the actual intensities or I need to process them further? Roumyana Wolfgang Huber wrote: > Roumyana Yordanova wrote: > >> Dear Dr. Huber, >> >> I have a question regarding using vsn with a reference set. >> I used it like this: >> >> ref <-ReadAffy(filenames=files.ref) >> test <-ReadAffy(filenames=files.test) >> ref.vsn <-justvsn(ref) >> test.vsn <-justvsn(test,reference=ref.vsn) >> >> and got this error message >> Error in vsnMatrix(m, reference, strata, optimpar = list(cvg.niter = >> 4L),: nrow(reference)' must be equal to 'nrow(x)'. >> >> I guess I am not using it right. Can you advise. Thank you very much. >> >> Sincerely, >> Roumyana Yordanova > > > Dear Roumyana > > you will need to generate a "vsn" object that contains the actual > model fit parameters, by using the function vsn2 on your object 'ref': > > You can then apply the model to the data in 'ref' by using 'predict', > and you can obtain a reference normalisation using vsn2 or justvsn > with the parameter 'ref' set. Please see the example below. > > Please also consider using the Bioconductor mailing list for this type > of questions! > > > library("vsn") > library("affydata") > > data("Dilution") > > a1 = Dilution[, 1:3] > a2 = Dilution[, 4 ] > > refvsn = vsn2(a1) > x1 = predict(refvsn, a1) > > x2 = justvsn(a2, ref=refvsn) > > x = justvsn(Dilution) > par(mfrow=c(2,2)) > for(i in 1:4) > plot(exprs(x)[,i], > if(i<=3) exprs(x1)[,i] else exprs(x2)[,1], > pch=".") > > > > > Best wishes > Wolfgang > > ------------------------------------------------------------------ > Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber
vsn PROcess vsn PROcess • 1.3k views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…
Dear Roumyana they are on the glog2 scale glog2(x) = log2( x + sqrt (x^2 + b^2) ) where b is of the order of the microarray background intensity, so glog2 is (up to a constant) the same as log2 for intensities well above background, x>>b. The effect of the sqrt-term is similar to what is called "background correction" in other approaches, namely to prevent the argument of the log2 function to become zero or negative. So you can treat the output of vsn2 like log2-transformed intensities, their differences as log2-fold-changes, etc. Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber 26/03/2008 17:11 Roumyana Yordanova a ?crit > Dear Wolfgang, > > Thank you. My version of R was old and vsn2 did not work with AffyBatch > objects. > However, when I run it with 2.6.2 I got very small numbers (also > negative) for > x2 = exprs(justvsn(a2, ref=refvsn)). Are x2 the actual intensities or I > need to process them further? > > Roumyana > > Wolfgang Huber wrote: > >> Roumyana Yordanova wrote: >> >>> Dear Dr. Huber, >>> >>> I have a question regarding using vsn with a reference set. >>> I used it like this: >>> >>> ref <-ReadAffy(filenames=files.ref) >>> test <-ReadAffy(filenames=files.test) >>> ref.vsn <-justvsn(ref) >>> test.vsn <-justvsn(test,reference=ref.vsn) >>> >>> and got this error message >>> Error in vsnMatrix(m, reference, strata, optimpar = list(cvg.niter = >>> 4L),: nrow(reference)' must be equal to 'nrow(x)'. >>> >>> I guess I am not using it right. Can you advise. Thank you very much. >>> >>> Sincerely, >>> Roumyana Yordanova >> >> >> Dear Roumyana >> >> you will need to generate a "vsn" object that contains the actual >> model fit parameters, by using the function vsn2 on your object 'ref': >> >> You can then apply the model to the data in 'ref' by using 'predict', >> and you can obtain a reference normalisation using vsn2 or justvsn >> with the parameter 'ref' set. Please see the example below. >> >> Please also consider using the Bioconductor mailing list for this type >> of questions! >> >> >> library("vsn") >> library("affydata") >> >> data("Dilution") >> >> a1 = Dilution[, 1:3] >> a2 = Dilution[, 4 ] >> >> refvsn = vsn2(a1) >> x1 = predict(refvsn, a1) >> >> x2 = justvsn(a2, ref=refvsn) >> >> x = justvsn(Dilution) >> par(mfrow=c(2,2)) >> for(i in 1:4) >> plot(exprs(x)[,i], >> if(i<=3) exprs(x1)[,i] else exprs(x2)[,1], >> pch=".") >> >> >> >> >> Best wishes >> Wolfgang >> >> ------------------------------------------------------------------ >> Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber
ADD COMMENT
0
Entering edit mode
Dear Wolfgang, I run your example and got this graph (attached). It seems the figure on the lower left (the normalization with the reference) is not scaled properly. If I use vsn2 with just a matrix instead of AffyBatch object the scaling is fine. Am I missing something? Thank you. Roumyana Wolfgang Huber wrote: >Dear Roumyana > >they are on the glog2 scale > > glog2(x) = log2( x + sqrt (x^2 + b^2) ) > >where b is of the order of the microarray background intensity, so glog2 >is (up to a constant) the same as log2 for intensities well above >background, x>>b. The effect of the sqrt-term is similar to what is >called "background correction" in other approaches, namely to prevent >the argument of the log2 function to become zero or negative. > >So you can treat the output of vsn2 like log2-transformed intensities, >their differences as log2-fold-changes, etc. > >Best wishes > Wolfgang > >------------------------------------------------------------------ >Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber > > >26/03/2008 17:11 Roumyana Yordanova a ?crit > > >>Dear Wolfgang, >> >>Thank you. My version of R was old and vsn2 did not work with AffyBatch >>objects. >>However, when I run it with 2.6.2 I got very small numbers (also >>negative) for >>x2 = exprs(justvsn(a2, ref=refvsn)). Are x2 the actual intensities or I >>need to process them further? >> >>Roumyana >> >>Wolfgang Huber wrote: >> >> >> >>>Roumyana Yordanova wrote: >>> >>> >>> >>>>Dear Dr. Huber, >>>> >>>>I have a question regarding using vsn with a reference set. >>>>I used it like this: >>>> >>>>ref <-ReadAffy(filenames=files.ref) >>>>test <-ReadAffy(filenames=files.test) >>>>ref.vsn <-justvsn(ref) >>>>test.vsn <-justvsn(test,reference=ref.vsn) >>>> >>>>and got this error message >>>>Error in vsnMatrix(m, reference, strata, optimpar = list(cvg.niter = >>>>4L),: nrow(reference)' must be equal to 'nrow(x)'. >>>> >>>>I guess I am not using it right. Can you advise. Thank you very much. >>>> >>>>Sincerely, >>>>Roumyana Yordanova >>>> >>>> >>>Dear Roumyana >>> >>>you will need to generate a "vsn" object that contains the actual >>>model fit parameters, by using the function vsn2 on your object 'ref': >>> >>>You can then apply the model to the data in 'ref' by using 'predict', >>>and you can obtain a reference normalisation using vsn2 or justvsn >>>with the parameter 'ref' set. Please see the example below. >>> >>>Please also consider using the Bioconductor mailing list for this type >>>of questions! >>> >>> >>>library("vsn") >>>library("affydata") >>> >>>data("Dilution") >>> >>>a1 = Dilution[, 1:3] >>>a2 = Dilution[, 4 ] >>> >>>refvsn = vsn2(a1) >>>x1 = predict(refvsn, a1) >>> >>>x2 = justvsn(a2, ref=refvsn) >>> >>>x = justvsn(Dilution) >>>par(mfrow=c(2,2)) >>>for(i in 1:4) >>> plot(exprs(x)[,i], >>> if(i<=3) exprs(x1)[,i] else exprs(x2)[,1], >>> pch=".") >>> >>> >>> >>> >>>Best wishes >>> Wolfgang >>> >>>------------------------------------------------------------------ >>>Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber >>> >>> > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: vsn_reference.png Type: image/png Size: 10660 bytes Desc: not available Url : https://stat.ethz.ch/pipermail/bioconductor/attachments/20080327 /d5266ae4/attachment.png
ADD REPLY
0
Entering edit mode
Dear Roumyana, that does not look good (and it looks different from what I get). As if the log were taken twice. What is your output of sessionInfo()? Can you please try with the current version of vsn (there have been some changes to the AffyBatch methods this winter, i.e. since release 2.1) http://www.bioconductor.org/packages/devel/bioc/html/vsn.html Best wishes Wolfgang ------------------------------------------------------------------ Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber 27/03/2008 16:06 Roumyana Yordanova a ?crit > Dear Wolfgang, > > I run your example and got this graph (attached). It seems the figure on > the lower left (the normalization with the reference) is not scaled > properly. > If I use vsn2 with just a matrix instead of AffyBatch object the scaling > is fine. Am I missing something? > Thank you. > > Roumyana > > Wolfgang Huber wrote: > >> Dear Roumyana >> >> they are on the glog2 scale >> >> glog2(x) = log2( x + sqrt (x^2 + b^2) ) >> >> where b is of the order of the microarray background intensity, so glog2 >> is (up to a constant) the same as log2 for intensities well above >> background, x>>b. The effect of the sqrt-term is similar to what is >> called "background correction" in other approaches, namely to prevent >> the argument of the log2 function to become zero or negative. >> >> So you can treat the output of vsn2 like log2-transformed intensities, >> their differences as log2-fold-changes, etc. >> >> Best wishes >> Wolfgang >> >> ------------------------------------------------------------------ >> Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber >> >> >> 26/03/2008 17:11 Roumyana Yordanova a ?crit >> >> >>> Dear Wolfgang, >>> >>> Thank you. My version of R was old and vsn2 did not work with AffyBatch >>> objects. >>> However, when I run it with 2.6.2 I got very small numbers (also >>> negative) for >>> x2 = exprs(justvsn(a2, ref=refvsn)). Are x2 the actual intensities or I >>> need to process them further? >>> >>> Roumyana >>> >>> Wolfgang Huber wrote: >>> >>> >>>> Roumyana Yordanova wrote: >>>> >>>> >>>>> Dear Dr. Huber, >>>>> >>>>> I have a question regarding using vsn with a reference set. >>>>> I used it like this: >>>>> >>>>> ref <-ReadAffy(filenames=files.ref) >>>>> test <-ReadAffy(filenames=files.test) >>>>> ref.vsn <-justvsn(ref) >>>>> test.vsn <-justvsn(test,reference=ref.vsn) >>>>> >>>>> and got this error message >>>>> Error in vsnMatrix(m, reference, strata, optimpar = list(cvg.niter = >>>>> 4L),: nrow(reference)' must be equal to 'nrow(x)'. >>>>> >>>>> I guess I am not using it right. Can you advise. Thank you very much. >>>>> >>>>> Sincerely, >>>>> Roumyana Yordanova >>>>> >>>> Dear Roumyana >>>> >>>> you will need to generate a "vsn" object that contains the actual >>>> model fit parameters, by using the function vsn2 on your object 'ref': >>>> >>>> You can then apply the model to the data in 'ref' by using 'predict', >>>> and you can obtain a reference normalisation using vsn2 or justvsn >>>> with the parameter 'ref' set. Please see the example below. >>>> >>>> Please also consider using the Bioconductor mailing list for this type >>>> of questions! >>>> >>>> >>>> library("vsn") >>>> library("affydata") >>>> >>>> data("Dilution") >>>> >>>> a1 = Dilution[, 1:3] >>>> a2 = Dilution[, 4 ] >>>> >>>> refvsn = vsn2(a1) >>>> x1 = predict(refvsn, a1) >>>> >>>> x2 = justvsn(a2, ref=refvsn) >>>> >>>> x = justvsn(Dilution) >>>> par(mfrow=c(2,2)) >>>> for(i in 1:4) >>>> plot(exprs(x)[,i], >>>> if(i<=3) exprs(x1)[,i] else exprs(x2)[,1], >>>> pch=".") >>>> >>>> >>>> >>>> >>>> Best wishes >>>> Wolfgang >>>> >>>> ------------------------------------------------------------------ >>>> Wolfgang Huber EBI/EMBL Cambridge UK http://www.ebi.ac.uk/huber >>>> >> >> >> > > > > -------------------------------------------------------------------- ----
ADD REPLY

Login before adding your answer.

Traffic: 708 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6