stringdb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const Host = "string-db.org"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg Config) *Client

func (*Client) GetEnrichment

func (c *Client) GetEnrichment(ctx context.Context, names []string, species int) ([]*Enrichment, error)

GetEnrichment returns functional enrichment for a set of proteins.

func (*Client) GetInteractions

func (c *Client) GetInteractions(ctx context.Context, names []string, species int, limit int) ([]*Interaction, error)

GetInteractions returns interactions for the given protein names.

func (*Client) ResolveProteins

func (c *Client) ResolveProteins(ctx context.Context, names []string, species int, limit int) ([]*Protein, error)

ResolveProteins looks up STRING IDs for the given protein names.

type Config

type Config struct {
	BaseURL   string
	CallerID  string
	Rate      time.Duration
	Retries   int
	Timeout   time.Duration
	UserAgent string
}

func DefaultConfig

func DefaultConfig() Config

type Domain

type Domain struct{}

func (Domain) Classify

func (Domain) Classify(input string) (string, string, error)

func (Domain) Info

func (Domain) Info() kit.DomainInfo

func (Domain) Locate

func (Domain) Locate(t, id string) (string, error)

func (Domain) Register

func (Domain) Register(app *kit.App)

type Enrichment

type Enrichment struct {
	Category    string `json:"category"              kit:"id"`
	Term        string `json:"term"`
	Description string `json:"description"`
	Genes       int    `json:"genes"`
	FDR         string `json:"fdr"`
	InputGenes  string `json:"input_genes,omitempty"`
}

Enrichment represents a functional enrichment term.

type Interaction

type Interaction struct {
	ProteinA   string  `json:"protein_a"           kit:"id"`
	ProteinB   string  `json:"protein_b"`
	NameA      string  `json:"name_a"`
	NameB      string  `json:"name_b"`
	Score      float64 `json:"score"`
	TextScore  float64 `json:"text_score,omitempty"`
	ExpScore   float64 `json:"exp_score,omitempty"`
	DbScore    float64 `json:"db_score,omitempty"`
	CoexpScore float64 `json:"coexp_score,omitempty"`
}

Interaction represents a protein-protein interaction edge.

type Protein

type Protein struct {
	StringID   string `json:"string_id"          kit:"id"`
	Name       string `json:"name"`
	TaxonName  string `json:"taxon_name"`
	TaxonID    string `json:"taxon_id"`
	Annotation string `json:"annotation,omitempty"`
}

Protein represents a resolved STRING protein.

Jump to

Keyboard shortcuts

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