bedtools_slop | R Documentation |
Widen ranges on the left and/or right side.
bedtools_slop(cmd = "--help")
R_bedtools_slop(i, b = 0, l = 0, r = 0, s = FALSE, pct = FALSE,
g = NULL, header = FALSE)
do_bedtools_slop(i, b = 0, l = 0, r = 0, s = FALSE, pct = FALSE,
g = NULL, header = FALSE)
cmd |
String of bedtools command line arguments, as they would be entered at the shell. There are a few incompatibilities between the docopt parser and the bedtools style. See argument parsing. |
i |
Path to a BAM/BED/GFF/VCF/etc file, a BED stream, a file object, or
a ranged data structure, such as a GRanges. Use |
b |
Widen the same number base pairs in each direction. |
l |
The number of base pairs to subtract from the start coordinate. |
r |
The number of base pairs to add to the end coordinate. |
s |
Define |
pct |
Define |
g |
Genome file, identifier or Seqinfo object that defines the order and size of the sequences. |
header |
Ignored. |
As with all commands, there are three interfaces to the
slop
command:
bedtools_slop
Parses the bedtools command line and compiles it to the equivalent R code.
R_bedtools_slop
Accepts R arguments corresponding to the command line arguments and compiles the equivalent R code.
do_bedtools_slop
Evaluates the result of
R_bedtools_slop
. Recommended only for
demonstration and testing. It is best to integrate the compiled
code into an R script, after studying it.
This is a fairly straight-forward application of
resize
and the +
operator on
GRanges.
A language object containing the compiled R code, evaluating to a GRanges, or similar, object. In principle, this is an endomorphism.
Michael Lawrence
http://bedtools.readthedocs.io/en/latest/content/tools/slop.html
intra-range-methods for resize
.
## Not run:
setwd(system.file("unitTests", "data", "slop", package="HelloRanges"))
## End(Not run)
## widen on both ends
bedtools_slop("-i a.bed -b 5 -g tiny.genome")
## widen only on the left end
bedtools_slop("-i a.bed -l 5 -r 0 -g tiny.genome")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.