waldronlab/HGNChelper

specifying chromosome does not map aliases if gene is correct on another chromosome

Opened this issue · 7 comments

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))

Sure. I'll fix it.

@Aggarwal-Ayush just checking if this is still on your radar?

@lwaldron This issue was resolved in my last PR.

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.

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?

Hi @lwaldron All the checks were passed in my last PR. This issue can be closed now.