pandasgwas.get_variants

get_variants

get_variants(
    study_id: str = None,
    association_id: str = None,
    variant_id: str = None,
    efo_id: str = None,
    pubmed_id: str = None,
    genomic_range: List[int] = None,
    gene_name: str = None,
    efo_trait: str = None,
    reported_trait: str = None,
    set_operation: str = "bind",
    interactive: bool = True,
) -> Variant

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

from pandasgwas.get_variants import get_variants_by_variant_id
snps = get_variants(variant_id='rs7744020')
Parameters:
  • study_id (str, default: None ) –
  • 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

  • genomic_range (List[int], default: None ) –

    A List of three elements. These elements are: 'chromosome', 'start' and 'end' in function get_variants_by_genomic_range

  • gene_name (str, default: None ) –

    Gene names

  • efo_trait (str, default: None ) –

    Trait description

  • reported_trait (str, default: None ) –

    Trait are reported by the original authors of the study

  • 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_variants_all

get_variants_all(interactive: bool = True) -> Variant

Get all Single Nucleotide Polymorphisms

from pandasgwas.get_variants import get_variants_all
snps = get_variants_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_variants_by_association_id

get_variants_by_association_id(
    association_id: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by by their Association identifier

from pandasgwas.get_variants import get_variants_by_association_id
snps = get_variants_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_variants_by_cytogenetic_band

get_variants_by_cytogenetic_band(
    cytogenetic_band: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by cytogenetic band.

from pandasgwas.get_variants import get_variants_by_cytogenetic_band
snps = get_variants_by_cytogenetic_band('1p36.32')
Parameters:
  • cytogenetic_band (str) –

    Cytogenetic bands of the form '1p36.11'

  • 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_variants_by_efo_id

get_variants_by_efo_id(
    efo_id: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by their EFO Trait identifier

from pandasgwas.get_variants import get_variants_by_efo_id
snps = get_variants_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_variants_by_efo_trait

get_variants_by_efo_trait(
    efo_trait: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms that match trait description

from pandasgwas.get_variants import get_variants_by_efo_trait
snps = get_variants_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_variants_by_gene_name

get_variants_by_gene_name(
    gene_name: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms gene name

from pandasgwas.get_variants import get_variants_by_gene_name
snps = get_variants_by_gene_name('KIAA0319')
Parameters:
  • gene_name (str) –

    Gene names

  • 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_variants_by_genomic_range

get_variants_by_genomic_range(
    chromosome: str,
    start: int,
    end: int,
    interactive: bool = True,
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by genomic range

from pandasgwas.get_variants import get_variants_by_genomic_range
snps = get_variants_by_genomic_range('1', 2300001, 5300000)
Parameters:
  • chromosome (str) –

    Human chromosome names: autosomal and sexual chromosomes only, i.e., 1--22, X and Y

  • start (int) –

    Start position of range (starts at 1).

  • end (int) –

    End position of range (inclusive).

  • 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_variants_by_pubmed_id

get_variants_by_pubmed_id(
    pubmed_id: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by PubMed identifiers

from pandasgwas.get_variants import get_variants_by_pubmed_id
snps = get_variants_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_variants_by_reported_trait

get_variants_by_reported_trait(
    reported_trait: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms that match the reported traits, as reported by the original authors of the study.

from pandasgwas.get_variants import get_variants_by_reported_trait
snps = get_variants_by_reported_trait("Dupuytren's disease")
Parameters:
  • reported_trait (str) –

    Trait are reported by the original authors of the 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_variants_by_study_id

get_variants_by_study_id(
    study_id: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by Study identifier

from pandasgwas.get_variants import get_variants_by_study_id
snps = get_variants_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_variants_by_variant_id

get_variants_by_variant_id(
    variant_id: str, interactive: bool = True
) -> Variant

Get GWAS Catalog Single Nucleotide Polymorphisms by Single Nucleotide Polymorphism identifier

from pandasgwas.get_variants import get_variants_by_variant_id
snps = get_variants_by_variant_id('rs7744020')
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: