# [BioC] reading imagene files with LIMMA

Yi Xing yxing at ucla.edu
Thu Jun 28 23:33:46 CEST 2007

```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)
>> files<-targets[,c("FileNameCy3","FileNameCy5")]
>>
>> however, I got this error message:
>>
>> Error in matrix(0, nspots, narrays) : matrix: invalid 'nrow' value
>> (too large or NA)
>> 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>

```