Targets file, array labels and Limma versions
2
0
Entering edit mode
Jenny Drnevich ★ 2.2k
@jenny-drnevich-382
Last seen 9.8 years ago
Hi, I have a 3 questions that are somewhat related: I noticed a discrepancy between the Limma vignette (21 Nov 2005) and readTargets() in Limma 2.4.4 (complete sessionInfo at the end). In the vignette on pg. 12, it says you can put a "Name" column in your Targets.txt file to give a shorter label for output, graphs, etc. However, when I did this and called readTargets(), the rownames of the targets object were the longer file names. Looking at the code for readTargets, it appears the column has to be called "Label", not "Name"? I am also having troubles getting shorter labels for my RGlist. It would be great if read.maimages() could get both the FileNames and Name/Label info from a targets= option, or alternatively have a colnames= option where targets$Label could be plugged in. However, I thought it could be done manually using colnames(RG), but I'm getting the following error message: > colnames(RG) <- targets$Label Error in "colnames<-"(`*tmp*`, value = c("a1", "a2", "a3", "a4", "a5", : 'dimnames' applied to non-array colnames(RG) does give a character vector of the names, so why it doesn't work for assignment? This may or may not have something to do with the version of Limma... which leads me to my last question: Why does the development version of Limma get installed when using biocLite() ? (haven't checked getBioC) I've seen that Gordon has said he doesn't keep "stable" and "developmental" versions like other maintainers and wants everyone to use the most recent version, so perhaps this is why. However, I keep getting a warning message when I load Limma that it was built under R 2.3.0. Do you anticipate there being any problems with using Limma 2.4.4 under R 2.2.0? I suspect that there won't be any real problems, but I want to point out that these warning messages can be be disconcerting to R novices - I just taught a workshop on R and Bioconductor and had to answer this question many times. If the newest version of Limma is likely to be continually built under the developmental version of R instead of the recommended stable version of R, perhaps a note explaining the situation could be put in the vignette or somewhere else? Thanks, Jenny > sessionInfo() R version 2.2.0, 2005-10-06, i386-pc-mingw32 attached base packages: [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" [7] "base" other attached packages: limma "2.4.4" Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
limma limma • 1.1k views
ADD COMMENT
0
Entering edit mode
Marcus Davy ▴ 680
@marcus-davy-374
Last seen 9.8 years ago
Jenny, help(readTargets) mentions that If 'row.names' is null, then the column 'Labels' will be used if such exists or, failing that, the column 'FileName'. This looks like a small typo as the column has to be "Label" not "Labels" in ReadTargets <- function(){ ... if ("Label" %in% names(tab)) { row.names(tab) <- tab[, "Label"] } ... You can add abbreviated names during file uploading with read.maimages from a vector or a column of the targets file with the "names" argument. library(limma) library(marray) datadir <- system.file("swirldata", package = "marray") targets <- readTargets(file.path(datadir, "SwirlSample.txt")) targets$Label <- c("foo","fodda","fi","fum") read.maimages(dir(datadir, pattern="spot"), path=datadir, source="spot", names=targets$Label) ... An object of class "RGList" $R foo fodda fi fum [1,] 19538.470 16138.720 2895.1600 14054.5400 [2,] 23619.820 17247.670 2976.6230 20112.2600 [3,] 21579.950 17317.150 2735.6190 12945.8500 [4,] 8905.143 6794.381 318.9524 524.0476 [5,] 8676.095 6043.542 780.6667 304.6190 8443 more rows ... etc The assignment of; colnames(RG) <- targets$Label Probably doesn't work because the RGList is a list with different types of structures in it, they do not all have the same column dimensions. I haven't had any problems under 2.2.0 using limma 2.4.4, not compared to when R moved from 1.9.1 to 2.0.0 with the addition of "lazy loading" of R objects. Something maybe of interest to you, biocLite() loads biocinstall.R from Bioconductor; source("http://www.bioconductor.org/scripts/2.2/biocinstall.R") Looking at the biocinstall script biocLite should be installing the 1.7 stable version of limma (version 2.2.0) but does appear to grabbing the version 2.4.4, probably for reasons your have already highlighted. Marcus On 12/16/05 11:12 AM, "Jenny Drnevich" <drnevich at="" uiuc.edu=""> wrote: > Hi, > > I have a 3 questions that are somewhat related: > > I noticed a discrepancy between the Limma vignette (21 Nov 2005) and > readTargets() in Limma 2.4.4 (complete sessionInfo at the end). In the > vignette on pg. 12, it says you can put a "Name" column in your Targets.txt > file to give a shorter label for output, graphs, etc. However, when I did > this and called readTargets(), the rownames of the targets object were the > longer file names. Looking at the code for readTargets, it appears the > column has to be called "Label", not "Name"? > > I am also having troubles getting shorter labels for my RGlist. It would be > great if read.maimages() could get both the FileNames and Name/Label info > from a targets= option, or alternatively have a colnames= option where > targets$Label could be plugged in. However, I thought it could be done > manually using colnames(RG), but I'm getting the following error message: > >> colnames(RG) <- targets$Label > Error in "colnames<-"(`*tmp*`, value = c("a1", "a2", "a3", "a4", "a5", : > 'dimnames' applied to non-array > > colnames(RG) does give a character vector of the names, so why it doesn't > work for assignment? > > This may or may not have something to do with the version of Limma... which > leads me to my last question: Why does the development version of Limma get > installed when using biocLite() ? (haven't checked getBioC) I've seen that > Gordon has said he doesn't keep "stable" and "developmental" versions like > other maintainers and wants everyone to use the most recent version, so > perhaps this is why. However, I keep getting a warning message when I load > Limma that it was built under R 2.3.0. Do you anticipate there being any > problems with using Limma 2.4.4 under R 2.2.0? I suspect that there won't > be any real problems, but I want to point out that these warning messages > can be be disconcerting to R novices - I just taught a workshop on R and > Bioconductor and had to answer this question many times. If the newest > version of Limma is likely to be continually built under the developmental > version of R instead of the recommended stable version of R, perhaps a > note explaining the situation could be put in the vignette or somewhere else? > > Thanks, > Jenny > > >> sessionInfo() > R version 2.2.0, 2005-10-06, i386-pc-mingw32 > > attached base packages: > [1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" > [7] "base" > > other attached packages: > limma > "2.4.4" > > Jenny Drnevich, Ph.D. > > Functional Genomics Bioinformatics Specialist > W.M. Keck Center for Comparative and Functional Genomics > Roy J. Carver Biotechnology Center > University of Illinois, Urbana-Champaign > > 330 ERML > 1201 W. Gregory Dr. > Urbana, IL 61801 > USA > > ph: 217-244-7355 > fax: 217-265-5066 > e-mail: drnevich at uiuc.edu > > _______________________________________________ > 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}}
ADD COMMENT
0
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia
Dear Jenny, At 09:12 AM 16/12/2005, Jenny Drnevich wrote: >Hi, > >I have a 3 questions that are somewhat related: > >I noticed a discrepancy between the Limma vignette (21 Nov 2005) and >readTargets() in Limma 2.4.4 (complete sessionInfo at the end). In the >vignette on pg. 12, it says you can put a "Name" column in your >Targets.txt file to give a shorter label for output, graphs, etc. However, >when I did this and called readTargets(), the rownames of the targets >object were the longer file names. Looking at the code for readTargets, it >appears the column has to be called "Label", not "Name"? Yes, you're right. The discprepancy has arisen because limmaGUI uses the "Name" column while limma uses the "Label" column. We'll have to make this consistent and fix the description in the User's Guide. >I am also having troubles getting shorter labels for my RGlist. It would >be great if read.maimages() could get both the FileNames and Name/Label >info from a targets= option, or alternatively have a colnames= option >where targets$Label could be plugged in. As Marcus Davy has explained, read.maimages() already has such an argument called 'names'. BTW, I am thinking of allowing the targets frame to be passed directly to read.maimages(), e.g., RG <- read.maimages(files=targets, source="genepix") If 'targets' is a data.frame, then the Filenames and Labels columns of would be used to locate the data files and associated names. Would you find this a useful facility? > However, I thought it could be done manually using colnames(RG), but I'm > getting the following error message: > > > colnames(RG) <- targets$Label >Error in "colnames<-"(`*tmp*`, value = c("a1", "a2", "a3", "a4", "a5", : > 'dimnames' applied to non-array > >colnames(RG) does give a character vector of the names, so why it doesn't >work for assignment? The assignment behaviour doesn't happen automatically, it needs to be implemented. It is a good suggestion and I will do so. In the meantime, you can set the colnames manually by colnames(RG$R) <- colnames(RG$G) <- colnames(RG$Rb) <- colnames(RG$Gb) <- targets$Label >This may or may not have something to do with the version of Limma... >which leads me to my last question: Why does the development version of >Limma get installed when using biocLite() ? (haven't checked >getBioC) I've seen that Gordon has said he doesn't keep "stable" and >"developmental" versions like other maintainers and wants everyone to use >the most recent version, so perhaps this is why. This happens because limma is on CRAN as well as on Bioconductor. biocLite() works differently from the older getBioC() script in that it searches CRAN as well as the Bioconductor repositories. It installs the latest version of each package that it can find for the version of R being run. For limma, the latest version will usually be the one on CRAN. > However, I keep getting a warning message when I load Limma that it was > built under R 2.3.0. Do you anticipate there being any problems with > using Limma 2.4.4 under R 2.2.0? I suspect that there won't be any real > problems, but I want to point out that these warning messages can be be > disconcerting to R novices - I just taught a workshop on R and > Bioconductor and had to answer this question many times. If the newest > version of Limma is likely to be continually built under the > developmental version of R instead of the recommended stable version of > R, perhaps a note explaining the situation could be put in the vignette > or somewhere else? There are no problems with limma 2.4.4 under R 2.2.0. However, if you are running R 2.2.0, you should never get limma or any other package built for R 2.3.0. I believe the intention is that neither biocLite() nor install.packages() should ever install a package built for a version of R other than that being run by the user. The only way I know of that the user could get limma built for R 2.3.0 would be (i) by actually running R 2.3.0 or (ii) by manually downloading the Windows build from http://www.bioconductor.org/download/bioc1.8/. Doing the latter and then installing it in R 2.2.0 would be a user error and would lead to the warning message that you mention. Best wishes Gordon >Thanks, >Jenny > > > > sessionInfo() >R version 2.2.0, 2005-10-06, i386-pc-mingw32 > >attached base packages: >[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets" >[7] "base" > >other attached packages: > limma >"2.4.4" > >Jenny Drnevich, Ph.D. > >Functional Genomics Bioinformatics Specialist >W.M. Keck Center for Comparative and Functional Genomics >Roy J. Carver Biotechnology Center >University of Illinois, Urbana-Champaign > >330 ERML >1201 W. Gregory Dr. >Urbana, IL 61801 >USA > >ph: 217-244-7355 >fax: 217-265-5066 >e-mail: drnevich at uiuc.edu
ADD COMMENT
0
Entering edit mode
Hi again, >>I am also having troubles getting shorter labels for my RGlist. It would >>be great if read.maimages() could get both the FileNames and Name/Label >>info from a targets= option, or alternatively have a colnames= option >>where targets$Label could be plugged in. > >As Marcus Davy has explained, read.maimages() already has such an argument >called 'names'. Oops - missed that! Sorry... >BTW, I am thinking of allowing the targets frame to be passed directly to >read.maimages(), e.g., > > RG <- read.maimages(files=targets, source="genepix") > >If 'targets' is a data.frame, then the Filenames and Labels columns of >would be used to locate the data files and associated names. Would you >find this a useful facility? Yes! >>This may or may not have something to do with the version of Limma... >>which leads me to my last question: Why does the development version of >>Limma get installed when using biocLite() ? (haven't checked >>getBioC) I've seen that Gordon has said he doesn't keep "stable" and >>"developmental" versions like other maintainers and wants everyone to use >>the most recent version, so perhaps this is why. > >This happens because limma is on CRAN as well as on Bioconductor. >biocLite() works differently from the older getBioC() script in that it >searches CRAN as well as the Bioconductor repositories. It installs the >latest version of each package that it can find for the version of R being >run. For limma, the latest version will usually be the one on CRAN. > >> However, I keep getting a warning message when I load Limma that it was >> built under R 2.3.0. Do you anticipate there being any problems with >> using Limma 2.4.4 under R 2.2.0? I suspect that there won't be any real >> problems, but I want to point out that these warning messages can be be >> disconcerting to R novices - I just taught a workshop on R and >> Bioconductor and had to answer this question many times. If the newest >> version of Limma is likely to be continually built under the >> developmental version of R instead of the recommended stable version of >> R, perhaps a note explaining the situation could be put in the vignette >> or somewhere else? > >There are no problems with limma 2.4.4 under R 2.2.0. However, if you are >running R 2.2.0, you should never get limma or any other package built for >R 2.3.0. I believe the intention is that neither biocLite() nor >install.packages() should ever install a package built for a version of R >other than that being run by the user. The only way I know of that the >user could get limma built for R 2.3.0 would be (i) by actually running R >2.3.0 or (ii) by manually downloading the Windows build from >http://www.bioconductor.org/download/bioc1.8/. Doing the latter and then >installing it in R 2.2.0 would be a user error and would lead to the >warning message that you mention. Ah - that solves the mystery... I didn't know that limma was also on CRAN, and that's the version that biocLite() installs. I had been installing R on three other computers when I noticed the differences in the limma versions and vignettes from when I had installed the newest R & Bioconductor on my computer back in October. I assumed they were getting the development version, so I downloaded that for my computer so I could get the same commands (one default changed somewhere...) and page numbers for my workshop. I just downloaded & installed limma 2.4.4 from CRAN, and now it loads without the warning. Thanks so much, Jenny Jenny Drnevich, Ph.D. Functional Genomics Bioinformatics Specialist W.M. Keck Center for Comparative and Functional Genomics Roy J. Carver Biotechnology Center University of Illinois, Urbana-Champaign 330 ERML 1201 W. Gregory Dr. Urbana, IL 61801 USA ph: 217-244-7355 fax: 217-265-5066 e-mail: drnevich at uiuc.edu
ADD REPLY

Login before adding your answer.

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