Tutorial

Phenotype, genotype, covariate, PC, population, GRM, summary statistic and filter files.

Section 2

Input File Formats

MVP follows HIBLUP-compatible data organization. Keep individual IDs consistent across phenotype, genotype, PC, GRM and population files.

Phenotype File

The phenotype file is a text table with a header. The first column is the individual ID. Missing values should be encoded as NA. Phenotype column positions are 1-indexed.

id trait1 trait2 sex year height
ID001 12.4 8.1 F 2025 168
ID002 NA 7.6 M 2025 175
ID003 10.9 8.4 F 2026 162

Use --pheno-pos to select the analyzed traits. The default is column 2.

--pheno demo.phe --pheno-pos 2
--pheno demo.phe --pheno-pos 2,3
ColumnMeaningHow MVP uses it
Column 1Individual IDUsed to match genotype, PC, population and GRM IDs.
Trait columnsNumeric phenotypesSelected by --pheno-pos. Multiple columns can be comma-separated.
Discrete covariatesGroups such as sex, year or batchSelected by --dcovar.
Quantitative covariatesContinuous variables such as height or ageSelected by --qcovar.

Column numbering. MVP follows user-facing 1-based column positions. Because the first column is reserved for IDs, phenotype positions must be larger than 1.

Genotype Files: PLINK BED and PLINK2 PGEN

MVP supports both PLINK 1 binary files and PLINK 2 PGEN files. Provide the file prefix, not the file name with extension. The sample IDs in genotype files should match the IDs in the phenotype file after any keep/remove filters are applied.

# PLINK 1 binary prefix
demo.bed
demo.bim
demo.fam
--bfile demo

# PLINK 2 PGEN prefix
demo.pgen
demo.pvar
demo.psam
--pfile demo
Input typeRequired filesMVP optionCommon mistake
PLINK 1 binary.bed, .bim, .fam--bfile demoUsing --bfile demo.bed instead of the prefix.
PLINK 2 PGEN.pgen, .pvar, .psam--pfile demoSupplying --bfile and --pfile together.

Covariates in Phenotype File

MVP reads covariates from the phenotype file by column position. Use --dcovar for discrete covariates and --qcovar for quantitative covariates.

# column 4 = sex, column 5 = year, column 6 = height
--dcovar 4,5
--qcovar 6
  • Discrete covariates are converted to model terms suitable for categorical variables.
  • Quantitative covariates are treated as numeric columns and should not contain text labels.
  • Do not include the phenotype column itself in --dcovar or --qcovar.
  • When a covariate has many missing values, remove or impute those records before running MVP.

Principal Component File

A PC file can be used as standalone clustering input with --cluster. It should include a header, and the first column should contain individual IDs. For GLM or MLM, PCs are usually generated internally by specifying --npc.

id PC1 PC2 PC3
ID001 -0.021 0.114 0.008
ID002 0.034 -0.090 0.012
ID003 -0.006 0.041 -0.017

To generate PCs from genotype data, use --pca. To use an existing PC file as standalone clustering input, use --cluster --pc.

--pca --bfile demo --npc 5
--cluster --pc result/demo_pca.pc --npc 3

Important. --pc is for standalone clustering input. For GLM or MLM correction, use --npc so MVP can add principal components to the model.

Population Classification File

Use --pop-class to provide known population labels. The file contains two columns: individual ID and population label.

ID001 POP_A
ID002 POP_B
ID003 POP_A

When this file is supplied with --glm or --mlm, MVP can run population-specific association scans and then combine subgroup evidence through the meta-analysis workflow if the meta module is available.

  • Each individual should appear at most once.
  • Population labels should be short and stable because they may be used in output column names.
  • --pop-class cannot be used together with standalone --cluster.
  • Do not provide a pre-computed --grm in the same command when using population classification.

Relationship Matrix File

Use --grm with the prefix of pre-computed relationship matrix files. MVP expects paired binary and ID files. A GRM can be reused by MLM and PCA, which is useful when several traits share the same genotype data.

demo_grm.bin
demo_grm.id

--grm demo_grm

ID consistency. The GRM ID file must match the individuals used in the phenotype and genotype data after sample filtering.

GWAS Summary Statistics File

Use --sumstat for standalone meta-analysis. At least two summary statistics files are required. Each file should include the following header fields:

SNP chr pos a1 a2 freq b se p n
rs001 1 10583 A G 0.42 0.031 0.010 0.0021 1200
rs002 1 12940 C T 0.18 -0.024 0.012 0.0450 1200
FieldDescriptionRequirement
SNPMarker ID.Should be consistent across cohorts whenever possible.
chr, posChromosome and base-pair position.Use the same genome build across all files.
a1, a2Effect and non-effect allele coding.Allele orientation must be checked before meta-analysis.
freqAllele frequency for a1.Used for MAF and population-structure-aware methods.
b, se, pEffect, standard error and p-value.Required for method-specific meta-analysis statistics.
nSample size.Should be numeric and cohort-specific.

Meta-analysis input. --sumstat requires at least two files, separated by commas, and duplicate file paths are rejected.

Genome Window File

Window-based methods can use fixed windows or a user-defined window file. The user-defined file should include chr, start and end columns.

chr start end
1 1 1000000
1 1000001 2000000
2 1 1000000

Window options are mutually exclusive:

# Fixed physical window size
mvp --meta --sumstat c1.sumstat,c2.sumstat --window-bp 1000000 --out result/meta_bp

# Fixed number of SNPs per window
mvp --meta --sumstat c1.sumstat,c2.sumstat --window-num 500 --out result/meta_num

# User-defined window file
mvp --meta --sumstat c1.sumstat,c2.sumstat --window-file windows.txt --out result/meta_windows
  • If no window option is supplied, MVP uses a default fixed base-pair window.
  • Do not use --window-bp and --window-num together.
  • Do not provide fixed window settings when --window-file is used.

Sample and Marker Filter Files

Use --keep and --remove for individual filters. Use --extract and --exclude for marker filters. Do not specify both include and exclude files for the same target.

# Keep only selected individuals
--keep keep.id

# Remove selected individuals
--remove remove.id

# Analyze selected markers
--extract marker_keep.txt
TargetInclude optionExclude optionExpected content
Individuals--keep--removeOne individual ID per line.
Markers--extract--excludeOne marker ID per line.

Quality Control

Before running large analyses, check ID consistency, missing phenotype values, genotype file prefixes, MAF thresholds, sample filters and marker filters. Use --maf to set the minor allele frequency threshold.

  • Confirm that phenotype IDs and genotype IDs use the same naming convention.
  • Check that the first phenotype column is the ID column and all selected trait columns are numeric or NA.
  • Remove samples or markers with known quality issues before running production analyses.
  • Use a clear --out prefix for each test run so intermediate files are not overwritten.
  • For meta-analysis, check genome build, marker ID, allele coding and sample-size columns before combining cohorts.