genomelink-go: Index | Files

package genomelink

import ""


Package Files

chromosome.go client.go phenotype.go population.go report.go sequence.go

type Chromosome Uses

type Chromosome string

Chromosome represents chromosome defined in GRCh37.

const (
    Chromosome1  Chromosome = "chr1"
    Chromosome2  Chromosome = "chr2"
    Chromosome3  Chromosome = "chr3"
    Chromosome4  Chromosome = "chr4"
    Chromosome5  Chromosome = "chr5"
    Chromosome6  Chromosome = "chr6"
    Chromosome7  Chromosome = "chr7"
    Chromosome8  Chromosome = "chr8"
    Chromosome9  Chromosome = "chr9"
    Chromosome10 Chromosome = "chr10"
    Chromosome11 Chromosome = "chr11"
    Chromosome12 Chromosome = "chr12"
    Chromosome13 Chromosome = "chr13"
    Chromosome14 Chromosome = "chr14"
    Chromosome15 Chromosome = "chr15"
    Chromosome16 Chromosome = "chr16"
    Chromosome17 Chromosome = "chr17"
    Chromosome18 Chromosome = "chr18"
    Chromosome19 Chromosome = "chr19"
    Chromosome20 Chromosome = "chr20"
    Chromosome21 Chromosome = "chr21"
    Chromosome22 Chromosome = "chr22"
    ChromosomeX  Chromosome = "chrX"
    ChromosomeY  Chromosome = "chrY"
    ChromosomeM  Chromosome = "chrM"

type Client Uses

type Client struct {
    URL        *url.URL
    HTTPClient *http.Client
    Logger     *zap.Logger

Client represents GENOMELINK API Client.

func DefaultClient Uses

func DefaultClient(ctx context.Context, token string) *Client

DefaultClient returns a client that connects to GENOME LINK API.

func NewClient Uses

func NewClient(urlStr string, client *http.Client, logger *zap.Logger) (*Client, error)

NewClient creates a new GENOME LINK client from given url, http client, and logger.

func (*Client) Report Uses

func (c *Client) Report(ctx context.Context, name PhenotypeName, population Population) (Report, error)

Report fetches report API for the given phenotype and population.

func (*Client) Sequence Uses

func (c *Client) Sequence(ctx context.Context, region Region) (io.ReadCloser, error)

Report fetches sequence API for the given region, returns io.ReadCloser.

type Phenotype Uses

type Phenotype struct {
    URLName     PhenotypeName `json:"url_name"`
    DisplayName string        `json:"display_name"`
    Category    string        `json:"category"`

Phenotype represents phenotype definition that includes display name and category.

type PhenotypeName Uses

type PhenotypeName string

PhenotypeName is URL-safe phenotype name.

const (
    PhenotypeNameAgreeableness                             PhenotypeName = "agreeableness"
    PhenotypeNameAlcoholDrinkingBehavior                   PhenotypeName = "alcohol-drinking-behavior"
    PhenotypeNameAlphaLinolenicAcid                        PhenotypeName = "alpha-linolenic-acid"
    PhenotypeNameAnger                                     PhenotypeName = "anger"
    PhenotypeNameBeardThickness                            PhenotypeName = "beard-thickness"
    PhenotypeNameBetaCarotene                              PhenotypeName = "beta-carotene"
    PhenotypeNameBitterTaste                               PhenotypeName = "bitter-taste"
    PhenotypeNameBlackHair                                 PhenotypeName = "black-hair"
    PhenotypeNameBloodGlucose                              PhenotypeName = "blood-glucose"
    PhenotypeNameBMI                                       PhenotypeName = "bmi"
    PhenotypeNameBodyFatMass                               PhenotypeName = "body-fat-mass"
    PhenotypeNameBodyFatPercentage                         PhenotypeName = "body-fat-percentage"
    PhenotypeNameBreastSize                                PhenotypeName = "breast-size"
    PhenotypeNameCaffeineConsumption                       PhenotypeName = "caffeine-consumption"
    PhenotypeNameCaffeineMetaboliteRatio                   PhenotypeName = "caffeine-metabolite-ratio"
    PhenotypeNameCalcium                                   PhenotypeName = "calcium"
    PhenotypeNameCarbohydrateIntake                        PhenotypeName = "carbohydrate-intake"
    PhenotypeNameChildhoodIntelligence                     PhenotypeName = "childhood-intelligence"
    PhenotypeNameConscientiousness                         PhenotypeName = "conscientiousness"
    PhenotypeNameDepression                                PhenotypeName = "depression"
    PhenotypeNameEggAllergy                                PhenotypeName = "egg-allergy"
    PhenotypeNameEndurancePerformance                      PhenotypeName = "endurance-performance"
    PhenotypeNameExcessiveDaytimeSleepiness                PhenotypeName = "excessive-daytime-sleepiness"
    PhenotypeNameExtraversion                              PhenotypeName = "extraversion"
    PhenotypeNameGeneticEyeColor                           PhenotypeName = "eye-color"
    PhenotypeNameFolate                                    PhenotypeName = "folate"
    PhenotypeNameFreckles                                  PhenotypeName = "freckles"
    PhenotypeNameGambling                                  PhenotypeName = "gambling"
    PhenotypeNameHarmAvoidance                             PhenotypeName = "harm-avoidance"
    PhenotypeNameHearingFunction                           PhenotypeName = "hearing-function"
    PhenotypeNameHeight                                    PhenotypeName = "height"
    PhenotypeNameHippocampalVolume                         PhenotypeName = "hippocampal-volume"
    PhenotypeNameIntelligence                              PhenotypeName = "intelligence"
    PhenotypeNameIron                                      PhenotypeName = "iron"
    PhenotypeNameJobRelatedExhaustion                      PhenotypeName = "job-related-exhaustion"
    PhenotypeNameLeanBodyMass                              PhenotypeName = "lean-body-mass"
    PhenotypeNameLobeSize                                  PhenotypeName = "lobe-size"
    PhenotypeNameLongevity                                 PhenotypeName = "longevity"
    PhenotypeNameMagnesium                                 PhenotypeName = "magnesium"
    PhenotypeNameMalePatternBaldnessAGA                    PhenotypeName = "male-pattern-baldness-aga"
    PhenotypeNameMathematicalAbility                       PhenotypeName = "mathematical-ability"
    PhenotypeNameMilkAllergy                               PhenotypeName = "milk-allergy"
    PhenotypeNameMorningPerson                             PhenotypeName = "morning-person"
    PhenotypeNameMotionSickness                            PhenotypeName = "motion-sickness"
    PhenotypeNameNeuroticism                               PhenotypeName = "neuroticism"
    PhenotypeNameNoveltySeeking                            PhenotypeName = "novelty-seeking"
    PhenotypeNameOpenness                                  PhenotypeName = "openness"
    PhenotypeNamePeanutsAllergy                            PhenotypeName = "peanuts-allergy"
    PhenotypeNamePhosphorus                                PhenotypeName = "phosphorus"
    PhenotypeNameProteinIntake                             PhenotypeName = "protein-intake"
    PhenotypeNameReadingAndSpellingAbility                 PhenotypeName = "reading-and-spelling-ability"
    PhenotypeNameRedHair                                   PhenotypeName = "red-hair"
    PhenotypeNameRedWineLiking                             PhenotypeName = "red-wine-liking"
    PhenotypeNameResponseToVitaminESupplementation         PhenotypeName = "response-to-vitamin-e-supplementation"
    PhenotypeNameRewardDependence                          PhenotypeName = "reward-dependence"
    PhenotypeNameSkinPigmentation                          PhenotypeName = "skin-pigmentation"
    PhenotypeNameSleepDuration                             PhenotypeName = "sleep-duration"
    PhenotypeNameSmellSensitivityForMalt                   PhenotypeName = "smell-sensitivity-for-malt"
    PhenotypeNameSmokingBehavior                           PhenotypeName = "smoking-behavior"
    PhenotypeNameVisceralAndSubcutaneousAdiposeTissueRatio PhenotypeName = "visceral-and-subcutaneous-adipose-tissue-ratio"
    PhenotypeNameVitaminA                                  PhenotypeName = "vitamin-a"
    PhenotypeNameVitaminB12                                PhenotypeName = "vitamin-b12"
    PhenotypeNameVitaminD                                  PhenotypeName = "vitamin-d"
    PhenotypeNameVitaminE                                  PhenotypeName = "vitamin-e"
    PhenotypeNameWaist                                     PhenotypeName = "waist"
    PhenotypeNameWaistHipRatio                             PhenotypeName = "waist-hip-ratio"
    PhenotypeNameGeneticWeight                             PhenotypeName = "weight"
    PhenotypeNameWhiteWineLiking                           PhenotypeName = "white-wine-liking"
    PhenotypeNameWordReadingAbility                        PhenotypeName = "word-reading-ability"

    PhenotypeNameLungCancer           PhenotypeName = "lung-cancer"
    PhenotypeNameColorectalCancer     PhenotypeName = "colorectal-cancer"
    PhenotypeNameGastricCancer        PhenotypeName = "gastric-cancer"
    PhenotypeNameBreastCancer         PhenotypeName = "breast-cancer"
    PhenotypeNameLiverCancer          PhenotypeName = "liver-cancer"
    PhenotypeNamePancreaticCancer     PhenotypeName = "pancreatic-cancer"
    PhenotypeNameProstateCancer       PhenotypeName = "prostate-cancer"
    PhenotypeNameType2Diabetes        PhenotypeName = "type-2-diabetes"
    PhenotypeNameMyocardialInfarction PhenotypeName = "myocardial-infarction"
    PhenotypeNameNicotineDependence   PhenotypeName = "nicotine-dependence"

type Population Uses

type Population string

Population represents population that is defined in API.

const (
    PopulationEuropean Population = "european"

type Region Uses

type Region struct {
    Chromosome Chromosome
    Start      int
    End        int

Region represent region of the chromosome.

func (*Region) String Uses

func (r *Region) String() string

String builds the string by prescribed format.

type Report Uses

type Report struct {
    Summary    Summary    `json:"summary"`
    Phenotype  Phenotype  `json:"phenotype"`
    Population Population `json:"population"`
    Scores     []Score    `json:"scores"`

Report represents the response of report API.

type Score Uses

type Score struct {
    Score int    `json:"score"`
    Text  string `json:"text"`

Score represents the score object in report response.

type Summary Uses

type Summary struct {
    Text     string   `json:"text"`
    Score    int      `json:"score"`
    Warnings []string `json:"warnings"`

Summary represents the summary object in report response.

Package genomelink imports 13 packages (graph) and is imported by 1 packages. Updated 2018-02-27. Refresh now. Tools for package owners.