localZScore: Local z-score

Description Usage Arguments Value See Also Examples

View source: R/localZScore.R

Description

Evaluates tthe variation of the z-score in the vicinty of the original region set

Usage

1

Arguments

A

a region set in any of the formats accepted by toGRanges (GenomicRanges, data.frame, etc...)

pt

a permTestResult object

window

a window in wich the local Z-score will be calculated (bp)

step

the number of bp that divide each Z-score evaluation

...

further arguments to be passed to other methods.

Value

It returns a local z-score object

See Also

overlapPermTest, permTest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
genome <- filterChromosomes(getGenome("hg19"), keep.chr="chr1")
A <- createRandomRegions(nregions=20, length.mean=10000, length.sd=20000, genome=genome, non.overlapping=FALSE) 
B <- c(A, createRandomRegions(nregions=10, length.mean=10000, length.sd=20000, genome=genome, non.overlapping=FALSE))

pt <- overlapPermTest(A=A, B=B, ntimes=10, genome=genome, non.overlapping=FALSE)
plot(pt)
 
lz <- localZScore(A=A, B=B, pt=pt)
plot(lz)


pt2 <- permTest(A=A, B=B, ntimes=10, randomize.function=randomizeRegions, evaluate.function=list(overlap=numOverlaps, distance=meanDistance), genome=genome, non.overlapping=FALSE)
plot(pt2)

lz2 <- localZScore(A=A, B=B, pt2)
plot(lz2)

 

regioneR documentation built on Nov. 8, 2020, 5 p.m.