specifying chromosome does not map aliases if gene is correct on another chromosome
Opened this issue · 7 comments
lwaldron commented
Here is an example. @Aggarwal-Ayush would you see if you can fix this?
library(HGNChelper)
#> Please cite our software :)
#>
#> Sehyun Oh et al. HGNChelper: identification and correction of invalid gene symbols for human and mouse. F1000Research 2020, 9:1493. DOI: https://doi.org/10.12688/f1000research.28033.1
#>
#> Type `citation('HGNChelper')` for a BibTeX entry.
hgnc.table[hgnc.table$Symbol == "TKT" | hgnc.table$Approved.Symbol == "TKT", ]
#> Symbol Approved.Symbol chromosome
#> 1: TKT DDR2 1
#> 2: TKT TKT 3
checkGeneSymbols(c("TKT", "TKT"), chromosome = c(1, 3))
#> Maps last updated on: Mon Sep 28 18:31:21 2020
#> x Approved Suggested.Symbol Input.chromosome Correct.chromosome
#> 1 TKT TRUE TKT 1 1
#> 2 TKT TRUE TKT 3 3
The desired behavior for a unit test would be:
library(testthat)
library(HGNChelper)
res <- checkGeneSymbols(c("TKT", "TKT"), chromosome = c(1L, 3L))
expect_identical(res$Approved, c(FALSE, TRUE))
expect_identical(res$Suggested.Symbol, c("DDR2", "TKT"))
expect_identical(res$Input.chromosome, c(1L, 3L))
expect_identical(res$Correct.chromosome, c(1L, 3L))
Aggarwal-Ayush commented
Sure. I'll fix it.
lwaldron commented
@Aggarwal-Ayush just checking if this is still on your radar?
Aggarwal-Ayush commented
@lwaldron This issue was resolved in my last PR.
lwaldron commented
I mean the error it introduced in R CMD CHECK...
--
Levi Waldron
Associate Professor
Department of Epidemiology and Biostatistics
CUNY Graduate School of Public Health and Health Policy
Institute for Implementation Science in Population Health
55 W 125th St, New York NY 10035
https://waldronlab.io
Aggarwal-Ayush commented
Yes, that I'm looking into but so far I've not been able to find the cause of that error. I'll check again.
lwaldron commented
Hi @Aggarwal-Ayush I just did some other minor updates and am getting ready to update CRAN in advance of posting the response to reviewers. Any luck?
Aggarwal-Ayush commented
Hi @lwaldron All the checks were passed in my last PR. This issue can be closed now.