Computes the spliced length of transcripts by summing the lengths of their constituent exons. This represents the mature RNA length after intron removal.
Value
A data frame with two columns: transcript_id
and transcript_length
, where the latter is the sum of exon widths for each transcript.
Details
This function processes the input data to:
Filter entries to include only exons.
Group exons by transcript ID.
Sum the widths of all exons per transcript.
The result provides the total length of the mature spliced RNA for each transcript.
Examples
file_v1 <- system.file("extdata", "gencode.v1.example.gtf.gz", package = "GencoDymo2")
gtf_v1 <- load_file(file_v1)
spliced_lengths <- spliced_trans_length(gtf_v1)