localZScore {regioneR} | R Documentation

## Local z-score

### Description

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

### Usage

    localZScore(A, pt, window, step, ...)

### 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

    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)

[Package regioneR version 1.16.5 Index]