phenotype

package
v0.0.0-...-2b433ae Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2024 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ConcurrentPhenoLoader = 10

Variables

This section is empty.

Functions

This section is empty.

Types

type PhenotypeLoader

type PhenotypeLoader struct {
	Workspace        string
	Host             string
	Token            string
	TableId          int
	OntologyTableMap map[string]int
	Payload          *PhenotypePayload
	Logger           *logrus.Entry
	TableManager     *database.TableManager
	Annotation       *phenotype.PhenotypeAnnotation
	WorkspaceManager *database.WorkspaceManager
}

func NewPhenotypeLoader

func NewPhenotypeLoader(props *PhenotypeLoaderProperties) *PhenotypeLoader

NewPhenotypeLoader creates a new instance of PhenotypeLoader with the provided properties.

func (*PhenotypeLoader) Load

func (loader *PhenotypeLoader) Load(
	reader *phenotype.PhenotypeAnnotationReader,
) error

Load processes the phenotype data from the given reader and loads them into the database. It concurrently processes and loads data up to a set limit before waiting and continuing with the next batch.

type PhenotypeLoaderProperties

type PhenotypeLoaderProperties struct {
	Workspace        string
	Host             string
	Token            string
	TableId          int
	OntologyTableMap map[string]int
	Payload          *PhenotypePayload
	Logger           *logrus.Entry
	TableManager     *database.TableManager
	Annotation       *phenotype.PhenotypeAnnotation
	WorkspaceManager *database.WorkspaceManager
}

type PhenotypePayload

type PhenotypePayload struct {
	Id               []int               `json:"phenotype_id"`
	Reference        string              `json:"reference"`
	CreatedOn        time.Time           `json:"created_on"`
	AssignedBy       []common.AssignedBy `json:"assigned_by"`
	StrainId         string              `json:"strain_id,omitempty"`
	StrainDescriptor string              `json:"strain_descriptor,omitempty"`
	AssayId          []int               `json:"assay_id,omitempty"`
	EnvironmentId    []int               `json:"environment_id,omitempty"`
	Deleted          bool                `json:"deleted,omitempty"`
}

Jump to

Keyboard shortcuts

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