Maps clustered genomic regions to their corresponding cytoband annotations for both maternal and paternal haplotypes. For each cluster of regions, the function collects and combines the cytoband annotations of all regions within that cluster.

create_cluster_cytoband_anno(region_clusters, cytoband_mapping)

Arguments

region_clusters

A nested list structure containing clustered genomic regions. The list is organized by haplotype ("maternal"/"paternal"), then by chromosome, then by cluster number, containing region IDs as the innermost elements.

cytoband_mapping

A list containing cytoband annotations for each genomic region. Each element should be named with a region ID corresponding to those in region_clusters.

Value

A nested list with the same structure as region_clusters, where each cluster contains a data frame of unique cytoband annotations. The structure is: list[haplotype][chromosome][cluster] -> data frame of cytoband annotations

Details

The function processes clusters by:

  1. Iterating through haplotypes (maternal/paternal)

  2. For each chromosome in each haplotype

  3. For each cluster in each chromosome

  4. Retrieving and combining cytoband annotations for all regions in the cluster

  5. Removing duplicate annotations using unique()

See also

Related functions for genomic region analysis and cytoband mapping

Examples

if (FALSE) { # \dontrun{
# Assuming region_clusters and cytoband_mapping are already defined:
cluster_annotations <- create_cluster_cytoband_anno(
  region_clusters = region_clusters,
  cytoband_mapping = cytoband_mapping
)

# Access annotations for a specific cluster:
maternal_chr1_cluster1 <- cluster_annotations[["maternal"]][["chr1"]][[1]]
} # }