[BioC] boxplots on summarized data

toedling at ebi.ac.uk toedling at ebi.ac.uk
Tue Jan 22 22:29:54 CET 2008


Hi Dennis,

the "exprs" method returns a matrix and for a matrix there's no special
way defined to treat each column individually. Try
boxplot(data.frame(exprs(x)))
gives you the boxplots for all genes, one for each sample.
With matrices, the index in front of the comma specifies the rows, the one
afterwards the columns. Since in R matrices are really just vectors with
an additional dimensions specified, specifying only one index also works,
your second example exprs(x)[10:20] is equivalent to exprs(x)[10:20,1] if
your matrix has at least 20 rows. If the expression matrix, say, would
have only 10 rows, this index would return the last entry of the first
column and all entries of the second column, though.

Regards,
Joern

> I'm having a time generating boxplots across chips on summarized data for
> more than one gene at a time.  I want a set of boxplots for a subset of
> the
> genes, say the 10th to the 20th genes in the ExpressionSet.  I expect this
> is an R list question but since the data is an expression set decided to
> post it here instead.
>
> I've tried:
> boxplot(exprs(x)[10:20])
> boxplot(exprs(x)[10,:20,])
> boxplot(exprs(x)c(10,11,12,13,14,15,16,17,18,19,20))
> these all return a single boxplot with the expression values for all chips
> from all 11 genes in the same boxplot.
>
> boxplot(exprs(x)[10])  gives me a boxplot for one gene.
> exprs(x)[10:20] returns the data for the 11 genes in a table.
>
> R 2.6.0
> x86_64-unknown-linux-gnu
> Biobase_1.16.1  affy_1.16.0
>
> I thought I had some understanding of subsetting and the last line of code
> to get just the tabular data back validated that thought but now I'm
> mostly
> just confused.
>
> thanks,  DB
>
> Dennis Burian, Ph.D.
> Functional Genomics Group
> Civil Aerospace Medical Institute, AAM-610
> 6500 S. MacArthur Blvd.
> Oklahoma City OK  73169
> 405-954-6087
> dennis.burian at faa.gov
>
>



More information about the Bioconductor mailing list