jaccard {bedr} | R Documentation |

## calculate the jaccard distance between sets of intervals

### Description

calculate the jaccard distance between sets of intervals

### Usage

```
jaccard(
x,
y,
proportion.overlap = 1e-09,
reciprocal.overlap = FALSE,
check.zero.based = TRUE,
check.chr = TRUE,
check.valid = TRUE,
check.sort = TRUE,
check.merge = TRUE,
verbose = TRUE
)
```

### Arguments

`x` |
first region to be compared |

`y` |
second region to be compared |

`proportion.overlap` |
Defaults 1e-9 which is 1 bp. See details below for the different interpretation between 0 and 1 based overlap |

`reciprocal.overlap` |
Should the proportion.overlap be reciprocal |

`check.zero.based` |
should 0 based coordinates be checked |

`check.chr` |
should chr prefix be checked |

`check.valid` |
should the region be checkded for integerity |

`check.sort` |
should regions be checked for sort order |

`check.merge` |
should overlapping regions be checked |

`verbose` |
should log messages and checking take place |

### Details

The Jaccard metric is the ratio of intersections to unions. The process can be tweaked by changing the proportion of overlap and even growiwng the regions.

### Value

A short vector.

### Author(s)

Daryl Waggott

### References

http://bedtools.readthedocs.org/en/latest/content/tools/jaccard.html

### See Also

reldist

### Examples

```
if (check.binary("bedtools")) {
index <- get.example.regions();
a <- index[[1]];
b <- index[[2]];
a <- bedr(engine = "bedtools", input = list(i = a), method = "sort", params = "");
b <- bedr(engine = "bedtools", input = list(i = b), method = "sort", params = "");
jaccard(a,b);
}
```

*bedr*version 1.0.7 Index]