Last data update: 2014.03.03

R: Predict classes for gene expression sets.
dksClassifyR Documentation

Predict classes for gene expression sets.

Description

Kolmogorov-Smirnov rank sum scoring will be used to assign one or more samples to one of two or more classes based on previously defined gene signatures (see dksTrain).

Usage

dksClassify(eset, classifier, rescale=FALSE, method="kort")

Arguments

eset

An ExpressionSet or matrix containing the gene expression data for the samples to be classified.

classifier

An DKSClassifier produced by dksSelectGenes describing the gene expression signature for each class.

rescale

If TRUE, scores for each class will be mean centered and normalized to remove arbitrary differences in scale and baseline value between signatures for different classes.

method

Two methods are supported. The 'kort' method returns the maximum of the running sum. The 'yang' method returns the sum of the maximum and the minimum of the running sum, thereby penalizing classes that are highly enriched in a subset of genes of a given signature, but highly down regulated in another subset of that same signature.

Value

An object of class DKSPredicted containing the class to which each sample in the eset was assigned as well as other information. This object has its own summary and show functions useful for displaying this information in a user friendly format.

Author(s)

Eric J. Kort, Yarong Yang

See Also

dksTrain, dksSelectGenes, dksClassify, DKSGeneScores, DKSPredicted, DKSClassifier

Examples


	data("dks")
	tr <- dksTrain(eset, 1, "up")
	cl <- dksSelectGenes(tr, 100)
	pr <- dksClassify(eset, cl,rescale=FALSE)
	summary(pr, pData(eset)[,1])
	show(pr)
	plot(pr, actual=pData(eset)[,1])	

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(dualKS)
Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: affy
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/dualKS/dksClassify.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dksClassify
> ### Title: Predict classes for gene expression sets.
> ### Aliases: dksClassify
> ### Keywords: classif
> 
> ### ** Examples
> 
> 
> 	data("dks")
> 	tr <- dksTrain(eset, 1, "up")
> 	cl <- dksSelectGenes(tr, 100)
> 	pr <- dksClassify(eset, cl,rescale=FALSE)
> 	summary(pr, pData(eset)[,1])


Dual KS Classification Summary:

Predicted class frequencies:

    normal      osteo rheumatoid 
        11          0          4 


Concordance rate (predicted==actual):  60 %

> 	show(pr)
     sample predicted class prediction score
1  GSM34379          normal         1024.367
2  GSM34383          normal         1073.083
3  GSM34385          normal         1116.797
4  GSM34388          normal            971.7
5  GSM34391          normal         1159.983
6  GSM34393          normal            592.5
7  GSM34394          normal          671.763
8  GSM34395          normal          610.143
9  GSM34396          normal           624.89
10 GSM34397          normal          604.087
11 GSM34398          normal          604.613
12 GSM34399      rheumatoid          599.083
13 GSM34400      rheumatoid          727.853
14 GSM34401      rheumatoid          606.457
15 GSM34402      rheumatoid           657.28
> 	plot(pr, actual=pData(eset)[,1])	
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>