Documentation ¶
Overview ¶
Package random provides functions to generate random DNA, RNA, and protein sequences.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DNASequence ¶
DNASequence returns a random DNA sequence string of a given length and seed.
Example ¶
// RandomDNASequence builds a DNA Sequence by only passing through arguments a length and a seed that will be use to generate a randomly the sequence. The length needs to be greater than two because every sequence already have a start and stop codon. Seed makes this test deterministic. randomDNA, _ := DNASequence(15, 2) fmt.Println(randomDNA)
Output: TTAAATTAGATGCAA
func ProteinSequence ¶
ProteinSequence returns a random protein sequence string of a given length and seed. All returned sequences start M (Methionine) and end with * (stop codon).
Example ¶
// RandomProteinSequence builds a Protein Sequence by only passing through arguments a length and a seed that will be use to generate a randomly the sequence. The length needs to be greater than two because every sequence already have a start and stop codon. Seed makes this test deterministic. randomProtein, _ := ProteinSequence(15, 2) fmt.Println(randomProtein)
Output: MHHPAFRMFNTMYG*
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.