NA/NaN argument error

2,802 views
Skip to first unread message

BBANGA

unread,
Dec 6, 2017, 9:15:34 AM12/6/17
to MaAsLin-users
Hi, 
When I tried to run MaAslin in R, I get the following error:

Error in liItemElement[1]:liItemElement[2] : NA/NaN argument
In addition: Warning messages:
1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion

I attached my file and R script.

Thanks for your advice. 

Regards,
Hanga Park
DEP_MZ_maaslin.read.config
tt_maaslin_genus_input_DEP.zip
Rscript.txt

Himel Mallick

unread,
Dec 6, 2017, 1:35:20 PM12/6/17
to BBANGA, MaAsLin-users
Hi Hanga,

In general, you only need to specify the first taxa and last metadata in the config file (see attached). I just tried re-running your code using the updated config file, which worked fine on my end. Let me know if you encounter any further issues once you switch to the modified config file.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

--
You received this message because you are subscribed to the Google Groups "MaAsLin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DEP_MZ_maaslin.read.config

wem...@mail.harvard.edu

unread,
Feb 13, 2018, 7:28:02 PM2/13/18
to MaAsLin-users

Hi,

I have the same error as following when using a random effect model in MaAsLin. Attached please find my pcl file and config file. I really appreciate any thoughts.

Error in liItemElement[1]:liItemElement[2] : NA/NaN argument
In addition: Warning messages:
1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion

Thank you!
Wenjie Ma
To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-user...@googlegroups.com.
t_crp_allbugs_w12_rescale.pcl
allbugs.w12.read.config.txt

Himel Mallick

unread,
Feb 14, 2018, 11:08:34 AM2/14/18
to wem...@mail.harvard.edu, MaAsLin-users
Hi Wenjie,

I edited your pcl and config files (see attached) and re-ran using the following script in R which worked fine on my end. Let me know if that resolves your error.

Maaslin('t_crp_allbugs_w12_rescale.pcl', 'Maaslin_Output', 'allbugs.w12.read.config', strRandomCovariates = 'id')

Many thanks,
Himel


HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.
allbugs.w12.read.config
t_crp_allbugs_w12_rescale.pcl

Himel Mallick

unread,
Feb 14, 2018, 1:14:34 PM2/14/18
to Wenjie Ma, MaAsLin-users
Hi Wenjie,

The config file should be .config file rather a .txt file. You need to specify the random effects in the R code itself (e.g. strRandomCovariates = 'id' in your version of the code). The only change I made in the PCL file is optional. You can avoid it but for debugging purposes, I wanted to test the code with a well-known naming convention.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

On Wed, Feb 14, 2018 at 1:05 PM, Wenjie Ma <wem...@mail.harvard.edu> wrote:
Hi Himel,

Thank you very much for the quick feedback. Yes the modified pcl and config files worked! I am curious what the issue causing the previous error is.

For the pcl file, I see you replaced the "#" with "sample". Have you also changed anywhere else?

For the config file, you deleted the ".txt" suffix and "-R id". Isn't the "-R id" required for the random effect model?

Thanks again for your help.

Best,
Wenjie




On Wed, Feb 14, 2018 at 11:08 AM, Himel Mallick <hmal...@broadinstitute.org> wrote:
Hi Wenjie,

I edited your pcl and config files (see attached) and re-ran using the following script in R which worked fine on my end. Let me know if that resolves your error.

Maaslin('t_crp_allbugs_w12_rescale.pcl', 'Maaslin_Output', 'allbugs.w12.read.config', strRandomCovariates = 'id')

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142



--
Wenjie Ma, ScD
Research Fellow
Clinical and Translational Epidemiology Unit and Division of Gastroenterology
Massachusetts General Hospital and Harvard Medical School


valentin...@cri-paris.org

unread,
Mar 21, 2018, 6:10:09 AM3/21/18
to MaAsLin-users
Dear all, 

Thank you for this very interested topic about issues encountered when running Maaslin on R.

I am writing because I am encountering the same kind of issues when working at a Phylum level.

Error in if (0 < (resp <- attr(attr(frame, "terms"), "response"))) { : 
  argument is of length zero
In addition: Warning messages:
1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion

In addition, when working on the Species level, I am encountering this other issue:

Error in if (0 < (resp <- attr(attr(frame, "terms"), "response"))) { : 
  argument is of length zero
In addition: There were 23 warnings (use warnings() to see them)
> warnings()
Messages d'avis :
1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
3: In sqrt(s) : NaNs produced
4: In sqrt(s) : NaNs produced
5: In sqrt(s) : NaNs produced
6: In sqrt(s) : NaNs produced
7: In sqrt(s) : NaNs produced
8: In sqrt(s) : NaNs produced
9: In sqrt(s) : NaNs produced
10: In sqrt(s) : NaNs produced
11: In sqrt(s) : NaNs produced
12: In sqrt(s) : NaNs produced
13: In sqrt(s) : NaNs produced
14: In sqrt(s) : NaNs produced
15: In sqrt(s) : NaNs produced
16: In sqrt(s) : NaNs produced
17: In sqrt(s) : NaNs produced
18: In sqrt(s) : NaNs produced
19: In sqrt(s) : NaNs produced
20: In sqrt(s) : NaNs produced
21: In sqrt(s) : NaNs produced
22: In sqrt(s) : NaNs produced
23: In sqrt(s) : NaNs produced

I have checked and rechecked my PCL and config files (attached for both Species and Phylum levels), but I cannot seem to figure out where the error does come from.

I would be very grateful for any kind of help!



--
CoarsePhylum.pcl
CoarsePhylum_maaslin.read.config
CoarseSpecies6.pcl
CoarseSpecies6_maaslin.read.config

Himel Mallick

unread,
Mar 21, 2018, 10:49:46 AM3/21/18
to valentin...@cri-paris.org, MaAsLin-users
Hi Valentin,

Related to the issue above, did you try the latest version of MaAsLin (i.e. 0.0.5)? If not, could you follow the instructions in https://bitbucket.org/biobakery/maaslin/ to install the latest version of MaAsLin and try again? Please note that you need to install the following R packages before installing MaAsLin: fagricolae, gam (version 1.14), gamlss, gbm, glmnet, inlinedocs, logging, MASS, nlme (version 3.1-127), optparse, outliers, penalized, pscl, robustbase. Please let me know if you still have issues after installing the latest version.

Many thanks,
Himel


HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

Himel Mallick

unread,
Mar 21, 2018, 10:54:07 AM3/21/18
to valentin...@cri-paris.org, MaAsLin-users
There was a typo in the previous email. fagricolae should be agricolae.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

On Wed, Mar 21, 2018 at 10:49 AM, Himel Mallick <hmal...@broadinstitute.org> wrote:
Hi Valentin,

Related to the issue above, did you try the latest version of MaAsLin (i.e. 0.0.5)? If not, could you follow the instructions in https://bitbucket.org/biobakery/maaslin/ to install the latest version of MaAsLin and try again? Please note that you need to install the following R packages before installing MaAsLin: fagricolae, gam (version 1.14), gamlss, gbm, glmnet, inlinedocs, logging, MASS, nlme (version 3.1-127), optparse, outliers, penalized, pscl, robustbase. Please let me know if you still have issues after installing the latest version.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142

valentin...@cri-paris.org

unread,
Mar 22, 2018, 5:20:01 AM3/22/18
to MaAsLin-users
Hi again Himel,

Here also, everything work perfectly when working on the latest version!

Many thanks for helping out!

Valentin

On Wednesday, March 21, 2018 at 3:54:07 PM UTC+1, Himel Mallick wrote:
There was a typo in the previous email. fagricolae should be agricolae.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

On Wed, Mar 21, 2018 at 10:49 AM, Himel Mallick <hmal...@broadinstitute.org> wrote:
Hi Valentin,

Related to the issue above, did you try the latest version of MaAsLin (i.e. 0.0.5)? If not, could you follow the instructions in https://bitbucket.org/biobakery/maaslin/ to install the latest version of MaAsLin and try again? Please note that you need to install the following R packages before installing MaAsLin: fagricolae, gam (version 1.14), gamlss, gbm, glmnet, inlinedocs, logging, MASS, nlme (version 3.1-127), optparse, outliers, penalized, pscl, robustbase. Please let me know if you still have issues after installing the latest version.

Many thanks,
Himel


HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

Kyu Han Lee

unread,
May 1, 2018, 5:22:02 PM5/1/18
to MaAsLin-users
Hello all,

I'm running into the same issue as below (species level error) when attempting the Maaslin example data (i.e. example(Maaslin)). I get results but I'm not comfortable using them until I understand what the warnings mean. I've tried removing and reinstalling the prerequisite R packages to make sure they are installed before Maaslin (version 0.0.5). I've attached the R code I've used so far. Any thoughts?


Thanks,
Kyu
maaslin_trial.R

Himel Mallick

unread,
May 1, 2018, 10:14:51 PM5/1/18
to Kyu Han Lee, MaAsLin-users
Hi Kyu,

Thanks for your email. Before installing the latest version (0.0.5), did you also install the following R packages with appropriate versions, i.e. agricolae, gam (version 1.14), gamlss, gbm, glmnet, inlinedocs, logging, MASS, nlme (version 3.1-127), optparse, outliers, penalized, pscl, robustbase. If not, you can follow the following pseudo-code to do that before downloading and installing Maaslin:

# Install pacman (to install other packages in one line of code)

if(! require("pacman")) install.packages("pacman", repos='http://cran.us.r-project.org') 
suppressPackageStartupMessages(library("pacman"))
pacman::p_load('agricolae', 'gamlss', 'gbm', 'nlme', 'gam',
               'glmnet', 'inlinedocs', 'logging', 'devtools', 
               'MASS', 'optparse', 'outliers', 
               'penalized', 'pscl', 'robustbase')

# Install Older Version of gam
if (!packageVersion('gam')=='1.14') {
  remove.packages('gam')
  devtools::install_version("gam", version = "1.14", repos = "http://cran.us.r-project.org")
}

# Install Older Version of nlme
if (!packageVersion('nlme')=='3.1-127') {
  remove.packages('nlme')
  devtools::install_version("nlme", version = "3.1-127", repos = "http://cran.us.r-project.org")
}

Please let me know if you have any difficulty with the installation using the above procedure. 

Many thanks,
Himel



HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

Kyu Han Lee

unread,
May 2, 2018, 10:08:22 AM5/2/18
to MaAsLin-users
Hi Himel,

Thank you for the quick and helpful response! Unfortunately, this did not work for me. I even tried a fresh install of R and Rstudio. Do you mind sharing which R version and package versions you are using? I wonder if new updates are messing with MaAsLin.


Thanks,
Kyu

Himel Mallick

unread,
May 2, 2018, 10:11:39 AM5/2/18
to Kyu Han Lee, MaAsLin-users
Hi Kyu,

Would you be able to send me your error message so that I can take a look more closely?

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

Kyu Han Lee

unread,
May 2, 2018, 10:16:39 AM5/2/18
to MaAsLin-users
Here you go. Just a reminder, this is with example(Maaslin). I also get a warning when loading Maaslin (near end of reply). Thanks for your time!

Warning messages:
1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion
3: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
4: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
5: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
6: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
7: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
8: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
9: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
10: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
11: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
12: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
13: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
14: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
15: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
16: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
17: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
18: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
19: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
20: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
21: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
22: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
23: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
24: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
25: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
26: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
27: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
28: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
29: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
30: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
31: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
32: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
33: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
34: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
35: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
36: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
37: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
38: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
39: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
40: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
41: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
42: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
43: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
44: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
45: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
46: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used
47: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'
48: In is.na(funcAnalysis) :
  is.na() applied to non-(list or vector) of type 'closure'
49: In is.na(funcGetResult) :
  is.na() applied to non-(list or vector) of type 'closure'
50: In if (is.na(lsOne)) { ... :
  the condition has length > 1 and only the first element will be used


I also get a warning when loading Maaslin:

Warning messages:
1: replacing previous import ‘gam::random’ by ‘gamlss::random’ when loading ‘Maaslin’ 
2: replacing previous import ‘gam::lo’ by ‘gamlss::lo’ when loading ‘Maaslin’

Himel Mallick

unread,
May 2, 2018, 10:21:04 AM5/2/18
to Kyu Han Lee, MaAsLin-users
Hi Kyu,

Thanks for your email. Did you check the package versions of the all the required packages? In particular, would you be able to send the output of the following from your R/RStudio console: 

packageVersion('nlme') 
packageVersion('gam') 
packageVersion('Maaslin') 


Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

Kyu Han Lee

unread,
May 2, 2018, 10:23:53 AM5/2/18
to MaAsLin-users
Hi Himel,

Yes. Here's the output:

> packageVersion('nlme')
[1] ‘3.1.127’
> packageVersion('gam')
[1] ‘1.14’
> packageVersion('Maaslin')
[1] ‘0.0.5’


Thanks,
Kyu

Himel Mallick

unread,
May 2, 2018, 10:31:52 AM5/2/18
to Kyu Han Lee, MaAsLin-users
Hi Kyu,

Thanks for your prompt reply. Unfortunately, I was unable to reproduce this error. I am using the latest versions of R and RStudio, but that should not affect the results as long as the appropriate versions of the required package are installed, which seems to be the case in your case. I have forwarded your email to our senior software developers George and Lauren if they are able to assist you. But in the meantime, if you can, would you be able to remove all the packages from your R (you can do it manually or by using the remove.packages() function) and fresh install all the Maaslin-specific packages before installing Maaslin (just to rule out the effect of other interacting packages)? 

Many thanks,
Himel


HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

Kyu Han Lee

unread,
May 2, 2018, 3:57:09 PM5/2/18
to MaAsLin-users
Hi Himel,

Thank you for the quick responses. I tried what you asked and also tried installing MaAsLin on a different computer but I'm still running into the same error. I am attempting to get support from my institution to make sure it's not a dumb mistake on my side. 

Do you mind sharing what package versions you are using for the other R packages (agricolae, gamlss, etc)?

Himel Mallick

unread,
May 3, 2018, 7:18:43 PM5/3/18
to Kyu Han Lee, MaAsLin-users
Hi Kyu,

Please find the attached snapshot.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.
Installed_Packages.png

Kyu Han Lee

unread,
May 14, 2018, 10:59:06 AM5/14/18
to MaAsLin-users
Hi Himel,

I apologize for the delayed response. Thank you for providing me with your package versions. I still have not been able to figure out why the warnings are popping up. However, the results from the demo data are identical to the downloadable file in the MaAsLin tutorial. It seems the warnings are related to R being picky about how the data is formatted and, thankfully, do not impact results. Thank you again for your time! 


Thanks,
Kyu

Himel Mallick

unread,
May 14, 2018, 11:03:21 AM5/14/18
to Kyu Han Lee, MaAsLin-users
No problem, Kyu. You can certainly ignore the warnings and your results will be unaffected as long you have properly installed the appropriate versions of the required packages. Let me know if you have any other questions.

Many thanks,
Himel

HIMEL MALLICK | Postdoctoral Associate
Medical and Population Genetics | Broad Institute of MIT and Harvard
415 Main Street | Cambridge, MA 02142
Email: hmal...@broadinstitute.org
Website: https://www.hsph.harvard.edu/himel-mallick/

To unsubscribe from this group and stop receiving emails from it, send an email to maaslin-users+unsubscribe@googlegroups.com.

alina_...@brown.edu

unread,
Jul 28, 2018, 8:38:08 PM7/28/18
to MaAsLin-users
Hi everyone, 

I'm running into a very similar issue as Kyu Han Lee. When I ran Maaslin in R via a cluster, I was able to generate output, though I received the following errors. 

1: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion

2: In which(is.na(as.numeric(lItemElement))) : NAs introduced by coercion

3: In sqrt(s) : NaNs produced

4: In sqrt(s) : NaNs produced

5: In sqrt(s) : NaNs produced

6: In sqrt(s) : NaNs produced

7: In sqrt(s) : NaNs produced

8: In sqrt(s) : NaNs produced

9: In sqrt(s) : NaNs produced

10: In sqrt(s) : NaNs produced

11: In sqrt(s) : NaNs produced

12: In sqrt(s) : NaNs produced

13: In sqrt(s) : NaNs produced

14: In sqrt(s) : NaNs produced

15: In sqrt(s) : NaNs produced

16: In sqrt(s) : NaNs produced

17: In sqrt(s) : NaNs produced

18: In sqrt(s) : NaNs produced

19: In sqrt(s) : NaNs produced

20: In sqrt(s) : NaNs produced

21: In sqrt(s) : NaNs produced

22: In sqrt(s) : NaNs produced

23: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'

24: In is.na(funcAnalysis) :

  is.na() applied to non-(list or vector) of type 'closure'

25: In is.na(funcGetResult) :

  is.na() applied to non-(list or vector) of type 'closure'

26: In if (is.na(lsOne)) { ... :

  the condition has length > 1 and only the first element will be used

27: In is.na(funcReg) : is.na() applied to non-(list or vector) of type 'closure'

28: In is.na(funcAnalysis) :

  is.na() applied to non-(list or vector) of type 'closure'

29: In is.na(funcGetResult) :

  is.na() applied to non-(list or vector) of type 'closure'


I checked the versions of all of the packages listed above by Himel Mallick (I have attached a screenshot of these versions), and I am running on Maaslin version 0.0.5. Additionally, when I load library(Maaslin) in R, I receive the following error: 


Warning messages:

1: replacing previous import ‘gam::random’ by ‘gamlss::random’ when loading ‘Maaslin’ 

2: replacing previous import ‘gam::lo’ by ‘gamlss::lo’ when loading ‘Maaslin’ 


I have attached screenshots of all of the errors and warnings produced when I run Maaslin. Any advice on how I should proceed? Additionally, do these errors impact the results Maaslin produces?


Best Regards,

Alina Husain

Maaslin Error Screenshot.png
Package versions screenshot.png
Maaslin library warning.png

Kyu Han Lee

unread,
Jul 29, 2018, 11:08:12 AM7/29/18
to MaAsLin-users
Hi Alina,

I would first go through the discussion above and try following each of Himel's troubleshooting suggestions. It seems this has worked for some people. I couldn't get it to run without the warnings but found that the results from the example data set (included in the package - use "example()") produced the exact same results as those posted in the online tutorial and that the warnings are possibly due to some data formatting issue. Maybe try that if troubleshooting fails.


Thanks,
Kyu
Reply all
Reply to author
Forward
0 new messages