Hi all,
Perhaps these questions are the result of a profound misunderstanding
of
the object-model at use here, or even R itself. I'm struggling to get
the
above method (normalize.qspline, in module Affy) to work.
This is the procedure I have followed:
> data <-read.table("data.txt");
> data2 <- data.matrix(data);
> targetav <- c(2335.958, 1932.225);
> test <- normalize.qspline(data2, target=targetav, samples=100,
verbose=TRUE);
The error message I get is:
Error in rep(data, t1) : invalid number of copies in "rep"
I don't see the function rep() being called in normalize.qspline at
all.
Any ideas what's going on here? A few records from data (the frame)
look
like:
qry1.S635 qry1.S532
H3001A10 613.0 602.5
H3001A12 1208.5 1019.0
H3001B01 337.0 353.0
H3001C02 495.0 497.5
And a few records from data2 (the data.matrix) would look like:
qry1.S635 qry1.S532
H3001A10 613.0 602.5
H3001A12 1208.5 1019.0
H3001B01 337.0 353.0
H3001C02 495.0 497.5
i.e. identical to my eyes.
Any help or ideas or anything very much appreciated! :)
Paul
To find out where the error is occuring use 'traceback()' after the
error
occurs.
-Greg
> -----Original Message-----
> From: Paul Boutros [mailto:pcboutro@engmail.uwaterloo.ca]
> Sent: Friday, October 25, 2002 4:08 PM
> To: BioConductor Mailing List
> Subject: [BioC] Qspline (again)
>
>
> Hi all,
>
> Perhaps these questions are the result of a profound
> misunderstanding of
> the object-model at use here, or even R itself. I'm
> struggling to get the
> above method (normalize.qspline, in module Affy) to work.
>
> This is the procedure I have followed:
> > data <-read.table("data.txt");
> > data2 <- data.matrix(data);
> > targetav <- c(2335.958, 1932.225);
> > test <- normalize.qspline(data2, target=targetav, samples=100,
> verbose=TRUE);
>
> The error message I get is:
> Error in rep(data, t1) : invalid number of copies in "rep"
>
> I don't see the function rep() being called in
> normalize.qspline at all.
> Any ideas what's going on here? A few records from data (the
> frame) look
> like:
> qry1.S635 qry1.S532
> H3001A10 613.0 602.5
> H3001A12 1208.5 1019.0
> H3001B01 337.0 353.0
> H3001C02 495.0 497.5
>
> And a few records from data2 (the data.matrix) would look like:
> qry1.S635 qry1.S532
> H3001A10 613.0 602.5
> H3001A12 1208.5 1019.0
> H3001B01 337.0 353.0
> H3001C02 495.0 497.5
>
> i.e. identical to my eyes.
>
> Any help or ideas or anything very much appreciated! :)
> Paul
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor@stat.math.ethz.ch
> http://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
>
LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and
may be privileged. It is intended for the addressee(s) only. Access to
this E-mail by anyone else is unauthorized. If you are not an
addressee, any disclosure or copying of the contents of this E-mail or
any action taken (or not taken) in reliance on it is unauthorized and
may be unlawful. If you are not an addressee, please inform the sender
immediately.
Hi again,
> > > > The error message I get is:
> > > > Error in rep(data, t1) : invalid number of copies in "rep"
> > > >
> > >
> > > Try 'traceback()' just after the error message is fired. It may
give
> > > us a hint about where this happened.
> >
> > I get:
> > 3: rep(data, t1)
> > 2: array(y.offset, (k - 1))
> > 1: normalize.qspline(data2)
> >
> > Does this help at all?
> It does. I had a hard time with the 'k' thing (and no answer from
the
> corresponding author about my questions/remarks/suggestions). I
suspect
> that for some reason you do not have the check added. Does the code
> for the function look like follows ?
> -------------------
> if (y.offset <= min.offset) {
> y.offset <- min.offset;
> k <- round(py.inds[1]/min.offset)
> }
>
> ## here is the part I suspect missing ##
> if (k < 1) {
> warning("qspline cannot be performed (insufficient number of
arrays)")
> return(x)
> }
> ## ---- ##
>
> y.offset <- c(0, array(y.offset, (k-1)))
> y.order <- order(target)
> -------------------
This is exactly how my code looks -- the check on array number is not
present.
However, I should note that I am doing this analysis with three
arrays.
The code I use looks like this:
> data1 <- read.table("c:\\docume~1\\paul\\dev\\testvals.txt");
> data2 <- data.matrix(data1);
> data2;
qry1.S635 qry1.S532 qry2.S635 qry2.S532 qry3.S635 qry3.S532
H3001A10 613.0 602.5 483.0 633.0 61.0 75.0
H3001A12 1208.5 1019.0 1209.0 1187.0 91.0 153.5
H3001B01 337.0 353.0 619.0 529.5 132.5 153.5
H3001C02 495.0 497.5 64.5 117.5 10.5 59.0
H3001C03 199.5 152.5 301.0 222.0 63.5 95.5
H3001C04 1855.5 1447.0 1969.0 1721.0 286.0 349.0
H3001C07 4765.5 3643.0 4889.0 4401.5 1064.0 1148.0
H3001C09 720.5 894.5 347.0 602.0 188.0 326.5
H3001C11 630.0 536.0 814.5 899.5 20.0 48.5
> c <- normalize.qspline(data2);
Error in rep(data, t1) : invalid number of copies in "rep"
> c <- normalize.qspline(data1);
Error in rep(data, t1) : invalid number of copies in "rep"
I tried adding the code you indicated as missing into the affy.R file.
I now get:
qry1.S635 qry1.S532 qry2.S635 qry2.S532 qry3.S635 qry3.S532
H3001A10 613.0 602.5 483.0 633.0 61.0 75.0
H3001A12 1208.5 1019.0 1209.0 1187.0 91.0 153.5
H3001B01 337.0 353.0 619.0 529.5 132.5 153.5
H3001C02 495.0 497.5 64.5 117.5 10.5 59.0
H3001C03 199.5 152.5 301.0 222.0 63.5 95.5
H3001C04 1855.5 1447.0 1969.0 1721.0 286.0 349.0
H3001C07 4765.5 3643.0 4889.0 4401.5 1064.0 1148.0
H3001C09 720.5 894.5 347.0 602.0 188.0 326.5
H3001C11 630.0 536.0 814.5 899.5 20.0 48.5
Warning message:
qspline cannot be performed (insufficient number of arrays) in:
normalize.qspline(data2)
This indicates to me that my input data is in an inappropriate format
somehow?
Any ideas where I go from here?
Thanks for your help with this,
Paul