SCFA: SCFA

View source: R/SCFA.R

SCFAR Documentation

SCFA

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

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

#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)

duct317/SCFA documentation built on April 18, 2023, 10:42 a.m.