collate_clusters: Collate sequence IDs from an existing clustering according to...

Description Usage Arguments Value Examples

View source: R/archR_auxiliary_functionsI.R

Description

Collate sequences original divided across n clusters into a new set of m clusters. These m clusters obtained by clustering the original n clusters. Assume a collection of 100 sequences across seven existing clusters. These seven clusters are collated to obtain three resulting clusters. Collating 100 sequences distributed across the seven clusters into the resulting three clusters can be achieved with collate clusters

Usage

1
collate_clusters(to_clust, orig_clust)

Arguments

to_clust

A list giving clustering of factors. In other words this is the clustering of clusters of sequences given in orig_clust

orig_clust

A list of sequence IDs in existing clusters

Value

A list with sequence IDs collated by the specified clustering

Examples

1
2
3
4
5
6
7
8
set.seed(123)
n <- 7; nn <- 100
orig_clust_labels <- ceiling(n * runif(nn))
orig_clust <- archR::get_seqs_clust_list(orig_clust_labels)

to_clust <- list(c(1,4), c(2,3,5), c(6,7))

collate_clusters(to_clust = to_clust, orig_clust = orig_clust)

snikumbh/archR documentation built on July 5, 2021, 8:46 a.m.