morinlab / GAMBLR

Set of standardized functions to operate with genomic data
https://morinlab.github.io/GAMBLR/
MIT License
3 stars 2 forks source link

`gene_to_region()` is not working #206

Closed Kdreval closed 1 year ago

Kdreval commented 1 year ago

I was trying to get the region for the gene but the gene_to_region() does not work as advertised. Even the code from examples returns the error:

r$> bcl2_region = gene_to_region(gene_symbol = "BCL2",
                                  genome_build = "grch37")
Error in `mutate()`:
ℹ In argument: `start = (function (x, y) ...`.
Caused by error:
! Can't convert `y` <character> to match type of `x` <double>.
Run `rlang::last_trace()` to see where the error occurred.

r$> bcl2_region = gene_to_region(ensembl_id = "ENSG00000171791",
                                  genome_build = "grch37")
Error in `mutate()`:
ℹ In argument: `start = (function (x, y) ...`.
Caused by error:
! Can't convert `y` <character> to match type of `x` <double>.
Run `rlang::last_trace()` to see where the error occurred.

Here is the error trace

r$> rlang::last_trace()
<error/dplyr:::mutate_error>
Error in `mutate()`:
ℹ In argument: `start = (function (x, y) ...`.
Caused by error:
! Can't convert `y` <character> to match type of `x` <double>.
---
Backtrace:
     ▆
  1. ├─GAMBLR::gene_to_region(ensembl_id = "ENSG00000171791", genome_build = "grch37")
  2. │ └─... %>% distinct(.keep_all = TRUE)
  3. ├─dplyr::distinct(., .keep_all = TRUE)
  4. ├─dplyr::mutate_all(., na_if, "")
  5. │ ├─dplyr::mutate(.tbl, !!!funs)
  6. │ └─dplyr:::mutate.data.frame(.tbl, !!!funs)
  7. │   └─dplyr:::mutate_cols(.data, dplyr_quosures(...), by)
  8. │     ├─base::withCallingHandlers(...)
  9. │     └─dplyr:::mutate_col(dots[[i]], data, mask, new_columns)
 10. │       └─mask$eval_all_mutate(quo)
 11. │         └─dplyr (local) eval()
 12. └─dplyr (local) `<fn>`(start, "")
rdmorin commented 1 year ago

I thought this was fixed by updating dplyr but I also thought @vladimirsouza had addressed this with a patch.

Kdreval commented 1 year ago

Probably I just don't have the updated master - will double check after pulling the latest version

Kdreval commented 1 year ago

Right, updating from master fixes this - sorry for the duplicated issue. Will close this one!