View source: R/generate_complement.R
| generate_complement | R Documentation |
Generate the complementary sequence of a nucleic acid sequence, with an option to reverse it.
generate_complement(input_seq, reverse = FALSE)
input_seq |
Input sequence(s) in 5' to 3' direction. Must be provided as either: - A character string (e.g., c("ATGCG", "GCTAG")) |
reverse |
Logical, controlling which of the two ways of writing the opposite strand is returned.
input 5'-A T G C G-3' reverse = FALSE T A C G C (3' to 5', pairs position by position) reverse = TRUE 5'-C G C A T-3' (the same strand, written 5' to 3') |
Returns the complementary sequence(s) in the specified direction.
Junhui Li
citation("TmCalculator")
# Plain complement: pairs position by position, reads 3' to 5'
generate_complement("ATGCG", reverse = FALSE)
# Reverse complement: the same strand written 5' to 3'
generate_complement("ATGCG", reverse = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.