Last data update: 2014.03.03

R: Extract gene signatures from a DKSGeneScores object.
dksSelectGenesR Documentation

Extract gene signatures from a DKSGeneScores object.

Description

The DKSGeneScores returned by dksTrain holds the rank data for all the genes in the original ExpressioSet. However, generally only the top n genes for each class are desired for classification. Rather than needing to re-run dksTrain every time a signature of different size (n) is desired, you simply extract that top n genes from this object using dksSelectGenes.

Usage

dksSelectGenes(data, n)

Arguments

data

An object of class DKSGeneScores, typically generated by dksTrain

n

The number of genes, per class, to include in the classification signature.

Value

An object of class DKSGeneScores

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)
	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/dksSelectGenes.Rd_%03d_medium.png", width=480, height=480)
> ### Name: dksSelectGenes
> ### Title: Extract gene signatures from a DKSGeneScores object.
> ### Aliases: dksSelectGenes
> ### Keywords: classif
> 
> ### ** Examples
> 
> 	data("dks")
> 	tr <- dksTrain(eset, 1, "up")
> 	cl <- dksSelectGenes(tr, 100)
> 	pr <- dksClassify(eset, cl)
> 	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 
>