aggregateRanks: Aggreagate ranks from multiple sources with various methods

Description Usage Arguments Value Author(s) Examples

View source: R/miRNAtap.R

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

1
2
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

Author(s)

Maciej Pajak m.pajak@sms.ed.ac.uk

Examples

1
2
3
4
5
6
7
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

Example output

Loading required package: AnnotationDbi
Loading required package: stats4
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

Loading required package: Biobase
Welcome to Bioconductor

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

Loading required package: IRanges
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

  GeneID source1scores source2scores source3scores
1  15364           0.9           0.7           0.5
2  56520           0.5            NA            NA
3  57781           0.3           0.8           0.3
4  58180            NA           0.6           0.1
5  18035            NA           0.5           0.2
      source_1 source_2 source_3 rank_product rank_final
15364        1        2        1    0.4199737        1.0
57781        2        1        2    0.5291337        2.0
58180       NA        3        4    1.7320508        3.5
18035       NA        4        3    1.7320508        3.5

miRNAtap documentation built on Nov. 8, 2020, 8:12 p.m.