Given the sequence cluster labels from the seqArchR result object, returns the clusters separated as a list.

get_seqs_clust_list(seqs_clust_lab)

Arguments

seqs_clust_lab

Sequences with cluster labels as in the seqArchR result object.

Value

A list holding sequence IDs belonging in each cluster.

Examples


clustLabels <- sample(seq_len(4), 50, replace = TRUE)
print(clustLabels)
#>  [1] 1 4 2 1 4 2 1 3 3 4 4 2 4 3 1 2 2 4 3 2 1 4 3 3 3 2 2 3 1 1 4 3 2 2 2 4 2 2
#> [39] 2 3 4 4 2 1 2 2 2 3 4 2
get_seqs_clust_list(clustLabels)
#> [[1]]
#> [1]  1  4  7 15 21 29 30 44
#> 
#> [[2]]
#>  [1]  3  6 12 16 17 20 26 27 33 34 35 37 38 39 43 45 46 47 50
#> 
#> [[3]]
#>  [1]  8  9 14 19 23 24 25 28 32 40 48
#> 
#> [[4]]
#>  [1]  2  5 10 11 13 18 22 31 36 41 42 49
#>