Description Usage Arguments Details Value Author(s) References See Also Examples
Summarize the ranges according to disjoin
and annotate each disjoint range with the samples that overlap the
range.
1 2 3 4 5 | bedtools_multiinter(cmd = "--help")
R_bedtools_multiinter(i, header=FALSE, names=NULL, g=NA_character_,
empty=FALSE)
do_bedtools_multiinter(i, header=FALSE, names=NULL, g=NA_character_,
empty=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 |
Paths to BAM/BED/GFF/VCF/etc files (vector or comma-separated), or a list of objects. |
header |
Ignored. |
names |
Provide an alias for each to use for each |
g |
A genome file, identifier or Seqinfo object that defines the order and size of the sequences. |
empty |
Report empty regions (i.e., regions not covered in any of the
files). This essentially yields a partitioning of the genome (and
thus requires |
As with all commands, there are three interfaces to the
multiinter
command:
bedtools_multiinter
Parses the bedtools command line and compiles it to the equivalent R code.
R_bedtools_multiinter
Accepts R arguments corresponding to the command line arguments and compiles the equivalent R code.
do_bedtools_multiinter
Evaluates the result of
R_bedtools_multiinter
. Recommended only for
demonstration and testing. It is best to integrate the compiled
code into an R script, after studying it.
The workhorse is
disjoin
. Passing with.revmap=TRUE
to disjoin
causes it to return a list of integers, which we use
to extract the sample identifiers. The empty
case requires a
bit more code, because we have to combine the disjoint ranges with the
gaps.
A language object containing the compiled R code, evaluating to a GRanges with a column āiā indicating the sample memberships.
Michael Lawrence
http://bedtools.readthedocs.io/en/latest/content/tools/multiinter.html
disjoin for forming disjoint ranges.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
setwd(system.file("unitTests", "data", "multiinter", package="HelloRanges"))
## End(Not run)
## default behavior
bedtools_multiinter("-i a.bed,b.bed,c.bed")
## custom names
bedtools_multiinter("-i a.bed,b.bed,c.bed -names A,B,C")
## include empty regions, i.e., partition the genome
bedtools_multiinter("-i a.bed,b.bed,c.bed -names A,B,C -empty -g test.genome")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.