NITUMID: NITUMID top level function

Description Usage Arguments Value Examples

View source: R/core_functions.R

Description

'NITUMID' is the top level function that should be used by user. It takes gene expression, trichotomous guide matrix and other signature genes' information as input, and output the deconvolution results. It has two different modes for pure cell's gene expression profile and bulk gene expression profiles. Also, it has a test mode that allows you to input data as well as known cells fractions and test NITUMID's performance.

Usage

1
2
3
NITUMID(Y, A, row_index = seq(1:53), if.bulk, row_mean = row_mean_v5,
  tol = 10^-5, num_cell = 11, max.itr = 2000, test_mode = F,
  real_H = NA, cell_structure = NA, correlation = "p")

Arguments

Y

Y is the gene expression matrix that has #signature genes rows and #samples columns

A

The trichotomous guide matrix A

row_index

Default c(1,2,3,...,53). A numeric vector, indicating among all the siganture genes, which of them CAN be found in input $Y$, when you have gene expression matrix $Y$, you could use 'Signature_Match' function from this package to do the searching for you. A suggested way is to first create a vector by seq(1,m), where m is the number of signature genes, and use 'Signature_Match', which will return a vector called 'missing_row_index' then you just need to remove those indexs from seq(1,m) by setdiff(seq(1,m),missing_row_index)

if.bulk

Logical, if Y is bulk gene expression data. If Y is purified cell gene expression, please set it as FALSE.

row_mean

a numeric vector speciying each signature gene's mean expression level across all cell types, defualt value is row_mean_v5 from us

tol

numeric scalar, the cutoff value for stop iterating, default $10^-5$

num_cell

numeric scalar, number of component cell types, dfault 11. Noted that if you were to change component cell types number, you should change your $A$ matrix accordingly.

max.itr

numerical scalar, maximum iteration number, default 2000

test_mode

Logical, default FALSE. This argument indicates if running NITUMID on test mode, which enables you to input known true cells' fractions and measure NITUMID's outcomes' correlation with underlying true. For details, please see function description as well as information regarding to arguments 'real_H', 'cell_structure' and 'correlation'

real_H

Optional, only needed when 'test_mode'=TRUE, this should be a matrix with #cell types rows and #samples columns indicating each cell types' fraction in each sample

cell_structure

Optional, only needed when 'test_mode'=TRUE, it is a dataframe with 11 rows and 2 variables: 'origina_index' and ‘destin_index', you can modify index in 'destin_index' to customize your cell types’ matching relationship with NITUMID's 11 cell types. See more information and samples from description of dataset 'cell_structure_example' that comes with this package.

correlation="p"

Optional, a character of "p","s" or "kl",only needed when 'test_mode'=TRUE. When you are in test mode with underlying true cells' fractions input, you can evaluate their consistency with NITUMID's outcome by Pearson Correlation ("p"), Spearman Correlation ("s") or K-L Divergence ("kl")

Value

'NITUMID' returns a list, depending on what specific mode you are using, it can return sevral different outcomes: 1. For test_mode=F, it returns a list of 2 elements: the 'result' element itself is a list, containing output Ws and Hs under multiple parameters; the second element is the ‘consistency_table' for NITUMID’s outcomes under different parameters, see our paper for more details, simply speaking, if the i-th value in 'consistency_table' has the largest value, then you should extract 'result'[[i]] and use its W and H, e.g. result[[i]]$W 2. For test_mode=T, it returns a list of 3 elements: on top of the 2 elements mentioned above, it has another element of 'real_corr_table', which is a numeric vector contianing the correlations between NITUMID's outcome and real cells' fractions under different parameters. Again, you should choose the i-th value (which you got from consistency_table) since that represents the final result.

Examples

1
TBA

tdw1221/NITUMID documentation built on Jan. 17, 2019, 12:46 a.m.