cptSamples: Sample profile identifier analysis

Description Usage Arguments Details Value See Also Examples

Description

Generate sample profile identifiers from sample zscores using change point model.

Usage

1
cptSamples(x, cpt_data, cpt_method, cpt_max)

Arguments

x

A matrix or data frame of sample GSVA enrichment zscores within which you wish to find a changepoint.

cpt_data

Identify changepoints for data using variance (cpt.var), mean (cpt.mean) or both (cpt.meanvar). Default is cpt.var.

cpt_method

Choice of single or multiple changepoint model. Default is "BinSeg".

cpt_max

The maximum number of changepoints to search for using "BinSeg" method. Default is 60.

Details

This function assigns samples identified in the first changepoint with the active profile ("1") while the remaining samples are grouped under inactive profile ("0").

Value

The input data frame with added sample identifiers and estimated changepoints. A plot showing the changepoint locations estimated on the data

See Also

changepoint

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
g <- 10 ## number of genes
s <- 60 ## number of samples
## sample data matrix with values ranging from 1 to 10
rnames <- paste("g", 1:g, sep="")
cnames <- paste("s", 1:s, sep="")
expr <- matrix(sample.int(10, size = g*s, replace = TRUE), nrow=g, ncol=s, dimnames=list(rnames, cnames))
## genes of interest
genes <- paste("g", 1:g, sep="")
## Estimates GSVA enrichment zscores.
gsva_results <- callGSVA(expr,genes)
cptSamples(gsva_results,cpt_data="var",cpt_method="BinSeg",cpt_max=60)

SISPA documentation built on Nov. 8, 2020, 8:26 p.m.

Related to cptSamples in SISPA...