Skip to main content

Run GWAS Analysis

Start a GWAS analysis job on an uploaded dataset.

Endpoint

POST /api/gwas/analyze

Authentication

Required.

Request Body

{
"dataset_id": "507f1f77bcf86cd799439011",
"analysis_type": "linear",
"phenotype_column": "phenotype",
"maf_threshold": 0.01,
"num_threads": 4
}
FieldTypeDefaultDescription
dataset_idstringRequiredDataset to analyze
analysis_typestringlinearlinear, logistic, chi_square
phenotype_columnstring-Column name for phenotype
maf_thresholdfloat0.01Minimum MAF
num_threadsint4Parallel threads

Response

{
"job_id": "507f1f77bcf86cd799439012",
"status": "pending",
"created_at": "2024-01-01T12:00:00Z"
}

Job Status

Check job progress:

GET /api/gwas/jobs/:job_id/status
{
"job_id": "...",
"status": "running",
"progress": 45,
"started_at": "2024-01-01T12:00:05Z"
}

Status Values

StatusDescription
pendingQueued for processing
runningAnalysis in progress
completedResults ready
failedError occurred