records

package
v0.0.0-...-412bf38 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0: "UN_INITIALIZED",
		1: "untagged",
		2: "tagsIncomplete",
		3: "tagsComplete",
		4: "announced",
	}
	Status_value = map[string]int32{
		"UN_INITIALIZED": 0,
		"untagged":       1,
		"tagsIncomplete": 2,
		"tagsComplete":   3,
		"announced":      4,
	}
)

Enum value maps for Status.

View Source
var (
	RecordType_name = map[int32]string{
		0: "run",
		1: "sample",
	}
	RecordType_value = map[string]int32{
		"run":    0,
		"sample": 1,
	}
)

Enum value maps for RecordType.

View Source
var DefaultFastqExtensions []string = []string{"*.fastq", "*.fq"}

DefaultFastqExtensions is used to glob the files from directories

View Source
var File_herald_records_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Comment

type Comment struct {
	Timestamp *timestamp.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Text      string               `protobuf:"bytes,2,opt,name=text,proto3" json:"text,omitempty"`
	// contains filtered or unexported fields
}

Comments are used to record generic text entries and to track the history of HeraldData.

func (*Comment) Descriptor deprecated

func (*Comment) Descriptor() ([]byte, []int)

Deprecated: Use Comment.ProtoReflect.Descriptor instead.

func (*Comment) GetText

func (x *Comment) GetText() string

func (*Comment) GetTimestamp

func (x *Comment) GetTimestamp() *timestamp.Timestamp

func (*Comment) ProtoMessage

func (*Comment) ProtoMessage()

func (*Comment) ProtoReflect

func (x *Comment) ProtoReflect() protoreflect.Message

func (*Comment) Reset

func (x *Comment) Reset()

func (*Comment) String

func (x *Comment) String() string

type HeraldData

type HeraldData struct {
	Created *timestamp.Timestamp `protobuf:"bytes,1,opt,name=created,proto3" json:"created,omitempty"`
	Label   string               `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`                        // the run or sample name
	History []*Comment           `protobuf:"bytes,4,rep,name=history,proto3" json:"history,omitempty"`                    // describes the history of the run
	Status  Status               `protobuf:"varint,5,opt,name=status,proto3,enum=records.Status" json:"status,omitempty"` // describes if untagged, tagged with complete/incomplete services and if announced
	Tags    map[string]bool      ``                                                                                       // tagged services and their complete status (true=complete, false=incomplete)
	/* 150-byte string literal not displayed */
	RequestOrder []string `protobuf:"bytes,7,rep,name=requestOrder,proto3" json:"requestOrder,omitempty"` // the order to send requests to the tagged services
	// contains filtered or unexported fields
}

HeraldData is the base data type. It is used by both Run and Sample.

func (*HeraldData) AddComment

func (heraldData *HeraldData) AddComment(text string) error

AddComment is a method to add a comment to the history of an run or sample

func (*HeraldData) AddTags

func (heraldData *HeraldData) AddTags(tags []string) error

AddTags is a method to tag a run or sample with a service

func (*HeraldData) CheckStatus

func (heraldData *HeraldData) CheckStatus() error

CheckStatus checks the tags and updates the status if all tags are now marked complete TODO: this func is incomplete - it only checks for tagged services atm

func (*HeraldData) Descriptor deprecated

func (*HeraldData) Descriptor() ([]byte, []int)

Deprecated: Use HeraldData.ProtoReflect.Descriptor instead.

func (*HeraldData) GetCreated

func (x *HeraldData) GetCreated() *timestamp.Timestamp

func (*HeraldData) GetHistory

func (x *HeraldData) GetHistory() []*Comment

func (*HeraldData) GetLabel

func (x *HeraldData) GetLabel() string

func (*HeraldData) GetRequestOrder

func (x *HeraldData) GetRequestOrder() []string

func (*HeraldData) GetStatus

func (x *HeraldData) GetStatus() Status

func (*HeraldData) GetTags

func (x *HeraldData) GetTags() map[string]bool

func (*HeraldData) ProtoMessage

func (*HeraldData) ProtoMessage()

func (*HeraldData) ProtoReflect

func (x *HeraldData) ProtoReflect() protoreflect.Message

func (*HeraldData) Reset

func (x *HeraldData) Reset()

func (*HeraldData) SetStatus

func (heraldData *HeraldData) SetStatus(status Status) error

SetStatus updates the status. TODO: do this better.

func (*HeraldData) SetTag

func (heraldData *HeraldData) SetTag(serviceName string, value bool) error

SetTag is a method to set a tag either true or false (complete or incomplete)

func (*HeraldData) String

func (x *HeraldData) String() string

type RecordType

type RecordType int32

RecordType is used for differentiating between Herald Record types.

const (
	RecordType_run    RecordType = 0
	RecordType_sample RecordType = 1
)

func (RecordType) Descriptor

func (RecordType) Descriptor() protoreflect.EnumDescriptor

func (RecordType) Enum

func (x RecordType) Enum() *RecordType

func (RecordType) EnumDescriptor deprecated

func (RecordType) EnumDescriptor() ([]byte, []int)

Deprecated: Use RecordType.Descriptor instead.

func (RecordType) Number

func (x RecordType) Number() protoreflect.EnumNumber

func (RecordType) String

func (x RecordType) String() string

func (RecordType) Type

type Run

type Run struct {
	Metadata             *HeraldData `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	OutputDirectory      string      `protobuf:"bytes,2,opt,name=outputDirectory,proto3" json:"outputDirectory,omitempty"`           // where the run is stored
	Fast5OutputDirectory string      `protobuf:"bytes,3,opt,name=fast5OutputDirectory,proto3" json:"fast5OutputDirectory,omitempty"` // where the run fast5 data is stored
	FastqOutputDirectory string      `protobuf:"bytes,4,opt,name=fastqOutputDirectory,proto3" json:"fastqOutputDirectory,omitempty"` // where the run fastq data is stored
	PrimerScheme         string      `protobuf:"bytes,5,opt,name=primerScheme,proto3" json:"primerScheme,omitempty"`                 // the ARTIC primer scheme name for this run
	// contains filtered or unexported fields
}

Run is used to describe a Nanopore sequencing run.

func InitRun

func InitRun(label, outputDir, fast5Dir, fastqDir, primerScheme string) *Run

InitRun will init a run struct with the minimum required values

func (*Run) Descriptor deprecated

func (*Run) Descriptor() ([]byte, []int)

Deprecated: Use Run.ProtoReflect.Descriptor instead.

func (*Run) GetFast5OutputDirectory

func (x *Run) GetFast5OutputDirectory() string

func (*Run) GetFastqFiles

func (r *Run) GetFastqFiles() ([]string, error)

GetFastqFiles will return a list of all fastq files found in the Run FASTQ directory.

func (*Run) GetFastqOutputDirectory

func (x *Run) GetFastqOutputDirectory() string

func (*Run) GetMetadata

func (x *Run) GetMetadata() *HeraldData

func (*Run) GetOutputDirectory

func (x *Run) GetOutputDirectory() string

func (*Run) GetPrimerScheme

func (x *Run) GetPrimerScheme() string

func (*Run) ProtoMessage

func (*Run) ProtoMessage()

func (*Run) ProtoReflect

func (x *Run) ProtoReflect() protoreflect.Message

func (*Run) Reset

func (x *Run) Reset()

func (*Run) String

func (x *Run) String() string

type Sample

type Sample struct {
	Metadata  *HeraldData `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	ParentRun string      `protobuf:"bytes,2,opt,name=parentRun,proto3" json:"parentRun,omitempty"` // the label of the parent run, used to perform lookups
	Barcode   int32       `protobuf:"varint,3,opt,name=barcode,proto3" json:"barcode,omitempty"`
	// contains filtered or unexported fields
}

Sample is used to describe a biological sample which is being sequenced as part of a Run.

func InitSample

func InitSample(sampleLabel, runLabel string, barcode int32) *Sample

InitSample will init a sample struct with the minimum required values

func (*Sample) Descriptor deprecated

func (*Sample) Descriptor() ([]byte, []int)

Deprecated: Use Sample.ProtoReflect.Descriptor instead.

func (*Sample) GetBarcode

func (x *Sample) GetBarcode() int32

func (*Sample) GetMetadata

func (x *Sample) GetMetadata() *HeraldData

func (*Sample) GetParentRun

func (x *Sample) GetParentRun() string

func (*Sample) ProtoMessage

func (*Sample) ProtoMessage()

func (*Sample) ProtoReflect

func (x *Sample) ProtoReflect() protoreflect.Message

func (*Sample) Reset

func (x *Sample) Reset()

func (*Sample) String

func (x *Sample) String() string

type Status

type Status int32

Status is used to determine if runs/samples have tagged service requests and if they have been announced via the message server.

const (
	Status_UN_INITIALIZED Status = 0
	Status_untagged       Status = 1 // data is not tagged with any service requests (either completed or incomplete)
	Status_tagsIncomplete Status = 2 // data is tagged with service requests, one or more of which are marked incomplete
	Status_tagsComplete   Status = 3 // data is tagged with service requests, all of which are marked complete
	Status_announced      Status = 4 // tagged service requests have been announced and we are waiting for completion notification
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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