Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mapIds(..., multiVal="asNA") returns logical() instead of character() when all ids map multiply #100

Open
mtmorgan opened this issue Aug 16, 2019 · 6 comments

Comments

@mtmorgan
Copy link
Contributor

> class(mapIds(EnsDb.Hsapiens.v86, "BCL2", "TXID", "GENENAME", multiVals="asNA"))
[1] "logical"
@jorainer
Copy link
Owner

Thanks @mtmorgan ! I will have a look into it.

@jorainer
Copy link
Owner

Fixed in ensembldb 2.9.3

@Kayla-Morrell
Copy link

> class(mapIds(EnsDb.Hsapiens.v86, "BCL2", "TXID", "GENENAME", multiVals="filter"))
[1] "NULL"

Filter has a similar problem. I'd expect a character vector of length 0.

@jorainer
Copy link
Owner

Thanks for reporting @Kayla-Morrell ! It's fixed in version 2.9.4

@Kayla-Morrell
Copy link

if (length(vals)) vals else character()

It seems like character(0) should be named so that things such as tibble::enframe() will work properly ('name' column is type character not integer).

> tibble::enframe(character(0))
# A tibble: 0 x 2
# … with 2 variables: name <int>, value <chr>
> tibble::enframe(setNames(nm = character(0)))
# A tibble: 0 x 2
# … with 2 variables: name <chr>, value <chr>
>

@jorainer
Copy link
Owner

I made the changes - hope it works now. Thanks for reporting @Kayla-Morrell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants