Description Usage Arguments Details Value Author(s) References See Also Examples
Compare two sets of genomic regions using the Jaccard statistic, defined as the total width of the intersection, divided by the total width of the union.
1 2 3 4 5 | bedtools_jaccard(cmd = "--help")
R_bedtools_jaccard(a, b, f = 1e-09, F = 1e-09, r = FALSE, e = FALSE,
s = FALSE, S = FALSE, split = FALSE)
do_bedtools_jaccard(a, b, f = 1e-09, F = 1e-09, r = FALSE, e = FALSE,
s = FALSE, S = FALSE, split = 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. |
a |
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 |
Like |
f |
Minimum overlap required as a fraction of |
F |
Minimum overlap required as a fraction of |
r |
Require that the fraction of overlap be reciprocal for |
e |
Require that the minimum fraction be satisfied for |
s |
Require same strandedness. That is, find the jaccard feature in
|
S |
Require opposite strandedness. That is, find the jaccard feature in
|
split |
Treat split BAM (i.e., having an ‘N’ CIGAR operation) or BED12 entries as compound ranges with gaps, i.e., as GRangesList objects. |
As with all commands, there are three interfaces to the
jaccard
command:
bedtools_jaccard
Parses the bedtools command line and compiles it to the equivalent R code.
R_bedtools_jaccard
Accepts R arguments corresponding to the command line arguments and compiles the equivalent R code.
do_bedtools_jaccard
Evaluates the result of
R_bedtools_jaccard
. Recommended only for
demonstration and testing. It is best to integrate the compiled
code into an R script, after studying it.
This is mostly just intersect
and
union
, except when fractional overlap
restrictions are involved.
A language object containing the compiled R code, evaluating to a a DataFrame with four columns:
intersection |
total width of intersection |
union |
total width of union |
jaccard |
the jaccard statistic |
n_intersections |
the number of ranges representing the intersection |
Michael Lawrence
http://bedtools.readthedocs.io/en/latest/content/tools/jaccard.html
setops-methods for set operations including intersect and union.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
setwd(system.file("unitTests", "data", "jaccard", package="HelloRanges"))
## End(Not run)
## basic
bedtools_jaccard("-a a.bed -b a.bed")
## excluding the gaps in compound ranges
bedtools_jaccard("-a three_blocks_match.bed -b e.bed -split")
## strand and fractional overlap restriction
bedtools_jaccard("-a aMixedStrands.bed -b bMixedStrands.bed -s -f 0.8")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.