[BioC] PCA plots and identifying outliers

James W. MacDonald jmacdon at uw.edu
Fri Oct 5 18:06:01 CEST 2012


Please don't take things off-list! We hope that the list archives will 
be useful to others.

On 10/5/2012 11:52 AM, Kasoji, Manjula (NIH/NCI) [C] wrote:
> Thanks for the quick response, Jim. I can't believe I missed that in the
> documentation. I can add text to the 2d plot, but I was unable to do it
> for the 3d plot. Is this feature not available for 3d?

Not using plotPCA(). I use rgl for the 3d plotting, and haven't really 
explored it enough to add the text to the plot.

However, you can easily do something close to what you want.

pca <- prcomp(t(exprs(eset)))
text3d(pca$x[,1:3], text = sampleNames(eset))

You will likely need to fiddle around with things to get what you like, 
but that is the general idea.

Best,

Jim



>
> Thanks!
>
>
>
>
> On 10/5/12 11:41AM, "James W. MacDonald"<jmacdon at uw.edu>  wrote:
>
>> Hi Guest,
>>
>> On 10/5/2012 11:35 AM, Guest [guest] wrote:
>>> Hi,
>>>
>>> I'm using affycoretools() to generate some pca plots. I found that I
>>> have some outliers. I was wondering, how do I find out which particular
>>> sample (.CEL file) was the outlier?
>>>
>>>    I know which group it is from, but not the identity.
>>>
>>> I've plotted pca plots with just using the plot() function as well, but
>>> I still do not know how to identify the particular sample that is the
>>> outlier.
>>>
>>> Any ideas for both affycoretools() or the general plot() function will
>>> be appreciated!
>> See ?plotPCA, in particular the addtext argument.
>>
>> plotPCA(eset, groups, groupnames, addtext = sampleNames(eset))
>>
>> Best,
>>
>> Jim
>>
>>
>>> Thanks,
>>>
>>> Guest
>>>
>>>    -- output of sessionInfo():
>>>
>>> No error, just question about how find out further details.
>>>
>>> --
>>> Sent via the guest posting facility at bioconductor.org.
>>>
>>> _______________________________________________
>>> Bioconductor mailing list
>>> Bioconductor at r-project.org
>>> 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
>> University of Washington
>> Environmental and Occupational Health Sciences
>> 4225 Roosevelt Way NE, # 100
>> Seattle WA 98105-6099
>>

-- 
James W. MacDonald, M.S.
Biostatistician
University of Washington
Environmental and Occupational Health Sciences
4225 Roosevelt Way NE, # 100
Seattle WA 98105-6099



More information about the Bioconductor mailing list