Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in generate_homologs() / recode_character2() #170

Open
kimberle9 opened this issue Aug 15, 2024 · 4 comments
Open

Error in generate_homologs() / recode_character2() #170

kimberle9 opened this issue Aug 15, 2024 · 4 comments

Comments

@kimberle9
Copy link

Hello,

I'm having an error with the generate_homologs() function, stemming from recode_character2(). Any idea how to fix it? I tried changing parameters in generate_homologs, like setting the max_homologs to 1, adding a symbols_dict.... but always got the same error.

Otherwise, how can I run liana_wrap with a mouse dataset?

Many thanks in advance!

op_resource <- select_resource("Consensus")[[1]]
ortholog_resource <- generate_homologs(op_resource = op_resource,
                                       target_organism = 10090, 
                                       .missing_fun = "str_to_title")
[2024-08-15 23:15:34] [SUCCESS] [OmnipathR] NCBI HomoloGene (rescued.omnipathdb.org): loaded 275237 records from cache
One-to-many homolog matches: 
Error in `mutate()`:
ℹ In argument: `across(all_of(columns), ~recode.character2(.x, .missing_fun = .missing_fun))`.
Caused by error in `across()`:
! Can't compute column `source_genesymbol`.
Caused by error in `recode.character2()`:
! No replacements provided.
Run `rlang::last_trace()` to see where the error occurred.

> rlang::last_trace()

<error/dplyr:::mutate_error>
Error in `mutate()`:
ℹ In argument: `across(all_of(columns), ~recode.character2(.x, .missing_fun = .missing_fun))`.
Caused by error in `across()`:
! Can't compute column `source_genesymbol`.
---
Backtrace:
     ▆
  1. ├─liana::generate_homologs(...)
  2. │ └─op_notmany %>% left_join(op_resource, by = columns) %>% ...
  3. ├─liana:::.handle_complexes(...)
  4. │ └─op_resource_decomplex %>% ...
  5. ├─dplyr::mutate(...)
  6. ├─dplyr:::mutate.data.frame(...)
  7. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  8. │   ├─base::withCallingHandlers(...)
  9. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
 10. │     ├─base::withCallingHandlers(...)
 11. │     └─mask$eval_all_mutate(quo)
 12. │       └─dplyr (local) eval()
 13. ├─liana:::recode.character2(source_genesymbol, .missing_fun = .missing_fun)
 14. │ └─dplyr:::find_template(values, .default, .missing)
 15. │   └─rlang::abort("No replacements provided.", call = error_call)
 16. │     └─rlang:::signal_abort(cnd, .file)
 17. │       └─base::signalCondition(cnd)
 18. └─dplyr (local) `<fn>`(`<rlng_rrr>`)
Caused by error in `recode.character2()`:
! No replacements provided.
---
Backtrace:
     ▆
  1. ├─liana::generate_homologs(...)
  2. │ └─op_notmany %>% left_join(op_resource, by = columns) %>% ...
  3. ├─liana:::.handle_complexes(...)
  4. │ └─op_resource_decomplex %>% ...
  5. ├─dplyr::mutate(...)
  6. ├─dplyr:::mutate.data.frame(...)
  7. │ └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  8. │   ├─base::withCallingHandlers(...)
  9. │   └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
 10. │     ├─base::withCallingHandlers(...)
 11. │     └─mask$eval_all_mutate(quo)
 12. │       └─dplyr (local) eval()
 13. └─liana:::recode.character2(source_genesymbol, .missing_fun = .missing_fun)
Run rlang::last_trace(drop = FALSE) to see 5 hidden frames.
@wgao688
Copy link

wgao688 commented Aug 28, 2024

I am also running into the same issue, running the code from this tutorial: https://saezlab.github.io/liana/articles/liana_ortho.html

@deeenes
Copy link
Member

deeenes commented Aug 29, 2024

Try install from this PR #174

remotes::install_github('saezlab/liana#174')

@wgao688
Copy link

wgao688 commented Aug 29, 2024

Thanks, this works

@trudy89
Copy link

trudy89 commented Nov 19, 2024

it does work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants