pandasgwas.get_traits

get_traits

get_traits(
    study_id: str = None,
    association_id: str = None,
    efo_id: str = None,
    pubmed_id: str = None,
    efo_uri: str = None,
    efo_trait: str = None,
    set_operation: str = "bind",
    interactive: bool = True,
) -> Trait

Retrieves EFO Traits via the NHGRI-EBI GWAS Catalog REST API. The REST API is queried multiple times with the criteria passed as arguments. By default all EFO Traits 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 EFO Traits that match simultaneously all criteria provided, then set set_operation to 'intersection'.

from pandasgwas.get_traits import get_traits_by_efo_id
traits = get_traits(efo_id='EFO_0001065')

Parameters:
  • study_id (str, default: None ) –

    Study identifier, accessionId in Study

  • association_id (str, default: None ) –

    Association identifier, associationId in Association

  • efo_id (str, default: None ) –

    EFO Trait identifier, shortForm in EFO Trait

  • pubmed_id (str, default: None ) –

    PubMed identifier

  • efo_uri (str, default: None ) –

    EFO URI

  • 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:
  • Trait

    A Trait object

get_traits_all

get_traits_all(interactive: bool = True) -> Trait

Gets all EFO Trats

from pandasgwas.get_traits import get_traits_all
traits = get_traits_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:
  • Trait

    A Trait object

get_traits_by_association_id

get_traits_by_association_id(
    association_id: str, interactive: bool = True
) -> Trait

Get GWAS Catalog EFO Traits by their Association identifier

from pandasgwas.get_traits import get_traits_by_association_id
traits = get_traits_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:
  • Trait

    A Trait object

get_traits_by_efo_id

get_traits_by_efo_id(
    efo_id: str, interactive: bool = True
) -> Trait

Get GWAS Catalog EFO Traits by their EFO Trait identifier

from pandasgwas.get_traits import get_traits_by_efo_id
traits = get_traits_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:
  • Trait

    A Trait object

get_traits_by_efo_trait

get_traits_by_efo_trait(
    efo_trait: str, interactive: bool = True
) -> Trait

Get GWAS Catalog EFO Traits that match trait description

from pandasgwas.get_traits import get_traits_by_efo_trait
traits = get_traits_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:
  • Trait

    A Trait object

get_traits_by_efo_uri

get_traits_by_efo_uri(
    efo_uri: str, interactive: bool = True
) -> Trait

Get GWAS Catalog EFO Traits by EFO URI

from pandasgwas.get_traits import get_traits_by_efo_uri
traits = get_traits_by_efo_uri('http://www.ebi.ac.uk/efo/EFO_0005133')

Parameters:
  • efo_uri (str) –

    EFO URI

  • 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:
  • Trait

    A Trait object

get_traits_by_pubmed_id

get_traits_by_pubmed_id(
    pubmed_id: str, interactive: bool = True
) -> Trait

Get GWAS Catalog EFO Traits by PubMed identifiers

from pandasgwas.get_traits import get_traits_by_pubmed_id
traits = get_traits_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:
  • Trait

    A Trait object

get_traits_by_study_id

get_traits_by_study_id(
    study_id: str, interactive: bool = True
) -> Trait
from pandasgwas.get_traits import get_traits_by_study_id
traits = get_traits_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:
  • Trait

    A Trait object