make_assign_dt: make_assign_dt

View source: R/functions_make.R

make_assign_dtR Documentation

make_assign_dt

Description

make_assign_dt

Usage

make_assign_dt(clust_dt, cluster_var = "cluster_id", id_var = "id")

Arguments

clust_dt

Output from ssvSignalClustering

cluster_var

variable name with cluster assignment info. Default is "cluster_id".

id_var

variable name with id info. Default is "id".

Value

data.table with id and cluster_id assignment info.

Examples

bw_files = dir(system.file("extdata", package = "seqqc"), pattern = "^M.+bw$", full.names = TRUE)
query_dt = make_dt(bw_files)
query_dt[, sample := sub("_FE_random100.A", "", name)]

peak_files = dir(system.file("extdata", package = "seqqc"), pattern = "Peak$", full.names = TRUE)
peak_grs = seqsetvis::easyLoad_narrowPeak(peak_files)
query_gr = resize(seqsetvis::ssvOverlapIntervalSets(peak_grs), 6e2, fix = "center")

prof_dt = seqsetvis::ssvFetchBigwig(query_dt, query_gr, return_data.table = TRUE)

clust_dt = seqsetvis::ssvSignalClustering(prof_dt, nclust = 3)

assign_dt = make_assign_dt(clust_dt)
assign_dt


FrietzeLabUVM/ssvQC documentation built on March 25, 2024, 12:24 a.m.