limma question
5
0
Entering edit mode
@michael-stapelberg-842
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060210/ f3dbc9c6/attachment.pl
• 1.3k views
ADD COMMENT
0
Entering edit mode
hdvi ▴ 50
@hdvi-1417
Last seen 10.2 years ago
On 10 Feb 2006, at 00:50, Michael Stapelberg wrote: > Hi. > > I am having a few problems with LIMMA that never happened before. The > first problem is trying to access and download my .gpr files into R. > Previously I would change the working directory to a nominated file > that contained all my .gpr files and other related bits. Here is the > whole script that I have used in the past. > > > Could you please advise me why perhaps I cannot download my gpr files ? > > controls<-read.table("blank and ratio.txt") > morecontrols<-read.table("utility and calib.txt") > morecontrols2<-read.table("neg.txt") > y<-as.vector(controls[,1]) > z<-as.vector(morecontrols[,1]) > z1<-as.vector(morecontrols2[,1]) > xx<-c(z,y,z1) > files<-dir(pattern="*\\.gpr") ??? does not work for some reason > Your problem here is that the meaning of star is that the preceding item will be matched zero or more times. You don't have any preceding items... \Heidi > RG<-read.maimages(files,source="genepix") > RG$genes<-readGAL("mouse 22k gal annotated.gal") > RG$printer<-getLayout(RG$genes) > RGb<-backgroundCorrect(RG,method="none") > RG1<-filter.controls.to.NA(RGb,xx) > MA<-normalizeWithinArrays(RG1,RG$printer) > UVscale<-normalizeBetweenArrays(MA) > UVscaleBALB<-cbind(UVscale[,1],UVscale[,2]UVscale[,3]UVscale[,4] > UVscale[,5]UVscale[,6]) > UVscaleC57BL<-cbind(UVscale[,7],UVscale[,8],UVscale[,9],UVscale[, > 10],UVscale[,11],UVscale[,12) > BALBcA.UVscale <- UVscaleBALB$A > BALBcM.UVscale <- UVscaleBALB$M > C57BLA.UVscale <- UVscaleC57BL$A > C57BLM.UVscale <- UVscaleC57BL$M > BALBca<-is.na(BALBcM.UVscale) > BALBcb<-apply(BALBa,1,sum) > BALBczero<-which(BALBcb==0) > BALBcx.lmFit <- lmFit(BALBcM.UVscale[BALBczero,],c(1,-1,1,-1,1,1)) > BALBcx.lmFit.Bayes <- eBayes(BALBcx.lmFit,proportion=0.10) > plot(BALBcx.lmFit.Bayes$coef,BALBcx.lmFit.Bayes$lods) > topTable(BALBcx.lmFit.Bayes,n=100) > RG$genes$ID[as.numeric(rownames(topTable(BALBcx.lmFit.Bayes,n=100)))] > M.UVscale[as.numeric(rownames(topTable(BALBcx.lmFit.Bayes,n=100)))] > > MA$M[as.numeric(rownames(topTable(BALBcx.lmFit.Bayes,n=100)))] ??? > could this give me replicate M values in the toptable ranking order ? > > C57BLa<-is.na(C57BLM.UVscale) > C57BLb<-apply(C57BL,1,sum) > C57BLzero<-which(C57BLb==0) > C57BLx.lmFit <- lmFit(C57BLM.UVscale[C57BLzero,],c(1,-1,1,-1,1,-1)) > C57BLx.lmFit.Bayes <- eBayes(C57BLx.lmFit,proportion=0.10) > plot(C57BLx.lmFit.Bayes$coef,C57BLx.lmFit.Bayes$lods) > topTable(C57BLx.lmFit.Bayes,n=100) > RG$genes$ID[as.numeric(rownames(topTable(C57BLx.lmFit.Bayes,n=100)))] > M.UVscale[as.numeric(rownames(topTable(C57BLx.lmFit.Bayes,n=100)))] > MA$M[as.numeric(rownames(topTable(C57BLx.lmFit.Bayes,n=100)))] > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENT
0
Entering edit mode
Sun, Yezhou ▴ 30
@sun-yezhou-1625
Last seen 10.2 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060222/ 646f9b91/attachment.pl
ADD COMMENT
0
Entering edit mode
Hi Sun, Sun, Yezhou wrote: > Hi, there, > > > > I am using limma for some single channel microarray data. Date format > follows that suggested by user guide: probes in row and arrays in > column. Data set has no missing value and was read into R by read.table > function. Design matrix is as following: > > > > P R > > P1 1 0 > > P2 1 0 > > P3 1 0 > > P4 1 0 > > P5 1 0 > > P6 1 0 > > P7 1 0 > > R1 0 1 > > R2 0 1 > > R3 0 1 > > R4 0 1 > > R5 0 1 > > R6 0 1 > > > > When I ran lmFit(data, design), I got this error: > > > > >>fit<-lmFit(data, design) It might help if you also showed what is in the data.frame (note that 'data' isn't a good name - you are masking an existing function). Show us what you get from data[1,] There may be extra things in there that you don't intend. Best, Jim > > > Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) > > In addition: Warning message: > > NAs introduced by coercion > > > > Traceback gave this: > > >>traceback() > > > > > 3: qr(x) > > 2: nonEstimable(design) > > 1: lmFit(data, design) > > > > I have converted data and design to numeric matrices but they never > worked. Could you please what's the problem? I really don't know what's > going on with it. Thanks a lot! > > > > Yezhou Sun > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Isn't the problem here just that lmFit adds an intercept so that the X matrix is singular? --Naomi At 03:14 PM 2/23/2006, James W. MacDonald wrote: >Hi Sun, > >Sun, Yezhou wrote: > > Hi, there, > > > > > > > > I am using limma for some single channel microarray data. Date format > > follows that suggested by user guide: probes in row and arrays in > > column. Data set has no missing value and was read into R by read.table > > function. Design matrix is as following: > > > > > > > > P R > > > > P1 1 0 > > > > P2 1 0 > > > > P3 1 0 > > > > P4 1 0 > > > > P5 1 0 > > > > P6 1 0 > > > > P7 1 0 > > > > R1 0 1 > > > > R2 0 1 > > > > R3 0 1 > > > > R4 0 1 > > > > R5 0 1 > > > > R6 0 1 > > > > > > > > When I ran lmFit(data, design), I got this error: > > > > > > > > > >>fit<-lmFit(data, design) > >It might help if you also showed what is in the data.frame (note that >'data' isn't a good name - you are masking an existing function). Show >us what you get from > >data[1,] > >There may be extra things in there that you don't intend. > >Best, > >Jim > > > > > > > > Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) > > > > In addition: Warning message: > > > > NAs introduced by coercion > > > > > > > > Traceback gave this: > > > > > >>traceback() > > > > > > > > > > 3: qr(x) > > > > 2: nonEstimable(design) > > > > 1: lmFit(data, design) > > > > > > > > I have converted data and design to numeric matrices but they never > > worked. Could you please what's the problem? I really don't know what's > > going on with it. Thanks a lot! > > > > > > > > Yezhou Sun > > > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor at stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > >-- >James W. MacDonald, M.S. >Biostatistician >Affymetrix and cDNA Microarray Core >University of Michigan Cancer Center >1500 E. Medical Center Drive >7410 CCGC >Ann Arbor MI 48109 >734-647-5623 > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor Naomi S. Altman 814-865-3791 (voice) Associate Professor Dept. of Statistics 814-863-7114 (fax) Penn State University 814-865-1348 (Statistics) University Park, PA 16802-2111
ADD REPLY
0
Entering edit mode
In my experience lmFit() never randomly adds anything including an intercept when you have directly specified a design matrix. Jim Naomi Altman wrote: > Isn't the problem here just that lmFit adds an intercept so that the X > matrix is singular? > > --Naomi > > At 03:14 PM 2/23/2006, James W. MacDonald wrote: > >> Hi Sun, >> >> Sun, Yezhou wrote: >> > Hi, there, >> > >> > >> > >> > I am using limma for some single channel microarray data. Date format >> > follows that suggested by user guide: probes in row and arrays in >> > column. Data set has no missing value and was read into R by read.table >> > function. Design matrix is as following: >> > >> > >> > >> > P R >> > >> > P1 1 0 >> > >> > P2 1 0 >> > >> > P3 1 0 >> > >> > P4 1 0 >> > >> > P5 1 0 >> > >> > P6 1 0 >> > >> > P7 1 0 >> > >> > R1 0 1 >> > >> > R2 0 1 >> > >> > R3 0 1 >> > >> > R4 0 1 >> > >> > R5 0 1 >> > >> > R6 0 1 >> > >> > >> > >> > When I ran lmFit(data, design), I got this error: >> > >> > >> > >> > >> >>fit<-lmFit(data, design) >> >> It might help if you also showed what is in the data.frame (note that >> 'data' isn't a good name - you are masking an existing function). Show >> us what you get from >> >> data[1,] >> >> There may be extra things in there that you don't intend. >> >> Best, >> >> Jim >> >> >> > >> > >> > Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) >> > >> > In addition: Warning message: >> > >> > NAs introduced by coercion >> > >> > >> > >> > Traceback gave this: >> > >> > >> >>traceback() >> > >> > >> > >> > >> > 3: qr(x) >> > >> > 2: nonEstimable(design) >> > >> > 1: lmFit(data, design) >> > >> > >> > >> > I have converted data and design to numeric matrices but they never >> > worked. Could you please what's the problem? I really don't know what's >> > going on with it. Thanks a lot! >> > >> > >> > >> > Yezhou Sun >> > >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > Bioconductor mailing list >> > Bioconductor at stat.math.ethz.ch >> > https://stat.ethz.ch/mailman/listinfo/bioconductor >> >> >> -- >> James W. MacDonald, M.S. >> Biostatistician >> Affymetrix and cDNA Microarray Core >> University of Michigan Cancer Center >> 1500 E. Medical Center Drive >> 7410 CCGC >> Ann Arbor MI 48109 >> 734-647-5623 >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Naomi S. Altman 814-865-3791 (voice) > Associate Professor > Dept. of Statistics 814-863-7114 (fax) > Penn State University 814-865-1348 (Statistics) > University Park, PA 16802-2111 > -- James W. MacDonald University of Michigan Affymetrix and cDNA Microarray Core 1500 E Medical Center Drive Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 4 minutes ago
United States
Hi Yezhou, It's what I suspected. The first column of your data.frame is non-numeric, which may be causing the problem. See if lmFit(data[,-1], design) works for you. Also, please respond to the list as well. The list archives are searchable, so those who take the time to look can often get their questions answered by simply searching the archives. HTH, Jim Sun, Yezhou wrote: > Hi, Jim, > > Thanks a lot for quick response. Attached text file has the first row of > data. Sorry I can't put it here because the line is too long. It's not a > mistake that data set has more experiments than design matrix because I > just showed part of design matrix. They actually match. I also changed > the name of data frame but it didn't help. > > Thank you. > > Yezhou > > -----Original Message----- > From: James W. MacDonald [mailto:jmacdon at med.umich.edu] > Sent: Thursday, February 23, 2006 3:14 PM > To: Sun, Yezhou > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] limma question > > Hi Sun, > > Sun, Yezhou wrote: > >>Hi, there, >> >> >> >>I am using limma for some single channel microarray data. Date format >>follows that suggested by user guide: probes in row and arrays in >>column. Data set has no missing value and was read into R by > > read.table > >>function. Design matrix is as following: >> >> >> >> P R >> >>P1 1 0 >> >>P2 1 0 >> >>P3 1 0 >> >>P4 1 0 >> >>P5 1 0 >> >>P6 1 0 >> >>P7 1 0 >> >>R1 0 1 >> >>R2 0 1 >> >>R3 0 1 >> >>R4 0 1 >> >>R5 0 1 >> >>R6 0 1 >> >> >> >>When I ran lmFit(data, design), I got this error: >> >> >> >> >> >>>fit<-lmFit(data, design) > > > It might help if you also showed what is in the data.frame (note that > 'data' isn't a good name - you are masking an existing function). Show > us what you get from > > data[1,] > > There may be extra things in there that you don't intend. > > Best, > > Jim > > > >> >>Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) >> >>In addition: Warning message: >> >>NAs introduced by coercion >> >> >> >>Traceback gave this: >> >> >> >>>traceback() >> >> >> >> >>3: qr(x) >> >>2: nonEstimable(design) >> >>1: lmFit(data, design) >> >> >> >>I have converted data and design to numeric matrices but they never >>worked. Could you please what's the problem? I really don't know > > what's > >>going on with it. Thanks a lot! >> >> >> >>Yezhou Sun >> >> >> [[alternative HTML version deleted]] >> >>_______________________________________________ >>Bioconductor mailing list >>Bioconductor at stat.math.ethz.ch >>https://stat.ethz.ch/mailman/listinfo/bioconductor > > > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
Sun, Yezhou ▴ 30
@sun-yezhou-1625
Last seen 10.2 years ago
Hi, Jim, I tried what you suggested but it's still not working. Got same error message: > fit<-lmFit(d[, -1], design) Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) In addition: Warning message: NAs introduced by coercion > I think the problem is still in data frame but I don't know what it is. The user guide has no detailed description for single channel data set. Many thanks. Yezhou -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: Thursday, February 23, 2006 4:26 PM To: Sun, Yezhou; BioConductor_list Subject: Re: [BioC] limma question Hi Yezhou, It's what I suspected. The first column of your data.frame is non-numeric, which may be causing the problem. See if lmFit(data[,-1], design) works for you. Also, please respond to the list as well. The list archives are searchable, so those who take the time to look can often get their questions answered by simply searching the archives. HTH, Jim Sun, Yezhou wrote: > Hi, Jim, > > Thanks a lot for quick response. Attached text file has the first row of > data. Sorry I can't put it here because the line is too long. It's not a > mistake that data set has more experiments than design matrix because I > just showed part of design matrix. They actually match. I also changed > the name of data frame but it didn't help. > > Thank you. > > Yezhou > > -----Original Message----- > From: James W. MacDonald [mailto:jmacdon at med.umich.edu] > Sent: Thursday, February 23, 2006 3:14 PM > To: Sun, Yezhou > Cc: bioconductor at stat.math.ethz.ch > Subject: Re: [BioC] limma question > > Hi Sun, > > Sun, Yezhou wrote: > >>Hi, there, >> >> >> >>I am using limma for some single channel microarray data. Date format >>follows that suggested by user guide: probes in row and arrays in >>column. Data set has no missing value and was read into R by > > read.table > >>function. Design matrix is as following: >> >> >> >> P R >> >>P1 1 0 >> >>P2 1 0 >> >>P3 1 0 >> >>P4 1 0 >> >>P5 1 0 >> >>P6 1 0 >> >>P7 1 0 >> >>R1 0 1 >> >>R2 0 1 >> >>R3 0 1 >> >>R4 0 1 >> >>R5 0 1 >> >>R6 0 1 >> >> >> >>When I ran lmFit(data, design), I got this error: >> >> >> >> >> >>>fit<-lmFit(data, design) > > > It might help if you also showed what is in the data.frame (note that > 'data' isn't a good name - you are masking an existing function). Show > us what you get from > > data[1,] > > There may be extra things in there that you don't intend. > > Best, > > Jim > > > >> >>Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) >> >>In addition: Warning message: >> >>NAs introduced by coercion >> >> >> >>Traceback gave this: >> >> >> >>>traceback() >> >> >> >> >>3: qr(x) >> >>2: nonEstimable(design) >> >>1: lmFit(data, design) >> >> >> >>I have converted data and design to numeric matrices but they never >>worked. Could you please what's the problem? I really don't know > > what's > >>going on with it. Thanks a lot! >> >> >> >>Yezhou Sun >> >> >> [[alternative HTML version deleted]] >> >>_______________________________________________ >>Bioconductor mailing list >>Bioconductor at stat.math.ethz.ch >>https://stat.ethz.ch/mailman/listinfo/bioconductor > > > -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT
0
Entering edit mode
On 2/24/06 12:43 PM, "Sun, Yezhou" <yezhou.sun at="" mssm.edu=""> wrote: > > Hi, Jim, > > I tried what you suggested but it's still not working. Got same error > message: > >> fit<-lmFit(d[, -1], design) > Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) > In addition: Warning message: > NAs introduced by coercion >> > > I think the problem is still in data frame but I don't know what it is. > The user guide has no detailed description for single channel data set. Actually, I think there are several sections in the limma user guide devoted to single-channel data analysis. Do the following: d1 <- as.matrix(d[,-1]) summary(d1) This will show you the number of NA's in each column. Of course, you will need to determine why those are there, but it can help pin down what is going on. Sean
ADD REPLY
0
Entering edit mode
@james-w-macdonald-5106
Last seen 4 minutes ago
United States
Sun, Yezhou wrote: > Hi, Jim, > > I tried what you suggested but it's still not working. Got same error > message: > > >>fit<-lmFit(d[, -1], design) > > Error in qr(x) : NA/NaN/Inf in foreign function call (arg 1) > In addition: Warning message: > NAs introduced by coercion > > > I think the problem is still in data frame but I don't know what it is. > The user guide has no detailed description for single channel data set. Affy data are single channel, and I think there are two or three examples in the user guide. lmFit() is expecting some sort of BioC type object (exprSet, MAlist, marrayNorm, PLMset) or a numeric matrix. A matrix can only contain data of one type (character, factor, numeric, etc), whereas a data.frame can contain data of mixed types. One of the first things lmFit() is doing to your data.frame is coercing to a matrix, which I think is the reason for the Warning message saying NAs introduced by coercion. I figured that the first column was the problem, but you need to see if there are any other NAs in the data.frame, or better yet do new.d <- as.matrix(d[,-1]) and look for the NAs. Best, Jim -- James W. MacDonald University of Michigan Affymetrix and cDNA Microarray Core 1500 E Medical Center Drive Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENT

Login before adding your answer.

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