SCFA: SCFA

Description Usage Arguments Value Examples

View source: R/SCFA.R

Description

The main function to perform subtyping. It takes a list of data matrices as the input and outputs the subtype for each patient.

Usage

1
SCFA(dataList, k = NULL, max.k = 5, ncores = 10L, seed = NULL)

Arguments

dataList

List of data matrices. In each matrix, rows represent samples and columns represent genes/features.

k

Number of clusters, leave as default for auto detection.

max.k

Maximum number of cluster

ncores

Number of processor cores to use.

seed

Seed for reproducibility, you still need to use set.seed function for full reproducibility.

Value

A numeric vector containing cluster assignment for each sample.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#Load example data (GBM dataset)
data("GBM")
#List of one matrix (microRNA data)
dataList <- GBM$data
#Survival information
survival <- GBM$survival
library(survival)
#Generating subtyping result
set.seed(1)
subtype <- SCFA(dataList, seed = 1, ncores = 2L)
#Perform survival analysis on the result
coxFit <- coxph(Surv(time = Survival, event = Death) ~ as.factor(subtype), data = survival, ties="exact")
coxP <- round(summary(coxFit)$sctest[3],digits = 20)
print(coxP)

SCFA documentation built on Nov. 8, 2020, 6:58 p.m.