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

fix extra interval reporting in bed_closest() #348

Merged
merged 1 commit into from Mar 22, 2019

Conversation

Projects
None yet
2 participants
@kriemo
Copy link
Member

kriemo commented Mar 22, 2019

On current master

library(valr)

x <- tibble::tribble(
  ~ chrom, ~ start, ~ end,
  "chr1", 10, 20
)

y <- tibble::tribble(
  ~ chrom, ~ start, ~ end,
  "chr1", 8, 9,
  "chr1", 9, 10,
  "chr1", 20, 21,
  "chr1", 21, 22
)
res <- bed_closest(x, y)

res
#> # A tibble: 4 x 7
#>   chrom start.x end.x start.y end.y .overlap .dist
#>   <chr>   <dbl> <dbl>   <dbl> <dbl>    <int> <int>
#> 1 chr1       10    20       9    10        0    -1
#> 2 chr1       10    20      20    21        0     1
#> 3 chr1       10    20       8     9        0    -2
#> 4 chr1       10    20      21    22        0     2

Created on 2019-03-22 by the reprex package (v0.2.1)

With PR:

library(valr)

x <- tibble::tribble(
  ~ chrom, ~ start, ~ end,
  "chr1", 10, 20
)

y <- tibble::tribble(
  ~ chrom, ~ start, ~ end,
  "chr1", 8, 9,
  "chr1", 9, 10,
  "chr1", 20, 21,
  "chr1", 21, 22
)
res <- bed_closest(x, y)

res
#> # A tibble: 2 x 7
#>   chrom start.x end.x start.y end.y .overlap .dist
#>   <chr>   <dbl> <dbl>   <dbl> <dbl>    <int> <int>
#> 1 chr1       10    20       9    10        0    -1
#> 2 chr1       10    20      20    21        0     1

Created on 2019-03-22 by the reprex package (v0.2.1)

@jayhesselberth jayhesselberth merged commit b0ae94b into master Mar 22, 2019

2 of 3 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.