generank: Rank genes based on statistics

Description Usage Arguments Details Author(s) Examples

View source: R/Cormotif.R

Description

This function rank the genes according to the decreasing order of the given statistics.

Usage

1

Arguments

x

A G*D matrix of statistics, the number of rows is the number of genes and the number of columns is the number of studies.

Details

The function returns a G*D matrix of index of top ranked genes in each study according to the decreasing order of statistics in that study.

Author(s)

Hongkai Ji, Yingying Wei

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(simudata2)
n<-nrow(simudata2)
m<-ncol(simudata2)
#the expression data is from the second column to m
exprs.simu2<-as.matrix(simudata2[,2:m])

#prepare the group ID number for each sample array
data(simu2_groupid)

#prepare the design matrix for each group of samples
data(simu2_compgroup)

#fit 2 correlation motif to the data
motif.fitted<-cormotiffit(exprs.simu2, simu2_groupid,simu2_compgroup,K=2)
#give the gene index list according to the decreasing order of 
#posterior probability for a gene to be differentially expressed in each study 
generank(motif.fitted$bestmotif$p.post)

Cormotif documentation built on Nov. 8, 2020, 6:53 p.m.