gprofiler

package
v0.0.0-...-40008dc Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gprofiler performs and term enrichment at g:Profiler

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(s *Service)

Fetch submits a gene list and parses results from g:Profiler

Types

type EnrichedTerm

type EnrichedTerm struct {
	Genes            []string
	ID               string `json:"native"`
	Intersections    [][]string
	IntersectionSize int `json:"intersection_size"`
	Name             string
	QuerySize        int `json:"query_size"`
	Precision        float64
	Pvalue           float64 `json:"p_value"`
	Recall           float64
	Source           string
	TermSize         int `json:"term_size"`
}

EnrichedTerm contains information on an enriched term.

type GenesMetaData

type GenesMetaData struct {
	Query map[string]Query
}

GenesMetaData contains g:Profiler information on queried genes.

type MetaData

type MetaData struct {
	GenesMetaData GenesMetaData `json:"genes_metadata"`
}

MetaData contains g:Profiler query meta data.

type Query

type Query struct {
	ENSG    []string `json:"ensgs"`
	Mapping map[string][]string
}

Query contains ENS to gene name mapping data for queried genes.

type RequestBody

type RequestBody struct {
	AllResults                  bool     `json:"all_results"`
	Background                  []string `json:"background"`
	Combined                    bool     `json:"combined"`
	DomainScope                 string   `json:"domain_scope"` // 'annotated', 'known' or 'custom'.
	MeasureUnderrepresentation  bool     `json:"measure_underrepresentation"`
	NoEvidences                 bool     `json:"no_evidences"`
	NoIEA                       bool     `json:"no_iea"`
	Ordered                     bool     `json:"ordered"`
	Organism                    string   `json:"organism"`
	Query                       []string `json:"query"`
	SignificanceThresholdMethod string   `json:"significance_threshold_method"` // 'bonferroni', 'fdr' or 'gSCS'
	Sources                     []string `json:"sources"`                       // An empty source list will query all datasources.
	UserThreshold               float64  `json:"user_threshold"`
}

RequestBody for POST data to gProfiler.

func (*RequestBody) AddDefaults

func (r *RequestBody) AddDefaults()

AddDefaults adds default values to POST data.

type Response

type Response struct {
	MetaData MetaData `json:"meta"`
	Result   []EnrichedTerm
}

Response for data received from gProfiler.

func (*Response) AddIntersectionGenes

func (r *Response) AddIntersectionGenes(queryName string)

AddIntersectionGenes adds the list of genes with the enriched term to each enriched term struct.

type Service

type Service struct {
	Body   RequestBody
	Result []EnrichedTerm
	URL    string
}

Service defines the POST body, URL and contains parsed results.

Jump to

Keyboard shortcuts

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