reading imagene files with LIMMA
3
0
Entering edit mode
Yi Xing ▴ 30
@yi-xing-2243
Last seen 9.7 years ago
Hi, I tried to read several Imagene files with LIMMA: library(limma) targets<-readTargets() files<-targets[,c("FileNameCy3","FileNameCy5")] RG<-read.maimages(files,source='imagene') however, I got this error message: Read header information Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value (too large or NA) In addition: Warning message: NAs introduced by coercion What might be the problem and how to fix it? Thanks. Yi Xing
• 1.2k views
ADD COMMENT
0
Entering edit mode
Yi Xing ▴ 30
@yi-xing-2243
Last seen 9.7 years ago
Here is my sessionInfo() > sessionInfo() R version 2.1.1, 2005-06-20, powerpc-apple-darwin7.9.0 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base" other attached packages: limma "2.0.8" Thanks for your suggestion. I'll upgrade my packages. On Jun 28, 2007, at 3:39 PM, smohapat at vbi.vt.edu wrote: > Yi: > > Could you send the output of sessionInfo() to the list? I am attaching > mine at the end. > > I guess that you are using an old version of limma (when field > dimensions > had only one block). It is recommended to upgrade to a more recent > version > (e.g., 2.10.5). > >> so read.imagene() calculates the total number of spots as prod(FD): >> nspots <- prod(FD) Y <- matrix(0, nspots, narrays) > > Looking at the actual code of read.imagene gives > nspots <- sum(apply(FD, 1, prod)) > > which seems good enough to handle your situation. > > Best, > > Saroj > > ------------------------------- >> sessionInfo() > R version 2.5.0 (2007-04-23) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] "stats" "graphics" "grDevices" "utils" "datasets" > "methods" > [7] "base" > > other attached packages: > limma > "2.10.5" > -------------------------------- > > > >> > > > > On Thu, June 28, 2007 5:33 pm, Yi Xing wrote: >> Hello Saroj, >> >> >> Thanks for your message. I think the problem is with the Field >> Dimensions. It looks like this for my file: >> >> >> Field Metarows Metacols Rows Cols >> Block1 1 1 15 14 >> Block2 1 1 15 14 >> Block3 1 1 15 14 >> Block4 1 1 15 14 >> Block5 1 1 15 14 >> Block6 1 1 15 14 >> Block7 1 1 15 14 >> Block8 1 1 15 14 >> Block9 1 1 15 14 >> Block10 1 1 15 14 >> Block11 1 1 15 14 >> Block12 1 1 15 14 >> Block13 1 1 15 14 >> Block14 1 1 15 14 >> Block15 1 1 15 14 >> Block16 1 1 15 14 >> Block17 1 1 15 14 >> Block18 1 1 15 14 >> Block19 1 1 15 14 >> Block20 1 1 15 14 >> Block21 1 1 15 14 >> Block22 1 1 15 14 >> Block23 1 1 15 14 >> Block24 1 1 15 14 >> Block25 1 1 15 14 >> Block26 1 1 15 14 >> Block27 1 1 15 14 >> Block28 1 1 15 14 >> Block29 1 1 15 14 >> Block30 1 1 15 14 >> Block31 1 1 15 14 >> Block32 1 1 15 14 >> >> >> >> which is 2.046527e+74, causing the error in the next line. >> >> Yi >> On Jun 28, 2007, at 2:21 PM, Saroj Mohapatra wrote: >> >> >>> Hello Yi, >>> >>> >>> It is possible that there is a discrepancy between the number of >>> spots >>> calculated from the Field Dimensions in header and the number of >>> rows it >>> actually reads from the file. >>> >>> For example, in my Imagene 5.1 file: >>> in the header, below "Begin Field Dimensions" I find the following: >>> Metarows = 8 >>> Metacols = 4 >>> Rows = 15 >>> Cols = 12 >>> >>> >>> So, the total number of spots = 5760 >>> In the data section of my file, there are 5760 rows (excluding column >>> titles). >>> >>> Of course, the actual number would vary, you would have a different >>> number of spots. You could start with checking that the numbers >>> match. >>> >>> Also, there should be something like "Begin Raw Data" before the >>> first >>> line and "End Raw Data" after the last line of data section. >>> >>> Good luck! >>> >>> >>> Saroj >>> >>> >>> Yi Xing wrote: >>> >>> >>>> Hi, >>>> >>>> >>>> I tried to read several Imagene files with LIMMA: >>>> >>>> >>>> library(limma) targets<-readTargets() >>>> files<-targets[,c("FileNameCy3","FileNameCy5")] >>>> RG<-read.maimages(files,source='imagene') >>>> >>>> >>>> however, I got this error message: >>>> >>>> Read header information >>>> Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value >>>> (too large or NA) >>>> In addition: Warning message: >>>> NAs introduced by coercion >>>> >>>> >>>> What might be the problem and how to fix it? Thanks. >>>> >>>> >>>> Yi Xing >>>> >>>> >>>> _______________________________________________ >>>> Bioconductor mailing list >>>> Bioconductor at stat.math.ethz.ch >>>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>>> Search the archives: >>>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>>> >>>> >>> <smohapat.vcf> >>> >> > >
ADD COMMENT
0
Entering edit mode
@martin-morgan-1513
Last seen 9 days ago
United States
Yi Xing -- What does sessionInfo() say? I suspect you are using an older version of limma, and that the bug you are encountering was fixed more than a year ago. Download and install the latest release of R from http://cran.r-project.org and use > source('http://bioconductor.org/biocLite.R') > biocLite() to get back on track. Best, Martin Yi Xing <yxing at="" ucla.edu=""> writes: > Hello Saroj, > > Thanks for your message. I think the problem is with the Field > Dimensions. It looks like this for my file: > > Field Metarows Metacols Rows Cols > Block1 1 1 15 14 > Block2 1 1 15 14 > Block3 1 1 15 14 > Block4 1 1 15 14 > Block5 1 1 15 14 > Block6 1 1 15 14 > Block7 1 1 15 14 > Block8 1 1 15 14 > Block9 1 1 15 14 > Block10 1 1 15 14 > Block11 1 1 15 14 > Block12 1 1 15 14 > Block13 1 1 15 14 > Block14 1 1 15 14 > Block15 1 1 15 14 > Block16 1 1 15 14 > Block17 1 1 15 14 > Block18 1 1 15 14 > Block19 1 1 15 14 > Block20 1 1 15 14 > Block21 1 1 15 14 > Block22 1 1 15 14 > Block23 1 1 15 14 > Block24 1 1 15 14 > Block25 1 1 15 14 > Block26 1 1 15 14 > Block27 1 1 15 14 > Block28 1 1 15 14 > Block29 1 1 15 14 > Block30 1 1 15 14 > Block31 1 1 15 14 > Block32 1 1 15 14 > > so read.imagene() calculates the total number of spots as prod(FD): > > nspots <- prod(FD) > Y <- matrix(0, nspots, narrays) > > which is 2.046527e+74, causing the error in the next line. > > Yi > On Jun 28, 2007, at 2:21 PM, Saroj Mohapatra wrote: > >> Hello Yi, >> >> It is possible that there is a discrepancy between the number of spots >> calculated from the Field Dimensions in header and the number of rows >> it actually reads from the file. >> >> For example, in my Imagene 5.1 file: >> in the header, below "Begin Field Dimensions" I find the following: >> Metarows = 8 >> Metacols = 4 >> Rows = 15 >> Cols = 12 >> >> So, the total number of spots = 5760 >> In the data section of my file, there are 5760 rows (excluding column >> titles). >> >> Of course, the actual number would vary, you would have a different >> number of spots. You could start with checking that the numbers match. >> >> Also, there should be something like "Begin Raw Data" before the first >> line and "End Raw Data" after the last line of data section. >> >> Good luck! >> >> Saroj >> >> Yi Xing wrote: >> >>> Hi, >>> >>> I tried to read several Imagene files with LIMMA: >>> >>> library(limma) >>> targets<-readTargets() >>> files<-targets[,c("FileNameCy3","FileNameCy5")] >>> RG<-read.maimages(files,source='imagene') >>> >>> however, I got this error message: >>> >>> Read header information >>> Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value >>> (too large or NA) >>> In addition: Warning message: >>> NAs introduced by coercion >>> >>> What might be the problem and how to fix it? Thanks. >>> >>> Yi Xing >>> >>> _______________________________________________ >>> Bioconductor mailing list >>> Bioconductor at stat.math.ethz.ch >>> https://stat.ethz.ch/mailman/listinfo/bioconductor >>> Search the archives: >>> http://news.gmane.org/gmane.science.biology.informatics.conductor >>> >> <smohapat.vcf> > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor -- Martin Morgan Bioconductor / Computational Biology http://bioconductor.org
ADD COMMENT
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20070628/ 0cf5228e/attachment.pl
ADD REPLY
0
Entering edit mode
@saroj-mohapatra-1446
Last seen 9.7 years ago
Hello Yi, It is possible that there is a discrepancy between the number of spots calculated from the Field Dimensions in header and the number of rows it actually reads from the file. For example, in my Imagene 5.1 file: in the header, below "Begin Field Dimensions" I find the following: Metarows = 8 Metacols = 4 Rows = 15 Cols = 12 So, the total number of spots = 5760 In the data section of my file, there are 5760 rows (excluding column titles). Of course, the actual number would vary, you would have a different number of spots. You could start with checking that the numbers match. Also, there should be something like "Begin Raw Data" before the first line and "End Raw Data" after the last line of data section. Good luck! Saroj Yi Xing wrote: >Hi, > >I tried to read several Imagene files with LIMMA: > >library(limma) >targets<-readTargets() >files<-targets[,c("FileNameCy3","FileNameCy5")] >RG<-read.maimages(files,source='imagene') > >however, I got this error message: > >Read header information >Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value (too >large or NA) >In addition: Warning message: >NAs introduced by coercion > >What might be the problem and how to fix it? Thanks. > >Yi Xing > >_______________________________________________ >Bioconductor mailing list >Bioconductor at stat.math.ethz.ch >https://stat.ethz.ch/mailman/listinfo/bioconductor >Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > >
ADD COMMENT
0
Entering edit mode
Hello Saroj, Thanks for your message. I think the problem is with the Field Dimensions. It looks like this for my file: Field Metarows Metacols Rows Cols Block1 1 1 15 14 Block2 1 1 15 14 Block3 1 1 15 14 Block4 1 1 15 14 Block5 1 1 15 14 Block6 1 1 15 14 Block7 1 1 15 14 Block8 1 1 15 14 Block9 1 1 15 14 Block10 1 1 15 14 Block11 1 1 15 14 Block12 1 1 15 14 Block13 1 1 15 14 Block14 1 1 15 14 Block15 1 1 15 14 Block16 1 1 15 14 Block17 1 1 15 14 Block18 1 1 15 14 Block19 1 1 15 14 Block20 1 1 15 14 Block21 1 1 15 14 Block22 1 1 15 14 Block23 1 1 15 14 Block24 1 1 15 14 Block25 1 1 15 14 Block26 1 1 15 14 Block27 1 1 15 14 Block28 1 1 15 14 Block29 1 1 15 14 Block30 1 1 15 14 Block31 1 1 15 14 Block32 1 1 15 14 so read.imagene() calculates the total number of spots as prod(FD): nspots <- prod(FD) Y <- matrix(0, nspots, narrays) which is 2.046527e+74, causing the error in the next line. Yi On Jun 28, 2007, at 2:21 PM, Saroj Mohapatra wrote: > Hello Yi, > > It is possible that there is a discrepancy between the number of spots > calculated from the Field Dimensions in header and the number of rows > it actually reads from the file. > > For example, in my Imagene 5.1 file: > in the header, below "Begin Field Dimensions" I find the following: > Metarows = 8 > Metacols = 4 > Rows = 15 > Cols = 12 > > So, the total number of spots = 5760 > In the data section of my file, there are 5760 rows (excluding column > titles). > > Of course, the actual number would vary, you would have a different > number of spots. You could start with checking that the numbers match. > > Also, there should be something like "Begin Raw Data" before the first > line and "End Raw Data" after the last line of data section. > > Good luck! > > Saroj > > Yi Xing wrote: > >> Hi, >> >> I tried to read several Imagene files with LIMMA: >> >> library(limma) >> targets<-readTargets() >> files<-targets[,c("FileNameCy3","FileNameCy5")] >> RG<-read.maimages(files,source='imagene') >> >> however, I got this error message: >> >> Read header information >> Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value >> (too large or NA) >> In addition: Warning message: >> NAs introduced by coercion >> >> What might be the problem and how to fix it? Thanks. >> >> Yi Xing >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at stat.math.ethz.ch >> https://stat.ethz.ch/mailman/listinfo/bioconductor >> Search the archives: >> http://news.gmane.org/gmane.science.biology.informatics.conductor >> > <smohapat.vcf>
ADD REPLY

Login before adding your answer.

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