vmikk / metagMisc

Miscellaneous functions for metagenomic analysis.
MIT License
44 stars 11 forks source link

phyloseq_inext -- error in rbind #24

Open gabriellestedman opened 1 year ago

gabriellestedman commented 1 year ago

I believe dependencies in phyloseq_inext may be compromised. The function was working for me beautifully maybe a week ago, and now the example code associated with this function is no longer working.

R.Version() = 4.2.2 (2022-10-31) packageVersion("phyloseq") = ‘1.42.0’ packageVersion("metagMisc") = ‘0.5.0’

See the reproducible example below:

library(phyloseq) library(metagMisc) data("esophagus") phyloseq_inext(esophagus) Error in rbind(deparse.level, ...): numbers of columns of arguments do not match phyloseq_inext(esophagus, curve_type = "coverage") Error in rbind(deparse.level, ...): numbers of columns of arguments do not match phyloseq_inext(esophagus, justDF = T) Error in rbind(deparse.level, ...): numbers of columns of arguments do not match

vmikk commented 1 year ago

Hello Gabrielle!

Thank you for reporting this issue! This error is related to the iNEXT update, for which a new major version was recently released. I will try to fix the phyloseq_inext function in the nearest future.

For now, you may install the older version of iNEXT (v.2.0.20 from July 27, 2022) with:

remotes::install_github("JohnsonHsieh/iNEXT@94bd02e0b26ee65fc520985211aee1837bc146da")

If you do not want to replace the newer version of iNEXT, you may run the code in development mode. First, create an R-dev directory in your home folder. Then, run the following code:

## 1. Enable dev mode, install te older version of iNEXT
library(remotes)
library(devtools)
dev_mode(on = TRUE)
remotes::install_github("JohnsonHsieh/iNEXT@94bd02e0b26ee65fc520985211aee1837bc146da")

## 2. Run your code here 
library(phyloseq)
library(metagMisc)
library(ggplot2)
data("esophagus")
phyloseq_inext(esophagus)

## 3. Disable dev mode
dev_mode(on = FALSE)

With kind regards, Vladimir

vmikk commented 1 year ago

Probably related with issue #22

gdunshea commented 3 months ago

Glad to see this had been flagged. I am having the same issue