annotate_features: Annotate Features

View source: R/annotate.R

annotate_featuresR Documentation

Annotate Features

Description

Use the ChIPseeker package to annotate TSSs or TSRs relative to known genes or transcripts.

Usage

annotate_features(
  experiment,
  data_type = c("tss", "tsr", "tss_diff", "tsr_diff", "shift"),
  feature_type = c("gene", "transcript"),
  genome_annotation = NULL,
  upstream = 1000,
  downstream = 100
)

Arguments

experiment

TSRexploreR object.

data_type

Whether to annotate TSSs ('tss') or TSRs ('tsr').

feature_type

Whether to annotate at the 'gene' or 'transcript' level.

genome_annotation

Genome annotation in GTF, GFF3, or TxDb format.

upstream

Number of bases upstream of TSS for 'promoter' annotation (integer).

downstream

Number of bases downstream of TSS for 'promoter' annotation (integer).

Details

This function attempts to assign TSSs or TSRs to the nearest genomic feature. Genomic annotation data can be provided as either a 'GTF' or 'GFF' file, or as a TxDb package from Bioconductor.

'feature_type' allows to you link TSSs or TSRs to genes or transcripts. Furthermore, the size of the promoter region can be defined using 'upstream' and 'downstream', which are relative to the TSSs defined in your annotation data. TSSs or TSRs overlapping a gene on the opposite strand will be marked as 'Antisense'.

Value

TSRexploreR object with annotation data added to TSS or TSR tables.

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")

exp <- annotate_features(exp, data_type="tss")


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