Last data update: 2014.03.03

R: P value for discriminant Non-Negative Matrix Factorization
NMFpvalR Documentation

P value for discriminant Non-Negative Matrix Factorization

Description

Estimate the significance of differentially expressed genes in parallel.

Usage

NMFpval(nmf_res, np = 100, ncores = parallel::detectCores(), fdr = FALSE,
  top = 1000, verbose = FALSE)

Arguments

nmf_res

result from DNMF or dNMF

np

number of permutations

ncores

cores used. Default is all the availiable cores

fdr

false discovery rate. Default is FALSE

top

only include top ranked genes. Default is 1000

verbose

verbose

Details

P value is caculated based on aatricle, Wang, Hong-Qiang, Chun-Hou Zheng, and Xing-Ming Zhao. "jNMFMA: a joint non-negative matrix factorization meta-analysis of transcriptomics data." Bioinformatics (2014): btu679.

Value

a matrix with columns rnk, p (and fdr)

Author(s)

Zhilong Jia

Examples

dat <- rbind(matrix(c(rep(3, 16), rep(8, 24)), ncol=5),
matrix(c(rep(5, 16), rep(5, 24)), ncol=5),
matrix(c(rep(18, 16), rep(7, 24)), ncol=5)) +
matrix(runif(120,-1,1), ncol=5)
trainlabel <- c(1,1,2,2,2)

nmf_res <- ndNMF(dat, trainlabel, r=2, lambada = 0.1)
pMat <- NMFpval(nmf_res, np=10, ncores=2, top=4)

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(DNMF)
Loading required package: foreach
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DNMF/NMFpval.Rd_%03d_medium.png", width=480, height=480)
> ### Name: NMFpval
> ### Title: P value for discriminant Non-Negative Matrix Factorization
> ### Aliases: NMFpval
> 
> ### ** Examples
> 
> dat <- rbind(matrix(c(rep(3, 16), rep(8, 24)), ncol=5),
+ matrix(c(rep(5, 16), rep(5, 24)), ncol=5),
+ matrix(c(rep(18, 16), rep(7, 24)), ncol=5)) +
+ matrix(runif(120,-1,1), ncol=5)
> trainlabel <- c(1,1,2,2,2)
> 
> nmf_res <- ndNMF(dat, trainlabel, r=2, lambada = 0.1)
> pMat <- NMFpval(nmf_res, np=10, ncores=2, top=4)
Time difference of 1.679775 secs
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>