The centralDogma package simulates the central dogma of molecular
biology: DNA -> RNA -> Peptide. The package provides functions for
each step and also a function to plot the abundance of each amino acid
in a peptide.
devtools::install_github("r4bds/centralDogma")library("centralDogma")Normally, you have a DNA strand of your own you want to investigate, but a random strand can be generated.
dna_strand <- random_dna(dna_length = 6000)The first step of the central dogma is to transcribe a gene (DNA strand) into RNA
rna_strand <- transcribe(dna = dna_strand)In reality, some post transcriptional changes occur to the messenger RNA, but we will ignore that fact here. To properly translate the RNA, it needs to be converted into a list of codons.
codons <- codon_split(rna = rna_strand)The list of codons can then be translated using the codon_table
provided with the package. Run ?codon_table if you want more
information.
peptide <- translate(codons = codons)A lot of post-translational changes are performed to the peptide, but this package will not apply those.
You are free to explore the created peptide. Here, a function is provided that plots the abundance of each amino acid in the peptide.
plot_abundance(peptide = peptide) +
ggplot2::theme(legend.position = "none")