[BioC] How to plot just "Present" genes?

James W. MacDonald jmacdon at med.umich.edu
Fri Oct 14 20:04:33 CEST 2005


Yoder, Sean J. wrote:
> I'm trying to perform density plots on members on a MAS 5 expression set
> derived from 5 .cel files, but I'd like to plot "present", "absent', and
> "marginal" genes in distinct plots...all on the same graphics pane. 
> 
>  
> 
> I suppose I first need to combine my MAS data with my MAS calls, then
> for each array, create filtered matrices based on the PMA calls.  Then I
> could use plotDensity() to display them.  Can someone give me some
> pointers from here?  I can't seem to get cbind() to combine my data and
> my calls together to even get started and a search of the archives was
> fruitless.
> 
>  
> 
> dat <- ReadAffy()
> 
> eset.mas5 <- mas5(dat)
> 
> eset.mas5.calls <- mas5calls(dat)
> 
> # need to combine these

No, you don't need to combine anything.
> 
> # need to filter by P,M,A
> 
> # need to call plotDensity()

You won't be able to use plotDensity() because it expects a matrix, and 
it is doubtful that you will have equal numbers of genes for each 
sample. Better to just call plot(density()).

I am sure that this could be done in a much cleaner manner, but as a 
first attempt, this should work.

plot(density(exprs(eset.mas5)), type = "n") ## make a blank plot
for(i in 1:5){
     index <- exprs(eset.mas5.calls)[,i] == "P"
     lines(density(exprs(eset.mas5)[index,i]), lty=1, col=1)
     index <- exprs(eset.mas5.calls)[,i] == "M"
     lines(density(exprs(eset.mas5)[index,i]), lty=2, col=2)
     index <- exprs(eset.mas5.calls)[,i] == "A"
     lines(density(exprs(eset.mas5)[index,i]), lty=3, col=3)
}


You might have to add a ylim argument to the first plot() call to make 
sure the y-axis is the correct length.

Best,

Jim


> 
>  
> 
> Thank you,
> 
>  
> 
> Sean
> 
>  
> 
> Sean Yoder, M.S.
> 
> Research Associate
> 
> Microarray Core Facility
> 
> Moffitt Cancer Center & Research Institute
> 
> E-mail:  yodersj at moffitt.usf.edu
> 
> Fax:  813-979-7265
> 
> Phone:  813-745-1917
> 
>  
> 
>  
> 
> 
> 
> 
> -----------------------------------------
> ###########################################################################
> ##  This transmission may be confidential or protected from disclosure and
> is only for review and use by the intended recipient. Access by anyone else
> is unauthorized. Any unauthorized reader is hereby notified that any
> review, use, dissemination, disclosure or copying of this information, or
> any act or omission taken in reliance on it, is prohibited and may be
> unlawful. If you received this transmission in error, please notify the
> sender immediately.  Thank you.   #########################################
> ####################################
> 
> 	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor


-- 
James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623



More information about the Bioconductor mailing list