[BioC] loading gal file using read.Galfile() in marray?

Marcus Davy MDavy at hortresearch.co.nz
Tue May 17 11:37:47 CEST 2005


Meng-Chuan,
On your gal file I can get the same error, this is because your gal file header information is >100 lines long.
read.Galfile tries to automatically work out how many lines to skip before reading in any data.

y <- readLines(f, n = 100)                           # only reads first 100 lines
    if (class(info.id) == "character") 
        skip <- intersect(grep(info.id[1], y), grep(layout.id[1], 
            y))[1] - 1
    else skip <- intersect(grep("ID", y), grep("Name", y))[1] - 1

So skip becomes an NA as it cant see the start of the row with "Name" in it, and read.table fails. There is a slight bug in the coding as read.Galfile allows an arguement for manual override of skip,

galinfo <- read.Galfile("pg.gal", skip=103),

but it gets overwritten by the if else statement and fails anyway...

Quick fix is to change,
y <- readLines(f, n = 100)
to
y <- readLines(f, n = 120)   # anything greater than 102
in your copy of read.Galfile.

Also, your gal file appears to be non standard, see example http://www.axon.com/gn_GenePix_File_Formats.html#gal, specifically Block Column Row
nesting order (should be Column nested in Row nested in Block - yours is different). This can be an issue if relating genes from a galfile list to marrayRaw/marrayNorm intensity information when the nesting is not the same in the files which load the intensity information into the marrayRaw object.

For GenePix gpr files, a way round this is to run read.Galfile on the first array (assuming the template is the same in the batch), reading in the gal information in the same row order as the intensities in the gpr file.


Marcus

 packageDescription("marray", field="Version")
[1] "1.5.25"
> version
         _              
platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    2              
minor    0.1            
year     2004           
month    11             
day      15             
language R              
> 
>>> Wolfgang Huber <huber at ebi.ac.uk> 13/05/2005 3:43:51 p.m. >>>
Hi Meng-Chuan,

what package, which version, which version of R, what platform are you 
using?

I have seen similar errors from marray::readGalfile, they were an 
interaction between the "locale" (i.e. the way your operating system 
and/or R represents characters as bytes) and the way that that funtion 
is programmed.

Hard to say more though without further details.

  Cheers
   Wolfgang

Cheng, Meng-Chuan wrote:
> Hi, 
> I got the following error message  
> 
> "Error in if (skip > 0) readLines(file, skip) :
>         missing value where TRUE/FALSE needed"
> 
> when I was trying galinfo<-read.Galfile("pg.gal").
> Here is the link to the gal file: http://www.brop.org:8000/pg.gal 
> 
> Is there anything wrong with the pg.gal file?
> 
> Thanks.
> 
> Meng
> 
>

-------------------------------------
Wolfgang Huber
European Bioinformatics Institute
European Molecular Biology Laboratory
Cambridge CB10 1SD
England
Phone: +44 1223 494642
Fax:   +44 1223 494486
Http:  www.ebi.ac.uk/huber 

_______________________________________________
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}}



More information about the Bioconductor mailing list