normalizing incomplete arrays [was: limma errormessage]
1
0
Entering edit mode
Marcus Davy ▴ 680
@marcus-davy-374
Last seen 9.6 years ago
you can use the function RG.MA to convert your M and A values back into normalized R and G values. > RG.MA function (object) { object$R <- 2^(object$A + object$M/2) object$G <- 2^(object$A - object$M/2) object$M <- NULL object$A <- NULL new("RGList", unclass(object)) } Marcus >>> Jianping Jin <jjin at="" email.unc.edu=""> 2/08/2005 6:41:49 a.m. >>> Thanks Gordon and Naomi for your time and efforts to help me out. The the code worked well for me. One more question. What if I wanted to get the loess normalized expression values in addition to M & As? Can I extract the expression values from after normalizeWithinArrays or do I have to use something like "loessFit"? best regards! JP- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x Jianping Jin Ph.D. x x Bioinformatics scientist x x Center for bioinformatics x x 3133 Bioinformatics Building x x CB# 7104 x x University of North Carolina x x Chapel Hill, NC 27599 x x Tel: (919)843-6105 x x Fax: (919)843-3103 x x E-mail: jjin at email.unc.edu x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx --On Saturday, July 30, 2005 11:55 PM +1000 Gordon Smyth <smyth at="" wehi.edu.au=""> wrote: > As you've deduced, the problem is that your arrays do not a constant > block size. limma assumes a constant block size for > normalizeWithinArrays() and imageplot(). > > Here is a work-around for GenePix data: > > for (b in 1:48) { > i <- RG$genes$Block==b > MA2 <- normalizeWithinArrays(RG[i,],method="loess") > if(b==1) > MA <- MA2 > else > MA <- rbind(MA,MA2) > } > > This will perform print-tip-loess normalization even though there are > irregular numbers of spots in the print-tip groups. > > Gordon > >> Date: Fri, 29 Jul 2005 16:42:58 -0400 >> From: Naomi Altman <naomi at="" stat.psu.edu=""> >> Subject: Re: [BioC] limma error message >> To: Jianping Jin <jjin at="" email.unc.edu=""> >> Cc: Bioconductor at stat.math.ethz.ch >> Message-ID: <6.2.1.2.2.20050729163707.040c3240 at imap.stat.psu.edu> >> Content-Type: text/plain; charset="us-ascii"; format=flowed >> >> 28*28*12*4 >> [1] 37632 >> >> But you have 34970 genes. >> >> The simplest thing to do is to add the missing lines to your GPR files. >> >> You could probably do this in your favorite text manipulation language >> but with 8 arrays, you might be able to do it manually more quickly. >> >> --Naomi >> >> >> At 12:13 PM 7/29/2005, Jianping Jin wrote: >> > Dear Naomi and BioConductor list, >> > >> > Thanks for your kind reply! But I got the same error message after >> > re-run the program as the following: >> > >> >> targets <- readTargets() >> >> RG <- read.maimages(targets$FileName, source="genepix") >> > Read 0341_3289_A5_052_HO34K_sample-1_HRef_scan2.gpr >> > Read 0341_3290_A5_053_HO34K_sample-2_HRef_scan2.gpr >> > Read 0341_3291_A5_054_HO34K_sample-3_HRef.gpr >> > Read 0341_3292_A5_055_HO34K_sample-4_HRef.gpr >> > Read 0341_3293_A5_056_HO34K_sample-5_HRef.gpr >> > Read 0341_3294_A5_057_HO34K_sample-6_HRef.gpr >> > Read 0341_3295_A5_058_HO34K_sample-7_HRef.gpr >> > Read 0341_3296_A5_059_HO34K_sample-8_HRef.gpr >> >> summary(RG) >> > Length Class Mode >> > R 279760 -none- numeric >> > G 279760 -none- numeric >> > Rb 279760 -none- numeric >> > Gb 279760 -none- numeric >> > targets 1 data.frame list >> > genes 5 data.frame list >> > >> >> dim(RG) >> > [1] 34970 8 >> > >> >> getLayout(RG$genes) >> > $ngrid.r >> > [1] 12 >> > >> > $ngrid.c >> > [1] 4 >> > >> > $nspot.r >> > [1] 28 >> > >> > $nspot.c >> > [1] 28 >> > >> > attr(,"class") >> > [1] "PrintLayout" >> > >> >> MA <- normalizeWithinArrays(RG, layout=list(ngrid.r=12, ngrid.c=4, >> > nspot.r=28, nspot.c=28)) >> > Error: subscript out of bounds >> > >> > I checked the data files and found nsopt.r and nspot.c in the last one >> > third blocks of every files were changed from 28 to 24 and 23 >> > respectively. That may be the reason for the error message. Do you have >> > any ways to handle this? >> > >> > Many thanks! >> > >> > JP- >> > >> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> > x Jianping Jin Ph.D. x >> > x Bioinformatics scientist x >> > x Center for bioinformatics x >> > x 3133 Bioinformatics Building x >> > x CB# 7104 x >> > x University of North Carolina x >> > x Chapel Hill, NC 27599 x >> > x Tel: (919)843-6105 x >> > x Fax: (919)843-3103 x >> > x E-mail: jjin at email.unc.edu x >> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> > >> > --On Thursday, July 28, 2005 5:17 PM -0400 Naomi Altman >> > <naomi at="" stat.psu.edu=""> wrote: >> > >> >> layout=list(ngrid.r= ,ngrid.c= ,nspot.r= , nspot.c= ) >> >> >> >> Your array is laid out in blocks according to the print tip >> >> configuration of the printer. >> >> nspot.r is the number of rows in each block >> >> nspot.c is the number of columns in each block >> >> >> >> ngrid.r is the number of rows of blocks >> >> ngrid.c is the number of columns of blocks >> >> >> >> e.g. a typical 8 tip design might have 4 rows and 2 columns of blocks >> >> >> >> If you don't know the right numbers to put in, look at the raw data - >> >> the block number and row and column are output to your expression >> >> file. >> >> >> >> --Naomi >> >> >> >> At 04:49 PM 7/28/2005, you wrote: >> >>> Thanks Naomi! Could you explain how to specify parameter "layout"? >> >>> JP- >> >>> >> >>> --On Thursday, July 28, 2005 3:35 PM -0400 Naomi Altman >> >>> <naomi at="" stat.psu.edu=""> wrote: >> >>> >> >>>> I got this message when I used the wrong layout file. >> >>>> >> >>>> --Naomi >> >>>> >> >>>> At 03:03 PM 7/28/2005, Jianping Jin wrote: >> >>>>> Dear BioConductor list, >> >>>>> >> >>>>> I got an error, Error: subscipt out of bounds, when I started to >> >>>>> run a limma program normalizeWithinArrays(). What I wanted to do >> >>>>> was to normalize eight cDNA slides. >dim(RG): 34970 8. >> >>>>> >> >>>>> I used >debug(normalizeWithinArrays) and then >> >>>>> > normalizeWithinArrays(RG) to debug by either Browse[1]> n or c as >> >>>>> well. But when I retried the program it gave me the same error >> >>>>> message above. >> >>>>> >> >>>>> I will highly appreciate it if any one could give it shot. >> >>>>> >> >>>>> >> >>>>> Best regards! >> >>>>> >> >>>>> JP- >> >>>>> >> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> >>>>> x Jianping Jin Ph.D. x >> >>>>> x Bioinformatics scientist x >> >>>>> x Center for bioinformatics x >> >>>>> x 3133 Bioinformatics Building x >> >>>>> x CB# 7104 x >> >>>>> x University of North Carolina x >> >>>>> x Chapel Hill, NC 27599 x >> >>>>> x Tel: (919)843-6105 x >> >>>>> x Fax: (919)843-3103 x >> >>>>> x E-mail: jjin at email.unc.edu x >> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >> >>>>> >> >>>> >> >>>> Naomi S. Altman 814-865-3791 (voice) >> >>>> Associate Professor >> >>>> Bioinformatics Consulting Center >> >>>> Dept. of Statistics 814-863-7114 (fax) >> >>>> Penn State University 814-865-1348 >> >>>> (Statistics) University Park, PA 16802-2111 > _______________________________________________ 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}}
Normalization limma convert Normalization limma convert • 665 views
ADD COMMENT
0
Entering edit mode
Jianping Jin ▴ 890
@jianping-jin-1212
Last seen 9.6 years ago
Thanks a lot Marcus! JP- --On Tuesday, August 02, 2005 11:19 AM +1200 Marcus Davy <mdavy at="" hortresearch.co.nz=""> wrote: > > you can use the function RG.MA to convert your M and A values back into > normalized R and G values. > >> RG.MA > function (object) > { > object$R <- 2^(object$A + object$M/2) > object$G <- 2^(object$A - object$M/2) > object$M <- NULL > object$A <- NULL > new("RGList", unclass(object)) > } > > Marcus > >>>> Jianping Jin <jjin at="" email.unc.edu=""> 2/08/2005 6:41:49 a.m. >>> > Thanks Gordon and Naomi for your time and efforts to help me out. The the > code worked well for me. > > One more question. What if I wanted to get the loess normalized > expression values in addition to M & As? Can I extract the expression > values from after normalizeWithinArrays or do I have to use something > like "loessFit"? > > best regards! > > JP- > > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > x Jianping Jin Ph.D. x > x Bioinformatics scientist x > x Center for bioinformatics x > x 3133 Bioinformatics Building x > x CB# 7104 x > x University of North Carolina x > x Chapel Hill, NC 27599 x > x Tel: (919)843-6105 x > x Fax: (919)843-3103 x > x E-mail: jjin at email.unc.edu x > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx > > --On Saturday, July 30, 2005 11:55 PM +1000 Gordon Smyth > <smyth at="" wehi.edu.au=""> wrote: > >> As you've deduced, the problem is that your arrays do not a constant >> block size. limma assumes a constant block size for >> normalizeWithinArrays() and imageplot(). >> >> Here is a work-around for GenePix data: >> >> for (b in 1:48) { >> i <- RG$genes$Block==b >> MA2 <- normalizeWithinArrays(RG[i,],method="loess") >> if(b==1) >> MA <- MA2 >> else >> MA <- rbind(MA,MA2) >> } >> >> This will perform print-tip-loess normalization even though there are >> irregular numbers of spots in the print-tip groups. >> >> Gordon >> >>> Date: Fri, 29 Jul 2005 16:42:58 -0400 >>> From: Naomi Altman <naomi at="" stat.psu.edu=""> >>> Subject: Re: [BioC] limma error message >>> To: Jianping Jin <jjin at="" email.unc.edu=""> >>> Cc: Bioconductor at stat.math.ethz.ch >>> Message-ID: <6.2.1.2.2.20050729163707.040c3240 at imap.stat.psu.edu> >>> Content-Type: text/plain; charset="us-ascii"; format=flowed >>> >>> 28*28*12*4 >>> [1] 37632 >>> >>> But you have 34970 genes. >>> >>> The simplest thing to do is to add the missing lines to your GPR files. >>> >>> You could probably do this in your favorite text manipulation language >>> but with 8 arrays, you might be able to do it manually more quickly. >>> >>> --Naomi >>> >>> >>> At 12:13 PM 7/29/2005, Jianping Jin wrote: >>> > Dear Naomi and BioConductor list, >>> > >>> > Thanks for your kind reply! But I got the same error message after >>> > re-run the program as the following: >>> > >>> >> targets <- readTargets() >>> >> RG <- read.maimages(targets$FileName, source="genepix") >>> > Read 0341_3289_A5_052_HO34K_sample-1_HRef_scan2.gpr >>> > Read 0341_3290_A5_053_HO34K_sample-2_HRef_scan2.gpr >>> > Read 0341_3291_A5_054_HO34K_sample-3_HRef.gpr >>> > Read 0341_3292_A5_055_HO34K_sample-4_HRef.gpr >>> > Read 0341_3293_A5_056_HO34K_sample-5_HRef.gpr >>> > Read 0341_3294_A5_057_HO34K_sample-6_HRef.gpr >>> > Read 0341_3295_A5_058_HO34K_sample-7_HRef.gpr >>> > Read 0341_3296_A5_059_HO34K_sample-8_HRef.gpr >>> >> summary(RG) >>> > Length Class Mode >>> > R 279760 -none- numeric >>> > G 279760 -none- numeric >>> > Rb 279760 -none- numeric >>> > Gb 279760 -none- numeric >>> > targets 1 data.frame list >>> > genes 5 data.frame list >>> > >>> >> dim(RG) >>> > [1] 34970 8 >>> > >>> >> getLayout(RG$genes) >>> > $ngrid.r >>> > [1] 12 >>> > >>> > $ngrid.c >>> > [1] 4 >>> > >>> > $nspot.r >>> > [1] 28 >>> > >>> > $nspot.c >>> > [1] 28 >>> > >>> > attr(,"class") >>> > [1] "PrintLayout" >>> > >>> >> MA <- normalizeWithinArrays(RG, layout=list(ngrid.r=12, ngrid.c=4, >>> > nspot.r=28, nspot.c=28)) >>> > Error: subscript out of bounds >>> > >>> > I checked the data files and found nsopt.r and nspot.c in the last one >>> > third blocks of every files were changed from 28 to 24 and 23 >>> > respectively. That may be the reason for the error message. Do you >>> > have any ways to handle this? >>> > >>> > Many thanks! >>> > >>> > JP- >>> > >>> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>> > x Jianping Jin Ph.D. x >>> > x Bioinformatics scientist x >>> > x Center for bioinformatics x >>> > x 3133 Bioinformatics Building x >>> > x CB# 7104 x >>> > x University of North Carolina x >>> > x Chapel Hill, NC 27599 x >>> > x Tel: (919)843-6105 x >>> > x Fax: (919)843-3103 x >>> > x E-mail: jjin at email.unc.edu x >>> > xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>> > >>> > --On Thursday, July 28, 2005 5:17 PM -0400 Naomi Altman >>> > <naomi at="" stat.psu.edu=""> wrote: >>> > >>> >> layout=list(ngrid.r= ,ngrid.c= ,nspot.r= , nspot.c= ) >>> >> >>> >> Your array is laid out in blocks according to the print tip >>> >> configuration of the printer. >>> >> nspot.r is the number of rows in each block >>> >> nspot.c is the number of columns in each block >>> >> >>> >> ngrid.r is the number of rows of blocks >>> >> ngrid.c is the number of columns of blocks >>> >> >>> >> e.g. a typical 8 tip design might have 4 rows and 2 columns of blocks >>> >> >>> >> If you don't know the right numbers to put in, look at the raw data - >>> >> the block number and row and column are output to your expression >>> >> file. >>> >> >>> >> --Naomi >>> >> >>> >> At 04:49 PM 7/28/2005, you wrote: >>> >>> Thanks Naomi! Could you explain how to specify parameter "layout"? >>> >>> JP- >>> >>> >>> >>> --On Thursday, July 28, 2005 3:35 PM -0400 Naomi Altman >>> >>> <naomi at="" stat.psu.edu=""> wrote: >>> >>> >>> >>>> I got this message when I used the wrong layout file. >>> >>>> >>> >>>> --Naomi >>> >>>> >>> >>>> At 03:03 PM 7/28/2005, Jianping Jin wrote: >>> >>>>> Dear BioConductor list, >>> >>>>> >>> >>>>> I got an error, Error: subscipt out of bounds, when I started to >>> >>>>> run a limma program normalizeWithinArrays(). What I wanted to do >>> >>>>> was to normalize eight cDNA slides. >dim(RG): 34970 8. >>> >>>>> >>> >>>>> I used >debug(normalizeWithinArrays) and then >>> >>>>> > normalizeWithinArrays(RG) to debug by either Browse[1]> n or c >>> >>>>> > as >>> >>>>> well. But when I retried the program it gave me the same error >>> >>>>> message above. >>> >>>>> >>> >>>>> I will highly appreciate it if any one could give it shot. >>> >>>>> >>> >>>>> >>> >>>>> Best regards! >>> >>>>> >>> >>>>> JP- >>> >>>>> >>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>> >>>>> x Jianping Jin Ph.D. x >>> >>>>> x Bioinformatics scientist x >>> >>>>> x Center for bioinformatics x >>> >>>>> x 3133 Bioinformatics Building x >>> >>>>> x CB# 7104 x >>> >>>>> x University of North Carolina x >>> >>>>> x Chapel Hill, NC 27599 x >>> >>>>> x Tel: (919)843-6105 x >>> >>>>> x Fax: (919)843-3103 x >>> >>>>> x E-mail: jjin at email.unc.edu x >>> >>>>> xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx >>> >>>>> >>> >>>> >>> >>>> Naomi S. Altman 814-865-3791 (voice) >>> >>>> Associate Professor >>> >>>> Bioinformatics Consulting Center >>> >>>> Dept. of Statistics 814-863-7114 (fax) >>> >>>> Penn State University 814-865-1348 >>> >>>> (Statistics) University Park, PA 16802-2111 >> > > _______________________________________________ > 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 confidential to the > named recipient and are not to be used by any other person and/or > organisation. If you have received this e-mail in error, please notify > the sender and delete all material pertaining to this e-mail. > ______________________________________________________ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx x Jianping Jin Ph.D. x x Bioinformatics scientist x x Center for bioinformatics x x 3133 Bioinformatics Building x x CB# 7104 x x University of North Carolina x x Chapel Hill, NC 27599 x x Tel: (919)843-6105 x x Fax: (919)843-3103 x x E-mail: jjin at email.unc.edu x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
ADD COMMENT

Login before adding your answer.

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