find_markers: find_markers

View source: R/functions.R

find_markersR Documentation

find_markers

Description

find_markers performs evaluation of variant as marker for the consensus clustering result by calculating the receiver operating characteristics (AUC) score and Pearson's correlation coefficient between the binary cluster labels and the frequency distribution.

Usage

find_markers(f, cluster)

Arguments

f

A list containing the frequency distribution of a variant. Required.

cluster

A list containing the consensus clustering result. Required.

Details

Marker variants identification

Value

A dataframe containing AUC score and p-value of the given variant.

Examples

data("TF1_clones")
data("scc")
data=TF1_clones$data
d=data_prepare(data)
tops2=data.frame()
for(i in 1:12){
    di=d[[i]]
    tops2=rbind(tops2,top_sites(di)[[2]])
}
find_markers_2=function(x,cluster=scc){
    a=find_markers(as.numeric(as.character(x)),cluster=as.numeric(as.character(scc)))
    a=a[a$p==min(a$p),]
    return(a)
}
markers=apply(tops2,1,find_markers_2)


songjiajia2018/LINEAGE documentation built on Oct. 17, 2022, 6:17 a.m.