Problem with Limma - Possible Limma/affy bug - minimal code not working
1
0
Entering edit mode
Atul Kakrana ▴ 30
@atul-kakrana-5871
Last seen 10.2 years ago
Hello All and Abdul, The fix suggested by Abdul didn't work. I reduced the code to minimal basic and tried work on other publicly available datasets but the problem is still the same. It seems to a bug with Limma or Affy? Dataset used: http://www.ncbi.nlm.nih.gov/geosuppl/?acc=GSE9711 CODE: library(affy) library(limma) setwd("/home/atul/Dropbox/Analysis/1.iSyTE/test_cel")# Need to change the directory to where the CEL files are stored mydata <- ReadAffy() mydata esetRMA <- rma(mydata)# RMA from affy was used in iSYTE paper - Ready made - does Background correction and Normalization by default algos - See 'affy' manual esetRMA sampletype <- c('1','1','1','2','2','2') design<- model.matrix(~0+factor(sampletype))## required to avoid intercept colnames(design) <- c('Cont','Test') ## Personalize the design with col names # fit <- lmFit(exprs(esetRMA), design) fit <- lmFit(exprs(esetRMA), design) contrast.matrix<-makeContrasts(Test-Cont, levels=design) fit2<- contrasts.fit(fit,contrast.matrix) fit2 <- ebayes(fit2) topTable(fit2, coef = 1, adjust = "BH", number = 50) Error in array(x, c(length(x), 1L), if (!is.null(names(x))) list(names(x), : 'data' must be of a vector type I am trying to fix this error from last few days but couldn't find a solution. I would really appreciate your help. AK On 04/05/2013 01:13 AM, abdul rawoof wrote: > Hello Atul, > > Please follow the following script. You need to convert your > normalised data into expression set value using exprs. > I hope your problem will solve. > > > fit <- lmFit*(exprs(esetRMA)*, design) > > contrast.matrix<-makeContrasts(Ten-WB, levels=design) > > fit2<- contrasts.fit(fit,contrast.matrix) > > fit2 <- ebayes(fit2). > > > On Fri, Apr 5, 2013 at 4:31 AM, Atul Kakrana <atulkakrana@gmail.com> <mailto:atulkakrana@gmail.com>> wrote: > > Hello All, > > I wrote a script to analyse affymetrix data but its giving an error > while using the topTable from limma: > > Error in array(x, c(length(x), 1L), if (!is.null(names(x))) > list(names(x), : > 'data' must be of a vector type > > I checked all the steps that might be causing the error but couldn't > find out. So, I trimmed my script to minimal basic and it still > gives me > same error. > > > mydata <- ReadAffy() > > esetRMA <- rma(mydata) > Background correcting > Normalizing > Calculating Expression > > esetRMA > ExpressionSet (storageMode: lockedEnvironment) > assayData: 45101 features, 12 samples > element names: exprs > protocolData > sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) > varLabels: ScanDate > varMetadata: labelDescription > phenoData > sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) > varLabels: sample > varMetadata: labelDescription > featureData: none > experimentData: use 'experimentData(object)' > Annotation: mouse4302 > > sampletype <- c('1','1','1','2','2','2','3','3','3','4','4','4') > > group <-factor(sampletype) > > design<- model.matrix(~0+group) > > colnames(design) <- c('WB','Ten','Eleven','Twelve') > > fit <- lmFit(esetRMA, design) > > contrast.matrix<-makeContrasts(Ten-WB, levels=design) > > fit2<- contrasts.fit(fit,contrast.matrix) > > fit2 <- ebayes(fit2) > > > topTable(fit2, adjust = "fdr", number = 50) > Error in 1:ncol(fit) : argument of length 0 > > > topTable(fit2,coef = 1, adjust = "fdr", number = 50) > Error in array(x, c(length(x), 1L), if (!is.null(names(x))) > list(names(x), : > 'data' must be of a vector type > > > results <- decideTests(fit2) > Error in decideTests(fit2) : Need MArrayLM object > > > Could anybody please explain me or point out what I am missing > here? Its > strange that I wrote a similar script for Illumina which works > just fine. > > AK > > -- > Atul Kakrana > Delaware Technology Park > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org <mailto:bioconductor@r-project.org> > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > -- Atul Kakrana Delaware Technology Park [[alternative HTML version deleted]]
Normalization affy limma convert Normalization affy limma convert • 2.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 3 days ago
United States
Hi Atul, I think the problem arises because you are using ebayes() instead of eBayes(). See ?eBayes, particularly the part after the Value heading. Best, Jim On 4/5/2013 6:07 PM, Atul Kakrana wrote: > Hello All and Abdul, > > The fix suggested by Abdul didn't work. I reduced the code to minimal > basic and tried work on other publicly available datasets but the > problem is still the same. > > > It seems to a bug with Limma or Affy? > > Dataset used: http://www.ncbi.nlm.nih.gov/geosuppl/?acc=GSE9711 > > CODE: > library(affy) > library(limma) > > setwd("/home/atul/Dropbox/Analysis/1.iSyTE/test_cel")# Need to change > the directory to where the CEL files are stored > mydata<- ReadAffy() > mydata > > esetRMA<- rma(mydata)# RMA from affy was used in iSYTE paper - Ready > made - does Background correction and Normalization by default algos - > See 'affy' manual > esetRMA > > sampletype<- c('1','1','1','2','2','2') > design<- model.matrix(~0+factor(sampletype))## required to avoid intercept > colnames(design)<- c('Cont','Test') ## Personalize the design with col > names > > # fit<- lmFit(exprs(esetRMA), design) > fit<- lmFit(exprs(esetRMA), design) > contrast.matrix<-makeContrasts(Test-Cont, levels=design) > fit2<- contrasts.fit(fit,contrast.matrix) > fit2<- ebayes(fit2) > topTable(fit2, coef = 1, adjust = "BH", number = 50) > > Error in array(x, c(length(x), 1L), if (!is.null(names(x))) > list(names(x), : > 'data' must be of a vector type > > I am trying to fix this error from last few days but couldn't find a > solution. I would really appreciate your help. > > AK > > > On 04/05/2013 01:13 AM, abdul rawoof wrote: >> Hello Atul, >> >> Please follow the following script. You need to convert your >> normalised data into expression set value using exprs. >> I hope your problem will solve. >> >>> fit<- lmFit*(exprs(esetRMA)*, design) >>> contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>> fit2<- contrasts.fit(fit,contrast.matrix) >>> fit2<- ebayes(fit2). >> >> On Fri, Apr 5, 2013 at 4:31 AM, Atul Kakrana<atulkakrana at="" gmail.com="">> <mailto:atulkakrana at="" gmail.com="">> wrote: >> >> Hello All, >> >> I wrote a script to analyse affymetrix data but its giving an error >> while using the topTable from limma: >> >> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >> list(names(x), : >> 'data' must be of a vector type >> >> I checked all the steps that might be causing the error but couldn't >> find out. So, I trimmed my script to minimal basic and it still >> gives me >> same error. >> >> > mydata<- ReadAffy() >> > esetRMA<- rma(mydata) >> Background correcting >> Normalizing >> Calculating Expression >> > esetRMA >> ExpressionSet (storageMode: lockedEnvironment) >> assayData: 45101 features, 12 samples >> element names: exprs >> protocolData >> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >> varLabels: ScanDate >> varMetadata: labelDescription >> phenoData >> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >> varLabels: sample >> varMetadata: labelDescription >> featureData: none >> experimentData: use 'experimentData(object)' >> Annotation: mouse4302 >> > sampletype<- c('1','1','1','2','2','2','3','3','3','4','4','4') >> > group<-factor(sampletype) >> > design<- model.matrix(~0+group) >> > colnames(design)<- c('WB','Ten','Eleven','Twelve') >> > fit<- lmFit(esetRMA, design) >> > contrast.matrix<-makeContrasts(Ten-WB, levels=design) >> > fit2<- contrasts.fit(fit,contrast.matrix) >> > fit2<- ebayes(fit2) >> >> > topTable(fit2, adjust = "fdr", number = 50) >> Error in 1:ncol(fit) : argument of length 0 >> >> > topTable(fit2,coef = 1, adjust = "fdr", number = 50) >> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >> list(names(x), : >> 'data' must be of a vector type >> >> > results<- decideTests(fit2) >> Error in decideTests(fit2) : Need MArrayLM object >> >> >> Could anybody please explain me or point out what I am missing >> here? Its >> strange that I wrote a similar script for Illumina which works >> just fine. >> >> AK >> >> -- >> Atul Kakrana >> Delaware Technology Park >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> >> > -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD COMMENT
0
Entering edit mode
Hi Jim, Thanks. So, I turned the code upside down just to know that it was a typo. Your suggestion fixed my problem. I just have minor doubt: What is the difference in using fit<- lmFit(exprs(esetRMA), design) OR fit<- lmFit(esetRMA, design) Does this effect result in any possible way? Thanks AK On 04/05/2013 06:41 PM, James W. MacDonald wrote: > Hi Atul, > > I think the problem arises because you are using ebayes() instead of > eBayes(). See ?eBayes, particularly the part after the Value heading. > > Best, > > Jim > > On 4/5/2013 6:07 PM, Atul Kakrana wrote: >> Hello All and Abdul, >> >> The fix suggested by Abdul didn't work. I reduced the code to minimal >> basic and tried work on other publicly available datasets but the >> problem is still the same. >> >> >> It seems to a bug with Limma or Affy? >> >> Dataset used: http://www.ncbi.nlm.nih.gov/geosuppl/?acc=GSE9711 >> >> CODE: >> library(affy) >> library(limma) >> >> setwd("/home/atul/Dropbox/Analysis/1.iSyTE/test_cel")# Need to change >> the directory to where the CEL files are stored >> mydata<- ReadAffy() >> mydata >> >> esetRMA<- rma(mydata)# RMA from affy was used in iSYTE paper - Ready >> made - does Background correction and Normalization by default algos - >> See 'affy' manual >> esetRMA >> >> sampletype<- c('1','1','1','2','2','2') >> design<- model.matrix(~0+factor(sampletype))## required to avoid >> intercept >> colnames(design)<- c('Cont','Test') ## Personalize the design with col >> names >> >> # fit<- lmFit(exprs(esetRMA), design) >> fit<- lmFit(exprs(esetRMA), design) >> contrast.matrix<-makeContrasts(Test-Cont, levels=design) >> fit2<- contrasts.fit(fit,contrast.matrix) >> fit2<- ebayes(fit2) >> topTable(fit2, coef = 1, adjust = "BH", number = 50) >> >> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >> list(names(x), : >> 'data' must be of a vector type >> >> I am trying to fix this error from last few days but couldn't find a >> solution. I would really appreciate your help. >> >> AK >> >> >> On 04/05/2013 01:13 AM, abdul rawoof wrote: >>> Hello Atul, >>> >>> Please follow the following script. You need to convert your >>> normalised data into expression set value using exprs. >>> I hope your problem will solve. >>> >>>> fit<- lmFit*(exprs(esetRMA)*, design) >>>> contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>>> fit2<- contrasts.fit(fit,contrast.matrix) >>>> fit2<- ebayes(fit2). >>> >>> On Fri, Apr 5, 2013 at 4:31 AM, Atul Kakrana<atulkakrana at="" gmail.com="">>> <mailto:atulkakrana at="" gmail.com="">> wrote: >>> >>> Hello All, >>> >>> I wrote a script to analyse affymetrix data but its giving an >>> error >>> while using the topTable from limma: >>> >>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>> list(names(x), : >>> 'data' must be of a vector type >>> >>> I checked all the steps that might be causing the error but >>> couldn't >>> find out. So, I trimmed my script to minimal basic and it still >>> gives me >>> same error. >>> >>> > mydata<- ReadAffy() >>> > esetRMA<- rma(mydata) >>> Background correcting >>> Normalizing >>> Calculating Expression >>> > esetRMA >>> ExpressionSet (storageMode: lockedEnvironment) >>> assayData: 45101 features, 12 samples >>> element names: exprs >>> protocolData >>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>> varLabels: ScanDate >>> varMetadata: labelDescription >>> phenoData >>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>> varLabels: sample >>> varMetadata: labelDescription >>> featureData: none >>> experimentData: use 'experimentData(object)' >>> Annotation: mouse4302 >>> > sampletype<- c('1','1','1','2','2','2','3','3','3','4','4','4') >>> > group<-factor(sampletype) >>> > design<- model.matrix(~0+group) >>> > colnames(design)<- c('WB','Ten','Eleven','Twelve') >>> > fit<- lmFit(esetRMA, design) >>> > contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>> > fit2<- contrasts.fit(fit,contrast.matrix) >>> > fit2<- ebayes(fit2) >>> >>> > topTable(fit2, adjust = "fdr", number = 50) >>> Error in 1:ncol(fit) : argument of length 0 >>> >>> > topTable(fit2,coef = 1, adjust = "fdr", number = 50) >>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>> list(names(x), : >>> 'data' must be of a vector type >>> >>> > results<- decideTests(fit2) >>> Error in decideTests(fit2) : Need MArrayLM object >>> >>> >>> Could anybody please explain me or point out what I am missing >>> here? Its >>> strange that I wrote a similar script for Illumina which works >>> just fine. >>> >>> AK >>> >>> -- >>> Atul Kakrana >>> Delaware Technology Park >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >>> >> >
ADD REPLY
0
Entering edit mode
Hi Atul, On 4/5/2013 7:08 PM, Atul Kakrana wrote: > Hi Jim, > > Thanks. So, I turned the code upside down just to know that it was a > typo. Your suggestion fixed my problem. > > I just have minor doubt: > > What is the difference in using > fit<- lmFit(exprs(esetRMA), design) > > OR > fit<- lmFit(esetRMA, design) > > Does this effect result in any possible way? No. From ?lmFit: |object| object of class |numeric|, |matrix|, |MAList|, |EList|, |marrayNorm|, |ExpressionSet| or |PLMset| containing log-ratios or log-values of expression for a series of microarrays In the first case you are feeding lmFit a matrix, in the second an ExpressionSet. Internally lmFit will then do exprs(esetRMA) to get the data, so the results will be identical. Best, Jim > > Thanks > > AK > > > > > > > On 04/05/2013 06:41 PM, James W. MacDonald wrote: >> Hi Atul, >> >> I think the problem arises because you are using ebayes() instead of >> eBayes(). See ?eBayes, particularly the part after the Value heading. >> >> Best, >> >> Jim >> >> On 4/5/2013 6:07 PM, Atul Kakrana wrote: >>> Hello All and Abdul, >>> >>> The fix suggested by Abdul didn't work. I reduced the code to minimal >>> basic and tried work on other publicly available datasets but the >>> problem is still the same. >>> >>> >>> It seems to a bug with Limma or Affy? >>> >>> Dataset used: http://www.ncbi.nlm.nih.gov/geosuppl/?acc=GSE9711 >>> >>> CODE: >>> library(affy) >>> library(limma) >>> >>> setwd("/home/atul/Dropbox/Analysis/1.iSyTE/test_cel")# Need to change >>> the directory to where the CEL files are stored >>> mydata<- ReadAffy() >>> mydata >>> >>> esetRMA<- rma(mydata)# RMA from affy was used in iSYTE paper - Ready >>> made - does Background correction and Normalization by default algos - >>> See 'affy' manual >>> esetRMA >>> >>> sampletype<- c('1','1','1','2','2','2') >>> design<- model.matrix(~0+factor(sampletype))## required to avoid >>> intercept >>> colnames(design)<- c('Cont','Test') ## Personalize the design with col >>> names >>> >>> # fit<- lmFit(exprs(esetRMA), design) >>> fit<- lmFit(exprs(esetRMA), design) >>> contrast.matrix<-makeContrasts(Test-Cont, levels=design) >>> fit2<- contrasts.fit(fit,contrast.matrix) >>> fit2<- ebayes(fit2) >>> topTable(fit2, coef = 1, adjust = "BH", number = 50) >>> >>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>> list(names(x), : >>> 'data' must be of a vector type >>> >>> I am trying to fix this error from last few days but couldn't find a >>> solution. I would really appreciate your help. >>> >>> AK >>> >>> >>> On 04/05/2013 01:13 AM, abdul rawoof wrote: >>>> Hello Atul, >>>> >>>> Please follow the following script. You need to convert your >>>> normalised data into expression set value using exprs. >>>> I hope your problem will solve. >>>> >>>>> fit<- lmFit*(exprs(esetRMA)*, design) >>>>> contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>>>> fit2<- contrasts.fit(fit,contrast.matrix) >>>>> fit2<- ebayes(fit2). >>>> On Fri, Apr 5, 2013 at 4:31 AM, Atul Kakrana<atulkakrana at="" gmail.com="">>>> <mailto:atulkakrana at="" gmail.com="">> wrote: >>>> >>>> Hello All, >>>> >>>> I wrote a script to analyse affymetrix data but its giving an >>>> error >>>> while using the topTable from limma: >>>> >>>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>>> list(names(x), : >>>> 'data' must be of a vector type >>>> >>>> I checked all the steps that might be causing the error but >>>> couldn't >>>> find out. So, I trimmed my script to minimal basic and it still >>>> gives me >>>> same error. >>>> >>>> > mydata<- ReadAffy() >>>> > esetRMA<- rma(mydata) >>>> Background correcting >>>> Normalizing >>>> Calculating Expression >>>> > esetRMA >>>> ExpressionSet (storageMode: lockedEnvironment) >>>> assayData: 45101 features, 12 samples >>>> element names: exprs >>>> protocolData >>>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>>> varLabels: ScanDate >>>> varMetadata: labelDescription >>>> phenoData >>>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>>> varLabels: sample >>>> varMetadata: labelDescription >>>> featureData: none >>>> experimentData: use 'experimentData(object)' >>>> Annotation: mouse4302 >>>> > sampletype<- c('1','1','1','2','2','2','3','3','3','4','4','4') >>>> > group<-factor(sampletype) >>>> > design<- model.matrix(~0+group) >>>> > colnames(design)<- c('WB','Ten','Eleven','Twelve') >>>> > fit<- lmFit(esetRMA, design) >>>> > contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>>> > fit2<- contrasts.fit(fit,contrast.matrix) >>>> > fit2<- ebayes(fit2) >>>> >>>> > topTable(fit2, adjust = "fdr", number = 50) >>>> Error in 1:ncol(fit) : argument of length 0 >>>> >>>> > topTable(fit2,coef = 1, adjust = "fdr", number = 50) >>>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>>> list(names(x), : >>>> 'data' must be of a vector type >>>> >>>> > results<- decideTests(fit2) >>>> Error in decideTests(fit2) : Need MArrayLM object >>>> >>>> >>>> Could anybody please explain me or point out what I am missing >>>> here? Its >>>> strange that I wrote a similar script for Illumina which works >>>> just fine. >>>> >>>> AK >>>> >>>> -- >>>> Atul Kakrana >>>> Delaware Technology Park >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: >>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> >>>> -- James W. MacDonald, M.S. Biostatistician University of Washington Environmental and Occupational Health Sciences 4225 Roosevelt Way NE, # 100 Seattle WA 98105-6099
ADD REPLY
0
Entering edit mode
Jim, Thanks for explaining the difference between both. AK On 06-Apr-13 1:47 PM, James W. MacDonald wrote: > Hi Atul, > > On 4/5/2013 7:08 PM, Atul Kakrana wrote: >> Hi Jim, >> >> Thanks. So, I turned the code upside down just to know that it was a >> typo. Your suggestion fixed my problem. >> >> I just have minor doubt: >> >> What is the difference in using >> fit<- lmFit(exprs(esetRMA), design) >> >> OR >> fit<- lmFit(esetRMA, design) >> >> Does this effect result in any possible way? > > No. From ?lmFit: > > |object| > > object of class |numeric|, |matrix|, |MAList|, |EList|, |marrayNorm|, > |ExpressionSet| or |PLMset| containing log-ratios or log-values of > expression for a series of microarrays > > > In the first case you are feeding lmFit a matrix, in the second an > ExpressionSet. Internally lmFit will then do exprs(esetRMA) to get the > data, so the results will be identical. > > Best, > > Jim >> >> Thanks >> >> AK >> >> >> >> >> >> >> On 04/05/2013 06:41 PM, James W. MacDonald wrote: >>> Hi Atul, >>> >>> I think the problem arises because you are using ebayes() instead of >>> eBayes(). See ?eBayes, particularly the part after the Value heading. >>> >>> Best, >>> >>> Jim >>> >>> On 4/5/2013 6:07 PM, Atul Kakrana wrote: >>>> Hello All and Abdul, >>>> >>>> The fix suggested by Abdul didn't work. I reduced the code to minimal >>>> basic and tried work on other publicly available datasets but the >>>> problem is still the same. >>>> >>>> >>>> It seems to a bug with Limma or Affy? >>>> >>>> Dataset used: http://www.ncbi.nlm.nih.gov/geosuppl/?acc=GSE9711 >>>> >>>> CODE: >>>> library(affy) >>>> library(limma) >>>> >>>> setwd("/home/atul/Dropbox/Analysis/1.iSyTE/test_cel")# Need to change >>>> the directory to where the CEL files are stored >>>> mydata<- ReadAffy() >>>> mydata >>>> >>>> esetRMA<- rma(mydata)# RMA from affy was used in iSYTE paper - Ready >>>> made - does Background correction and Normalization by default algos - >>>> See 'affy' manual >>>> esetRMA >>>> >>>> sampletype<- c('1','1','1','2','2','2') >>>> design<- model.matrix(~0+factor(sampletype))## required to avoid >>>> intercept >>>> colnames(design)<- c('Cont','Test') ## Personalize the design with col >>>> names >>>> >>>> # fit<- lmFit(exprs(esetRMA), design) >>>> fit<- lmFit(exprs(esetRMA), design) >>>> contrast.matrix<-makeContrasts(Test-Cont, levels=design) >>>> fit2<- contrasts.fit(fit,contrast.matrix) >>>> fit2<- ebayes(fit2) >>>> topTable(fit2, coef = 1, adjust = "BH", number = 50) >>>> >>>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>>> list(names(x), : >>>> 'data' must be of a vector type >>>> >>>> I am trying to fix this error from last few days but couldn't find a >>>> solution. I would really appreciate your help. >>>> >>>> AK >>>> >>>> >>>> On 04/05/2013 01:13 AM, abdul rawoof wrote: >>>>> Hello Atul, >>>>> >>>>> Please follow the following script. You need to convert your >>>>> normalised data into expression set value using exprs. >>>>> I hope your problem will solve. >>>>> >>>>>> fit<- lmFit*(exprs(esetRMA)*, design) >>>>>> contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>>>>> fit2<- contrasts.fit(fit,contrast.matrix) >>>>>> fit2<- ebayes(fit2). >>>>> On Fri, Apr 5, 2013 at 4:31 AM, Atul Kakrana<atulkakrana at="" gmail.com="">>>>> <mailto:atulkakrana at="" gmail.com="">> wrote: >>>>> >>>>> Hello All, >>>>> >>>>> I wrote a script to analyse affymetrix data but its giving an >>>>> error >>>>> while using the topTable from limma: >>>>> >>>>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>>>> list(names(x), : >>>>> 'data' must be of a vector type >>>>> >>>>> I checked all the steps that might be causing the error but >>>>> couldn't >>>>> find out. So, I trimmed my script to minimal basic and it still >>>>> gives me >>>>> same error. >>>>> >>>>> > mydata<- ReadAffy() >>>>> > esetRMA<- rma(mydata) >>>>> Background correcting >>>>> Normalizing >>>>> Calculating Expression >>>>> > esetRMA >>>>> ExpressionSet (storageMode: lockedEnvironment) >>>>> assayData: 45101 features, 12 samples >>>>> element names: exprs >>>>> protocolData >>>>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>>>> varLabels: ScanDate >>>>> varMetadata: labelDescription >>>>> phenoData >>>>> sampleNames: 00.0A.CEL 00.0B.CEL ... 12.5C.CEL (12 total) >>>>> varLabels: sample >>>>> varMetadata: labelDescription >>>>> featureData: none >>>>> experimentData: use 'experimentData(object)' >>>>> Annotation: mouse4302 >>>>> > sampletype<- >>>>> c('1','1','1','2','2','2','3','3','3','4','4','4') >>>>> > group<-factor(sampletype) >>>>> > design<- model.matrix(~0+group) >>>>> > colnames(design)<- c('WB','Ten','Eleven','Twelve') >>>>> > fit<- lmFit(esetRMA, design) >>>>> > contrast.matrix<-makeContrasts(Ten-WB, levels=design) >>>>> > fit2<- contrasts.fit(fit,contrast.matrix) >>>>> > fit2<- ebayes(fit2) >>>>> >>>>> > topTable(fit2, adjust = "fdr", number = 50) >>>>> Error in 1:ncol(fit) : argument of length 0 >>>>> >>>>> > topTable(fit2,coef = 1, adjust = "fdr", number = 50) >>>>> Error in array(x, c(length(x), 1L), if (!is.null(names(x))) >>>>> list(names(x), : >>>>> 'data' must be of a vector type >>>>> >>>>> > results<- decideTests(fit2) >>>>> Error in decideTests(fit2) : Need MArrayLM object >>>>> >>>>> >>>>> Could anybody please explain me or point out what I am missing >>>>> here? Its >>>>> strange that I wrote a similar script for Illumina which works >>>>> just fine. >>>>> >>>>> AK >>>>> >>>>> -- >>>>> Atul Kakrana >>>>> Delaware Technology Park >>>>> >>>>> _______________________________________________ >>>>> Bioconductor mailing list >>>>> Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> >>>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>>> Search the archives: >>>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>>> >>>>> >
ADD REPLY

Login before adding your answer.

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