swaping values in a RGList object...
2
0
Entering edit mode
@lourdes-pena-castillo-1305
Last seen 9.6 years ago
Hello Everyone, I am analyzing micro-array data using limma, and I need to swap intensity data between arrays (because the samples were mislabeled) . Something like: R1 <- RG[,1]$R R2 <- RG[,2]$R RG[,1]$R <-R2 RG[,2]$R <-R1 But I get the message: Error: incorrect number of subscripts on matrix I have also tried replacing the values using a for-loop but got the same error. for (i in 1:length(RG[,1]$R)) { RG[,1]$R[i] <- R2[i] } Do you know how I can swap the values? Thanks! Lourdes
limma limma • 958 views
ADD COMMENT
0
Entering edit mode
@richard-pearson-1304
Last seen 9.6 years ago
Lourdes, Try the following: R1 <- RG$R[,1] R2 <- RG$R[,2] RG$R[,1] <-R2 RG$R[,2] <-R1 Regards Richard Quoting Lourdes Pe?a Castillo <lourdes.pena at="" gmail.com="">: > Hello Everyone, > > I am analyzing micro-array data using limma, and I need to swap > intensity data between arrays (because the samples were mislabeled) . > Something like: > > R1 <- RG[,1]$R > R2 <- RG[,2]$R > RG[,1]$R <-R2 > RG[,2]$R <-R1 > > But I get the message: > > Error: incorrect number of subscripts on matrix > > I have also tried replacing the values using a for-loop but got the > same error. > > for (i in 1:length(RG[,1]$R)) { > RG[,1]$R[i] <- R2[i] > } > > Do you know how I can swap the values? > > Thanks! > > Lourdes > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
Marcus Davy ▴ 680
@marcus-davy-374
Last seen 9.6 years ago
Another way would be to modify/correct the "targets" descriptor information which relates the treatments to the Cy3 and Cy5 channels for each slide without having to reorder intensity information within the GRList at all. Targets information is in section 5.2 of the limma users guide, limmaUsersGuide(). Marcus >>> Richard Pearson <richard.pearson at="" postgrad.manchester.ac.uk=""> 1/07/2005 1:19:26 p.m. >>> Lourdes, Try the following: R1 <- RG$R[,1] R2 <- RG$R[,2] RG$R[,1] <-R2 RG$R[,2] <-R1 Regards Richard Quoting Lourdes Pe?a Castillo <lourdes.pena at="" gmail.com="">: > Hello Everyone, > > I am analyzing micro-array data using limma, and I need to swap > intensity data between arrays (because the samples were mislabeled) . > Something like: > > R1 <- RG[,1]$R > R2 <- RG[,2]$R > RG[,1]$R <-R2 > RG[,2]$R <-R1 > > But I get the message: > > Error: incorrect number of subscripts on matrix > > I have also tried replacing the values using a for-loop but got the > same error. > > for (i in 1:length(RG[,1]$R)) { > RG[,1]$R[i] <- R2[i] > } > > Do you know how I can swap the values? > > Thanks! > > Lourdes > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > _______________________________________________ Bioconductor mailing list Bioconductor at stat.math.ethz.ch https://stat.ethz.ch/mailman/listinfo/bioconductor ______________________________________________________ The contents of this e-mail are privileged and/or confidenti...{{dropped}}
ADD COMMENT
0
Entering edit mode
I guess this depends on exactly what you mean by "the samples were mislabeled". My understanding is that RG$R should always hold values for the red (Cy5) dye, regardless of whether this is sample or reference. The targets should say which dye is sample and which is reference. If you modify your targets file, this will have an effect on any subsequent linear models you build, but will make no diference to, for example, any normalisations or subsequent MA plots. If you have simply read the Cy3 values into RG$R and the Cy5 values into RG$G, swapping the values for the two columns will ensure that subsequent MA plots will be as expected. Could someone with more knowledge than myself confirm that this is correct, i.e. that the targets file has no effect on any normalisations? This raises an issue I've been dealing with. I have an experiment with two sets of time series data. Each series has 17 time points. All slides have the sample in one channel and a common (across all 34 time points) reference in the other. For the first 17 slides, the reference is labelled with Cy5, and in the second 17 with Cy3 (i.e. I have a dye swap). Am I right in saying that the MA plots for the second series should be "upside down" with respect to the first series? If I want to make a direct comparison between the two series I should multiply the M values of one series by -1, is that correct? Would this still be valid after any type of within array normalisation? Would this still be valid after any between array normalisation, or should I "swap" the R and G values before normalising? Many thanks Richard Quoting Marcus Davy <mdavy at="" hortresearch.co.nz="">: > > Another way would be to modify/correct the "targets" descriptor > information which relates the treatments to the Cy3 and Cy5 channels > for each slide without having to reorder intensity information within > the GRList at all. > > Targets information is in section 5.2 of the limma users guide, > limmaUsersGuide(). > > Marcus > >>>> Richard Pearson <richard.pearson at="" postgrad.manchester.ac.uk=""> >>>> 1/07/2005 1:19:26 p.m. >>> > Lourdes, > > Try the following: > > R1 <- RG$R[,1] > R2 <- RG$R[,2] > RG$R[,1] <-R2 > RG$R[,2] <-R1 > > Regards > > Richard > > > Quoting Lourdes Pe?a Castillo <lourdes.pena at="" gmail.com="">: > >> Hello Everyone, >> >> I am analyzing micro-array data using limma, and I need to swap >> intensity data between arrays (because the samples were mislabeled) . >> Something like: >> >> R1 <- RG[,1]$R >> R2 <- RG[,2]$R >> RG[,1]$R <-R2 >> RG[,2]$R <-R1 >> >> But I get the message: >> >> Error: incorrect number of subscripts on matrix >> >> I have also tried replacing the values using a for-loop but got the >> same error. >> >> for (i in 1:length(RG[,1]$R)) { >> RG[,1]$R[i] <- R2[i] >> } >> >> Do you know how I can swap the values? >> >> Thanks! >> >> Lourdes >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > ______________________________________________________ > > The contents of this e-mail are privileged and/or confidenti...{{dropped} } > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD REPLY

Login before adding your answer.

Traffic: 771 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