[BioC] pca.legend function of package affycoretools
James W. MacDonald
jmacdon at med.umich.edu
Tue Sep 19 21:07:54 CEST 2006
Hi Mark,
Kimpel, Mark William wrote:
> Jim,
>
> Your are a tricky one ;)
>
> I am trying to plot data from 5 brain regions of 2 lines of rats. My
> boss requests, "The figure needs to be simplified, and done in black and
> white. This can be done by using all open symbols for one line and
> closed (filled) symbols for the other line. The 5 symbols could be
> square, triangle, circle, inverted triangle, diamond."
>
> I have actually implemented this using the following plot arguments for
> my prcomp object:
>
> plot(pca$x[,1:2], pch = (groups + 20), col = "black", bg = c("black",
> "white"), ylab = "PC2", xlab = "PC1", main = "Principal Components
> Plot", ylim = ylim)
You don't need the bg argument here, and I certainly wouldn't want to
add that as an argument for plotPCA(), because bg is an argument for
plot() as the background for the plotting symbols, and an argument for
legend() as the legend background, so you can easily end up with a black
box for a legend.
Anyway, if you use col = "black" and pch = c(0:2, 5:6, 15:19) with the
new version of affycoretools (sent separately, and soon to appear in the
devel repository), you should get what you want.
Let me know if you have problems.
Best,
Jim
>
> I have used the open symbols (after reviewing ?points) and used fills on
> some of them.
>
> Could you add the capability to pass on pch, col, and bg to plot from
> plotPCA?
>
> And, if you have an interim fix for me, that would be great.
>
> Thanks,
>
> Mark
>
> Mark W. Kimpel MD
>
>
>
> (317) 490-5129 Work, & Mobile
>
>
>
> (317) 663-0513 Home (no voice mail please)
>
> 1-(317)-536-2730 FAX
>
>
> -----Original Message-----
> From: James W. MacDonald [mailto:jmacdon at med.umich.edu]
> Sent: Tuesday, September 19, 2006 1:33 PM
> To: Kimpel, Mark William
> Cc: bioconductor at stat.math.ethz.ch
> Subject: Re: [BioC] pca.legend function of package affycoretools
>
> Kimpel, Mark William wrote:
>
>>I am trying to hack the function plotPCA of package "affycoretools" so
>>that I can use special symbols in place of the default.
>>
>>I cannot access the function "pca.legend". I get the following error
>>message.
>
>
> Ha! I have been most tricky and hid this function in a NAMESPACE, so no
> hacking for you! ;-D
>
> Kidding aside, is there a particular symbol you want to plot that isn't
> available? You can specify any one of the 25 'number-based' plotting
> symbols using the group argument to plotPCA() (see example(points) for
> the available choices). In other words, you don't have to use 1s and 2s
> for the plotting symbols. If you want solid circles and solid diamonds,
> you could specify groups = c(16,16,16,18,18,18), or whatever, depending
> on the number of replicates.
>
> If you tell me what you would want to do, it would probably be easier
> for me to implement than for you to hack.
>
> However, if you really want to play around with things, you will need to
>
> download the package sources first, then make your changes to the
> function in the affystart.R file, and then re-install. Since I use a
> namespace on this package, you cannot just change things locally and
> expect them to work because a namespace is designed to keep things like
> that from happening (well, actually it is designed to keep different
> packages from over-writing functions with the same names, but the effect
>
> is the same).
>
> If you want me to make changes, let me know quickly because we go into
> feature freeze on the 25th.
>
> Best,
>
> Jim
>
>
>
>>pca.legend
>>Error: object "pca.legend" not found
>>No suitable frames for recover()
>>
>>Same error message when I try to use the function.
>>
>>Is this function written in C?
>>
>>How can I access it?
>>
>>Thanks Jim,
>>
>>Mark
>>
>>Mark W. Kimpel MD
>>
>>
>>
>>(317) 490-5129 Work, & Mobile
>>
>>
>>
>>(317) 663-0513 Home (no voice mail please)
>>
>>1-(317)-536-2730 FAX
>>
>>_______________________________________________
>>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
>
>
--
James W. MacDonald, M.S.
Biostatistician
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
More information about the Bioconductor
mailing list