Search
Question: Remove NaN from a list or replace NaN with a value.
0
gravatar for morteza.hadizade
24 days ago by
morteza.hadizade10 wrote:

Hi every one
During microarray meta-analysis, I encounter below error, (“anals” class is a list).

> es_res <- es_meta(anals, by_source = TRUE)
Error in quantile.default(x, probs = c(0.25, 0.75)) : 
missing values and NaN's not allowed if 'na.rm' is FALSE 

please guide me, which one is more logical, remove NaN or replace with a value?
How to remove or replace NaN with a value?
I would be very pleased if you could guide me.

ADD COMMENTlink modified 23 days ago • written 24 days ago by morteza.hadizade10

What is inside each element of the anals list? A number a complex object or other things...

ADD REPLYlink written 24 days ago by Lluís Revilla Sancho430

Hi Lluís,

I'm sorry for the delay in replying,

the lists include matrix, table, and character.

 

ADD REPLYlink written 23 days ago by morteza.hadizade10

And are you sure you can use es_meta on that list? From which package is this function? Have you checked if in any of these objects there are some NA values?

ADD REPLYlink written 23 days ago by Lluís Revilla Sancho430

Name of the package is “crossmeta”. As shown in the error, “anals” contains missing value (Na), I remove NA with anals<- na.omit(anals), but I encountered an error in removing NaNs.

ADD REPLYlink written 22 days ago by morteza.hadizade10

The error is occuring inside fdrtool::fdrtool but I don't know why. If you can share a reproducible example I'll track it down.

ADD REPLYlink modified 22 days ago • written 22 days ago by alexvpickering90

Hi Dr pickering,

Thanks for your attention,

library(crossmeta)

library(shiny)

gse_names  <- c("GSE87105", "GSE87108")

get_raw(gse_names)

esets <- load_raw(gse_names)

# I select young samples as control and old samples as case, In both GSE number.

anals <- diff_expr(esets)

es_res <- es_meta(anals, by_source = TRUE)

Error in quantile.default(x, probs = c(0.25, 0.75)) : 
missing values and NaN's not allowed if 'na.rm' is FALSE

ADD REPLYlink modified 22 days ago • written 22 days ago by morteza.hadizade10

Hi Morteza,

I wasn't able to reproduce the error so I'm guessing it is a bug that has been fixed. Please download the latest version from github and try again. You should be able to do this with devtools::install_github('alexvpickering/crossmeta') or remotes::install_github('alexvpickering/crossmeta'). Let me know if that doesn't work.

ADD REPLYlink written 22 days ago by alexvpickering90

Hi Dr pickering,

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

After downloading the latest version of github, the previous error has been resolved.

But I had to change TRUE to FALSE (in below command) to analyze done.

es_res <- es_meta(anals, by_source = FALSE)

while source = TRUE, The following message was given.

es_res <- es_meta(anals, by_source = TRUE)

Sources missing from diff_exprs (to add, use add_sources).

Continuing with by_source = FALSE.

However, the result of the analysis is valid?

ADD REPLYlink modified 21 days ago • written 21 days ago by morteza.hadizade10

Hi Morteza,

Yes, the analysis is still valid. The difference is that all contrasts are used to perform a single meta-analysis. If sources are added, then separate meta-analyses are performed for contrasts belonging to each source as well as for all contrasts. This would be useful if you want to do a separate meta-analyses for contrasts from e.g. liver and brain. To specify sources in a GUI, run:

# add tissue sources to perform seperate meta-analyses for each source (optional) 
anals <- add_sources(anals, data_dir)

# perform meta-analysis
es <- es_meta(anals, by_source = TRUE)
ADD REPLYlink modified 20 days ago • written 20 days ago by alexvpickering90

Dear Dr Pickering,

Thank you so much for your valuable guidance.

ADD REPLYlink written 19 days ago by morteza.hadizade10
Please log in to add an answer.

Help
Access

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