Remove NaN from a list or replace NaN with a value.
1
0
Entering edit mode
Last seen 3.2 years ago

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.

R meta-analysis • 2.9k views
0
Entering edit mode

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

0
Entering edit mode

Hi Lluís,

I'm sorry for the delay in replying,

the lists include matrix, table, and character.

0
Entering edit mode

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?

0
Entering edit mode

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.

0
Entering edit mode

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.

0
Entering edit mode

Hi Dr pickering,

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

0
Entering edit mode

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.

0
Entering edit mode

Hi Dr pickering,

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?

0
Entering edit mode

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)

# perform meta-analysis
es <- es_meta(anals, by_source = TRUE)
0
Entering edit mode

Dear Dr Pickering,

Thank you so much for your valuable guidance.

0
Entering edit mode
Tanya • 0
@2d6e3eda
Last seen 15 months ago

Hi. I am getting these warnings after setting contrast. Can someone explain?

analysis <- diff_expr(raw)

Listening on http://127.0.0.1:3838 sva failed - continuing without. GSE34781_Normal-Angina Patient (# p < 0.05): 1886

Listening on http://127.0.0.1:3838 GSE98583_Control-Disease (# p < 0.05): 0 Warning message: Zero sample variances detected, have been offset away from zero