Learn R Programming

ktspair (version 1.0)

kts.pair: Calculation of the k top scoring pairs.

Description

This function computes the k pairs of genes that achieved the maximum difference between the sensitivity and the specificity (in absolute value) between two specific groups based on the comparison of the expressions of the two genes present in the pairs. The function ktspcalc() is the general function and uses the function kts.pair once the dataset has been prepared for this function. The function ktspcalc() is also able to deal with eSets.

Usage

kts.pair(dat, grp, k, display = TRUE, length = 40, med = FALSE)

Arguments

dat
A matrix of m lines (the gene expressions) and n columns (the observations).
grp
A vector of 0 and 1 for the groups of the observations.
k
The number of pairs of genes that the function will select.
display
Allows the user to avoid the function kts.pair() to print warning message (mainly used in the function crossvalidation).
length
This paramters allows the used to control the length of the list used in the C code.
med
If the mean of the median between the two groups for each gene should be substracted to the dataset or not.

Value

A ktsp object with the following elements:
index
A k by 2 matrix composed of genes where the ith row stands for the ith best pair of genes with the restriction that a gene can appear in only one pair. The pairs are seleceted with respect to the score Delta and Gamma (in case of ties), see Tan et al. (2005) for more details about the k-TSP.
ktspcore
A vector of size k containing the scores Delta achieved by each selected pair of genes. The score Delta is based on the sensitivity and the specificity of a pair, see Geman et al. (2004) for more details.
grp
The group for each observation in a binary form
ktspdat
The row i and the row i+k represents the expressions of the genes present in the ith pair.
k
The number of pairs of genes.
labels
The name of the two groups that were present in the original variable grp.
rankscore
The score Gamma achieved by each pair of genes, for more details on this score see Geman et al. (2004).
accuracy
A vector of the estimated percentage of correct prediction for the k-TSP with k=1,3,5,7,9.
accuracy_k
The estimated percentage of correct prediction of the k-TSP with the selected k.
sensitivity
A vector of the estimated sensitivity for the k-TSP with k=1,3,5,7,9.
specificity
A vector of the estimated specificity for the k-TSP with k=1,3,5,7,9.
med
If the mean of the medians within each group has been substracted to the dataset return the values of the mean of the median, return FALSE otherwise

note

The length sets to the list used in the C code (defined by the paramter length) has to be at least as big as k.

Details

This function only works with matrices and vector of group containing only 0 and 1. For a more general use (eSets and labels for the groups) see the function ktspcalc(). This classifier can only be used for classifications with two groups. The k-TSP was introduced in Tan et al. (2005) and is an extension of the TSP, which was presented in Geman et al. (2004).

References

D. Geman, C. d'Avignon, D. Naiman and R. Winslow, "Classifying gene expression profiles from pairwise mRNA comparisons," Statist. Appl. in Genetics and Molecular Biology, 3, 2004.

A.C. Tan, D.Q. Naiman, L. Xu, R.L. Winslow, D. Geman, "Simple decision rules for classifying human cancers from gene expression profiles," Bioinformatics, 21: 3896-3904, 2005.

J. Damond, supervised by S. Morgenthaler and S. Hosseinian, "Presentation and study of robustness for several methods to classify individuals based on their gene expressions", Master thesis, Swiss Federal Institute of Technology Lausanne (Switzerland), 2011. J. Damond, S. Morgenthaler, S. Hosseinian, "The robustness of the TSP and the k-TSP and the computation of ROC curves", paper is submitted in Bioinformatics, December 2011. Jeffrey T. Leek (). tspair: Top Scoring Pairs for Microarray Classification. R package version 1.10.0.

See Also

ktspcalc, ktspplot,predict.ktsp, summary.ktsp

Examples

Run this code
  ## Not run: 
#   ## Load data
#   data(ktspdata) 
#   ktsp <- kts.pair(dat,grp,3)
#   ktsp$index
#   ktsp$ktspscore
# 
#   ktsp2 <- kts.pair(dat, grp, 9)
#   ktsp2
#   ktsp2 <- kts.pair(dat, grp, 9, length=40)
#   ktsp2
#  ## End(Not run)

Run the code above in your browser using DataLab