Learn R Programming

bedr (version 1.1.3)

test.region.similarity: Compare sets of regions via jaccard and relative distance using permutation

Description

Compare sets of regions via jaccard and relative distance using permutation to get an empirical p-value.

Usage

test.region.similarity(
	x,
	y,
	n = 1000,
	stratify.by.chr = FALSE,
	species = "human",
	build = "hg19",
	mask.gaps = FALSE,
	mask.repeats = FALSE,
	gaps.file = NULL,
	repeats.file = NULL,
	check.zero.based = TRUE,
	check.chr = TRUE,
	check.valid = TRUE,
	verbose = TRUE
	)

Value

A list of results

Arguments

x

first region to be compared. this is the region that is permuted

y

second region to be compared

n

the number of iterations to permute

stratify.by.chr

Should the permutation be happen separetely for each chromosome. That is are chromosomes exchangeable.

species

species

build

the build of the reference

mask.gaps

should the gaps (Ns) in the human reference be ignored as potential start points. This drammatically increases memory and run time but is more appropriate in almost all settings. By default it's off.

mask.repeats

should the repeats from repeatMasker be ignored as potential start points. This drammatically increases memory and run time but is more appropriate in almost all settings. By default it's off.

gaps.file

database file of gaps. Defaults to Homo sapiens Hg19 gap.txt.gz file available through UCSC

repeats.file

database file of repeats as supplied by UCSC containing RepMasker data e.g rmsk.txt.gz

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

verbose

should log messages and checking take place

Author

Daryl Waggott

Details

Iteratively permutes intervals and recalculates jaccard and reldist statistics.