bed_fisher_grouped: Fisher test of significance of overlaps between grouped sets...

View source: R/bed_fisher_grouped.R

bed_fisher_groupedR Documentation

Fisher test of significance of overlaps between grouped sets of intervals

Description

Calculate Fisher's test on the number of intervals that are shared and unique between two input tibble BEDs. If a grouping variable is provided for bedA, Fisher tests can be performed within these groups of intervals in bedA.

Usage

bed_fisher_grouped(bedA, bedB, bedA_groups = NULL, genome, ...)

Arguments

bedA

A tibble BED with columns: chrom, start, end, ...(metadata cols)...

bedB

A tibble BED with columns: chrom, start, end, ...(metadata cols)...

bedA_groups

A character vector of data variable(s) in bedA upon which to group data and perform the test on each group of intervals separately

genome

A tibble BED of chromosome sizes with columns: chrom, size

...

Expressions that return a logical value upon which to filter the Fisher results table (thresholds for test output values)

Details

This function is built as a modification of the valr::bed_fisher() function. Equivalent to bedtools fisher -a A.bed -b B.bed (performed within each variable group for A.bed)

Value

The outcome of the Fisher test(s) on the overlaps between bedA and bedB


alextidd/tgp documentation built on June 1, 2022, 9:25 a.m.