model

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2018 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	STATUS_NOT_EXISTS = -1
	STATUS_PENDING    = 0
	STATUS_RUNNING    = 1
	STATUS_FINISHED   = 2
	STATUS_ERROR      = 3
	STATUS_CANCELED   = 4
	STATUS_TIMEOUT    = 5
	STATUS_DELETED    = 6

	WORKFLOW_NIL       = -1
	WORKFLOW_PHYML_SMS = 8
	WORKFLOW_FASTTREE  = 9

	ALIGN_AMINOACIDS = 0
	ALIGN_NUCLEOTIDS = 1
)

Variables

This section is empty.

Functions

func WorkflowConst added in v0.1.5

func WorkflowConst(workflow string) (w int, err error)

Types

type Analysis

type Analysis struct {
	Id      string `json:"id"`      // sha256 sum of reftree and boottree files
	RunName string `json:"runname"` // Optional user given name of the run
	EMail   string `json:"-"`       // EMail of the job creator, may be empty string ""

	// Next attributes are for users who want to build the trees using PhyML-SMS of galaxy
	SeqAlign      string `json:"alignfile"` // Input Fasta Sequence Alignment if user wants to build the ref/boot trees (priority over reffile and bootfile)
	NbootRep      int    `json:"nbootrep"`  // Number of bootstrap replicates given by the user to build the bootstrap trees
	Alignfile     string `json:"align"`     // Alignment result file returned by galaxy workflow if users gave a input sequence file
	AlignAlphabet int    `json:"alphabet"`  // Alignment alphabet: 0: aa | 1 : nt
	Workflow      int    `json:"workflow"`  // The galaxy workflow that has been run. 8:PHYML-SMS, 9: FASTTREE
	AlignNbSeq    int    `json:"nbseqs"`    // Number of sequences in the given alignment
	AlignLength   int    `json:"length"`    // Length of the given alignment

	Reffile       string `json:"reftreefile"`  // reftree original file path
	Bootfile      string `json:"boottreefile"` // bootstrap original file path
	FbpTree       string `json:"fbptree"`      // Tree with Fbp supports
	TbeNormTree   string `json:"tbenormtree"`  // resulting newick tree with support
	TbeRawTree    string `json:"tberawtree"`   // result tree with raw <id|avg_dist|depth> as branch names
	TbeLogs       string `json:"tbelogs"`      // log file
	Status        int    `json:"status"`       // status code of the analysis
	JobId         string `json:jobid`          // Galaxy or Local JobId
	GalaxyHistory string `json:galaxyhistory`  // Galaxy History
	Message       string `json:"message"`      // error message if any
	Nboot         int    `json:"nboot"`        // number of trees that have been processed
	StartPending  string `json:"startpending"` // Analysis queue time
	StartRunning  string `json:"startrunning"` // Analysis Start running time
	End           string `json:"end"`          // Analysis End time
}

func NewAnalysis added in v0.1.5

func NewAnalysis() (a *Analysis)

func (*Analysis) BootfileName added in v0.1.8

func (a *Analysis) BootfileName() string

func (*Analysis) DelTemp

func (a *Analysis) DelTemp()

func (*Analysis) OlderThan added in v0.1.5

func (a *Analysis) OlderThan(agelimit time.Duration) (old bool, err error)

A job is considered old if its end time is < today-days

A timeout <= 0 means : no limit on job age

func (*Analysis) ReffileName added in v0.1.8

func (a *Analysis) ReffileName() string

func (*Analysis) RunTime added in v0.1.5

func (a *Analysis) RunTime() string

Returns the run time of the analysis from the start pending time If end date is not filled yet, takes now(). If some dates have format issues: returns "?"

func (*Analysis) RunTimeDuration added in v0.1.5

func (a *Analysis) RunTimeDuration() (delta time.Duration, err error)

Returns the run time of the analysis from the start pending time If end date is not filled yet, takes now(). If some dates have format issues: returns "?"

func (*Analysis) SeqAlignName added in v0.1.8

func (a *Analysis) SeqAlignName() string

func (*Analysis) StatusStr

func (a *Analysis) StatusStr() (st string)

func (*Analysis) TimedOut added in v0.1.5

func (a *Analysis) TimedOut(timeout time.Duration) (timedout bool, err error)

A job is considered timed out if its run time is > than the given timeout and the given timeout is > 0

A timeout <= 0 means : no time timit on runtime

func (*Analysis) WorkflowStr added in v0.1.5

func (a *Analysis) WorkflowStr() string

Jump to

Keyboard shortcuts

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