| make_eventdata_plus | R Documentation |
This function reads in a GTF file, extracts gene annotations, and merges them with
event-level genomic intervals provided by the user. The final data table contains the
original event intervals and the corresponding gene information (for example, gene_id
and gene_name).
make_eventdata_plus(eventdata, GTF_file_direction)
eventdata |
A data table of genomic intervals for events. Must contain columns:
|
GTF_file_direction |
A character string specifying the path to a GTF file. The file
must contain at least these columns: |
Read the GTF: Uses data.table::fread to load GTF data and convert it to
a data table.
Subset for Genes: Keeps only rows where type == "gene", retaining columns
for chromosome, start, end, strand, gene_id, and gene_name.
Strand Conversion: Merges the GTF data with a small lookup table to replace
+ and - with numeric strand indicators 1 and 2 (matching STAR).
Overlaps: With both data sets keyed, uses foverlaps() from data.table to
find intervals in eventdata that fall fully within gene boundaries.
A data table containing overlapping event intervals with added gene metadata
(such as gene_id and gene_name). The columns returned will include both event-level
and gene-level information.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.