Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

skernel

Stratified Kernel


Description

This function defines a stratified kernel for metabolite abundance level measurements.

Usage

skernel(x, y, rho)

Arguments

x

a numerical scalar or vector of metabolomic measurements.

y

a numerical scalar or vector of metabolomic measurements.

rho

a positive kernel shape parameter.

Details

This function calculates a stratified kernel function skernel between two metabolomic measurements x and y. Suppose the metabolite-set contains p metabolites. Then measurements x and y have p components. Let x_i be the ith component of x. If x_i=0, then the ith metabolite in the metabolite-set is absent. If x_i>0, then the ith metabolite is present and x_i measures the abundance level of the ith metabolite. Measurements x and y are said to from the same stratum if they have the same set of metabolites being absent (present). If x and y are from the same stratum, then skernel(x,y,ρ) is assigned a Gaussian kernel with kernel parameter ρ. Otherwise skernel(x,y,ρ) is defined to be 0. More details can be found in Zhan et al. (2015).

Value

A non-negative real value.

References

Zhan, X., Patterson, A. D., & Ghosh, D. (2015). Kernel approaches for differential expression analysis of mass spectrometry-based metabolomics data. BMC Bioinformatics, 16(1), 77.

Examples

x=c(0,0,1,2)
	y=c(0,1,2,0)
	z=c(0,0,3,4)
	## x and z are from the same stratum while x and y are not. 
	skernel(x,y,1)
	skernel(x,z,1)

KMDA

Kernel-Based Metabolite Differential Analysis

v1.0
GNU General Public License
Authors
Xiang Zhan and Debashis Ghosh
Initial release
2015-03-26

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.