zhouhj1994 / LinDA

35 stars 3 forks source link

if (any(corr.pval <= corr.cut)) { : missing value where TRUE/FALSE needed #19

Open SoniramDK opened 2 weeks ago

SoniramDK commented 2 weeks ago

Hello everybody,

I am new in ONT data analysis and I came across your work. I face an issue when trying to run LinDA in MicrobiomeStat using the ggpicrust2 pipeline.

message("Performing LinDA analysis...") LinDA_results <- MicrobiomeStat::linda(abundance, LinDA_metadata_df, formula = "~Group_groupnonsense", alpha = 0.05, )$output

That is the command I run, and the error I get is as follows:

0 features are filtered! The filtered data has 5 samples and 4149 features will be tested! Error in if (any(corr.pval <= corr.cut)) { : missing value where TRUE/FALSE needed In addition: Warning message: In MicrobiomeStat::linda(abundance, LinDA_metadata_df, formula = "~Group_groupnonsense", : Some features have less than 3 nonzero values! They have virtually no statistical power. You may consider filtering them in the analysis!

image

I searched and found that the error might have something to do with some NA values but I don't think I see any.

Any help would be much appreciated.

Thank's!

zhouhj1994 commented 2 weeks ago

The code if (any(corr.pval <= corr.cut)) is used in the chunk to test whether log(N) (where N is the sequencing depth) and the variables in the formula are correlated. I'm not sure why an error occurs here. I noticed that only five samples remain after filtering, which is risky. If you could provide some data, I could try running it to investigate why the error occurs. Thanks.