[BioC] Labels in exprs to plot

Rafael A. Irizarry ririzarr at jhsph.edu
Thu Aug 19 18:08:56 CEST 2004


i just saw this thread and wanted to point out that 
in the devel version of affy the full paths wont be kept as
sampleNames as default.

-r



On Sun, 15 Aug 2004 mcolosim at brandeis.edu wrote:

> I think this would be great.
> 
> Thanks for the function and help.
> 
> Marc
> 
> Quoting Adaikalavan Ramasamy <ramasamy at cancer.org.uk>:
> 
> > I would like to contribute this little function if anyone is interested.
> > 
> > exprSet.sampleNames.cleanup <- function(object){
> >    stopifnot( is(object, "exprSet") )
> > 
> >    cn <- sampleNames(object)
> >    cn <- sapply( strsplit(cn, split="\/"), function(x) x[ length(x) ] )
> >    cn <- sub( ".cel$|.CEL$", "", cn)
> >    sampleNames(object) <- cn
> >    return(object)
> > }
> > 
> > 
> > On a particular dataset I have, I have the following :
> > 
> > > sampleNames(obj)  # before cleanup
> > 
> >  [1] "/home/adai/tmp/0029_1209_H95Av2_KF0077.cel"
> >  [2] "/home/adai/tmp/0029_1210_H95A2_KF0079.cel"
> >  [3] "/home/adai/tmp/0029_1213_H95A2_KF0110.cel"
> >  [4] "/home/adai/tmp/0029_1221_H95A2_KF0144.cel"
> >  [5] "/home/adai/tmp/0029_1222_H95A2_KF0146.cel"
> >  [6] "/home/adai/tmp/0029_1224_HU95A_KF0150.cel"
> >  [7] "/home/adai/tmp/0029_1225_H95A2_KF0157.CEL"
> >  [8] "/home/adai/tmp/0029_1237_H95A2_KF0125.CEL"
> >  [9] "/home/adai/tmp/0029_1238_H95A2_KF0128.CEL"
> > [10] "/home/adai/tmp/0029_1239_H95A2_KF0131.CEL"
> > [11] "/home/adai/tmp/0029_1240_H95A2_KF0133.CEL"
> > [12] "/home/adai/tmp/0029_1377_H95A2_KF-104.CEL"
> > 
> > obj <- exprSet.sampleNames.cleanup(obj)
> > > sampleNames(obj)  # after cleanup
> > 
> >  [1] "0029_1209_H95Av2_KF0077" "0029_1210_H95A2_KF0079"
> >  [3] "0029_1213_H95A2_KF0110"  "0029_1221_H95A2_KF0144"
> >  [5] "0029_1222_H95A2_KF0146"  "0029_1224_HU95A_KF0150"
> >  [7] "0029_1225_H95A2_KF0157"  "0029_1237_H95A2_KF0125"
> >  [9] "0029_1238_H95A2_KF0128"  "0029_1239_H95A2_KF0131"
> > [11] "0029_1240_H95A2_KF0133"  "0029_1377_H95A2_KF-104"
> > 
> > 
> > 
> > On Sat, 2004-08-14 at 22:11, James MacDonald wrote:
> > > The easiest way I know to do this is to use list.celfiles() when you
> > > read in your AffyBatch.
> > > 
> > > abatch <- read.affybatch(filenames=list.celfiles())
> > > 
> > > If you simply use ReadAffy(), you will get the entire path and will have
> > > to use sub() to truncate later.
> > > 
> > > HTH,
> > > 
> > > Jim
> > > 
> > > 
> > > 
> > > 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
> > > >>> <mcolosim at brandeis.edu> 08/14/04 10:11 AM >>>
> > > Hi,
> > > 
> > > I'm having the hardest time trying to get the correct labels from my
> > > exprs to
> > > plot correctly. I'm using the affy to read in cels and process them.
> > > However,
> > > the lables I get are the "fullpath" to the files and not the ones in
> > > pData.
> > > 
> > > Is there a way to get the correct labels minus the .CEL from pData to be
> > > used
> > > as labels for plot (even exprs2excel is now printing out the full paths,
> > > which it didn't do before).
> > > 
> > > Basically I clustered my arrays and want to view it, but with the full
> > > path as
> > > labels it is tiny.
> > > 
> > > hcRMA <- hclust(....)
> > > plot(hcRMA, labels = ?, main = "Hierarchical clustering dendrogram"
> > > 
> > > Thanks
> > > Marc
> > > 
> > > _______________________________________________
> > > Bioconductor mailing list
> > > Bioconductor at stat.math.ethz.ch
> > > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > > 
> > > _______________________________________________
> > > Bioconductor mailing list
> > > Bioconductor at stat.math.ethz.ch
> > > https://stat.ethz.ch/mailman/listinfo/bioconductor
> > > 
> > 
> >
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/bioconductor
>



More information about the Bioconductor mailing list