Closed raysinensis closed 6 years ago
start output did not respect chrom size similar to issue with bed_shift
library(valr) tiny.genome <- tibble::tribble( ~chrom, ~size, "chr1", 1000 ) b <- tibble::tribble( ~chrom, ~start, ~end, ~name, ~score, ~strand, "chr1", 950, 970, "a1", 5, "-" ) res <- bed_slop(b, tiny.genome, left = 60, right = -60, strand = TRUE, trim = TRUE) res #> # A tibble: 1 x 6 #> chrom start end name score strand #> <chr> <dbl> <dbl> <chr> <dbl> <chr> #> 1 chr1 1010 1000 a1 5 -
Created on 2018-01-19 by the reprex package (v0.1.1.9000).
Expected output based on bedtools test
res <- tibble::tribble( ~chrom, ~start, ~end, ~name, ~score, ~strand, "chr1", 999, 1000, "a1", 5, "-" )
start output did not respect chrom size similar to issue with bed_shift
Created on 2018-01-19 by the reprex package (v0.1.1.9000).