[BioC] converting data into logical matrix

Assa Yeroslaviz Assa.Yeroslaviz at uni-duesseldorf.de
Fri Nov 4 10:32:35 CET 2005


Hey,

I have a difficult question(for me at least).

I did the sam calculation and got the data i wanted. First i have a matrix with
double values (last.out)
>last.out<- sam(last.data, AE0625419.cl, B=20, gene.names=matrix_all_names[,2])

After i cut out the lines with 'NA'-values for the p-values
>       scores	        <- log(pmax(last.out at p.value))
>	valids		<- !is.na(scores)
>	scores		<- scores[valids]
>	data    	<- last.data[valids,]

I have a list of data (18 Columns x 19,302 rows)
I then added the p-values as a 19th column to the list
>      data[,19]	<- scores

Afterwards I've searched for the significant genes (delta =10)
>       sig		<- list.siggenes(last.out, 10)

subsequent I deduced the data matrix to the few genes which were significant.
>       data_end	<- last.data[sig,]

Now I come to my problem(s):

1. I would like to have my p-Values also in the last data matrix. Somehow I lose
these values while minimizing the matrix.
the data file is than again with only 18 columns.
>dim(data_end)
[1]  6 18

But if i add the scores afterwards then the list is too long, because i have
only 6 rows (and not 19,302).

Can you help me?

2. My second problem is a bit bigger.

I would like to convert my first data file (data) into a logical matrix, with
TRUE for the rows which are in the object sig( the significantly expressed
genes) The other rows should be FALSE
I nthis case it should look like a matrix with 19,302 rows, whereas 6 rows have
TRUE in all 18 columns and all the rest have FALSE ( I would be happy to do it
also with 0=FALSE and 1=TRUE, but I then have the same problem.)

It would be really nice if someone can help me with this two cases.


TVM,

Assa




--
Assa Yeroslaviz
Lötzenerstr. 15
51373 Leverkusen



More information about the Bioconductor mailing list