Documentation
¶
Index ¶
- Variables
- func GetAPIDoc() []byte
- func GetAssetFS() (fs.FS, error)
- func GetTemplateFS() (fs.FS, error)
- func GetVersion() string
- func MostRecentSamplesheet(path string) (string, error)
- type APIKey
- type Analysis
- type AnalysisSummary
- type Gene
- type GenePanel
- type GenePanelVersion
- type PaginationFilter
- type PaginationMetadata
- type PanelFilter
- type Pipeline
- type Platform
- type Platforms
- type QcFilter
- type QcResult
- type Run
- type RunCompletionStatus
- type RunFilter
- type RunResult
- type RunState
- func (r RunState) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (r RunState) MarshalJSON() ([]byte, error)
- func (s *RunState) Set(v string) error
- func (s RunState) String() string
- func (s *RunState) Type() string
- func (r *RunState) UnmarshalBSONValue(t bsontype.Type, data []byte) error
- func (r *RunState) UnmarshalJSON(data []byte) error
- type RunningSummary
- type Sample
- type SampleAnalysis
- type SampleAnalysisResult
- type SampleFilter
- type SampleResult
- type SampleSheet
- type SampleSheetInfo
- type Section
- type SectionType
- type Time
- type TimedRunState
- type UpdateResult
- type Version
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GetAssetFS ¶
func GetTemplateFS ¶
func GetVersion ¶ added in v0.2.0
func GetVersion() string
func MostRecentSamplesheet ¶
Find the SampleSheet with the most recent modification time in a directory. The file name must be on the format `SampleSheet*.csv`.
Types ¶
type Analysis ¶
type Analysis struct {
AnalysisId string `bson:"analysis_id" json:"analysis_id"`
Path string `bson:"path" json:"path"`
State RunState `bson:"state" json:"state"`
Summary *AnalysisSummary `bson:"summary" json:"summary"`
}
type AnalysisSummary ¶
type AnalysisSummary struct {
RunID string `bson:"run_id" json:"run_id"`
Result string `bson:"result" json:"result"`
SoftwareVersion string `bson:"software_version" json:"software_version"`
Workflows []struct {
WorkflowName string `bson:"workflow_name" json:"workflow_name"`
ReportAggregation string `bson:"report_aggregation" json:"report_aggregation"`
Samples []struct {
SampleID string `bson:"sample_id" json:"sample_id"`
BclToFastq string `bson:"bcl_to_fastq" json:"bcl_to_fastq"`
OraCompression string `bson:"ora_compression" json:"ora_compression"`
SecondaryAnalysis string `bson:"secondary_analysis" json:"secondary_analysis"`
ReportGeneration string `bson:"report_generation" json:"report_generation"`
} `bson:"samples" json:"samples"`
} `bson:"workflows" json:"workflows"`
}
func ParseAnalysisSummary ¶
func ParseAnalysisSummary(data []byte) (AnalysisSummary, error)
type GenePanel ¶ added in v0.5.0
type GenePanel struct {
GenePanelVersion `bson:",inline" json:",inline"`
Id string `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Categories []string `json:"categories"`
Genes []Gene `json:"genes,omitzero"`
Archived bool `json:"archived"`
ArchivedAt time.Time `bson:",omitzero" json:"archived_at,omitzero"`
}
func NewGenePanel ¶ added in v0.5.0
func (*GenePanel) AddCategory ¶ added in v0.5.0
type GenePanelVersion ¶ added in v0.5.0
type PaginationFilter ¶ added in v0.3.0
Pagination filtering.
func (PaginationFilter) Validate ¶ added in v0.3.0
func (f PaginationFilter) Validate() error
type PaginationMetadata ¶
type PanelFilter ¶ added in v0.5.0
type PanelFilter struct {
Category string `form:"category"`
Name string `form:"name"`
NameQuery string `form:"name_query"`
Gene string `form:"gene"`
GeneQuery string `form:"gene_query"`
HGNC string `form:"hgnc"`
Version string `form:"version"`
Archived bool `form:"archived"`
}
func NewPanelFilter ¶ added in v0.5.0
func NewPanelFilter() PanelFilter
type Pipeline ¶ added in v0.3.0
type Pipeline struct {
Name string `bson:"name" json:"name"`
Version string `bson:"version" json:"version"`
URL string `bson:"url" json:"url"`
}
Pipeline represents an analysis pipeline.
type Platform ¶
type Platform struct {
Name string
InstrumentIds []string
Aliases []string
ReadyMarker string
RunCount int
}
Platform represents a sequencing platform.
func (*Platform) UnmarshalBSON ¶ added in v0.4.0
UnmarshalBSON unmarshals a BSON representation into a Platform struct.
type Platforms ¶ added in v0.4.0
type Platforms struct {
Platforms []Platform
// contains filtered or unexported fields
}
Platforms represents a collection of sequencing platforms.
func (Platforms) Condense ¶ added in v0.4.0
Condense merges platforms by name. This collects all the instrument IDs and aliases for platforms with the same name, as well as sums up the run count for all individual instruments. The function will leave the original object intact and return a new Platforms object. Platforms will be sorted lexicographically by name.
type QcFilter ¶
type QcFilter struct {
RunId string `form:"run_id"`
RunIdQuery string `form:"run_id_query"`
Platform string `form:"platform"`
StartDate time.Time `form:"start_time"`
EndDate time.Time `form:"end_time"`
PaginationFilter
}
QC filtering.
func NewQcFilter ¶ added in v0.4.0
func NewQcFilter() QcFilter
type QcResult ¶
type QcResult struct {
PaginationMetadata `bson:"metadata" json:"metadata"`
InteropSummary []interop.InteropSummary `bson:"interop" json:"interop"`
}
type Run ¶
type Run struct {
RunID string `bson:"run_id" json:"run_id"`
ExperimentName string `bson:"experiment_name" json:"experiment_name"`
Path string `bson:"path" json:"path"`
Platform string `bson:"platform" json:"platform"`
Created time.Time `bson:"created" json:"created"`
StateHistory []TimedRunState `bson:"state_history" json:"state_history"`
SampleSheet *SampleSheetInfo `bson:"samplesheet,omitempty" json:"samplesheet"`
SampleSheetFiles []SampleSheetInfo `bson:"samplesheets,omitempty" json:"samplesheets"`
RunParameters interop.RunParameters `bson:"run_parameters,omitzero" json:"run_parameters,omitzero"`
RunInfo interop.RunInfo `bson:"run_info,omitzero" json:"run_info,omitzero"`
Analysis []*Analysis `bson:"analysis,omitempty" json:"analysis,omitempty"`
AnalysisCount int `bson:"analysis_count" json:"analysis_count"`
}
Run represents an Illumina sequencing run.
func (*Run) UnmarshalBSON ¶
Unmarshals a BSON representation of a run. This supports schema version 1 and 2. If the schema verison is not defined in the document, it is assumed to be version 1. The goal is to eventually deprecate version 1.
type RunCompletionStatus ¶
func ParseRunCompletionStatus ¶
func ParseRunCompletionStatus(data []byte) (RunCompletionStatus, error)
func ReadRunCompletionStatus ¶
func ReadRunCompletionStatus(filename string) (RunCompletionStatus, error)
type RunFilter ¶
type RunFilter struct {
RunID string `form:"run_id"`
RunIdQuery string `form:"run_id_query"`
Brief bool `form:"brief"`
Platform string `form:"platform"`
State string `form:"state"`
From time.Time `form:"from"`
To time.Time `form:"to"`
PaginationFilter `form:",inline"`
}
Run filtering.
func NewRunFilter ¶ added in v0.4.0
func NewRunFilter() RunFilter
type RunResult ¶
type RunResult struct {
PaginationMetadata `bson:"metadata" json:"metadata"`
Runs []*Run `bson:"runs" json:"runs"`
}
type RunState ¶
type RunState int
func (RunState) MarshalBSONValue ¶
func (RunState) MarshalJSON ¶
func (*RunState) UnmarshalBSONValue ¶
func (*RunState) UnmarshalJSON ¶
type RunningSummary ¶
type RunningSummary[T uint32 | uint64 | float32 | float64] struct { Sum T Mean float64 // contains filtered or unexported fields }
func NewRunningSummary ¶
func (*RunningSummary[T]) Push ¶
func (v *RunningSummary[T]) Push(x T, weight ...T) error
func (RunningSummary[T]) SD ¶
func (v RunningSummary[T]) SD() float64
func (RunningSummary[T]) Var ¶
func (v RunningSummary[T]) Var() float64
type Sample ¶ added in v0.3.0
type Sample struct {
// Sample name. If missing it should be set to the sample ID.
Name string `bson:"name" json:"name"`
// Sample ID as listed in the samplesheet.
Id string `bson:"id" json:"id"`
// Paths to fastq files related to the sample.
Fastq []string `bson:"fastq" json:"fastq"`
// Analyses associated with the sample.
Analyses []*SampleAnalysis `bson:"analyses" json:"analyses"`
}
Sample represents a sequenced sample with associated analyses.
type SampleAnalysis ¶ added in v0.3.0
type SampleAnalysis struct {
Pipeline `bson:"pipeline" json:"pipeline"`
Results []SampleAnalysisResult `bson:"path" json:"path"`
}
SampleAnalysis represents a collection of analysis results from an analysis pipeline.
type SampleAnalysisResult ¶ added in v0.3.0
type SampleAnalysisResult struct {
Type string `bson:"type" json:"type"`
Description string `bson:"description" json:"description"`
Path []string `bson:"path" json:"path"`
}
SampleAnalysisResult is a specific result from an analysis pipeline.
type SampleFilter ¶ added in v0.3.0
type SampleFilter struct {
Name string `form:"sample_name"`
Id string `form:"sample_id"`
RunId string `form:"run_id"`
Analysis string `form:"analysis"`
PaginationFilter `form:",inline"`
}
Sample filtering.
func NewSampleFilter ¶ added in v0.4.0
func NewSampleFilter() SampleFilter
func (SampleFilter) UrlParams ¶ added in v0.3.0
func (f SampleFilter) UrlParams() string
Convert a sample filter to URL query parameters.
type SampleResult ¶ added in v0.3.0
type SampleResult struct {
PaginationMetadata `bson:"metadata" json:"metadata"`
Samples []Sample `bson:"samples" json:"samples"`
}
type SampleSheet ¶
type SampleSheet struct {
RunID *string `bson:"run_id" json:"run_id"`
UUID *uuid.UUID `bson:"uuid" json:"uuid"`
Files []SampleSheetInfo `bson:"files" json:"files"`
Sections []Section `bson:"sections" json:"sections"`
}
func ParseSampleSheet ¶
func ParseSampleSheet(r *bufio.Reader) (SampleSheet, error)
func ReadSampleSheet ¶
func ReadSampleSheet(filename string) (SampleSheet, error)
func (SampleSheet) IsValid ¶
func (s SampleSheet) IsValid() bool
func (SampleSheet) LastModified ¶ added in v0.3.0
func (s SampleSheet) LastModified() (time.Time, error)
func (SampleSheet) Merge ¶ added in v0.3.0
func (s SampleSheet) Merge(other *SampleSheet) (*SampleSheet, error)
Merge two sample sheets. Merging is only allowed if the UUIDs of the sample sheets are the same, and the run IDs are the same. An exception to this is if the run ID of the current sample sheet is nil. If the run ID in the current sample sheet is non-nil and different from the other sample sheet, or if the UUIDs are different, an error is returned.
func (SampleSheet) Section ¶
func (s SampleSheet) Section(name string) *Section
func (SampleSheet) Version ¶
func (s SampleSheet) Version() int
type SampleSheetInfo ¶
type Section ¶
type Section struct {
Name string `bson:"name" json:"name"`
Type SectionType `bson:"type" json:"type"`
Rows [][]string `bson:"rows" json:"rows"`
}
type SectionType ¶
type SectionType int
const ( UnknownSection SectionType = iota SettingsSection DataSection )
func (SectionType) MarshalBSONValue ¶
func (s SectionType) MarshalBSONValue() (bsontype.Type, []byte, error)
func (SectionType) MarshalJSON ¶
func (s SectionType) MarshalJSON() ([]byte, error)
func (SectionType) String ¶
func (s SectionType) String() string
func (*SectionType) UnmarshalBSONValue ¶
func (s *SectionType) UnmarshalBSONValue(t bsontype.Type, b []byte) error
type TimedRunState ¶
type UpdateResult ¶
type UpdateResult = mongo.UpdateResult
type Version ¶ added in v0.2.0
func NewMinorVersion ¶ added in v0.5.0
func NewPatchVersion ¶ added in v0.5.0
func ParseVersion ¶ added in v0.5.0
func (Version) MarshalJSON ¶ added in v0.5.0
func (Version) NewerThan ¶ added in v0.5.0
NewerThan checks if version `v` is newer than verson `other`. Only returns `true` if `v` is strictly larger than `other`. If the versions are identical `false` is returned. If one of the versions has a patch version number and the other doesn't, false is returned.
func (Version) OlderThan ¶ added in v0.5.0
OlderThan checks if version `v` is older than verson `other`. Only returns `true` if `v` is strictly smaller than `other`. If the versions are identical `false` is returned. If one of the versions has a patch version number and the other doesn't, false is returned.