The vcf2maf.pl script converts VCF files to MAF format. It relies on Ensembl's VEP (Variant Effect Predictor) for annotation.
Basic Usage
To perform a standard conversion:
perl vcf2maf.pl --input-vcf <input.vcf> --output-maf <output.maf>
Handling Sample IDs and Genotypes
- Use
--tumor-id and --normal-id to fill columns 16 and 17 of the output MAF with specific sample IDs and to parse genotypes/allele counts from the VCF. - If your VCF uses specific hardcoded names for genotype columns (e.g.,
TUMOR/NORMAL from VarScan), use --vcf-tumor-id and --vcf-normal-id to map them to your desired output IDs.
VEP Configuration
If VEP is installed in non-standard locations, specify the paths:
--vep-path: Path to the VEP installation.--vep-data: Path to the VEP cache/data.
Bypassing VEP
Use --inhibit-vep to skip VEP and create a minimalist MAF-like file using only data from the input VCF. Warning: This is not recommended unless you are certain of the input VCF's annotation quality, as vcf2maf normally runs VEP with specific parameters to ensure standardization.
# Basic conversion
perl vcf2maf.pl --input-vcf tests/test.vcf --output-maf tests/test.vep.maf
# Conversion with sample IDs
perl vcf2maf.pl --input-vcf tests/test.vcf --output-maf tests/test.vep.maf --tumor-id WD1309 --normal-id NB1308
# Handling VarScan-style VCFs
perl vcf2maf.pl --input-vcf tests/test_varscan.vcf --output-maf tests/test_varscan.vep.maf --tumor-id WD1309 --normal-id NB1308 --vcf-tumor-id TUMOR --vcf-normal-id NORMAL
# Specifying VEP paths
perl vcf2maf.pl --input-vcf tests/test.vcf --output-maf tests/test.vep.maf --vep-path /opt/vep --vep-data /srv/vep