Description Usage Arguments Details Value Author(s) References See Also Examples
Generate a partitioning/tiling or set of sliding windows over the genome or a set of ranges.
1 2 3 | bedtools_makewindows(cmd = "--help")
R_bedtools_makewindows(b, g = NA_character_, w, s, n)
do_bedtools_makewindows(b, g = NA_character_, w, s, n)
|
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. |
b |
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 |
g |
A genome file, identifier or Seqinfo object that defines the order
and size of the sequences. Specifying this generates windows over
the genome. Exclusive with |
w |
Window size, exclusive with |
s |
Step size (generates sliding windows). |
n |
Number of windows, exclusive with |
As with all commands, there are three interfaces to the
makewindows
command:
bedtools_makewindows
Parses the bedtools command line and compiles it to the equivalent R code.
R_bedtools_makewindows
Accepts R arguments corresponding to the command line arguments and compiles the equivalent R code.
do_bedtools_makewindows
Evaluates the result of
R_bedtools_makewindows
. Recommended only for
demonstration and testing. It is best to integrate the compiled
code into an R script, after studying it.
We view the generation of a partitioning (or tiling) as a distinct use
case from the generation of sliding windows. The two use cases
correspond to the tile
and
slidingWindows
functions, respectively.
A language object containing the compiled R code, evaluating to a a GRangesList containing the windows for each range (or chromosome).
Michael Lawrence
http://bedtools.readthedocs.io/en/latest/content/tools/makewindows.html
tile-methods for generating windows.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
setwd(system.file("unitTests", "data", "makewindows", package="HelloRanges"))
## End(Not run)
## tiles of width 5000
bedtools_makewindows("-b input.bed -w 5000")
## sliding windows, 5kb wide, every 2kb
bedtools_makewindows("-b input.bed -w 5000 -s 2000")
## 3 tiles in each range
bedtools_makewindows("-b input.bed -n 3")
## 3 tiles for each chromosome of the genome
bedtools_makewindows("-g test.genome -n 3")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.