View source: R/genomics_files_utils.R
slop_bed | R Documentation |
If strand_aware
then for the negative strands start position is slopped by
the negative downstream
value and
the end position is slopped by adding the upstream value.
slop_bed(bed, upstream = 10, downstream = 5, strand_aware = T)
bed |
a tibble imported with |
upstream |
How many nucleotides to add upstream to the start coordinate |
downstream |
How many nucleotides to add upstream to the end coordinate |
strand_aware |
Logical, whether or not to slop in a strand aware fashion. |
strand can only be specified with +
or -
,
A tibble
read_bed(path = test_coord, header = F)
# A tibble: 3 × 6
# chr start end name score strand
# <chr> <dbl> <dbl> <chr> <dbl> <chr>
# chr10 100 200 test1 0 +
# chr14 500 550 test2 0 -
# chr1 150 190 test3 0 -
read_bed(path = exons_coord, header = F) |> slop_bed(upstream = 10, downstream = 5, strand_aware = T)
# A tibble: 3 × 6
# chr start end name score strand
# <chr> <dbl> <dbl> <chr> <dbl> <chr>
# chr10 90 205 test1 0 +
# chr14 495 560 test2 0 -
# chr1 145 200 test3 0 -
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.