differentialabundance icon indicating copy to clipboard operation
differentialabundance copied to clipboard

immunedeconv doesn't work with custom gene symbol column

Open grst opened this issue 2 months ago • 0 comments

Description of the bug

When I run the dev version of the pipeline with

    --immunedeconv_run true \
    --immunedeconv_method mcp_counter \
    --features_id_col gene_id \
    --features_name_col GENESMBL \

it fails with

Command error:
  The following objects are masked from ‘package:base’:
  
      intersect, setdiff, setequal, union
  
  Loading required package: EPIC
  Warning message:
  In normalizePath("~") : path[1]="/home/sturmgre": No such file or directory
  Rows: 58050 Columns: 95
  ── Column specification ────────────────────────────────────────────────────────
  Delimiter: "\t"
  chr  (1): gene_id
  dbl (94): TMG412_163, TMG412_348, TMG412_316, TMG412_317, TMG412_350, TMG412...
  
  ℹ Use `spec()` to retrieve the full column specification for this data.
  ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
  Error in `dplyr::select()`:
  ℹ In argument: `dplyr::all_of("GENESMBL")`.
  Caused by error in `dplyr::all_of()`:
  ! Can't subset elements that don't exist.
  ✖ Element `GENESMBL` doesn't exist.
  Backtrace:
       ▆
    1. ├─... %>% tibble::column_to_rownames("GENESMBL")
    2. ├─tibble::column_to_rownames(., "GENESMBL")
    3. │ ├─base::stopifnot(is.data.frame(.data))
    4. │ └─base::is.data.frame(.data)
    5. ├─dplyr::select(., dplyr::all_of("GENESMBL"), where(~!is.character(.)))
    6. ├─dplyr:::select.data.frame(., dplyr::all_of("GENESMBL"), where(~!is.character(.)))
    7. │ └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call)
    8. │   └─tidyselect:::eval_select_impl(...)
    9. │     ├─tidyselect:::with_subscript_errors(...)
   10. │     │ └─base::withCallingHandlers(...)
   11. │     └─tidyselect:::vars_select_eval(...)
   12. │       └─tidyselect:::walk_data_tree(expr, data_mask, context_mask)
   13. │         └─tidyselect:::eval_c(expr, data_mask, context_mask)
   14. │           └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init)
   15. │             └─tidyselect:::walk_data_tree(new, data_mask, context_mask)
   16. │               └─tidyselect:::eval_context(expr, context_mask, call = error_call)
   17. │                 ├─tidyselect:::with_chained_errors(...)
   18. │                 │ └─base::withCallingHandlers(...)
   19. │                 └─rlang::eval_tidy(as_quosure(expr, env), context_mask)
   20. ├─dplyr::all_of("GENESMBL")
   21. │ └─tidyselect:::as_indices_impl(x, vars = vars, strict = TRUE)
   22. │   └─tidyselect:::chr_as_locations(x, vars, call = call, arg = arg)
   23. │     └─vctrs::vec_as_location(...)
   24. └─vctrs (local) `<fn>`()
   25.   └─vctrs:::stop_subscript_oob(...)
   26.     └─vctrs:::stop_subscript(...)
   27.       └─rlang::abort(...)
  Execution halted

seemingly because the GENESMBL column is not available in the input dataframe.

Could you please look into this?

Command used and terminal output


Relevant files

No response

System information

No response

grst avatar Sep 25 '25 07:09 grst