[BioC] limma & targets

Gordon Smyth smyth at wehi.edu.au
Thu Sep 23 03:46:39 CEST 2004

At 10:02 AM 23/09/2004, Giovanni Coppola wrote:
>I am analyzing 12 Agilent slides with LIMMA (ver 1.7.7, R: 1.9.1)
>I load my targets file with this line...
>targets<-readTargets(file="targets.txt", path = "C:/Documents and
>... and I read the data with this line:
>RG <-read.maimages(name=targets$Name,source="agilent", ext="txt", path =
>"C:/Documents and Settings/giovanni/analysis/data",verbose=TRUE,

You need

RG <- read.maimages(files=targets$FileName, etc

If you don't specify 'files', then all the '.ext' files will be read in 

If you specify 'names' but not 'files', as you have done, you risk random
association of names with files.


>Now, if I type 'targets' I obtain (as expected) the following:
>                            slide.number   Name
>FileName cy5 cy3
>jc_251197823988_S01_A01              1
>e6-c3h   jc_251197823988_S01_A01.txt   e   c
>jc_16011978013880_S01_A01            2 c3-e6h
>jc_16011978013880_S01_A01.txt   c   e
>jc_16011978013882_S01_A01            3 e4-c7h
>jc_16011978013882_S01_A01.txt   e   c
>jc_16011978013881_S01_A01            4 c7-e4h
>jc_16011978013881_S01_A01.txt   c   e
>jc_251197823979_S01_A01              5
>e7-c8h   jc_251197823979_S01_A01.txt   e   c
>jc_251197823980_S01_A01              6
>c8-e7h   jc_251197823980_S01_A01.txt   c   e
>jc_251197823977_S01_A01              7
>e6-c3m   jc_251197823977_S01_A01.txt   e   c
>jc_251197823978_S01_A01              8
>c3-e6m   jc_251197823978_S01_A01.txt   c   e
>jc_251197823989_S01_A01              9
>e3-c4m   jc_251197823989_S01_A01.txt   e   c
>jc_251197823990_S01_A01             10
>c4-e3m   jc_251197823990_S01_A01.txt   c   e
>jc_251197824015_S01_A01             11
>e7-c8m   jc_251197824015_S01_A01.txt   e   c
>jc_251197824017_S01_A01             12
>c8-e7m   jc_251197824017_S01_A01.txt   c   e
>But, if I type 'RG$targets' I get this:
>e6-c3h jc_16011978013880_S01_A01
>c3-e6h jc_16011978013881_S01_A01
>e4-c7h jc_16011978013882_S01_A01
>c7-e4h   jc_251197823977_S01_A01
>e7-c8h   jc_251197823978_S01_A01
>c8-e7h   jc_251197823979_S01_A01
>e6-c3m   jc_251197823980_S01_A01
>c3-e6m   jc_251197823988_S01_A01
>e3-c4m   jc_251197823989_S01_A01
>c4-e3m   jc_251197823990_S01_A01
>e7-c8m   jc_251197824015_S01_A01
>c8-e7m   jc_251197824017_S01_A01
>So, the slide RG[,2] points to the file 'jc_16011978013881_S01_A01', and
>has a mismatched name ('c3-e6h')!!
>If I try (not specifying name=)
>RG <-read.maimages(source="agilent", ext="txt", path = "C:/Documents and
>Settings/giovanni/analysis/data",verbose=TRUE, wt.fun=mywtfun(c(1)))
>...RG[,2] has no name, but the file ('jc_16011978013881_S01_A01') is still
>not corresponding to the slide #2 in targets.txt.
>It looks like read.maimages sorted the files in alphabetical
>order....without touching the slide names...
>I can change the file names, but I wonder if I made any mistakes, or this
>is a point to look at.

More information about the Bioconductor mailing list