Undesirable behavior of limma MArrayLM?
1
0
Entering edit mode
Paul Leo ▴ 970
@paul-leo-2092
Last seen 9.7 years ago
Personally I don't like this kind of behavior see "#*** and comments... It will surely catch someone out, will it use a rowname or a number , the joy of variable interpolation! Do I complain too much or is this worth a fix? > n<-8963 > fit2[8963,]$genes["ID"] ID 8963 106220736 ## ok that's what I wanted > fit2$genes[8961,"ID"] #** [1] "5050440" ## oops! > test<-fit2$genes > test[8963,] [1] "106220736" ## life is sane again, but now I need more caffeine! > > n<-8963 > fit2[n,]$genes["ID"] ID 8963 106220736 > fit2$genes[n,"ID"] ### Works as I would expect AGAIN [1] "106220736" > test<-fit2$genes > test[n,] [1] "106220736" > > fit2[8963,]$genes["ID"] ID 8963 106220736 > fit2$genes[8961,"ID"] [1] "5050440" > fit2$genes["8961","ID"] # Oh yes... now I get it! [1] "5050440" > fit2$genes[n,"ID"] [1] "106220736" > class(fit2) [1] "MArrayLM" attr(,"package") [1] "limma" > sessionInfo() R version 2.7.1 RC (2008-06-16 r45949) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] limma_2.14.5 > Cheers Paul [[alternative HTML version deleted]]
• 766 views
ADD COMMENT
0
Entering edit mode
Mark Cowley ▴ 400
@mark-cowley-2858
Last seen 8.6 years ago
Australia
Hi Paul, you've unearthed the terror that is using numerical ID's as rownames! As a rule, if I have numerical rownames, then I always refer to them using a quoted number - ie a character, eg rma["12356",], or programatically using the as.character wrapper, eg: psID <- 12345 rma[as.character(psID),] I did not realise the error snuck in at your 2nd line (fit2$genes[8961,"ID") This is an important issue to watch out for, for those using new generation affy arrays, where the probesetID's/transcript cluster ID's or whatever they're now called are numbers. cheers, Mark On 26/06/2008, at 5:33 PM, Paul Leo wrote: > Personally I don't like this kind of behavior see "#*** and > comments... > It will surely catch someone out, will it use a rowname or a number , > the joy of variable interpolation! > Do I complain too much or is this worth a fix? > >> n<-8963 >> fit2[8963,]$genes["ID"] > ID > 8963 106220736 ## ok that's what I wanted >> fit2$genes[8961,"ID"] #** > [1] "5050440" ## oops! >> test<-fit2$genes >> test[8963,] > [1] "106220736" ## life is sane again, but now I need more caffeine! >> >> n<-8963 >> fit2[n,]$genes["ID"] > ID > 8963 106220736 >> fit2$genes[n,"ID"] ### Works as I would expect AGAIN > [1] "106220736" >> test<-fit2$genes >> test[n,] > [1] "106220736" >> >> fit2[8963,]$genes["ID"] > ID > 8963 106220736 >> fit2$genes[8961,"ID"] > [1] "5050440" >> fit2$genes["8961","ID"] # Oh yes... now I get it! > [1] "5050440" >> fit2$genes[n,"ID"] > [1] "106220736" > > >> class(fit2) > [1] "MArrayLM" > attr(,"package") > [1] "limma" >> sessionInfo() > R version 2.7.1 RC (2008-06-16 r45949) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > > other attached packages: > [1] limma_2.14.5 >> > > > Cheers > Paul > > > > [[alternative HTML version deleted]] > > _______________________________________________ > 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
ADD COMMENT

Login before adding your answer.

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