Documentation
¶
Overview ¶
Package transform provides functions for transforming sequences.
Complement takes the complement of a sequence. (returns a sequence string where each nucleotide has been swapped with its complement A<->T, C<->G)
Reverse takes the reverse of a sequence. (literally just reverses a string. Exists in stdlib but hey why not have it here too?)
ReverseComplement takes the reverse complement of a sequence. (Reverses the sequence string and returns the complement of the reversed sequence.)
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Complement ¶
Complement takes the complement of a sequence.
Example ¶
package main
import (
"fmt"
"github.com/TimothyStiles/poly/transform"
)
func main() {
sequence := "GATTACA"
complement := transform.Complement(sequence)
fmt.Println(complement)
}
Output: CTAATGT
func ComplementBase ¶
ComplementBase accepts a base pair and returns its complement base pair
func Reverse ¶
Reverse takes the reverse of a sequence.
Example ¶
package main
import (
"fmt"
"github.com/TimothyStiles/poly/transform"
)
func main() {
sequence := "GATTACA"
reverse := transform.Reverse(sequence)
fmt.Println(reverse)
}
Output: ACATTAG
func ReverseComplement ¶
ReverseComplement takes the reverse complement of a sequence.
Example ¶
package main
import (
"fmt"
"github.com/TimothyStiles/poly/transform"
)
func main() {
sequence := "GATTACA"
reverseComplement := transform.ReverseComplement(sequence)
fmt.Println(reverseComplement)
}
Output: TGTAATC
Types ¶
This section is empty.