You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the function "bed_intersect", any factor column in the input is converted automatically to an integer column. The same column as a character type, it does not change.
Example:
library(valr)
library(dplyr)
#> #> Attaching package: 'dplyr'#> The following objects are masked from 'package:stats':#> #> filter, lag#> The following objects are masked from 'package:base':#> #> intersect, setdiff, setequal, union
tibble(chrom='1', start=1, end=10, pathogenic=factor(c('Yes'))) %>%
bed_intersect(tibble(chrom='1', start=1, end=5))
#> # A tibble: 1 x 8#> chrom start.x end.x pathogenic.x start.y end.y .source .overlap#> <chr> <dbl> <dbl> <int> <dbl> <dbl> <chr> <int>#> 1 1 1 10 1 1 5 1 4
tibble(chrom='1', start=1, end=10, pathogenic= c('Yes')) %>%
bed_intersect(tibble(chrom='1', start=1, end=5))
#> # A tibble: 1 x 8#> chrom start.x end.x pathogenic.x start.y end.y .source .overlap#> <chr> <dbl> <dbl> <chr> <dbl> <dbl> <chr> <int>#> 1 1 1 10 Yes 1 5 1 4
Yes, this is a bug, thanks for bringing this issue to our attention. I see how to fix this but will need to do some testing prior to pushing as it affects some c++ internals.
When I use the function "bed_intersect", any factor column in the input is converted automatically to an integer column. The same column as a character type, it does not change.
Example:
Created on 2020-04-23 by the reprex package (v0.3.0)
The text was updated successfully, but these errors were encountered: