knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
This documentation describes three use cases of this package.
library(iCodon) library(dplyr)
Suppose you have a table containing a set of coding DNA sequences like the one shown next.
set.seed(12) codin_seqs <- training %>% sample_n(100) %>% select(gene_id, coding) %>% filter(!duplicated(coding))
codin_seqs
If you wish to compute the codon-frequencies you can use the function add_codon_counts
.
add_codon_counts(codin_seqs)
see the help ?add_codon_counts
for more information about this function.
You can use the function predict_stability
to predict the mRNA stability based on the codon sequence (Medina et al 2020).
Positive values indicate stability, while negative values indicate instability.
You need to specify a species. Possible species are:
predictor_human <- predict_stability(specie = "human") # Now you can pass any coding sequence to this function predictor_human("ATGTGGAGCGGCGGAGCTGAGCAACAACACCCTAAAACCGACAAATCTCACCGATGCAATGGCGTCGACAGCTCAAGAAGAAAGAACAGATCGCAGCGGTGGCGATATGAAGTCAAGAAAACTGGATGA")
If you have a table (see first example) you can add a column with the prediction for each sequence.
codin_seqs$prediction_optimality <- predictor_human(codin_seqs$coding) select(codin_seqs, gene_id, prediction_optimality)
To optimize mRNA stability you can use the function optimizer
.
a_seq <- "ATGTGGAGCGGCGGAGCTGAGCAACAACACCCTAAAACCGACAAATCTCACCGATGCAATGGCGTCGACAGCTCAAGAAGAAAGAACAGATCGCAGCGGTGGCGATATGAAGTCAAGAAAACTGGATGA" optimizer( sequence_to_optimize = a_seq, specie = "human", n_iterations = 10, make_more_optimal = TRUE, mutation_Rate = .1, max_abs_val = 2, n_Daughters = 4 )
See the help ?optimizer
for information about the parameters.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.