mark_dominant: Mark Dominant

View source: R/tss_metrics.R

mark_dominantR Documentation

Mark Dominant

Description

Mark TSSs as dominant per TSR or gene/transcript, or TSRs as dominant per gene/transcript.

Usage

mark_dominant(
  experiment,
  data_type = c("tss", "tsr"),
  threshold = NULL,
  use_normalized = FALSE,
  mark_per = "default",
  exclude_antisense = TRUE
)

Arguments

experiment

TSRexploreR object.

data_type

Whether to mark dominant TSSs ('tss') or TSRs ('tsr').

threshold

TSSs or TSRs with a score below this value will not be considered.

use_normalized

Whether to use the normalized (TRUE) or raw (FALSE) counts.

mark_per

By default, the function marks dominant TSR per gene, and dominant TSS per TSR. TSSs can also be set per as dominant TSS per 'gene'.

exclude_antisense

Remove antisense TSSs/TSRs prior to analysis.

Details

This function marks which TSSs are dominant per TSR or gene, or which TSR is dominant per gene. Analysis of dominant features may help to cut through the noise to get information such as the length of the primary 5' UTR and sequence features associated with the the strongest TSS.

Setting a 'threshold' will only mark a TSS or TSR as dominant if its score is greater than or equal to the threshold.

'mark_per' controls the behavior of the function. For TSSs 'default' will mark, dominant TSS per TSR, and for TSRs the dominant TSR per gene is marked. For TSSs, 'gene' can also be specified, which will mark the dominant TSS per gene.

Value

TSRexploreR object with dominant status added to TSSs or TSRs.

See Also

associate_with_tsr to associate TSSs with TSRs prior to marking dominant TSS per TSR.

Examples

data(TSSs_reduced)
annotation <- system.file("extdata", "S288C_Annotation.gtf", package="TSRexploreR")

exp <- TSSs_reduced %>%
  tsr_explorer(genome_annotation=annotation) %>%
  format_counts(data_type="tss") %>%
  tss_clustering(threshold=3) %>%
  associate_with_tsr

exp <- annotate_features(exp, data_type="tss")
exp <- mark_dominant(exp, data_type="tss", mark_per="gene")


zentnerlab/TSRexploreR documentation built on Dec. 30, 2022, 10:27 p.m.