Version: v0.0.0-...-5130504 Latest Latest

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

Go to latest
Published: Jun 3, 2017 License: Apache-2.0 Imports: 2 Imported by: 0




This section is empty.


View Source
var (
	Err         = errors.NewClass("error")
	ErrNotFound = Err.NewClass("not found", errhttp.SetStatusCode(404))


This section is empty.


type Dataset

type Dataset interface {
	Name() string
	Dimensions() int
	DimMax() float64
	SampleTagNames() []string

	Samples() int
	GeneSigs() int
	Genesets() int

	ListSamples(offset, limit int) ([]Sample, error)
	ListGeneSigs(offset, limit int) ([]GeneSig, error)
	ListGenesets(offset, limit int) ([]Geneset, error)

	GetSample(sampleId string) (Sample, error)
	GetGeneSig(geneSigId string) (GeneSig, error)
	GetGeneset(genesetId string) (Geneset, error)

	NearestSamples(dims []Dimension, f1 SampleFilter, f2 ScoreFilter,
		offset, limit int) ([]ScoredSample, error)
	NearestGeneSigs(dims []Dimension, f2 ScoreFilter, offset, limit int) (
		[]ScoredGeneSig, error)
	NearestGenesets(dims []Dimension, f ScoreFilter, offset, limit int) (
		[]ScoredGeneset, error)

	CombineGenes(genes []Gene) ([]Dimension, error)

	SearchSamples(keyword string, filter SampleFilter, offset, limit int) (
		[]ScoredSample, error)
	SearchGeneSigs(keyword string, offset, limit int) ([]ScoredGeneSig, error)
	SearchGenesets(keyword string, offset, limit int) ([]ScoredGeneset, error)

type Dimension

type Dimension struct {
	Name  string
	Value float64

type Gene

type Gene struct {
	Name   string
	Weight float64

type GeneSig

type GeneSig interface {
	Id() string
	Name() string
	Data() ([]Dimension, error)

type Geneset

type Geneset interface {
	Id() string
	Name() string
	Description() string
	Genes() []string

	Query() ([]Dimension, error)

type Sample

type Sample interface {
	Id() string
	Name() string
	Tags() map[string]string

	Data() ([]Dimension, error)

type SampleFilter

type SampleFilter func(Sample) bool

func CombineSampleFilters

func CombineSampleFilters(filters ...SampleFilter) SampleFilter

type ScoreFilter

type ScoreFilter func(float64) bool

func CombineScoreFilters

func CombineScoreFilters(filters ...ScoreFilter) ScoreFilter

type ScoredGeneSig

type ScoredGeneSig interface {
	Score() float64

type ScoredGeneset

type ScoredGeneset interface {
	Score() float64

type ScoredSample

type ScoredSample interface {
	Score() float64

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

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