Question: remove NAs values from gset
gravatar for morteza.hadizade
10 weeks ago by
morteza.hadizade10 wrote:

Hi everyone

Sometimes in microarray analysis, “ex” matrix is contained any NA values, I remove NAs with “na.omit” command, after removing NAs from “ex” matrix, do I need to remove NAs from “gset”???

I would be very pleased if you could guide me.


gset <- getGEO(dataset, GSEMatrix =TRUE, AnnotGPL=TRUE, destdir = "C:/R Database /Data/")

if (length(gset) > 1) idx <- grep(platform, attr(gset, "names")) else idx <- 1

gset <- gset[[idx]]

ex <- exprs(gset)

> max(ex)

[1] NA

> dim(ex)

[1] 18999    24

> ex<- na.omit(ex)

> max(ex)

[1] 7.683

> dim(ex)

[1] 16764    24

> gset<- na.omit(gset)?????

ADD COMMENTlink modified 9 weeks ago by James W. MacDonald48k • written 10 weeks ago by morteza.hadizade10
gravatar for James W. MacDonald
9 weeks ago by
United States
James W. MacDonald48k wrote:

I don't believe there is a na.omit function that will dispatch correctly on an ExpressionSet, so you will need to do things slightly differently. But do note that an ExpressionSet is intended to act just like a matrix, so subsetting with the [ operator works just like you would think.

naind <- apply(exprs(gset), 1, function(x) any(

gset <- gset[!naind,]
ADD COMMENTlink written 9 weeks ago by James W. MacDonald48k

Or probably faster

naind <-

gset <- gset[!naind,]
ADD REPLYlink written 9 weeks ago by James W. MacDonald48k

Thank you so much for your valuable guidance, your answer was reasonable and accurate.

ADD REPLYlink written 9 weeks ago by morteza.hadizade10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.2.0
Traffic: 352 users visited in the last hour