pkgdown/header.html

Skip to contents

Overview

Divergent loci are genomic regions with divergent transcription: plus and minus strand transcription initiation events that originate close together and point away from each other. They are a hallmark of active enhancers and promoters.

PRIME provides two methods for calling divergent loci from CTSS data:

  1. Summit-based (PRIME::divergentLociTCsSummit()) — identifies summit positions of tag clusters on each strand and pairs them into divergent loci. This is the recommended native PRIME approach.

  2. FANTOM5-style / TC-based (PRIME::divergentLoci()) — first calls unidirectional tag clusters with CAGEfightR and then pairs them into divergent loci. This mirrors the approach used in FANTOM5.

Setup

This vignette uses CTSS objects produced in vignette("ctss-processing"). Serialized copies are included with PRIME so the divergent-loci workflow can be run directly:

ctss <- readRDS(system.file("extdata", "ctss.rds",
                            package = "PRIME"))
ctss_clean <- readRDS(system.file("extdata", "ctss_clean.rds",
                                  package = "PRIME"))

Method 1: Summit-based divergent loci (PRIME native)

This approach directly uses CTSS counts to identify divergent loci via summit detection.

DLs <- PRIME::divergentLociTCsSummit(
        ctss         = ctss_clean,
        callingAssay = "counts.noSingletons"
    )

For large datasets it is efficient to process per chromosome:

CTSSs_by_chr <- split(ctss_clean, GenomicRanges::seqnames(ctss_clean))

DLs <- lapply(names(CTSSs_by_chr), function(chr) {
    PRIME::divergentLociTCsSummit(
        ctss         = CTSSs_by_chr[[chr]],
        callingAssay = "counts.noSingletons"
    )
})

# Combine results across chromosomes
DLs <- do.call(c, DLs)

Method 2: FANTOM5-style divergent loci

This approach first calls unidirectional tag clusters and then pairs them:

# Pool CTSSs and call unidirectional tag clusters
ctss_clean_pooled <- CAGEfightR::calcPooled(ctss_clean,
                                            inputAssay = "counts.noSingletons")
ctss_clean_pooled <- subset(ctss_clean_pooled, score > 0)
TCs <- CAGEfightR::clusterUnidirectionally(ctss_clean_pooled)

# Call divergent loci
DLs_fantom <- PRIME::divergentLoci(
    object = TCs,
    ctss   = ctss_clean_pooled
)

Quantifying divergent loci

Once divergent loci have been called, expression can be quantified across all samples using:

DLs_quant <- PRIME::quantifyDivergentLoci(
    DLs,
    ctss,
    inputAssay = "counts"
)

See also