Skip to main content

Upload GWAS Dataset

Upload a VCF or PLINK file for GWAS analysis.

Endpoint

POST /api/gwas/datasets/upload

Authentication

Required. Include JWT token in Authorization header.

Request

Content-Type: multipart/form-data

FieldTypeRequiredDescription
filefileYesVCF or PLINK file
namestringNoDataset name

Example

curl -X POST http://localhost:8000/api/gwas/datasets/upload \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@data.vcf" \
-F "name=My GWAS Dataset"

Response

{
"dataset_id": "507f1f77bcf86cd799439011",
"name": "data.vcf",
"status": "processing",
"snp_count": null,
"sample_count": null,
"created_at": "2024-01-01T12:00:00Z"
}

File Processing

After upload, the file is processed asynchronously:

  1. VCF/PLINK parsing
  2. SNP extraction
  3. Sample identification
  4. Quality control

Check status with GET /api/gwas/datasets/:id

Supported Formats

FormatExtensionsMax Size
VCF.vcf, .vcf.gz500MB
PLINK.bed, .bim, .fam1GB

Errors

CodeMessage
400Unsupported file format
413File too large
422File parsing failed