AnnotatePeaksFromGTF: Annotates a set of peak coordinates from a GTF

View source: R/Annotate.R

AnnotatePeaksFromGTFR Documentation

Annotates a set of peak coordinates from a GTF

Description

Annotate a set of peak coordinates according to genomic features the coordinates fall on - 3'UTR, exon, intron and 5'UTR, and annotate proximity to motifs. Motifs include the canonical polyA motif, A-rich regions and T-rich regions.

Usage

AnnotatePeaksFromGTF(
  peak.sites.file,
  gtf.file,
  output.file,
  genome = NULL,
  invert_strand = FALSE,
  annotationType = "any",
  transcriptDetails = TRUE,
  annotation_correction = TRUE,
  pA_motif_max_position = 50,
  AAA_motif_min_position = 10,
  polystretch_length = 13,
  max_mismatch = 1,
  append.chr.peaks = TRUE,
  check.chr = TRUE
)

Arguments

peak.sites.file

a file of peak coordinates.

gtf.file

GTF reference file.

output.file

file to write the annotations to.

genome

genome object. If NOT NULL then will perform pA motif analysis.

invert_strand

Boolean to signifiy if strand of gr peaks should be inversed

annotationType

can be assigned "any" or "within". Default is "any" which states that the peak with gr must overlap annotation feature (eg exon)

transcriptDetails

Boolean. If false will only return gene name. If true will return internal transcript position feature (eg exon/intron)

annotation_correction

Boolean. When multiple overlapping genes are identified will prioritise gene based on annotation. 3'UTR annotation trumps all other annotation.

pA_motif_max_position

Any AAUAAA after this position are not considered (default 50nt)

AAA_motif_min_position

Any polyA/polyT stretches before this postion are not considered (default 10)

polystretch_length

: the length of A or T to search for (default 13)

max_mismatch

number of allowed mismatches for motif matching (default 1)

append.chr.peaks

: When TRUE (default) appends the character "chr" on chromosome entry in peaks file.

check.chr

if TRUE (default) and append.chr.peaks is also TRUE, check whether "chr" characters have already been added.

Value

NULL. writes output to file

Examples


extdata_path <- system.file("extdata",package = "Sierra")
peak.merge.output.file <- paste0(extdata_path, "/TIP_merged_peaks.txt")
reference.file <- paste0(extdata_path,"/Vignette_cellranger_genes_subset.gtf")


 genome <- BSgenome.Mmusculus.UCSC.mm10::BSgenome.Mmusculus.UCSC.mm10


 AnnotatePeaksFromGTF(peak.sites.file = peak.merge.output.file, 
                    gtf.file = reference.file, 
                    output.file = "TIP_merged_peak_annotations.txt", 
                    genome = genome)



VCCRI/Sierra documentation built on July 3, 2023, 6:39 a.m.