Documentation
¶
Overview ¶
Package used for preprocessing necessary data for the CAMUS algorithm
Index ¶
- Variables
- func ConvertToNetwork(ntw *tree.Tree) (network *gr.Network, err error)
- func NetworkIsBinary(ntw *tree.Tree) bool
- func Preprocess(tre *tree.Tree, geneTrees []*tree.Tree, nprocs int, opts QuartetFilterOptions, ...) (*gr.TreeData, error)
- func TreeIsBinary(tre *tree.Tree) bool
- func WriteDPResultsToCSV(td *gr.TreeData, newicks []string, qsat []float64, w io.Writer) (err error)
- func WriteResultsLineplot(qstat []float64, prefix string) error
- func WriteRetScoresToCSV(scores []*map[string]float64, names []string) error
- type Format
- type GeneTrees
- type QMode
- type QuartetFilterOptions
- type Threshold
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidFile = errors.New("invalid file") ErrInvalidFormat = errors.New("invalid format") ErrNoReticulations = errors.New("no reticulations") ErrWritingFile = errors.New("error writing file") )
View Source
var ( ErrUnrooted = errors.New("not rooted") ErrNonBinary = errors.New("not binary") ErrMulTree = errors.New("contains duplicate labels") ErrTypeOutRange = errors.New("out of type range") )
View Source
var ParseFormat = map[string]Format{ "newick": Newick, "nexus": Nexus, }
Functions ¶
func ConvertToNetwork ¶
Read in extended newick file and make network
func NetworkIsBinary ¶
func Preprocess ¶
func Preprocess(tre *tree.Tree, geneTrees []*tree.Tree, nprocs int, opts QuartetFilterOptions, minSupp float64) (*gr.TreeData, error)
Preprocess necessary data. Returns an error if the constraint tree is not valid (e.g., not rooted/binary) or if the gene trees are not valid (bad leaf labels).
func TreeIsBinary ¶
func WriteDPResultsToCSV ¶ added in v0.8.0
func WriteDPResultsToCSV(td *gr.TreeData, newicks []string, qsat []float64, w io.Writer) (err error)
Write DP results csv file to writer.
There are three columns: "Number of Branches", "Quartet Satisfied Percent", "Extended Newick"
func WriteResultsLineplot ¶ added in v0.8.0
Types ¶
type GeneTrees ¶
func ReadInputFiles ¶
Reads in and validates constraint tree and gene tree input files. Returns an error if the newick format is invalid, or the file is invalid for some other reason (e.g., more than one constraint tree)
type QuartetFilterOptions ¶ added in v0.4.1
type QuartetFilterOptions struct {
// contains filtered or unexported fields
}
Options for quartet filter mode
func SetQuartetFilterOptions ¶ added in v0.4.1
func SetQuartetFilterOptions(mode int, threshold float64) (QuartetFilterOptions, error)
func (QuartetFilterOptions) QuartetFilterOff ¶ added in v0.4.1
func (opts QuartetFilterOptions) QuartetFilterOff() bool
Click to show internal directories.
Click to hide internal directories.