Entering edit mode
Dear Bjoern,
>Date: Mon, 31 Jul 2006 12:43:00 +0200
>From: Bj?rn Usadel <usadel at="" mpimp-golm.mpg.de="">
>Subject: [BioC] limma: read.maimages possibility to warn the user?
>To: bioconductor at stat.math.ethz.ch
>
>Dear list,
>
>when using read.maimages from limma with a "broken" file (tabs
replaced
>by ":", two extra tabs added at the end of row e)
>limma reads the table fine
>
>table:
>:R:G:RB:GB
>a:1:2:0.5:0.5
>b:2:4:1:1
>c:3:6:1.5:1.5
>d:4:8:2:2
>e:5:10:2.5:2.5::
>f:6:12:3:3
>g:7:14:3.5:3.5
>
>code:
>RG<-read.maimages(files="test.txt",
path="C://cpan//",columns=list(Gf="G",
> Rf="R",
> Gb="GB",
> Rb="RB"
> ))
>
>But I get NA values added in all columns thus changing the order of
>probes in this particular arrayfile
>$G
> test
>[1,] 2
>[2,] 4
>[3,] 6
>[4,] 8
>[5,] 10
>[6,] NA <-
>[7,] 12
>[8,] 14
This unfortunate behaviour is due to (what I believe to be) a bug in
the R function read.table. (I've sent a post to R-devel today to
discuss it.) You can prevent it simply by adding the argument
flush=TRUE to your read.maimages() call. This will result in the
spurious delimiters at the of the end of the lines being ignored.
Perhaps I will add flush=TRUE to the limma read by default.
>Marray on the other hand, complains using the following syntax and
>refuses to read in the offending file.
>RG2<-read.marrayRaw(fnames="test.txt",path="C://cpan//", name.Gf="G",
> name.Rf="R",
> name.Gb="GB",
> name.Rb="RB"
> )
>
>"Error in scan(file = file, what = what, sep = sep, quote = quote,
dec =
>dec, : line 5 did not have 5 elements"
This is something of an accident. If there had been five extra tab
characters at the end of the line instead of two, then marray would
have done exactly the same as limma. The difference between the two
packages is that limma is using fill=TRUE in the read while marray is
not. This allows limma to read incomplete lines.
Best wishes
Gordon
>Even though I appreciate, that limma reads the data fine without the
>usual read.table hazzle and realize that the data should have been
>checked before reading it in anyway, I think at least a little
warning
>could greatly help.
>But maybe I missed something important (not being a two color type
anyway)?
>
>(The broken files result from an MS Excel export and this happens on
>R2.2 with limma 2.4.13 and on R 2.3.1 with limma 2.6.2)
>
>
>Cheers,
>Bj?rn
>
>
>--
>-+-+-+-+-+-+-+-+-+-+-+-
>Bj?rn Usadel, PhD
>
>Max Planck Institute of Molecular Plant Physiology
>System Regulation Group
>
>Am M?hlenberg 1
>D-14476 Golm
>Germany
>
>Tel (+49 331) 567-8114
>
>Email usadel at mpimp-golm.mpg.de
>WWW mapman.mpimp-golm.mpg.de