ramiromagno / hgnc

Download and import HGNC gene data into R
https://rmagno.eu/hgnc
Other
3 stars 2 forks source link

issue about “use_hgnc_file” #5

Closed Mike-Guo-2021 closed 11 months ago

Mike-Guo-2021 commented 11 months ago

library(hgnc) last_update() [1] "2023-10-30 03:31:41 UTC" use_hgnc_file(file = latest_archive_url()) Error in use_hgnc_file(file = latest_archive_url()) : could not find function "use_hgnc_file"

After the r package is loaded correctly, the function cannot be run

I'm using a macbook with m1 chip

ramiromagno commented 11 months ago

Hi @Mike-Guo-2021:

Could you run your code inside reprex::reprex() (see https://reprex.tidyverse.org/)?

The reason I'm asking this is because I can't reproduce your error.

Mike-Guo-2021 commented 11 months ago
library(hgnc)

# Date of HGNC last update
last_update()
#> [1] "2023-10-30 03:31:41 UTC"

# Set the HGNC archive file to use for the remainder of the R-session
use_hgnc_file(file = latest_archive_url())
#> Error in use_hgnc_file(file = latest_archive_url()): could not find function "use_hgnc_file"

Created on 2023-10-30 with reprex v2.0.2

ramiromagno commented 11 months ago

Could you try installing the development version, please:

remotes::install_github("ramiromagno/hgnc")
Mike-Guo-2021 commented 11 months ago
library(hgnc)
last_update()
#> [1] "2023-10-30 03:31:41 UTC"
use_hgnc_file(file = latest_archive_url())
#> using hgnc file: https://ftp.ebi.ac.uk/pub/databases/genenames/hgnc/tsv/hgnc_complete_set.txt

Created on 2023-10-31 with reprex v2.0.2

yes, it works. Thanks for your answer