Documentation ¶
Index ¶
- Variables
- func ExtractBest(bs Blast, p float64, fKing, fNames string) (Blast, Duplicated, error)
- func ListSortClosures(s string) ([]lessFunc, error)
- func OrderMatchBy(less ...matchLessFunc) *matchSorter
- func OrderedBy(less []lessFunc) *multiSorter
- type Blast
- func (bs Blast) ExtractGenomes() (map[string]map[string]bool, error)
- func (b Blast) GetMatchedRegions(min int) (Match, error)
- func (b Blast) GetPangenome(t pangenome.Taxids, core, acc float64, k, s string) (pangenome.Pangenome, error)
- func (b Blast) Pretty(nb int)
- func (b Blast) ReorderFna(fna, prefix string) error
- func (b Blast) Write(d, o string) error
- type Duplicated
- type Match
- type Overlap
- type OverlapMap
Constants ¶
This section is empty.
Variables ¶
View Source
var AZqseqid = func(c1, c2 *row) bool { i, ok := (*c1.index)["qseqid"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "qseqid")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a < b }
Closures that order the Change structure.
View Source
var AZsseqid = func(c1, c2 *row) bool { i, ok := (*c1.index)["sseqid"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "sseqid")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a < b }
View Source
var Closures = map[string]func(*row, *row) bool{ "qseqid": AZqseqid, "sseqid": AZsseqid, "Length": DecLength, "length": IncLength, "Pident": DecPident, "Qcovhsp": DecQcovhsp, "evalue": IncEvalue, "sstart": IncSstart, "Sstart": DecSstart, "qstart": IncQstart, "Qstart": DecQstart, }
Lists the different functions to sort our table. We use the following naming convention : names should be the same has the different column names. To sort values decreasingly, we capitalize the first letter, if available
View Source
var DecLength = func(c1, c2 *row) bool { i, ok := (*c1.index)["length"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "length")) } a, _ := c1.data[i].(int) b, _ := c2.data[i].(int) return a > b }
View Source
var DecPident = func(c1, c2 *row) bool { i, ok := (*c1.index)["pident"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "pident")) } a, _ := c1.data[i].(float64) b, _ := c2.data[i].(float64) return a > b }
View Source
var DecQcovhsp = func(c1, c2 *row) bool { i, ok := (*c1.index)["qcovhsp"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "qcovhsp")) } a, _ := c1.data[i].(float64) b, _ := c2.data[i].(float64) return a > b }
View Source
var DecQstart = func(c1, c2 *row) bool { i, ok := (*c1.index)["qstart"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "qstart")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a > b }
View Source
var DecSstart = func(c1, c2 *row) bool { i, ok := (*c1.index)["sstart"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "sstart")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a > b }
View Source
var IncEvalue = func(c1, c2 *row) bool { i, ok := (*c1.index)["evalue"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "evalue")) } a, _ := c1.data[i].(float64) b, _ := c2.data[i].(float64) return a < b }
View Source
var IncLength = func(c1, c2 *row) bool { i, ok := (*c1.index)["length"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "length")) } a, _ := c1.data[i].(int) b, _ := c2.data[i].(int) return a < b }
View Source
var IncQstart = func(c1, c2 *row) bool { i, ok := (*c1.index)["qstart"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "qstart")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a < b }
View Source
var IncSstart = func(c1, c2 *row) bool { i, ok := (*c1.index)["sstart"] if !ok { panic(fmt.Sprintf("Oups! Somehow we got a sort parameter for column %v, but no such columns in file!", "sstart")) } a, _ := c1.data[i].(string) b, _ := c2.data[i].(string) return a < b }
View Source
var Query = func(c1, c2 *aln) bool {
return c1.Query < c2.Query
}
View Source
var QueryEnd = func(c1, c2 *aln) bool {
return c1.Qend < c2.Qend
}
View Source
var QueryStart = func(c1, c2 *aln) bool {
return c1.Qstart < c2.Qstart
}
View Source
var Subject = func(c1, c2 *aln) bool {
return c1.Subject < c2.Subject
}
View Source
var SubjectEnd = func(c1, c2 *aln) bool {
return c1.Send < c2.Send
}
View Source
var SubjectStart = func(c1, c2 *aln) bool {
return c1.Sstart < c2.Sstart
}
Functions ¶
func ExtractBest ¶
func ListSortClosures ¶
func OrderMatchBy ¶
func OrderMatchBy(less ...matchLessFunc) *matchSorter
OrderedBy returns a Sorter that sorts using the less functions, in order. Call its Sort method to sort the data.
Types ¶
type Blast ¶
type Blast struct {
// contains filtered or unexported fields
}
The main struct to describe the Blast result data table Consists of a list of `columns` names, and the actual `data` table
func (Blast) GetMatchedRegions ¶
Extracts matched regions from the blast results If alignment length is lower than min, aln is ignored
func (Blast) GetPangenome ¶
func (Blast) ReorderFna ¶
type Duplicated ¶
type Duplicated [][]*row
func (Duplicated) PrintDup ¶
func (d Duplicated) PrintDup()
func (Duplicated) Write ¶
func (d Duplicated) Write(dir, o string) error
type Match ¶
type Match []aln
func (Match) GetOverlap ¶
func (m Match) GetOverlap(name string, gap int) (OverlapMap, OverlapMap)
type Overlap ¶
type Overlap struct { Name string Regions []region Gaps []int // Space between overlapping regions }
type OverlapMap ¶
Map linking query and subject and pointing to Match struct
func (OverlapMap) NewEntry ¶
func (m OverlapMap) NewEntry(a aln, o Overlap, name string)
Click to show internal directories.
Click to hide internal directories.