Learn R Programming

miRNAtap (version 1.6.0)

aggregateRanks: Aggreagate ranks from multiple sources with various methods

Description

This function performs aggregation phase of target prediction for getPredictedTargets. Consensus ranking is derived from multiple individual rankings. Available methods include minimum, maximum and geometric mean with further tuning parameters which promote true positives at the top of the final ranking

Usage

aggregateRanks(ranks, n_valid_srcs, min_src, method = "geom", promote = TRUE)

Arguments

ranks
data.frame with ordered scores
n_valid_srcs
number of valid sources in the dataset
min_src
minimum acceptable number fo sources
method
'min','max', or 'geom', default 'geom'
promote
add weights to improve accuracy of the method, default TRUE

Value

data.frame object with ranks per source and aggregate ranks

Examples

Run this code
data = data.frame(GeneID=c("15364", "56520", "57781", "58180", "18035"),
                source1scores=c(0.9,0.5,0.3,NA,NA),
                source2scores=c(0.7,NA,0.8,0.6,0.5),
                source3scores=c(0.5,NA,0.3,0.1,0.2))
data #dataframe with scores
aggregateRanks(data, n_valid_srcs=3, min_src=2, method='geom')
#note how gene 56520 is eliminated as it appeared in fewer than 2 sources

Run the code above in your browser using DataLab