pandasgwas.get_associations

get_associations

get_associations(
    study_id: str = None,
    association_id: str = None,
    variant_id: str = None,
    efo_id: str = None,
    pubmed_id: str = None,
    efo_trait: str = None,
    set_operation: str = "bind",
    interactive: bool = True,
) -> Association

Retrieves Associations via the NHGRI-EBI GWAS Catalog REST API. The REST API is queried multiple times with the criteria passed as arguments. By default all Associations that match the criteria supplied in the arguments are retrieved: this corresponds to the default set_operation set to 'bind', If you rather have only the Associations that match simultaneously all criteria provided, then set set_operation to 'intersection'.

from pandasgwas.get_associations import *
associations = get_associations(association_id='16603')
Parameters:
  • study_id (str, default: None ) –

    Study identifier, accessionId in Study

  • association_id (str, default: None ) –

    Association identifier, associationId in Association

  • variant_id (str, default: None ) –

    Single Nucleotide Polymorphism identifier, rsId in Single Nucleotide Polymorphism

  • efo_id (str, default: None ) –

    EFO Trait identifier, shortForm in EFO Trait

  • pubmed_id (str, default: None ) –

    PubMed identifier

  • efo_trait (str, default: None ) –

    Trait description

  • set_operation (str, default: 'bind' ) –

    "bind" or "intersection"

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_all

get_associations_all(
    interactive: bool = True,
) -> Association

Gets all associations

from pandasgwas.get_associations import *
associations = get_associations_all()
Parameters:
  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_association_id

get_associations_by_association_id(
    association_id: str, interactive: bool = True
) -> Association

Get GWAS Catalog Associations by their Association identifier

from pandasgwas.get_associations import *
associations = get_associations_by_association_id('16603')
Parameters:
  • association_id (str) –

    Association identifier, associationId in Association

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_efo_id

get_associations_by_efo_id(
    efo_id: str, interactive: bool = True
) -> Association

Get GWAS Catalog Associations by their EFO Trait identifier

from pandasgwas.get_associations import *
associations = get_associations_by_efo_id('EFO_0001065')
Parameters:
  • efo_id (str) –

    EFO Trait identifier, shortForm in EFO Trait

  • interactive (bool, default: True ) –

    indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_efo_trait

get_associations_by_efo_trait(
    efo_trait: str, interactive: bool = True
) -> Association

Gets associations that match trait description

from pandasgwas.get_associations import *
associations = get_associations_by_efo_trait('MHPG measurement')
Parameters:
  • efo_trait (str) –

    Trait description

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_pubmed_id

get_associations_by_pubmed_id(
    pubmed_id: str, interactive: bool = True
) -> Association

Get GWAS Catalog associations by PubMed identifiers

from pandasgwas.get_associations import *
associations = get_associations_by_pubmed_id('21041247')
Parameters:
  • pubmed_id (str) –

    PubMed identifier

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_study_id

get_associations_by_study_id(
    study_id: str, interactive: bool = True
) -> Association

Get GWAS Catalog Associations by Study identifier

from pandasgwas.get_associations import *
associations = get_associations_by_study_id('GCST000854')
Parameters:
  • study_id (str) –

    Study identifier, accessionId in Study

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns:

get_associations_by_variant_id

get_associations_by_variant_id(
    variant_id: str, interactive: bool = True
) -> Association

Get GWAS Catalog Associations by their Single Nucleotide Polymorphism identifier

from pandasgwas.get_associations import *
associations = get_associations_by_variant_id('rs6538678')
Parameters:
  • variant_id (str) –

    Single Nucleotide Polymorphism identifier, rsId in Single Nucleotide Polymorphism

  • interactive (bool, default: True ) –

    Indicates whether to run in interactive mode, when the value is True and the query data is divided into many pages, the function will prompt whether to continue the download.

Returns: