Skip to contents

extract_trna_gcn processes tRNA sequence data from GtRNADB to extract gene copy numbers for each tRNA type. This information is essential for calculating tRNA availability weights used in TAI analysis.

Usage

extract_trna_gcn(trna_seq)

Arguments

trna_seq

A named vector or DNAStringSet of tRNA sequences, typically from GtRNADB. Sequence names should follow the standard format containing amino acid and anticodon information (e.g., "tRNA-Ala-AGC-1-1").

Value

A named table of tRNA gene copy numbers. Names are in the format "AminoAcid-Anticodon" (e.g., "Ala-AGC") and values represent the count of genes encoding each tRNA type. Initiator tRNAs (iMet, fMet) and undetermined tRNAs (Und-NNN) are automatically excluded as they serve specialized functions in translation initiation.

Examples

# Extract tRNA gene copy numbers for yeast
trna_gcn <- extract_trna_gcn(yeast_trna)
head(trna_gcn)
#> 
#> Ala-AGC Ala-TGC Arg-ACG Arg-CCG Arg-CCT Arg-TCT 
#>      11       5       6       1       1      11 

# View the distribution of tRNA gene copies
hist(trna_gcn, main = "Distribution of tRNA gene copy numbers")