yiluheihei / microbiomeMarker

R package for microbiome biomarker discovery
https://yiluheihei.github.io/microbiomeMarker
GNU General Public License v3.0
169 stars 40 forks source link

error with run_lefse with 1 group and one subgroup: Error in `purrr::map2_lgl()`: i In index: 1 #107

Open nadiaandreani opened 9 months ago

nadiaandreani commented 9 months ago

Hi, I am using MicrobiomeMarker to run lefse on my dataset. Briefly I am looking at fecal microbiome in patients and controls from 3 locations.

The command works if I use 2 independent analyses (one for condition, one for location), but when using "group" and "subgroup" I get an error. Here my code and following issue:

lefse_locANDcondition <- normalize(df, method = "CPM") %>%

  • run_lefse(
  • wilcoxon_cutoff = 0.01,
  • norm = "none", # must be "none" since the input has been normalized
  • group ="group",
  • subgroup = "location",
  • kw_cutoff = 0.01,
  • multigrp_strat = TRUE,
  • lda_cutoff = 4,
  • taxa_rank = "Species"
  • ) Error in purrr::map2_lgl(): i In index: 1. i With name: Blautia_producta. Caused by error in if ((sx < sy) != dir_cmp || sx == sy) ...: ! missing value where TRUE/FALSE needed Run rlang::last_error() to see where the error occurred. rlang::last_error() <error/purrr_error_indexed> Error in purrr::map2_lgl(): i In index: 1. i With name: Blautia_producta. Caused by error in if ((sx < sy) != dir_cmp || sx == sy) ...: ! missing value where TRUE/FALSE needed

    Backtrace:

    1. normalize(df, method = "CPM") %>% ...
    2. microbiomeMarker::run_lefse(...)
    3. purrr::map2_lgl(...)
    4. purrr:::map2_("logical", .x, .y, .f, ..., .progress = .progress)
    5. microbiomeMarker (local) .f(.x[[i]], .y[[i]], ...)
    6. microbiomeMarker:::test_rep_wilcoxon(...) Run rlang::last_trace() to see the full context.

Can you help me troubleshooting?

Thanks in advance,

Nadia