data

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeCell = "CELL"
	ResourceTypeRef  = "REF"
)

Resource types.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accession

type Accession struct {
	Primary   string   `json:"primary"`
	Secondary []string `json:"secondary,omitempty"`
}

type Cell

type Cell struct {
	Identifier      string            `json:"identifier"`
	Accession       Accession         `json:"accession"`
	Synonyms        []string          `json:"synonyms,omitempty"`
	CrossReferences []CrossReference  `json:"crossReferences,omitempty"`
	References      []string          `json:"references,omitempty"`
	WebPages        []string          `json:"webPages,omitempty"`
	Comments        []string          `json:"comments,omitempty"`
	STR             STR               `json:"strProfileData,omitempty"`
	Diseases        []Disease         `json:"diseases,omitempty"`
	SpeciesOfOrigin []SpeciesOfOrigin `json:"speciesOfOrigin"`
	Hierarchy       []Hierarchy       `json:"hierarchy,omitempty"`
	SameOriginAs    []SameOriginAs    `json:"sameOriginAs,omitempty"`
	Sex             string            `json:"sex,omitempty"`
	Age             string            `json:"age,omitempty"`
	Category        string            `json:"category"`
	Date            Date              `json:"date"`
}

type CrossReference

type CrossReference struct {
	Database  string `json:"database,omitempty"`
	Accession string `json:"accession,omitempty"`
}

type Date

type Date struct {
	Created string `json:"created"`
	Updated string `json:"lastUpdated"`
	Version string `json:"version"`
}

type Disease

type Disease struct {
	Terminology string `json:"terminology,omitempty"`
	Accession   string `json:"accession,omitempty"`
	Disease     string `json:"disease,omitempty"`
}

type Hierarchy

type Hierarchy struct {
	Terminology string `json:"terminology,omitempty"`
	Accession   string `json:"accession,omitempty"`
	DerivedFrom string `json:"derivedFrom,omitempty"`
}

type Marker

type Marker struct {
	ID      string `json:"id,omitempty"`
	Alleles string `json:"alleles,omitempty"`
}

type ObjectStore

type ObjectStore struct {
	// contains filtered or unexported fields
}

ObjectStore provides an API for interacting with the data store that contains the ingested Cellosaurus data.

func NewObjectStore

func NewObjectStore(client *db.MySQLClient) *ObjectStore

NewObjectStore creates a new ObjectStore.

func (*ObjectStore) CountCells

func (s *ObjectStore) CountCells() (int, error)

CountCells returns the total number of cell lines.

func (*ObjectStore) CountCrossReferences

func (s *ObjectStore) CountCrossReferences() (int, error)

CountCrossReferences returns the total number of cross-references.

func (*ObjectStore) CountReferences

func (s *ObjectStore) CountReferences() (int, error)

CountReferences returns the total number of references.

func (*ObjectStore) FetchCell

func (s *ObjectStore) FetchCell(attribute string) (*Cell, error)

FetchCell retrieves a cell line using its attribute. Attribute can be oneof: ["accession", "identifier", "synonym"].

func (*ObjectStore) ListCells

func (s *ObjectStore) ListCells(from, to int) ([]*Cell, error)

ListCells returns a list of cell lines from the store.

func (*ObjectStore) ListCrossReferences

func (s *ObjectStore) ListCrossReferences() ([]*XRef, error)

ListXRefs returns a list of cross-references.

func (*ObjectStore) ListReferences

func (s *ObjectStore) ListReferences(from, to int) ([]*Reference, error)

ListReferences returns a list of paginated references.

func (*ObjectStore) ListStatistics

func (s *ObjectStore) ListStatistics(version string) (*Statistics, error)

ListStatistics returns a list of Cellosaurus data stats.

type Reference

type Reference struct {
	Identifier []string `json:"identifier"`
	Authors    []string `json:"authors,omitempty"`
	Consortium []string `json:"group/consortium,omitempty"`
	Title      string   `json:"title"`
	Citation   string   `json:"citation"`
}

type STR

type STR struct {
	Sources []string `json:"sources,omitempty"`
	Markers []Marker `json:"markers,omitempty"`
}

type SameOriginAs

type SameOriginAs struct {
	Terminology string `json:"terminology,omitempty"`
	Accession   string `json:"accession,omitempty"`
	Identifier  string `json:"identifier,omitempty"`
}

type SpeciesOfOrigin

type SpeciesOfOrigin struct {
	Terminology string `json:"terminology,omitempty"`
	Accession   string `json:"accession,omitempty"`
	Species     string `json:"species,omitempty"`
}

type Statistics

type Statistics struct {
	Version string `json:"version"`
	Cells   int    `json:"cellLines"`
	Refs    int    `json:"references"`
	XRefs   int    `json:"crossReferences"`
}

type XRef

type XRef struct {
	Abbreviation string `json:"abbreviation"`
	Name         string `json:"name"`
	Server       string `json:"server"`
	URL          string `json:"dbURL"`
	Terminology  string `json:"terminology"`
	Category     string `json:"category"`
}

Jump to

Keyboard shortcuts

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