Remove NaN from a list or replace NaN with a value.
1
0
Entering edit mode
@mortezahadizade-16792
Last seen 8 months ago
Iran

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 • 4.3k views
ADD COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

Hi Lluís,

I'm sorry for the delay in replying,

the lists include matrix, table, and character.

 

ADD REPLY
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?

ADD REPLY
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.

ADD REPLY
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.

ADD REPLY
0
Entering edit mode

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 REPLY
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.

ADD REPLY
0
Entering edit mode

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 REPLY
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) 
anals <- add_sources(anals, data_dir)

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

Dear Dr Pickering,

Thank you so much for your valuable guidance.

ADD REPLY
0
Entering edit mode
Tanya • 0
@2d6e3eda
Last seen 3.3 years 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

ADD COMMENT

Login before adding your answer.

Traffic: 525 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6