make_BED_from_rejections: Write BED files from testing output.

Usage Arguments Value Examples

View source: R/downstream.R

Usage

1
make_BED_from_rejections(infiles, chromosomes, null_outfile, rejected_outfile, resolution, region_size = 5000)

Arguments

infiles

Paths to output from one of test_by_wFDR or test_by_wFDX. For analyses of multiple chromosomes, this is a vector of paths.

chromosomes

(Integer or character) vector of chromosome numbers, in the same order as the chromosomes examined in each infile.

null_outfile

path to file where BED file will be written for null regions.

rejected_outfile

path to file where BED file will be written for rejected regions.

resolution

Resolution of the Hi-C data.

region_size

Number of base pairs to fall into each region of the BED file. Must divide evenly into resolution. Defaults to 5,000.

Value

Writes two outfiles in 3-column BED format, containing loci which are labeled as falling within either a null or rejected region based on the testing info supplied.

Examples

1
2
3
4
5
6
7
make_BED_from_rejections(
    infiles = "inst/extdata/output/wfdr.rds",
    chromosomes = 19,
    null_outfile = "inst/extdata/output/null_wfdr.bed",
    rejected_outfile = "inst/extdata/output/rejected_wfdr.bed",
    resolution = 40000
    )

hillarykoch/locdiffr documentation built on April 25, 2021, 6:26 p.m.