annotate_features.Rd
Use the ChIPseeker package to annotate TSSs or TSRs relative to known genes or transcripts.
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 )
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). |
TSRexploreR object with annotation data added to TSS or TSR tables.
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'.
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")#>#>#>#>#>#> Warning: The "phase" metadata column contains non-NA values for features of type #> stop_codon. This information was ignored.#>exp <- annotate_features(exp, data_type="tss")#>