Heatmap.2 scale problems: Sacling inside the function gives different results than scaling outside!!!
1
0
Entering edit mode
@elmer-fernandez-3744
Last seen 8.2 years ago
Dear Users I'm working with the heatmap.2 function and I realize that if you use the scale input paramenter gives different results than usign the scale function outsie and feed the heatmap.2 fucntion with the scaled matrix. I attached the results of the two approaches and the used data matrix (M.csv). SO, what I'm doing wrong? R Code library(gplots) M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) heatmap.2(M,scale="column",trace="none",main="scaled inside") x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled outside") > sessionInfo() R version 2.10.0 (2009-10-26) x86_64-unknown-linux-gnu locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 gtools_2.6.1 rkward_0.5.1 loaded via a namespace (and not attached): [1] tools_2.10.0 -- Elmer A. Fernández (Bioing. PhD) Investigador Asistente CONICET - Research Assistant CONICET Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC tel: +54-(0)351-4938000 int 145 Fax: +54-(0)351-4938081 web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 http://sites.google.com/site/biologicaldatamininggroup/Home/ mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina -- Elmer A. Fernández (Bioing. PhD) Investigador Asistente CONICET - Research Assistant CONICET Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC tel: +54-(0)351-4938000 int 145 Fax: +54-(0)351-4938081 web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 http://sites.google.com/site/biologicaldatamininggroup/Home/ mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina [[alternative HTML version deleted]]
• 1.7k views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 3 months ago
United States
2010/7/22 Elmer Fernández <elmerfer@gmail.com> > Dear Users > I'm working with the heatmap.2 function and I realize that if you use the > scale input paramenter gives different results than usign the scale > function > outsie and feed the heatmap.2 fucntion with the scaled matrix. I attached > the results of the two approaches and the used data matrix (M.csv). > SO, what I'm doing wrong? > > Hi, Elmer. The default distance function used by heatmap.2 is dist() which is not going to be invariant under centering and scaling, I don't think. It looks like you are using that default. Sean > R Code > > library(gplots) > M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > heatmap.2(M,scale="column",trace="none",main="scaled inside") > x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled outside") > > > sessionInfo() > R version 2.10.0 (2009-10-26) > x86_64-unknown-linux-gnu > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > gtools_2.6.1 rkward_0.5.1 > > loaded via a namespace (and not attached): > [1] tools_2.10.0 > > > -- > Elmer A. Fernández (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > > > -- > Elmer A. Fernández (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Hi Elmer, The default scale option in heatmap.2 scales by row, whereas the scale() function scales by column, so this is probably why there is a difference. I think whichever dimension contains unique samples is how you want to scale (if this was expression data, for example). Pete ________________________________________ From: bioconductor-bounces@stat.math.ethz.ch [bioconductor- bounces@stat.math.ethz.ch] on behalf of Sean Davis [sdavis2@mail.nih.gov] Sent: Thursday, July 22, 2010 9:17 AM To: Elmer Fern?ndez Cc: Bioconductor mailing list Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the function gives different results than scaling outside!!! 2010/7/22 Elmer Fern?ndez <elmerfer at="" gmail.com=""> > Dear Users > I'm working with the heatmap.2 function and I realize that if you use the > scale input paramenter gives different results than usign the scale > function > outsie and feed the heatmap.2 fucntion with the scaled matrix. I attached > the results of the two approaches and the used data matrix (M.csv). > SO, what I'm doing wrong? > > Hi, Elmer. The default distance function used by heatmap.2 is dist() which is not going to be invariant under centering and scaling, I don't think. It looks like you are using that default. Sean > R Code > > library(gplots) > M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > heatmap.2(M,scale="column",trace="none",main="scaled inside") > x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled outside") > > > sessionInfo() > R version 2.10.0 (2009-10-26) > x86_64-unknown-linux-gnu > > locale: > [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > > attached base packages: > [1] grid stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > gtools_2.6.1 rkward_0.5.1 > > loaded via a namespace (and not attached): > [1] tools_2.10.0 > > > -- > Elmer A. Fern?ndez (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina > > > > -- > Elmer A. Fern?ndez (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina > > [[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 > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi Guys, do note that the scale() function in heatmap doesn't scale your values till AFTER clustering for visualization purpose! So if you provide already scaled data, you naturally will expect a different result. cheers Benjamin Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: > Hi Elmer, > > The default scale option in heatmap.2 scales by row, whereas the scale() function scales by column, so this is probably why there is a difference. I think whichever dimension contains unique samples is how you want to scale (if this was expression data, for example). > > > Pete > ________________________________________ > From: bioconductor-bounces at stat.math.ethz.ch [bioconductor- bounces at stat.math.ethz.ch] on behalf of Sean Davis [sdavis2 at mail.nih.gov] > Sent: Thursday, July 22, 2010 9:17 AM > To: Elmer Fern?ndez > Cc: Bioconductor mailing list > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the function gives different results than scaling outside!!! > > 2010/7/22 Elmer Fern?ndez <elmerfer at="" gmail.com=""> > >> Dear Users >> I'm working with the heatmap.2 function and I realize that if you use the >> scale input paramenter gives different results than usign the scale >> function >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I attached >> the results of the two approaches and the used data matrix (M.csv). >> SO, what I'm doing wrong? >> >> > Hi, Elmer. > > The default distance function used by heatmap.2 is dist() which is not going > to be invariant under centering and scaling, I don't think. It looks like > you are using that default. > > Sean > > >> R Code >> >> library(gplots) >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) >> heatmap.2(M,scale="column",trace="none",main="scaled inside") >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled outside") >> >>> sessionInfo() >> R version 2.10.0 (2009-10-26) >> x86_64-unknown-linux-gnu >> >> locale: >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C >> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 >> LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 >> [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 >> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 >> >> attached base packages: >> [1] grid stats graphics grDevices utils datasets methods >> base >> >> other attached packages: >> [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 >> gtools_2.6.1 rkward_0.5.1 >> >> loaded via a namespace (and not attached): >> [1] tools_2.10.0 >> >> >> -- >> Elmer A. Fern?ndez (Bioing. PhD) >> Investigador Asistente CONICET - Research Assistant CONICET >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC >> tel: +54-(0)351-4938000 int 145 >> Fax: +54-(0)351-4938081 >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 >> http://sites.google.com/site/biologicaldatamininggroup/Home/ >> mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina >> >> >> >> -- >> Elmer A. Fern?ndez (Bioing. PhD) >> Investigador Asistente CONICET - Research Assistant CONICET >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC >> tel: +54-(0)351-4938000 int 145 >> Fax: +54-(0)351-4938081 >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 >> http://sites.google.com/site/biologicaldatamininggroup/Home/ >> mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina >> >> [[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 >> > > [[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 > ___________________________________________ Benjamin Otto, PhD University Medical Center Hamburg-Eppendorf Institute For Clinical Chemistry / Central Laboratories Campus Forschung N27 Martinistr. 52, D-20246 Hamburg Tel.: +49 40 7410 51908 Fax.: +49 40 7410 54971 ___________________________________________ -- Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universit?tsklinikum Hamburg-Eppendorf K?rperschaft des ?ffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. J?rg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Joachim Pr?l? Prof. Dr. Dr. Uwe Koch-Gromus
ADD REPLY
0
Entering edit mode
Hy Benjamin Are you sure about that? If so, I think that it is not correct, right? best Elmer 2010/7/22 Benjamin Otto <b.otto@uke.uni-hamburg.de> > Hi Guys, > > do note that the scale() function in heatmap doesn't scale your values till > AFTER clustering for visualization purpose! So if you provide already scaled > data, you naturally will expect a different result. > > cheers > > Benjamin > > Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: > > > Hi Elmer, > > > > The default scale option in heatmap.2 scales by row, whereas the scale() > function scales by column, so this is probably why there is a difference. I > think whichever dimension contains unique samples is how you want to scale > (if this was expression data, for example). > > > > > > Pete > > ________________________________________ > > From: bioconductor-bounces@stat.math.ethz.ch [ > bioconductor-bounces@stat.math.ethz.ch] on behalf of Sean Davis [ > sdavis2@mail.nih.gov] > > Sent: Thursday, July 22, 2010 9:17 AM > > To: Elmer Fernández > > Cc: Bioconductor mailing list > > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the function > gives different results than scaling outside!!! > > > > 2010/7/22 Elmer Fernández <elmerfer@gmail.com> > > > >> Dear Users > >> I'm working with the heatmap.2 function and I realize that if you use > the > >> scale input paramenter gives different results than usign the scale > >> function > >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I > attached > >> the results of the two approaches and the used data matrix (M.csv). > >> SO, what I'm doing wrong? > >> > >> > > Hi, Elmer. > > > > The default distance function used by heatmap.2 is dist() which is not > going > > to be invariant under centering and scaling, I don't think. It looks > like > > you are using that default. > > > > Sean > > > > > >> R Code > >> > >> library(gplots) > >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > >> heatmap.2(M,scale="column",trace="none",main="scaled inside") > >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled > outside") > >> > >>> sessionInfo() > >> R version 2.10.0 (2009-10-26) > >> x86_64-unknown-linux-gnu > >> > >> locale: > >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > >> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > >> LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > >> [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > >> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > >> > >> attached base packages: > >> [1] grid stats graphics grDevices utils datasets methods > >> base > >> > >> other attached packages: > >> [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > >> gtools_2.6.1 rkward_0.5.1 > >> > >> loaded via a namespace (and not attached): > >> [1] tools_2.10.0 > >> > >> > >> -- > >> Elmer A. Fernández (Bioing. PhD) > >> Investigador Asistente CONICET - Research Assistant CONICET > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > >> tel: +54-(0)351-4938000 int 145 > >> Fax: +54-(0)351-4938081 > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > >> > >> > >> > >> -- > >> Elmer A. Fernández (Bioing. PhD) > >> Investigador Asistente CONICET - Research Assistant CONICET > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > >> tel: +54-(0)351-4938000 int 145 > >> Fax: +54-(0)351-4938081 > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > >> > >> [[alternative HTML version deleted]] > >> > >> > >> _______________________________________________ > >> Bioconductor mailing list > >> Bioconductor@stat.math.ethz.ch > >> https://stat.ethz.ch/mailman/listinfo/bioconductor > >> Search the archives: > >> http://news.gmane.org/gmane.science.biology.informatics.conductor > >> > > > > [[alternative HTML version deleted]] > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > ___________________________________________ > Benjamin Otto, PhD > University Medical Center Hamburg-Eppendorf > Institute For Clinical Chemistry / Central Laboratories > Campus Forschung N27 > Martinistr. 52, > D-20246 Hamburg > > Tel.: +49 40 7410 51908 > Fax.: +49 40 7410 54971 > ___________________________________________ > > > > > > -- > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > Universitätsklinikum Hamburg-Eppendorf > Körperschaft des öffentlichen Rechts > Gerichtsstand: Hamburg > > Vorstandsmitglieder: > Prof. Dr. Jörg F. Debatin (Vorsitzender) > Dr. Alexander Kirstein > Joachim Prölß > Prof. Dr. Dr. Uwe Koch-Gromus > -- Elmer A. Fernández (Bioing. PhD) Investigador Asistente CONICET - Research Assistant CONICET Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC tel: +54-(0)351-4938000 int 145 Fax: +54-(0)351-4938081 web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 http://sites.google.com/site/biologicaldatamininggroup/Home/ mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
2010/7/22 Elmer Fernández <elmerfer@gmail.com> > Hy Benjamin > Are you sure about that? If so, I think that it is not correct, right? > best > Elmer > Hi, Elmer. My reading of the source code for heatmap.2 suggests that Benjamin is correct. Sean > > 2010/7/22 Benjamin Otto <b.otto@uke.uni-hamburg.de> > > > Hi Guys, > > > > do note that the scale() function in heatmap doesn't scale your values > till > > AFTER clustering for visualization purpose! So if you provide already > scaled > > data, you naturally will expect a different result. > > > > cheers > > > > Benjamin > > > > Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: > > > > > Hi Elmer, > > > > > > The default scale option in heatmap.2 scales by row, whereas the > scale() > > function scales by column, so this is probably why there is a difference. > I > > think whichever dimension contains unique samples is how you want to > scale > > (if this was expression data, for example). > > > > > > > > > Pete > > > ________________________________________ > > > From: bioconductor-bounces@stat.math.ethz.ch [ > > bioconductor-bounces@stat.math.ethz.ch] on behalf of Sean Davis [ > > sdavis2@mail.nih.gov] > > > Sent: Thursday, July 22, 2010 9:17 AM > > > To: Elmer Fernández > > > Cc: Bioconductor mailing list > > > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the > function > > gives different results than scaling outside!!! > > > > > > 2010/7/22 Elmer Fernández <elmerfer@gmail.com> > > > > > >> Dear Users > > >> I'm working with the heatmap.2 function and I realize that if you use > > the > > >> scale input paramenter gives different results than usign the scale > > >> function > > >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I > > attached > > >> the results of the two approaches and the used data matrix (M.csv). > > >> SO, what I'm doing wrong? > > >> > > >> > > > Hi, Elmer. > > > > > > The default distance function used by heatmap.2 is dist() which is not > > going > > > to be invariant under centering and scaling, I don't think. It looks > > like > > > you are using that default. > > > > > > Sean > > > > > > > > >> R Code > > >> > > >> library(gplots) > > >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > > >> heatmap.2(M,scale="column",trace="none",main="scaled inside") > > >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled > > outside") > > >> > > >>> sessionInfo() > > >> R version 2.10.0 (2009-10-26) > > >> x86_64-unknown-linux-gnu > > >> > > >> locale: > > >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > > >> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > > >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > > >> LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > > >> [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > > >> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > > >> > > >> attached base packages: > > >> [1] grid stats graphics grDevices utils datasets > methods > > >> base > > >> > > >> other attached packages: > > >> [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > > >> gtools_2.6.1 rkward_0.5.1 > > >> > > >> loaded via a namespace (and not attached): > > >> [1] tools_2.10.0 > > >> > > >> > > >> -- > > >> Elmer A. Fernández (Bioing. PhD) > > >> Investigador Asistente CONICET - Research Assistant CONICET > > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ > UCC > > >> tel: +54-(0)351-4938000 int 145 > > >> Fax: +54-(0)351-4938081 > > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > >> > > >> > > >> > > >> -- > > >> Elmer A. Fernández (Bioing. PhD) > > >> Investigador Asistente CONICET - Research Assistant CONICET > > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ > UCC > > >> tel: +54-(0)351-4938000 int 145 > > >> Fax: +54-(0)351-4938081 > > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > >> > > >> [[alternative HTML version deleted]] > > >> > > >> > > >> _______________________________________________ > > >> Bioconductor mailing list > > >> Bioconductor@stat.math.ethz.ch > > >> https://stat.ethz.ch/mailman/listinfo/bioconductor > > >> Search the archives: > > >> http://news.gmane.org/gmane.science.biology.informatics.conductor > > >> > > > > > > [[alternative HTML version deleted]] > > > > > > _______________________________________________ > > > Bioconductor mailing list > > > Bioconductor@stat.math.ethz.ch > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > > ___________________________________________ > > Benjamin Otto, PhD > > University Medical Center Hamburg-Eppendorf > > Institute For Clinical Chemistry / Central Laboratories > > Campus Forschung N27 > > Martinistr. 52, > > D-20246 Hamburg > > > > Tel.: +49 40 7410 51908 > > Fax.: +49 40 7410 54971 > > ___________________________________________ > > > > > > > > > > > > -- > > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universitätsklinikum Hamburg-Eppendorf > > Körperschaft des öffentlichen Rechts > > Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: > > Prof. Dr. Jörg F. Debatin (Vorsitzender) > > Dr. Alexander Kirstein > > Joachim Prölß > > Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > -- > Elmer A. Fernández (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi Guys, thanks for confirmation. :-) I was pretty sure because I have a little modified script of heatmap.2() where I added some features such as scaling "before" clustering where I can choose between z-score or just median centering, or having the signal color legend below or beside the heatmap ... stuff like that. In fact it even has a little module which I snatched from the HeatPlus package (I remember it was called like that) that should provide the possibility to color the dendrogram- clusters according to a given parameter defining either number of clusters of cut-heigt. If somebody is interested just send me a notification. However I must warn you, that the modified code still has some minor bugs and is far from "package" ready, because I used to code it beside my projects and never had the time to concentrate on giving it a really final shape. cheers Benjamin Am 22.07.2010 um 23:00 schrieb Sean Davis: > > > 2010/7/22 Elmer Fernández <elmerfer@gmail.com> > Hy Benjamin > Are you sure about that? If so, I think that it is not correct, right? > best > Elmer > > Hi, Elmer. My reading of the source code for heatmap.2 suggests that Benjamin is correct. > > Sean > > > 2010/7/22 Benjamin Otto <b.otto@uke.uni-hamburg.de> > > > Hi Guys, > > > > do note that the scale() function in heatmap doesn't scale your values till > > AFTER clustering for visualization purpose! So if you provide already scaled > > data, you naturally will expect a different result. > > > > cheers > > > > Benjamin > > > > Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: > > > > > Hi Elmer, > > > > > > The default scale option in heatmap.2 scales by row, whereas the scale() > > function scales by column, so this is probably why there is a difference. I > > think whichever dimension contains unique samples is how you want to scale > > (if this was expression data, for example). > > > > > > > > > Pete > > > ________________________________________ > > > From: bioconductor-bounces@stat.math.ethz.ch [ > > bioconductor-bounces@stat.math.ethz.ch] on behalf of Sean Davis [ > > sdavis2@mail.nih.gov] > > > Sent: Thursday, July 22, 2010 9:17 AM > > > To: Elmer Fernández > > > Cc: Bioconductor mailing list > > > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the function > > gives different results than scaling outside!!! > > > > > > 2010/7/22 Elmer Fernández <elmerfer@gmail.com> > > > > > >> Dear Users > > >> I'm working with the heatmap.2 function and I realize that if you use > > the > > >> scale input paramenter gives different results than usign the scale > > >> function > > >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I > > attached > > >> the results of the two approaches and the used data matrix (M.csv). > > >> SO, what I'm doing wrong? > > >> > > >> > > > Hi, Elmer. > > > > > > The default distance function used by heatmap.2 is dist() which is not > > going > > > to be invariant under centering and scaling, I don't think. It looks > > like > > > you are using that default. > > > > > > Sean > > > > > > > > >> R Code > > >> > > >> library(gplots) > > >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > > >> heatmap.2(M,scale="column",trace="none",main="scaled inside") > > >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled > > outside") > > >> > > >>> sessionInfo() > > >> R version 2.10.0 (2009-10-26) > > >> x86_64-unknown-linux-gnu > > >> > > >> locale: > > >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > > >> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > > >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > > >> LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > > >> [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > > >> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > > >> > > >> attached base packages: > > >> [1] grid stats graphics grDevices utils datasets methods > > >> base > > >> > > >> other attached packages: > > >> [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > > >> gtools_2.6.1 rkward_0.5.1 > > >> > > >> loaded via a namespace (and not attached): > > >> [1] tools_2.10.0 > > >> > > >> > > >> -- > > >> Elmer A. Fernández (Bioing. PhD) > > >> Investigador Asistente CONICET - Research Assistant CONICET > > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > > >> tel: +54-(0)351-4938000 int 145 > > >> Fax: +54-(0)351-4938081 > > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > >> > > >> > > >> > > >> -- > > >> Elmer A. Fernández (Bioing. PhD) > > >> Investigador Asistente CONICET - Research Assistant CONICET > > >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > > >> tel: +54-(0)351-4938000 int 145 > > >> Fax: +54-(0)351-4938081 > > >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > > >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > > >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > >> > > >> [[alternative HTML version deleted]] > > >> > > >> > > >> _______________________________________________ > > >> Bioconductor mailing list > > >> Bioconductor@stat.math.ethz.ch > > >> https://stat.ethz.ch/mailman/listinfo/bioconductor > > >> Search the archives: > > >> http://news.gmane.org/gmane.science.biology.informatics.conductor > > >> > > > > > > [[alternative HTML version deleted]] > > > > > > _______________________________________________ > > > Bioconductor mailing list > > > Bioconductor@stat.math.ethz.ch > > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > > Search the archives: > > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > > ___________________________________________ > > Benjamin Otto, PhD > > University Medical Center Hamburg-Eppendorf > > Institute For Clinical Chemistry / Central Laboratories > > Campus Forschung N27 > > Martinistr. 52, > > D-20246 Hamburg > > > > Tel.: +49 40 7410 51908 > > Fax.: +49 40 7410 54971 > > ___________________________________________ > > > > > > > > > > > > -- > > Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > > Genossenschaftsregister sowie das Unternehmensregister (EHUG): > > > > Universitätsklinikum Hamburg-Eppendorf > > Körperschaft des öffentlichen Rechts > > Gerichtsstand: Hamburg > > > > Vorstandsmitglieder: > > Prof. Dr. Jörg F. Debatin (Vorsitzender) > > Dr. Alexander Kirstein > > Joachim Prölß > > Prof. Dr. Dr. Uwe Koch-Gromus > > > > > > -- > Elmer A. Fernández (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > [[alternative HTML version deleted]] > > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor > ___________________________________________ Benjamin Otto, PhD University Medical Center Hamburg-Eppendorf Institute For Clinical Chemistry / Central Laboratories Campus Forschung N27 Martinistr. 52, D-20246 Hamburg Tel.: +49 40 7410 51908 Fax.: +49 40 7410 54971 ___________________________________________ -- Pflichtangaben gemäß Gesetz über elektronische Handelsregister und Genossenschaftsregister sowie das Unternehmensregister (EHUG): Universitätsklinikum Hamburg-Eppendorf Körperschaft des öffentlichen Rechts Gerichtsstand: Hamburg Vorstandsmitglieder: Prof. Dr. Jörg F. Debatin (Vorsitzender) Dr. Alexander Kirstein Joachim Prölß Prof. Dr. Dr. Uwe Koch-Gromus [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi, On Fri, Jul 23, 2010 at 6:44 AM, Benjamin Otto <b.otto at="" uke.uni-hamburg.de=""> wrote: > Hi Guys, > > thanks for confirmation. :-) > > I was pretty sure because I have a little modified script of heatmap.2() where I added some features such as scaling "before" clustering where I can choose between z-score or just median centering, or having the signal color legend below or beside the heatmap ... stuff like that. In fact it even has a little module which I snatched from the HeatPlus package (I remember it was called like that) that should provide the possibility to color the dendrogram- clusters according to a given parameter defining either number of clusters of cut-heigt. > > If somebody is interested just send me a notification. However I must warn you, that the modified code still has some minor bugs and is far from "package" ready, because I used to code it beside my projects and never had the time to concentrate on giving it a really final shape. Sure, why not? :-) Throw it up as a gist, perhaps, and those who like can hack it into shape: http://gist.github.com/ I actually have my own version of heatmap.2 as well, because I'm convinced the default arguments in the function definition that deal with "symmetrical keys" are wrong. Take for instance the definition of the symbreaks argument: symbreaks = min(x < 0, na.rm=TRUE) || scale != "none" I'm pretty sure it should be `symbreaks = min(x, na.rm=TRUE) < 0 || ...` since the former will always evaluate to 0 (FALSE) (likewise with symkey). I emailed the maintainer about it but never got a response, so I've just been using my own version since. -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Perhaps Bioconductor (or R for that matter) could have a "scripts" page, where useful scripts could be uploaded for public use. On Fri, Jul 23, 2010 at 5:04 AM, Steve Lianoglou < mailinglist.honeypot@gmail.com> wrote: > Hi, > > On Fri, Jul 23, 2010 at 6:44 AM, Benjamin Otto > <b.otto@uke.uni-hamburg.de> wrote: > > Hi Guys, > > > > thanks for confirmation. :-) > > > > I was pretty sure because I have a little modified script of heatmap.2() > where I added some features such as scaling "before" clustering where I can > choose between z-score or just median centering, or having the signal color > legend below or beside the heatmap ... stuff like that. In fact it even has > a little module which I snatched from the HeatPlus package (I remember it > was called like that) that should provide the possibility to color the > dendrogram-clusters according to a given parameter defining either number of > clusters of cut-heigt. > > > > If somebody is interested just send me a notification. However I must > warn you, that the modified code still has some minor bugs and is far from > "package" ready, because I used to code it beside my projects and never had > the time to concentrate on giving it a really final shape. > > Sure, why not? :-) > > Throw it up as a gist, perhaps, and those who like can hack it into shape: > http://gist.github.com/ > > I actually have my own version of heatmap.2 as well, because I'm > convinced the default arguments in the function definition that deal > with "symmetrical keys" are wrong. > > Take for instance the definition of the symbreaks argument: > symbreaks = min(x < 0, na.rm=TRUE) || scale != "none" > > I'm pretty sure it should be `symbreaks = min(x, na.rm=TRUE) < 0 || > ...` since the former will always evaluate to 0 (FALSE) > (likewise with symkey). > > I emailed the maintainer about it but never got a response, so I've > just been using my own version since. > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact<http: cbio.mskc="" c.org="" %7elianos="" contact=""> > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
Hi, 2010/7/22 Elmer Fern?ndez <elmerfer at="" gmail.com="">: > Hy Benjamin > Are you sure about that? Looking at the source code for heatmap.2 (and heatmap, for that matter) it looks as if Benjamin is correct. The scaling is done after the clustering. > If so, I think that it is not correct, right? I guess it depends on what you were expecting it to do :-) Having just realized this myself (yikes -- see what happens when we assume(?)), I think I'd more often rather send in a scaled version of the data and have scale='none' in the heatmap call, to be honest. -steve > best > Elmer > > 2010/7/22 Benjamin Otto <b.otto at="" uke.uni-hamburg.de=""> > >> Hi Guys, >> >> do note that the scale() function in heatmap doesn't scale your values till >> AFTER clustering for visualization purpose! So if you provide already scaled >> data, you naturally will expect a different result. >> >> cheers >> >> Benjamin >> >> Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: >> >> > Hi Elmer, >> > >> > The default scale option in heatmap.2 scales by row, whereas the scale() >> function scales by column, so this is probably why there is a difference. I >> think whichever dimension contains unique samples is how you want to scale >> (if this was expression data, for example). >> > >> > >> > Pete >> > ________________________________________ >> > From: bioconductor-bounces at stat.math.ethz.ch [ >> bioconductor-bounces at stat.math.ethz.ch] on behalf of Sean Davis [ >> sdavis2 at mail.nih.gov] >> > Sent: Thursday, July 22, 2010 9:17 AM >> > To: Elmer Fern?ndez >> > Cc: Bioconductor mailing list >> > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the function >> ? ? ? gives different results than scaling outside!!! >> > >> > 2010/7/22 Elmer Fern?ndez <elmerfer at="" gmail.com=""> >> > >> >> Dear Users >> >> I'm working with the heatmap.2 function and I realize that if you use >> the >> >> scale input paramenter gives different results than usign the scale >> >> function >> >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I >> attached >> >> the results of the two approaches and the used data matrix (M.csv). >> >> SO, what I'm doing wrong? >> >> >> >> >> > Hi, Elmer. >> > >> > The default distance function used by heatmap.2 is dist() which is not >> going >> > to be invariant under centering and scaling, I don't think. ?It looks >> like >> > you are using that default. >> > >> > Sean >> > >> > >> >> R Code >> >> >> >> library(gplots) >> >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) >> >> heatmap.2(M,scale="column",trace="none",main="scaled inside") >> >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled >> outside") >> >> >> >>> sessionInfo() >> >> R version 2.10.0 (2009-10-26) >> >> x86_64-unknown-linux-gnu >> >> >> >> locale: >> >> [1] LC_CTYPE=en_US.UTF-8 ? ? ? ? ?LC_NUMERIC=C >> >> LC_TIME=en_US.UTF-8 ? ? ? ? ? LC_COLLATE=en_US.UTF-8 >> >> [5] LC_MONETARY=en_US.UTF-8 ? ? ? LC_MESSAGES=en_US.UTF-8 >> >> LC_PAPER=en_US.UTF-8 ? ? ? ? ?LC_NAME=en_US.UTF-8 >> >> [9] LC_ADDRESS=en_US.UTF-8 ? ? ? ?LC_TELEPHONE=en_US.UTF-8 >> >> LC_MEASUREMENT=en_US.UTF-8 ? ?LC_IDENTIFICATION=en_US.UTF-8 >> >> >> >> attached base packages: >> >> [1] grid ? ? ?stats ? ? graphics ?grDevices utils ? ? datasets ?methods >> >> base >> >> >> >> other attached packages: >> >> [1] gplots_2.7.4 ? caTools_1.10 ? bitops_1.0-4.1 gdata_2.7.1 >> >> gtools_2.6.1 ? rkward_0.5.1 >> >> >> >> loaded via a namespace (and not attached): >> >> [1] tools_2.10.0 >> >> >> >> >> >> -- >> >> Elmer A. Fern?ndez (Bioing. PhD) >> >> Investigador Asistente CONICET - Research Assistant CONICET >> >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC >> >> tel: +54-(0)351-4938000 int 145 >> >> Fax: +54-(0)351-4938081 >> >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 >> >> http://sites.google.com/site/biologicaldatamininggroup/Home/ >> >> mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina >> >> >> >> >> >> >> >> -- >> >> Elmer A. Fern?ndez (Bioing. PhD) >> >> Investigador Asistente CONICET - Research Assistant CONICET >> >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC >> >> tel: +54-(0)351-4938000 int 145 >> >> Fax: +54-(0)351-4938081 >> >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 >> >> http://sites.google.com/site/biologicaldatamininggroup/Home/ >> >> mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina >> >> >> >> ? ? ? [[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 >> >> >> > >> > ? ? ? ?[[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 >> > >> >> ___________________________________________ >> Benjamin Otto, PhD >> University Medical Center Hamburg-Eppendorf >> Institute For Clinical Chemistry / Central Laboratories >> Campus Forschung N27 >> Martinistr. 52, >> D-20246 Hamburg >> >> Tel.: +49 40 7410 51908 >> Fax.: +49 40 7410 54971 >> ___________________________________________ >> >> >> >> >> >> -- >> Pflichtangaben gem?? Gesetz ?ber elektronische Handelsregister und >> Genossenschaftsregister sowie das Unternehmensregister (EHUG): >> >> Universit?tsklinikum Hamburg-Eppendorf >> K?rperschaft des ?ffentlichen Rechts >> Gerichtsstand: Hamburg >> >> Vorstandsmitglieder: >> Prof. Dr. J?rg F. Debatin (Vorsitzender) >> Dr. Alexander Kirstein >> Joachim Pr?l? >> Prof. Dr. Dr. Uwe Koch-Gromus >> > > > > -- > Elmer A. Fern?ndez (Bioing. PhD) > Investigador Asistente CONICET - Research Assistant CONICET > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > tel: +54-(0)351-4938000 int 145 > Fax: +54-(0)351-4938081 > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > http://sites.google.com/site/biologicaldatamininggroup/Home/ > mail address: Camino Alta Gracia Km 7.1/2- C?rdoba-5017-Argentina > > ? ? ? ?[[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 > -- Steve Lianoglou Graduate Student: Computational Systems Biology ?| Memorial Sloan-Kettering Cancer Center ?| Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact
ADD REPLY
0
Entering edit mode
Dear Steve You are right when you say that you should scale your data according to what do you want to do, but from the help it is not clear when the scaling is done. In most of the R functions, when the scale parameter is present in the input you assume that the scaling process is permormed BEFORE the main process. That's why I said that it could not be correct. Dear guys, THANKS for the discussion!! I'll really appreciated and enjoyed. Best Elmer 2010/7/22 Steve Lianoglou <mailinglist.honeypot@gmail.com> > Hi, > > 2010/7/22 Elmer Fernández <elmerfer@gmail.com>: > > Hy Benjamin > > Are you sure about that? > > Looking at the source code for heatmap.2 (and heatmap, for that > matter) it looks as if Benjamin is correct. The scaling is done after > the clustering. > > > If so, I think that it is not correct, right? > > I guess it depends on what you were expecting it to do :-) > > Having just realized this myself (yikes -- see what happens when we > assume(?)), I think I'd more often rather send in a scaled version of > the data and have scale='none' in the heatmap call, to be honest. > > -steve > > > best > > Elmer > > > > 2010/7/22 Benjamin Otto <b.otto@uke.uni-hamburg.de> > > > >> Hi Guys, > >> > >> do note that the scale() function in heatmap doesn't scale your values > till > >> AFTER clustering for visualization purpose! So if you provide already > scaled > >> data, you naturally will expect a different result. > >> > >> cheers > >> > >> Benjamin > >> > >> Am 22.07.2010 um 16:25 schrieb Bazeley, Peter: > >> > >> > Hi Elmer, > >> > > >> > The default scale option in heatmap.2 scales by row, whereas the > scale() > >> function scales by column, so this is probably why there is a > difference. I > >> think whichever dimension contains unique samples is how you want to > scale > >> (if this was expression data, for example). > >> > > >> > > >> > Pete > >> > ________________________________________ > >> > From: bioconductor-bounces@stat.math.ethz.ch [ > >> bioconductor-bounces@stat.math.ethz.ch] on behalf of Sean Davis [ > >> sdavis2@mail.nih.gov] > >> > Sent: Thursday, July 22, 2010 9:17 AM > >> > To: Elmer Fernández > >> > Cc: Bioconductor mailing list > >> > Subject: Re: [BioC] Heatmap.2 scale problems: Sacling inside the > function > >> gives different results than scaling outside!!! > >> > > >> > 2010/7/22 Elmer Fernández <elmerfer@gmail.com> > >> > > >> >> Dear Users > >> >> I'm working with the heatmap.2 function and I realize that if you use > >> the > >> >> scale input paramenter gives different results than usign the scale > >> >> function > >> >> outsie and feed the heatmap.2 fucntion with the scaled matrix. I > >> attached > >> >> the results of the two approaches and the used data matrix (M.csv). > >> >> SO, what I'm doing wrong? > >> >> > >> >> > >> > Hi, Elmer. > >> > > >> > The default distance function used by heatmap.2 is dist() which is not > >> going > >> > to be invariant under centering and scaling, I don't think. It looks > >> like > >> > you are using that default. > >> > > >> > Sean > >> > > >> > > >> >> R Code > >> >> > >> >> library(gplots) > >> >> M=matrix(c(rnorm(10*3,1,2),rnorm(10*2,-0.5,1)),ncol=5) > >> >> heatmap.2(M,scale="column",trace="none",main="scaled inside") > >> >> x11();heatmap.2(scale(M),scale="none",trace="none",main="scaled > >> outside") > >> >> > >> >>> sessionInfo() > >> >> R version 2.10.0 (2009-10-26) > >> >> x86_64-unknown-linux-gnu > >> >> > >> >> locale: > >> >> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C > >> >> LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 > >> >> [5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 > >> >> LC_PAPER=en_US.UTF-8 LC_NAME=en_US.UTF-8 > >> >> [9] LC_ADDRESS=en_US.UTF-8 LC_TELEPHONE=en_US.UTF-8 > >> >> LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 > >> >> > >> >> attached base packages: > >> >> [1] grid stats graphics grDevices utils datasets > methods > >> >> base > >> >> > >> >> other attached packages: > >> >> [1] gplots_2.7.4 caTools_1.10 bitops_1.0-4.1 gdata_2.7.1 > >> >> gtools_2.6.1 rkward_0.5.1 > >> >> > >> >> loaded via a namespace (and not attached): > >> >> [1] tools_2.10.0 > >> >> > >> >> > >> >> -- > >> >> Elmer A. Fernández (Bioing. PhD) > >> >> Investigador Asistente CONICET - Research Assistant CONICET > >> >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ > UCC > >> >> tel: +54-(0)351-4938000 int 145 > >> >> Fax: +54-(0)351-4938081 > >> >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > >> >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > >> >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > >> >> > >> >> > >> >> > >> >> -- > >> >> Elmer A. Fernández (Bioing. PhD) > >> >> Investigador Asistente CONICET - Research Assistant CONICET > >> >> Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ > UCC > >> >> tel: +54-(0)351-4938000 int 145 > >> >> Fax: +54-(0)351-4938081 > >> >> web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > >> >> http://sites.google.com/site/biologicaldatamininggroup/Home/ > >> >> mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > >> >> > >> >> [[alternative HTML version deleted]] > >> >> > >> >> > >> >> _______________________________________________ > >> >> Bioconductor mailing list > >> >> Bioconductor@stat.math.ethz.ch > >> >> https://stat.ethz.ch/mailman/listinfo/bioconductor > >> >> Search the archives: > >> >> http://news.gmane.org/gmane.science.biology.informatics.conductor > >> >> > >> > > >> > [[alternative HTML version deleted]] > >> > > >> > _______________________________________________ > >> > Bioconductor mailing list > >> > Bioconductor@stat.math.ethz.ch > >> > https://stat.ethz.ch/mailman/listinfo/bioconductor > >> > Search the archives: > >> http://news.gmane.org/gmane.science.biology.informatics.conductor > >> > > >> > >> ___________________________________________ > >> Benjamin Otto, PhD > >> University Medical Center Hamburg-Eppendorf > >> Institute For Clinical Chemistry / Central Laboratories > >> Campus Forschung N27 > >> Martinistr. 52, > >> D-20246 Hamburg > >> > >> Tel.: +49 40 7410 51908 > >> Fax.: +49 40 7410 54971 > >> ___________________________________________ > >> > >> > >> > >> > >> > >> -- > >> Pflichtangaben gemäß Gesetz über elektronische Handelsregister und > >> Genossenschaftsregister sowie das Unternehmensregister (EHUG): > >> > >> Universitätsklinikum Hamburg-Eppendorf > >> Körperschaft des öffentlichen Rechts > >> Gerichtsstand: Hamburg > >> > >> Vorstandsmitglieder: > >> Prof. Dr. Jörg F. Debatin (Vorsitzender) > >> Dr. Alexander Kirstein > >> Joachim Prölß > >> Prof. Dr. Dr. Uwe Koch-Gromus > >> > > > > > > > > -- > > Elmer A. Fernández (Bioing. PhD) > > Investigador Asistente CONICET - Research Assistant CONICET > > Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC > > tel: +54-(0)351-4938000 int 145 > > Fax: +54-(0)351-4938081 > > web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 > > http://sites.google.com/site/biologicaldatamininggroup/Home/ > > mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina > > > > [[alternative HTML version deleted]] > > > > > > _______________________________________________ > > Bioconductor mailing list > > Bioconductor@stat.math.ethz.ch > > https://stat.ethz.ch/mailman/listinfo/bioconductor > > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > > > > -- > Steve Lianoglou > Graduate Student: Computational Systems Biology > | Memorial Sloan-Kettering Cancer Center > | Weill Medical College of Cornell University > Contact Info: http://cbio.mskcc.org/~lianos/contact<http: cbio.mskc="" c.org="" %7elianos="" contact=""> > -- Elmer A. Fernández (Bioing. PhD) Investigador Asistente CONICET - Research Assistant CONICET Prof. Inteligencia Artificial -UCC - Prof. Artificial Intelligence @ UCC tel: +54-(0)351-4938000 int 145 Fax: +54-(0)351-4938081 web page : http://www.uccor.edu.ar/modelo.php?param=3.8.5.15 http://sites.google.com/site/biologicaldatamininggroup/Home/ mail address: Camino Alta Gracia Km 7.1/2- Córdoba-5017-Argentina [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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