{"swagger": "2.0", "basePath": "/api", "paths": {"/associations": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Get specific variant associations from specific GWAS datasets", "operationId": "assoc_post", "parameters": [{"name": "variant", "in": "query", "type": "array", "required": true, "description": "List of variants as rsid or chr:pos or chr:pos1-pos2 where positions are in hg19/b37 e.g. ['rs1205', '7:105561135', '7:105561135-105563135']", "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "id", "in": "query", "type": "array", "required": true, "description": "List of GWAS study IDs e.g. ['ieu-a-2', 'ieu-a-7']", "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "proxies", "in": "query", "type": "integer", "description": "Whether to look for proxies (1) or not (0). Note that proxies won't be looked for range queries", "default": 0}, {"name": "population", "in": "query", "type": "string", "description": "Which population to use for proxy (select from AFR, AMR, EAS, EUR, SAS)", "default": "EUR"}, {"name": "r2", "in": "query", "type": "number", "description": "Minimum LD r2 for a proxy (>= the given value)", "default": 0.8}, {"name": "align_alleles", "in": "query", "type": "integer", "description": "Whether to align alleles", "default": 1}, {"name": "palindromes", "in": "query", "type": "integer", "description": "Whether to allow palindromic proxies", "default": 1}, {"name": "maf_threshold", "in": "query", "type": "number", "description": "Maximum MAF allowed for a palindromic variant (< the given value)", "default": 0.3}, {"name": "commercial_approval_received", "in": "query", "type": "integer", "description": "[Only for commercial users under agreement/contract] Whether to include results from datasets of which commercial use is not allowed as per the metadata. Other users do not need to specify this.", "default": 0}], "tags": ["associations"]}}, "/batches": {"get": {"responses": {"200": {"description": "Success"}}, "description": "List existing data batches", "operationId": "batches_get", "security": [], "tags": ["batches"]}}, "/edit/add": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Add new gwas metadata", "operationId": "edit_add_metadata", "parameters": [{"name": "id", "in": "query", "type": "string", "description": "Leave blank for the next auto-assigned sequential id (e.g. ieu-b-9999, where ieu-b is fixed and 9999 is the sequence number), or provide your own study identifier if suggested by us (in full, e.g. met-e-LDL_C ). See also https://mrcieu.github.io/GwasDataImport/articles/import_pipeline.html#opengwas-id"}, {"name": "trait", "in": "query", "type": "string", "required": true, "description": "Avoid acronyms; don't include other information in the trait name (e.g. don't include array name, whether restricted to males or females or whether adjusted or unadjusted for covariates)"}, {"name": "build", "in": "query", "type": "string", "required": true, "description": "Select the genome build for the dataset. Must be HG19/GRCh37. If not, please convert the files before uploading it for QC", "enum": ["HG19/GRCh37"]}, {"name": "group_name", "in": "query", "type": "string", "required": true, "description": "Who can access this dataset once uploaded? Contact us if you need to create/reuse a specific group to restrict access", "enum": ["Ahola-Olli_Cytokines", "BCAC", "Bristol", "CHDI", "EmmaLA", "GSK", "GTEx", "Huntingtons", "King_GSK", "OCAC", "Onco_TRICL_lung_cancer", "Sclerostin_genetics_consortium", "SpiroMetaplusCHARGE", "Thompson_JIA", "biobank_japan", "biogen", "charge_igf", "developer", "eQTLGen", "headspace", "immunobase_users", "internal", "ncase_lt_10_ukb-b", "pQTL", "practical", "public", "sclerostin", "small_ukb-b"]}, {"name": "category", "in": "query", "type": "string", "required": true, "description": "Is your phenotype a binary disease phenotype or a non-disease phenotype?", "enum": ["Binary", "Categorical Ordered", "Continuous", "Disease", "Immune system", "Metabolites", "NA", "Risk factor"]}, {"name": "subcategory", "in": "query", "type": "string", "required": true, "description": "Select the option that best describes your phenotype", "enum": ["Aging", "Amino acid", "Anthropometric", "Autoimmune / inflammatory", "Behavioural", "Biomarker", "Blood pressure", "Bone", "Cancer", "Carbohydrate", "Cardiovascular", "Cofactors and vitamins", "Cytokines", "Diabetes", "Education", "Energy", "Eye", "Fatty acid", "Glycemic", "Growth hormone", "Haemotological", "Hemodynamic", "Hormone", "Immune cell subset frequency", "Immune cell-surface protein expression levels", "Immune system", "Keto acid", "Kidney", "Lipid", "Lung disease", "Lung function", "Metabolite salt", "Metabolites ratio", "Metal", "NA", "Nucleotide", "Other", "Paediatric disease", "Peptide", "Personality", "Protein", "Psychiatric / neurological", "Reproductive aging", "Sleeping", "Unknown metabolite", "Xenobiotics", "gtex_eqtl"]}, {"name": "population", "in": "query", "type": "string", "required": true, "description": "Describe the geographic origins of your population", "enum": ["Aboriginal Australian", "African American or Afro-Caribbean", "African unspecified", "Asian unspecified", "Central Asian", "East Asian", "European", "Greater Middle Eastern (Middle Eastern, North African, or Persian)", "Hispanic or Latin American", "Mixed", "NA", "Native American", "Not reported", "Oceanian", "Other", "Other admixed ancestry", "South Asian", "South East Asian", "Sub-Saharan African"]}, {"name": "sex", "in": "query", "type": "string", "required": true, "description": "Indicate whether males or females are included in the study", "enum": ["Females", "Males", "Males and Females", "NA"]}, {"name": "author", "in": "query", "type": "string", "required": true, "description": "Provide the last name and initials of the first author of your study (e.g. Mendel GJ)"}, {"name": "nsnp", "in": "query", "type": "integer", "description": "How many SNPs are in your results file that you are uploading?"}, {"name": "sample_size", "in": "query", "type": "integer", "description": "Provide the sample size of your study"}, {"name": "year", "in": "query", "type": "integer", "description": "In which year was this GWAS published?"}, {"name": "ontology", "in": "query", "type": "string", "description": "Ontology mapping, semi-colon separated (e.g. MONDO:0003274;EFO:0000311)"}, {"name": "unit", "in": "query", "type": "string", "description": "How do you interpret a 1-unit change in the phenotype? (e.g. log odds ratio, mmol/L, SD)"}, {"name": "ncase", "in": "query", "type": "integer", "description": "Provide number of cases in the dataset (if applicable)"}, {"name": "ncontrol", "in": "query", "type": "integer", "description": "Provide number of controls in the dataset (if applicable)"}, {"name": "study_design", "in": "query", "type": "string", "description": "Which best describes the design of the study?", "enum": ["Case-control study", "Case-only analysis", "Cohort/cross-sectional study", "Meta-analysis of case-control studies", "Meta-analysis of cohort/cross-sectional studies", "Meta-analysis of studies with varying designs", "Other", "Unknown"]}, {"name": "covariates", "in": "query", "type": "string", "description": "Describe the covariates included in your regression model"}, {"name": "coverage", "in": "query", "type": "string", "description": "Level of genome coverage", "enum": ["whole genome", "partial", "exome"]}, {"name": "qc_prior_to_upload", "in": "query", "type": "string", "description": "Detail any QC or filtering steps taken prior to data upload"}, {"name": "imputation_panel", "in": "query", "type": "string", "description": "Select the imputation panel used in the study", "enum": ["1000 Genomes", "HRC", "HapMap2", "HapMap3", "TOPMed", "UK10K", "not imputed", "other"]}, {"name": "beta_transformation", "in": "query", "type": "string", "description": "Describe transformations applied to your phenotype (e.g. inverse rank normal, Z transformations)"}, {"name": "doi", "in": "query", "type": "string", "description": "DOI. Leave blank for unpublished studies (e.g. 10.1101/2020.08.10.244293v1)"}, {"name": "consortium", "in": "query", "type": "string", "description": "What is the name of the consortium (if applicable)? E.g. UK Biobank"}, {"name": "pmid", "in": "query", "type": "integer", "description": "PubMed identifier (digits only). Leave blank for unpublished studies"}, {"name": "sd", "in": "query", "type": "number", "description": "What is the standard deviation of the sample mean of the phenotype?"}, {"name": "mr", "in": "query", "type": "integer", "description": "Is the dataset suitable for MR studies? Put 1 for yes, or 0 for no (digits only)", "enum": [0, 1]}, {"name": "priority", "in": "query", "type": "integer", "description": "If multiple datasets with the same trait name exist, where does this dataset rank in terms of priority"}, {"name": "note", "in": "query", "type": "string", "description": "Is there any other information you would like to provide us about your GWAS?"}, {"name": "is_nc", "in": "query", "type": "integer", "description": "Is this dataset for non-commercial use only? Put 1 for yes, or 0 for no (digits only)", "enum": [0, 1]}], "tags": ["edit"]}}, "/edit/check/{gwas_id}": {"parameters": [{"name": "gwas_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/GwasInfo"}}}, "description": "Get metadata about specified GWAS summary datasets", "operationId": "edit_get_metadata", "tags": ["edit"]}}, "/edit/delete/draft/{gwas_id}": {"parameters": [{"name": "gwas_id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"200": {"description": "Success"}}, "description": "For the given GWAS ID, force the QC pipeline (if any) to fail, delete uploaded files and QC product etc., and when required, delete the metadata. Available until the dataset is submitted for approval.", "operationId": "edit_delete_draft_gwas", "tags": ["edit"]}}, "/edit/edit": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Edit existing GWAS metadata", "operationId": "edit_edit_metadata", "parameters": [{"name": "id", "in": "query", "type": "string", "required": true, "description": "ID to be edited"}, {"name": "trait", "in": "query", "type": "string", "required": true, "description": "Avoid acronyms; don't include other information in the trait name (e.g. don't include array name, whether restricted to males or females or whether adjusted or unadjusted for covariates)"}, {"name": "build", "in": "query", "type": "string", "required": true, "description": "Select the genome build for the dataset. Must be HG19/GRCh37. If not, please convert the files before uploading it for QC", "enum": ["HG19/GRCh37"]}, {"name": "group_name", "in": "query", "type": "string", "required": true, "description": "Who can access this dataset once uploaded? Contact us if you need to create/reuse a specific group to restrict access", "enum": ["Ahola-Olli_Cytokines", "BCAC", "Bristol", "CHDI", "EmmaLA", "GSK", "GTEx", "Huntingtons", "King_GSK", "OCAC", "Onco_TRICL_lung_cancer", "Sclerostin_genetics_consortium", "SpiroMetaplusCHARGE", "Thompson_JIA", "biobank_japan", "biogen", "charge_igf", "developer", "eQTLGen", "headspace", "immunobase_users", "internal", "ncase_lt_10_ukb-b", "pQTL", "practical", "public", "sclerostin", "small_ukb-b"]}, {"name": "category", "in": "query", "type": "string", "required": true, "description": "Is your phenotype a binary disease phenotype or a non-disease phenotype?", "enum": ["Binary", "Categorical Ordered", "Continuous", "Disease", "Immune system", "Metabolites", "NA", "Risk factor"]}, {"name": "subcategory", "in": "query", "type": "string", "required": true, "description": "Select the option that best describes your phenotype", "enum": ["Aging", "Amino acid", "Anthropometric", "Autoimmune / inflammatory", "Behavioural", "Biomarker", "Blood pressure", "Bone", "Cancer", "Carbohydrate", "Cardiovascular", "Cofactors and vitamins", "Cytokines", "Diabetes", "Education", "Energy", "Eye", "Fatty acid", "Glycemic", "Growth hormone", "Haemotological", "Hemodynamic", "Hormone", "Immune cell subset frequency", "Immune cell-surface protein expression levels", "Immune system", "Keto acid", "Kidney", "Lipid", "Lung disease", "Lung function", "Metabolite salt", "Metabolites ratio", "Metal", "NA", "Nucleotide", "Other", "Paediatric disease", "Peptide", "Personality", "Protein", "Psychiatric / neurological", "Reproductive aging", "Sleeping", "Unknown metabolite", "Xenobiotics", "gtex_eqtl"]}, {"name": "population", "in": "query", "type": "string", "required": true, "description": "Describe the geographic origins of your population", "enum": ["Aboriginal Australian", "African American or Afro-Caribbean", "African unspecified", "Asian unspecified", "Central Asian", "East Asian", "European", "Greater Middle Eastern (Middle Eastern, North African, or Persian)", "Hispanic or Latin American", "Mixed", "NA", "Native American", "Not reported", "Oceanian", "Other", "Other admixed ancestry", "South Asian", "South East Asian", "Sub-Saharan African"]}, {"name": "sex", "in": "query", "type": "string", "required": true, "description": "Indicate whether males or females are included in the study", "enum": ["Females", "Males", "Males and Females", "NA"]}, {"name": "author", "in": "query", "type": "string", "required": true, "description": "Provide the last name and initials of the first author of your study (e.g. Mendel GJ)"}, {"name": "nsnp", "in": "query", "type": "integer", "description": "How many SNPs are in your results file that you are uploading?"}, {"name": "sample_size", "in": "query", "type": "integer", "description": "Provide the sample size of your study"}, {"name": "year", "in": "query", "type": "integer", "description": "In which year was this GWAS published?"}, {"name": "ontology", "in": "query", "type": "string", "description": "Ontology mapping, semi-colon separated (e.g. MONDO:0003274;EFO:0000311)"}, {"name": "unit", "in": "query", "type": "string", "description": "How do you interpret a 1-unit change in the phenotype? (e.g. log odds ratio, mmol/L, SD)"}, {"name": "ncase", "in": "query", "type": "integer", "description": "Provide number of cases in the dataset (if applicable)"}, {"name": "ncontrol", "in": "query", "type": "integer", "description": "Provide number of controls in the dataset (if applicable)"}, {"name": "study_design", "in": "query", "type": "string", "description": "Which best describes the design of the study?", "enum": ["Case-control study", "Case-only analysis", "Cohort/cross-sectional study", "Meta-analysis of case-control studies", "Meta-analysis of cohort/cross-sectional studies", "Meta-analysis of studies with varying designs", "Other", "Unknown"]}, {"name": "covariates", "in": "query", "type": "string", "description": "Describe the covariates included in your regression model"}, {"name": "coverage", "in": "query", "type": "string", "description": "Level of genome coverage", "enum": ["whole genome", "partial", "exome"]}, {"name": "qc_prior_to_upload", "in": "query", "type": "string", "description": "Detail any QC or filtering steps taken prior to data upload"}, {"name": "imputation_panel", "in": "query", "type": "string", "description": "Select the imputation panel used in the study", "enum": ["1000 Genomes", "HRC", "HapMap2", "HapMap3", "TOPMed", "UK10K", "not imputed", "other"]}, {"name": "beta_transformation", "in": "query", "type": "string", "description": "Describe transformations applied to your phenotype (e.g. inverse rank normal, Z transformations)"}, {"name": "doi", "in": "query", "type": "string", "description": "DOI. Leave blank for unpublished studies (e.g. 10.1101/2020.08.10.244293v1)"}, {"name": "consortium", "in": "query", "type": "string", "description": "What is the name of the consortium (if applicable)? E.g. UK Biobank"}, {"name": "pmid", "in": "query", "type": "integer", "description": "PubMed identifier (digits only). Leave blank for unpublished studies"}, {"name": "sd", "in": "query", "type": "number", "description": "What is the standard deviation of the sample mean of the phenotype?"}, {"name": "mr", "in": "query", "type": "integer", "description": "Is the dataset suitable for MR studies? Put 1 for yes, or 0 for no (digits only)", "enum": [0, 1]}, {"name": "priority", "in": "query", "type": "integer", "description": "If multiple datasets with the same trait name exist, where does this dataset rank in terms of priority"}, {"name": "note", "in": "query", "type": "string", "description": "Is there any other information you would like to provide us about your GWAS?"}, {"name": "is_nc", "in": "query", "type": "integer", "description": "Is this dataset for non-commercial use only? Put 1 for yes, or 0 for no (digits only)", "enum": [0, 1]}], "tags": ["edit"]}}, "/edit/list": {"get": {"responses": {"200": {"description": "Success"}}, "description": "List datasets that are added by the user. Can filter by state (draft/released) and paginate released datasets.", "operationId": "edit_list_metadata", "parameters": [{"name": "state", "in": "query", "type": "string", "description": "Filter by state: \"draft\" for datasets not released, \"released\" for released datasets. Default: draft", "default": "draft"}, {"name": "offset", "in": "query", "type": "integer", "description": "Pagination offset for released datasets (only used when state=released). Default: 0", "default": 0}, {"name": "limit", "in": "query", "type": "integer", "description": "Pagination limit for released datasets (only used when state=released). Default: 100", "default": 100}], "tags": ["edit"]}}, "/edit/state/{gwas_id}": {"parameters": [{"name": "gwas_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "description": "Check the DAG runs and task instances related to the dataset", "operationId": "edit_get_state", "tags": ["edit"]}}, "/edit/upload": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Upload GWAS summary stats file to the IEU OpenGWAS database", "operationId": "edit_upload_gwas", "parameters": [{"name": "chr_col", "in": "query", "type": "integer", "required": true, "description": "Column index for chromosome"}, {"name": "pos_col", "in": "query", "type": "integer", "required": true, "description": "Column index for base position"}, {"name": "ea_col", "in": "query", "type": "integer", "required": true, "description": "Column index for effect allele"}, {"name": "oa_col", "in": "query", "type": "integer", "required": true, "description": "Column index for non-effect allele"}, {"name": "beta_col", "in": "query", "type": "integer", "required": true, "description": "Column index for effect size"}, {"name": "se_col", "in": "query", "type": "integer", "required": true, "description": "Column index for standard error"}, {"name": "pval_col", "in": "query", "type": "integer", "required": true, "description": "Column index for P-value"}, {"name": "delimiter", "in": "query", "type": "string", "required": true, "description": "Column delimiter for file", "enum": ["comma", "tab", "space"]}, {"name": "header", "in": "query", "type": "string", "required": true, "description": "Does the file have a header line?", "enum": ["True", "False"]}, {"name": "ncase_col", "in": "query", "type": "integer", "description": "Column index for case sample size"}, {"name": "snp_col", "in": "query", "type": "integer", "description": "Column index for dbsnp rs-identifer"}, {"name": "eaf_col", "in": "query", "type": "integer", "description": "Column index for effect allele frequency"}, {"name": "oaf_col", "in": "query", "type": "integer", "description": "Column index for other allele frequency"}, {"name": "imp_z_col", "in": "query", "type": "integer", "description": "Column number for summary statistics imputation Z score"}, {"name": "imp_info_col", "in": "query", "type": "integer", "description": "Column number for summary statistics imputation INFO score"}, {"name": "ncontrol_col", "in": "query", "type": "integer", "description": "Column index for control sample size; total sample size if continuous trait"}, {"name": "id", "in": "query", "type": "string", "required": true, "description": "Identifier to which the summary stats belong."}, {"name": "gwas_file", "in": "formData", "type": "file", "description": "Path to GWAS summary stats text file for upload. If you do not provide a file we assume the analysis is performed on HPC."}, {"name": "gzipped", "in": "query", "type": "string", "required": true, "description": "Is the file compressed with gzip?", "enum": ["True", "False"]}, {"name": "md5", "in": "query", "type": "string", "description": "MD5 checksum of the uploaded file"}, {"name": "nsnp", "in": "query", "type": "integer", "description": "Number of snps in the uploaded file"}], "consumes": ["multipart/form-data"], "tags": ["edit"]}}, "/gwasinfo": {"post": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/GwasInfo"}}}, "description": "Get metadata about all GWAS summary datasets that you have access to", "operationId": "gwasinfo_post", "parameters": [{"name": "id", "in": "query", "type": "array", "description": "List of GWAS IDs", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}], "tags": ["gwasinfo"]}, "get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/GwasInfo"}}}, "description": "Get metadata about all GWAS summary datasets that you have access to", "operationId": "gwasinfo_get_all", "tags": ["gwasinfo"]}}, "/gwasinfo/files": {"post": {"responses": {"200": {"description": "Success"}}, "description": "For each dataset specified, get the download URL for each file (.vcf.gz, .vcf.gz.tbi, _report.html) associated with the dataset. The URLs will expire in 2 hours. If a dataset is missing from the results, that means the dataset doesn't exist or you don't have access to it. If a dataset is in the result but some/all links are missing, that means the files are unavailable.", "operationId": "gwasinfo_files_get", "parameters": [{"name": "id", "in": "query", "type": "array", "required": true, "description": "List of GWAS IDs", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "commercial_approval_received", "in": "query", "type": "integer", "description": "[Only for commercial users under agreement/contract] Whether to include results from datasets of which commercial use is not allowed as per the metadata. Other users do not need to specify this.", "default": 0}], "tags": ["gwasinfo"]}}, "/ld/clump": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Perform clumping a specified set of rs IDs. \nUses 1000 genomes reference data filtered to within-population MAF > 0.01 and only retaining SNPs.", "operationId": "ld_clump_post", "parameters": [{"name": "rsid", "in": "query", "type": "array", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "pval", "in": "query", "type": "array", "default": [], "items": {"type": "number"}, "collectionFormat": "multi"}, {"name": "pthresh", "in": "query", "type": "number", "default": 5e-08}, {"name": "r2", "in": "query", "type": "number", "default": 0.001}, {"name": "kb", "in": "query", "type": "integer", "default": 5000}, {"name": "pop", "in": "query", "type": "string", "default": "EUR", "enum": ["EUR", "SAS", "EAS", "AFR", "AMR", "legacy"]}], "tags": ["ld"]}}, "/ld/matrix": {"post": {"responses": {"200": {"description": "Success"}}, "description": "For a list of SNPs get the LD R values. These are presented relative to a specified reference allele.\nUses 1000 genomes reference data filtered to within-population MAF > 0.01 and only retaining SNPs.", "operationId": "ld_matrix_post", "parameters": [{"name": "rsid", "in": "query", "type": "array", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "pop", "in": "query", "type": "string", "default": "EUR", "enum": ["EUR", "SAS", "EAS", "AFR", "AMR", "legacy"]}], "tags": ["ld"]}}, "/ld/reflookup": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Lookup whether rsids are present in the LD reference panel", "operationId": "ld_reflookup_post", "parameters": [{"name": "rsid", "in": "query", "type": "array", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "pop", "in": "query", "type": "string", "default": "EUR", "enum": ["EUR", "SAS", "EAS", "AFR", "AMR", "legacy"]}], "tags": ["ld"]}}, "/phewas": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Perform PheWAS of specified variants across all available GWAS datasets. Only accepts p <= 0.01", "operationId": "phewas_post", "parameters": [{"name": "variant", "in": "query", "type": "array", "required": true, "description": "List of rs IDs, chr:pos or chr:pos range  (hg19/b37). e.g rs1205,7:105561135,7:105561135-105563135", "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "pval", "in": "query", "type": "number", "description": "P-value threshold (must <= 0.01) (exponents not supported through Swagger)", "default": 0.01}, {"name": "index_list", "in": "query", "type": "array", "description": "List of study indexes. If empty then searches across all indexes.", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "commercial_approval_received", "in": "query", "type": "integer", "description": "[Only for commercial users under agreement/contract] Whether to include results from datasets of which commercial use is not allowed as per the metadata. Other users do not need to specify this.", "default": 0}], "tags": ["phewas"]}}, "/quality_control/check/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "description": "View files generated for a dataset", "operationId": "qc_get_files", "tags": ["quality_control"]}}, "/quality_control/delete/{id}": {"parameters": [{"name": "id", "in": "path", "required": true, "type": "string"}], "delete": {"responses": {"200": {"description": "Success"}}, "description": "Delete quality control relationship (does not delete metadata or data files)", "operationId": "qc_delete", "parameters": [{"name": "id", "in": "query", "required": true, "type": "string", "description": "Identifier for the gwas info."}], "tags": ["quality_control"]}}, "/quality_control/list": {"get": {"responses": {"200": {"description": "Success", "schema": {"$ref": "#/definitions/GwasInfo"}}}, "description": "Return all GWAS summary datasets requiring QC", "operationId": "qc_get_todo", "tags": ["quality_control"]}}, "/quality_control/release": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Release data from quality control process", "operationId": "qc_post_release", "parameters": [{"name": "id", "in": "query", "type": "string", "required": true, "description": "Identifier for the gwas info."}, {"name": "comments", "in": "query", "type": "string", "description": "Comments."}, {"name": "passed_qc", "in": "query", "type": "string", "required": true, "description": "Did the data meet QC?", "enum": ["True", "False"]}], "tags": ["quality_control"]}}, "/quality_control/report/{gwas_id}": {"parameters": [{"name": "gwas_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "description": "View html report on QC process for specified ID", "operationId": "qc_get_report", "tags": ["quality_control"]}}, "/quality_control/submit/{gwas_id}": {"parameters": [{"name": "gwas_id", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "description": "Submit dataset for approval", "operationId": "qc_post_submit", "tags": ["quality_control"]}}, "/status": {"get": {"responses": {"200": {"description": "Success"}}, "description": "Check services are running", "operationId": "status_get", "security": [], "tags": ["status"]}}, "/tophits": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Extract top hits based on p-value threshold from a GWAS dataset.", "operationId": "tophits_post", "parameters": [{"name": "id", "in": "query", "type": "array", "required": true, "description": "list of GWAS study IDs", "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "pval", "in": "query", "type": "number", "description": "P-value threshold (must <= 0.01) (exponents not supported through Swagger)", "default": 5e-08}, {"name": "preclumped", "in": "query", "type": "integer", "description": "Whether to use pre-clumped tophits (1) or not (0)", "default": 1}, {"name": "clump", "in": "query", "type": "integer", "description": "Whether to clump (1) or not (0)", "default": 1}, {"name": "r2", "in": "query", "type": "number", "description": "Clumping parameter", "default": 0.001}, {"name": "kb", "in": "query", "type": "integer", "description": "Clumping parameter", "default": 5000}, {"name": "pop", "in": "query", "type": "string", "default": "EUR", "enum": ["EUR", "SAS", "EAS", "AFR", "AMR", "legacy"]}, {"name": "commercial_approval_received", "in": "query", "type": "integer", "description": "[Only for commercial users under agreement/contract] Whether to include results from datasets of which commercial use is not allowed as per the metadata. Other users do not need to specify this.", "default": 0}], "tags": ["tophits"]}}, "/user": {"get": {"responses": {"200": {"description": "Success"}}, "description": "Get information of the current user. This can be used to validate your token (status code will be 200 OK if successful). Read more at https://api.opengwas.io/api/#authentication", "operationId": "user_get", "security": [{"token_jwt": []}], "tags": ["user"]}}, "/variants/afl2": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Obtain allele frequency and LD scores for a particular variant or comma separated list of variants.\n```", "operationId": "variants_afl2_post", "parameters": [{"name": "rsid", "in": "query", "type": "array", "description": "List of variant rs IDs", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "chrpos", "in": "query", "type": "array", "description": "List of variant chr:pos format on build 37 (e.g. 7:105561135)", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "radius", "in": "query", "type": "integer", "description": "Range to search either side of target locus (for chrpos only)", "default": 0}], "tags": ["variants"]}}, "/variants/afl2/snplist": {"get": {"responses": {"200": {"description": "Success"}}, "description": "Get list of rsids that are variable across populations for ancestry analyses", "operationId": "variants_afl2_snplist_get", "tags": ["variants"]}}, "/variants/chrpos": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Obtain information for a particular variant or comma separated list of variants. Note the payload can be passed to curl via json using e.g.:\n\n```\n-X POST -d '\n{\n    'chrpos': ['7:105561135-105563135','10:44865737']\n}\n'\n```", "operationId": "variants_chrpos_post", "parameters": [{"name": "chrpos", "in": "query", "type": "array", "description": "List of variant chr:pos format on build 37 (e.g. 7:105561135)", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}, {"name": "radius", "in": "query", "type": "integer", "description": "Range to search either side of target locus", "default": 0}], "tags": ["variants"]}}, "/variants/gene/{gene}": {"parameters": [{"description": "A gene identifier, either Ensembl or Entrez, e.g. ENSG00000123374 or 1017", "name": "gene", "in": "path", "required": true, "type": "string"}], "get": {"responses": {"200": {"description": "Success"}}, "description": "Obtain information for a particular SNP or comma separated list of SNPs", "operationId": "variants_gene_get", "parameters": [{"name": "radius", "in": "query", "type": "integer", "description": "Range to search either side of target locus", "default": 0}], "tags": ["variants"]}}, "/variants/rsid": {"post": {"responses": {"200": {"description": "Success"}}, "description": "Obtain information for a particular SNP or comma separated list of SNPs. Note the payload can be passed to curl via json using e.g.:\n```\n-X POST -d '\n{\n    'rsid': ['rs234','rs333']\n}\n'\n```", "operationId": "variants_post_rsid", "parameters": [{"name": "rsid", "in": "query", "type": "array", "description": "List of variant rs IDs", "default": [], "items": {"type": "string"}, "collectionFormat": "multi"}], "tags": ["variants"]}}}, "info": {"title": "IEU OpenGWAS database", "version": "4.0.0", "description": "A RESTful API for querying tens of thousands of GWAS summary datasets"}, "produces": ["application/json"], "consumes": ["application/json"], "securityDefinitions": {"token_jwt": {"type": "apiKey", "in": "header", "name": "Authorization", "description": "Prepend \"<code>Bearer(whitespace)</code>\" to your token. The entire value provided for this header should be like: <code>Bearer ey******.**********.*********</code>. Read more at https://api.opengwas.io/api/#authentication"}}, "security": [{"token_jwt": []}], "tags": [{"name": "status", "description": "Status of API and linked resources"}, {"name": "batches", "description": "Data batches"}, {"name": "user", "description": "User zone"}, {"name": "gwasinfo", "description": "Get information about available GWAS summary datasets"}, {"name": "associations", "description": "Retrieve GWAS associations"}, {"name": "tophits", "description": "Extract top hits based on p-value threshold from a GWAS dataset"}, {"name": "phewas", "description": "Perform PheWAS of specified variants across all available GWAS datasets"}, {"name": "variants", "description": "Retrieve variant information"}, {"name": "ld", "description": "LD operations e.g. clumping, tagging, LD matrices"}, {"name": "edit", "description": "Upload and delete data"}, {"name": "quality_control", "description": "Quality control the GWAS data"}], "definitions": {"GwasInfo": {"properties": {"id": {"type": "string"}, "trait": {"type": "string"}, "build": {"type": "string"}, "group_name": {"type": "string"}, "category": {"type": "string"}, "subcategory": {"type": "string"}, "population": {"type": "string"}, "sex": {"type": "string"}, "author": {"type": "string"}, "nsnp": {"type": "integer"}, "sample_size": {"type": "integer"}, "year": {"type": "integer"}, "ontology": {"type": "string"}, "unit": {"type": "string"}, "ncase": {"type": "integer"}, "ncontrol": {"type": "integer"}, "study_design": {"type": "string"}, "covariates": {"type": "string"}, "coverage": {"type": "string"}, "qc_prior_to_upload": {"type": "string"}, "imputation_panel": {"type": "string"}, "beta_transformation": {"type": "string"}, "doi": {"type": "string"}, "consortium": {"type": "string"}, "pmid": {"type": "integer"}, "sd": {"type": "number"}, "mr": {"type": "integer"}, "priority": {"type": "integer"}, "note": {"type": "string"}, "is_nc": {"type": "integer"}}, "type": "object"}}, "responses": {"ParseError": {"description": "When a mask can't be parsed"}, "MaskError": {"description": "When any error occurs on mask"}, "TooManyRequests": {}}}
