Documentation ¶
Index ¶
- func DoTraceBack(scores, backSeqMatrix, backGrphMatrix *DpMatrix, IndexToId map[int]int) ([]int, []int)
- func MakeNodeIndexMaps(g *PoaGraph) (map[int]int, map[int]int)
- type DpMatrix
- type Edge
- type FqReader
- type MoveOption
- type Node
- type PairwiseAlignment
- type PairwiseAlignmentParameters
- type PoaGraph
- func (self *PoaGraph) AddBaseSequence(sequence string, label string, updateSequence bool) (int, int)
- func (self *PoaGraph) AddEdge(startId, endId int, label string)
- func (self *PoaGraph) AddNode(base string) int
- func (self *PoaGraph) AddSequenceAlignment(pA *PairwiseAlignment)
- func (self *PoaGraph) AllConsensuses(maxFraction float64) ([]*[]int, []*[]string, int)
- func (self *PoaGraph) GenerateAlignmentStrings() ([]string, []string)
- func (self *PoaGraph) TopoSort()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoTraceBack ¶
Types ¶
type DpMatrix ¶
type DpMatrix struct {
// contains filtered or unexported fields
}
func DpMatrixConstruct ¶
func DpMatrixConstructFull ¶
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
Edge : Directed edge object
func EdgeConstruct ¶
type FqReader ¶
FqReader holds all the necessary fields that will be use during the processing of a fasta fastq file
func (*FqReader) Iter ¶
Iter iterates over the records in a fasta fastq file Example (number of reacords and sequence/qual lenghts):
fp, r := files.Xopen("-") defer fp.Close() n, sLen, qLen := 0, int64(0), int64(0) var fqr fasta.FqReader fqr.Reader = r // Any reader you want ..
for r, done := fqr.iter(); !done; r, done = fqr.iter() { n += 1 sLen += int64(len(r.seq)) qLen += int64(len(r.qual)) }
type MoveOption ¶
type MoveOption struct {
// contains filtered or unexported fields
}
func MaxMoveOption ¶
func MaxMoveOption(options []*MoveOption) (*MoveOption, error)
returns the MoveOption with the max score
func MoveOptionConstruct ¶
func MoveOptionConstruct(score float64, backGraphIdx, backSeqIdx int, move string) *MoveOption
func (MoveOption) GetScore ¶
func (self MoveOption) GetScore() float64
func (MoveOption) String ¶
func (self MoveOption) String() string
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node : Vertex in a DAG
func NodeConstruct ¶
func (*Node) AddOutEdge ¶
type PairwiseAlignment ¶
type PairwiseAlignment struct {
// contains filtered or unexported fields
}
func AlignStringToGraph ¶
func AlignStringToGraph(g *PoaGraph, aln *PairwiseAlignmentParameters, sequence, label string) *PairwiseAlignment
func PairwiseAlignmentConstruct ¶
func PairwiseAlignmentConstruct(strIdxs, matches []int, sequence, label string) *PairwiseAlignment
type PairwiseAlignmentParameters ¶
type PairwiseAlignmentParameters struct {
// contains filtered or unexported fields
}
func PairwiseAlignmentParametersConstruct ¶
func PairwiseAlignmentParametersConstruct(matchScore, mismatchScore, openGapScore, extendGapScore float64) *PairwiseAlignmentParameters
func (*PairwiseAlignmentParameters) MatchBases ¶
func (self *PairwiseAlignmentParameters) MatchBases(c1, c2 string) float64
type PoaGraph ¶
type PoaGraph struct {
// contains filtered or unexported fields
}
POAGraph : A partial order graph for multiple sequence alignment
func PoaGraphConstruct ¶
func PoaGraphConstruct() *PoaGraph
func (*PoaGraph) AddBaseSequence ¶
func (*PoaGraph) AddSequenceAlignment ¶
func (self *PoaGraph) AddSequenceAlignment(pA *PairwiseAlignment)
func (*PoaGraph) AllConsensuses ¶
func (*PoaGraph) GenerateAlignmentStrings ¶
Click to show internal directories.
Click to hide internal directories.