Learn R Programming

macat (version 1.46.0)

Kernels: various kernel functions for computations in MACAT

Description

Various Kernel functions for computations in MACAT. Normally not called by user. All kernel functions have the same arguments in the same order!!!

Usage

kNN(geneLocations, position, params) rbf(geneLocations, position, params = list(gamma=1/10^13)) basePairDistance(geneLocations, position, params = list(distance = 1e+06))

Arguments

geneLocations
Location of genes
position
Position on chromosome
params
special kernel parameters
kNN:
k = number of nearest genes

rbf:
gamma = kernel width

basePairDistance:
distance = distance within which all genes are averaged

Value

returns kernel weight for position, computed from the geneLocations

Details

For internal use by other MACAT-functions. Not called by user.

See Also

evalScoring, compute.sliding, kernelize

Examples

Run this code
  data(stjd)
  genes = seq(100)
  geneLocations = abs(stjd$geneLocation[genes])
  position = c(1000) # location for which you want the kernelweights
  kernelweights = rbf(as.matrix(geneLocations), as.matrix(position), 
  		      list(gamma=1/10e13))
  hist(kernelweights)  

Run the code above in your browser using DataLab