variants

package
v0.31.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package variants contains a function for generating all variants of a sequence.

Sometimes sequencers will only give you an *estimate* of what the basepair at a given position is. This package provides a function for generating all possible deterministic variants of a sequence given a sequence with ambiguous bases.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllVariantsIUPAC

func AllVariantsIUPAC(seq string) ([]string, error)

AllVariantsIUPAC takes a string as input and returns all iupac variants as output

Example
// AllVariantsIUPAC takes a string as input
// and returns all iupac variants as output
mendelIUPAC := "ATGGARAAYGAYGARCTN"
// ambiguous IUPAC codes for most of the sequences that code for the protein MENDEL
mendelIUPACvariants, _ := AllVariantsIUPAC(mendelIUPAC)
fmt.Println(mendelIUPACvariants)
Output:

[ATGGAGAATGATGAGCTG ATGGAGAATGATGAGCTA ATGGAGAATGATGAGCTT ATGGAGAATGATGAGCTC ATGGAGAATGATGAACTG ATGGAGAATGATGAACTA ATGGAGAATGATGAACTT ATGGAGAATGATGAACTC ATGGAGAATGACGAGCTG ATGGAGAATGACGAGCTA ATGGAGAATGACGAGCTT ATGGAGAATGACGAGCTC ATGGAGAATGACGAACTG ATGGAGAATGACGAACTA ATGGAGAATGACGAACTT ATGGAGAATGACGAACTC ATGGAGAACGATGAGCTG ATGGAGAACGATGAGCTA ATGGAGAACGATGAGCTT ATGGAGAACGATGAGCTC ATGGAGAACGATGAACTG ATGGAGAACGATGAACTA ATGGAGAACGATGAACTT ATGGAGAACGATGAACTC ATGGAGAACGACGAGCTG ATGGAGAACGACGAGCTA ATGGAGAACGACGAGCTT ATGGAGAACGACGAGCTC ATGGAGAACGACGAACTG ATGGAGAACGACGAACTA ATGGAGAACGACGAACTT ATGGAGAACGACGAACTC ATGGAAAATGATGAGCTG ATGGAAAATGATGAGCTA ATGGAAAATGATGAGCTT ATGGAAAATGATGAGCTC ATGGAAAATGATGAACTG ATGGAAAATGATGAACTA ATGGAAAATGATGAACTT ATGGAAAATGATGAACTC ATGGAAAATGACGAGCTG ATGGAAAATGACGAGCTA ATGGAAAATGACGAGCTT ATGGAAAATGACGAGCTC ATGGAAAATGACGAACTG ATGGAAAATGACGAACTA ATGGAAAATGACGAACTT ATGGAAAATGACGAACTC ATGGAAAACGATGAGCTG ATGGAAAACGATGAGCTA ATGGAAAACGATGAGCTT ATGGAAAACGATGAGCTC ATGGAAAACGATGAACTG ATGGAAAACGATGAACTA ATGGAAAACGATGAACTT ATGGAAAACGATGAACTC ATGGAAAACGACGAGCTG ATGGAAAACGACGAGCTA ATGGAAAACGACGAGCTT ATGGAAAACGACGAGCTC ATGGAAAACGACGAACTG ATGGAAAACGACGAACTA ATGGAAAACGACGAACTT ATGGAAAACGACGAACTC]
Example (Error)
// AllVariantsIUPAC takes a string as input
// and returns all iupac variants as output
mendelIUPAC := "ATGGARAAYGAYGARXYZ"
// ambiguous IUPAC codes for most of the sequences that code for the protein MENDEL
mendelIUPACvariants, _ := AllVariantsIUPAC(mendelIUPAC)
fmt.Println(mendelIUPACvariants)
Output:

[]

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL