stabilityRanking-methods: Wrapper to perform stabilityRanking

Description Arguments Value Examples

Description

An S4 function to perform stability ranking on a dataset or directly on given sample rankings.

Arguments

x

the data that is to be ranked. It can be of different types: a data matrix with one row per element to be ranked, or a ranking from an external method, or an object of class cellHTS. Depending on this the other parameters can vary.

samps

a matrix of scored sample data, each row corresponds to an element, the columns to a scoring. This is only needed when an external ranking method is used.

channel

a string with the name of the feature (channel) to be ranked. This is only needed for cellHTS objects.

replicates

names or indices of the replicates (samples) to be used for the rankings (default: all samples are used).

method

one of the ranking methods: 'mean' (default), 'median', 'mwtest' (two-sample one sided Mann-Whitney test), 'ttest'(two-sample one sided t-test) or 'RSA' (redundant siRNA analysis). If an external ranking is used, you can specify the name of that ranking method in the method argument.

decreasing

a boolean indicating the direction of the ranking.

bootstrap

a boolean indicating if bootstrapping or subsampling is used.

thr

threshold for stability (default = 0.9).

nSamp

the number of samples to generate (default = 100).

Pi

boolean indicating if the Pi matrix should be returned (can be very large, default=FALSE).

verbose

boolean indicating if status update should be printed

...

further parameter for the stability ranking.

Value

an object of class RankSummary.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# generate dataset
d<-replicate(4,sample(1:10,10,replace=FALSE))
rownames(d)<-letters[1:10]

# rank aggregation on the dataset using two base methods
aggregRank(d, method='mean')
aggregRank(d, method='median')

# calculate summary statistic from the data
summaryStats(d, method='mean')
summaryStats(d, method='RSA')

# calculating replicate scores from different summary statistics
scores<-getSampleScores(d,'mean',decreasing=FALSE,bootstrap=TRUE)
scores<-getSampleScores(d,'mwtest',decreasing=FALSE,bootstrap=TRUE)

# perform RSA analysis

# get RSA format of data
rsaData<-dataFormatRSA(d)
# set RSA options
opts<-list(LB=min(d),UB=max(d),reverse=FALSE)
# run the RSA analysis
r<-runRSA(rsaData,opts)
# directly obtain the per gene RSA ranking from the data
r<-uniqueRSARanking(rsaData,opts)

# get stable Ranking, stable setsizes and the Pi matrix for default settings
# and stability threshold of 0.9
s<-getStability(d,0.9)

# run default stability ranking
s<-stabilityRanking(d)

# using an accessor function on the RankSummary object
stabRank(s)

# summarize a RankSummary object
summary(s)

# generate a rank matrix from a RankSummary object
getRankmatrix(s)

Example output

Loading required package: cellHTS2
Loading required package: RColorBrewer
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, sd, var, xtabs

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

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, 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, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

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

Loading required package: genefilter
Loading required package: splots
Loading required package: vsn
Loading required package: hwriter
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: grid
Warning message:
In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'
   a    h    d    g    i    c    e    f    j    b 
3.75 4.00 4.25 4.25 4.25 5.00 6.00 6.25 8.50 8.75 
  h   a   d   c   g   i   e   f   j   b 
3.0 3.5 4.0 4.5 4.5 5.0 6.0 6.5 8.5 9.0 
   a    b    c    d    e    f    g    h    i    j 
3.75 8.75 5.00 4.25 6.00 6.25 4.25 4.00 4.25 8.50 
          a           b           c           d           e           f 
-1.01371011 -0.09275405 -0.52306887 -1.65233426 -0.34896305 -0.40683372 
          g           h           i           j 
-0.93452887 -1.00000000 -1.09668435 -0.05281597 
  a   g   i   c   h   d   e   f   b   j 
1.0 2.5 2.5 4.5 4.5 6.5 6.5 8.0 9.5 9.5 
     Length       Class        Mode 
          1 RankSummary          S4 
  mean_stability mean_base mean_averaged
a            1.0         1             1
g            2.5         4             3
i            2.5         4             2
c            4.5         6             6
h            4.5         2             4
d            6.5         4             5
e            6.5         7             7
f            8.0         8             8
b            9.5        10            10
j            9.5         9             9

staRank documentation built on Nov. 8, 2020, 7:51 p.m.