Open
Description
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))
Metadata
Metadata
Assignees
Labels
No labels