Documentation ¶
Index ¶
- Constants
- Variables
- func BeamPrune(beamstep *map[int]*State) float64
- func CONTRAfoldV2(sequence string, beamSize int) (string, float64)
- func GET_ACGU_NUM(x rune) int
- func Max(a, b int) int
- func Min(a, b int) int
- func NUM_TO_NUC(x int) int
- func NUM_TO_PAIR(x, y int) (ret energy_params.BasePairType)
- func Parse(sequence string, foldingModel FoldingModel) (string, float64)
- func SET_HELIX_STACKING(x rune, y rune, z rune, w rune, val bool)
- func ScoreExternalUnpaired(i, j int) float64
- func ViennaRNAFold(sequence string, temperature float64, ...) (string, float64)
- type FoldingModel
- type Pair
- type PairHeap
- type State
- type Tuple
Examples ¶
Constants ¶
View Source
const ( MANNER_NONE = iota // 0: empty MANNER_H // 1: hairpin candidate MANNER_HAIRPIN // 2: hairpin MANNER_SINGLE // 3: single MANNER_HELIX // 4: helix MANNER_MULTI // 5: multi = ..M2. [30 restriction on the left and jump on the right] MANNER_MULTI_eq_MULTI_plus_U // 6: multi = multi + U MANNER_P_eq_MULTI // 7: P = (multi) MANNER_M2_eq_M_plus_P // 8: M2 = M + P MANNER_M_eq_M2 // 9: M = M2 MANNER_M_eq_M_plus_U // 10: M = M + U MANNER_M_eq_P // 11: M = P /* MANNER_C_eq_U, */ /* MANNER_C_eq_P, */ MANNER_C_eq_C_plus_U // 12: C = C + U MANNER_C_eq_C_plus_P // 13: C = C + P )
What is manner?
View Source
const ( DefaultTemperature = mfe.DefaultTemperature DefaultEnergyParamsSet = energy_params.Turner2004 )
View Source
const ASYMMETRY_MAX_LEN int = 28
View Source
const DefaultBeamSize int = 100
recommended beam size based on paper
View Source
const EXPLICIT_MAX_LEN int = 4
View Source
const HAIRPIN_MAX_LEN int = 30
View Source
const MIN_CUBE_PRUNING_SIZE int = 20
View Source
const NOTON int = 5 // NUM_OF_TYPE_OF_NUCS
View Source
const NOTOND int = 25
View Source
const NOTONT int = 125
View Source
const SINGLE_MAX_LEN int = 30 // NOTE: *must* <= sizeof(char), otherwise modify State::TraceInfo accordingly
View Source
const SINGLE_MIN_LEN int = 0
View Source
const SYMMETRIC_MAX_LEN int = 15
Variables ¶
View Source
var INTERNAL_MAX_LEN int = SINGLE_MAX_LEN
View Source
var VALUE_MIN float64 = -math.MaxFloat64
Functions ¶
func GET_ACGU_NUM ¶
func NUM_TO_NUC ¶
func NUM_TO_PAIR ¶
func NUM_TO_PAIR(x, y int) (ret energy_params.BasePairType)
func ScoreExternalUnpaired ¶
func ViennaRNAFold ¶
func ViennaRNAFold(sequence string, temperature float64, energyParamsSet energy_params.EnergyParamsSet, danglingEndsModel mfe.DanglingEndsModel, beamSize int) (string, float64)
Example ¶
sequence := "UCUAGACUUUUCGAUAUCGCGAAAAAAAAU" result, score := ViennaRNAFold(sequence, DefaultTemperature, DefaultEnergyParamsSet, mfe.DefaultDanglingEndsModel, DefaultBeamSize) fmt.Println(fmt.Sprintf("result: %v , score: %.2f", result, score))
Output: result: .......((((((......))))))..... , score: -3.90
Types ¶
type FoldingModel ¶
type FoldingModel int
const ( CONTRAfoldv2 FoldingModel = iota // CONTRAfold v2.0 machine-learned model, Do et al 2006 ViennaRNA // thermodynamic model, Lorenz et al 2011, with parameters from Mathews et al 2004 )
Click to show internal directories.
Click to hide internal directories.