vcf_format_conversions.py: VCF to Plink/EIGENSTRAT¶
Automates various simple file conversions. Currently the function is capable of converting between VCF-based formats (i.e. VCF, compressed-VCF, and BCF) and PLINK-based formats (i.e. PED and Binary-PED). Additional formats will be added as needed.
Input Command-line Arguments¶
- --vcf <vcf_filename>
- Argument used to define the filename of the VCF file.
- --vcf-fid <fid_str>
- Argument used to define the family ID for all VCF samples.
- --ped-prefix <ped_prefix>
- Argument used to define the filename prefix of both PED and MAP files.
- --ped <ped_filename>
- Argument used to define the filename of the PED file. Called alongside --map.
- --map <map_filename>
- Argument used to define the filename of the MAP file. Called alongside --ped.
- --binary-ped-prefix <binary_ped_prefix>
- Argument used to define the filename prefix of the Binary-PED, FAM, and BIM files.
- --binary-ped <ped_filename>
- Argument used to define the filename of the Binary-PED (i.e. BED) file. Called alongside --fam and --bim.
- --fam <fam_filename>
- Argument used to define the filename of the FAM file. Called alongside --binary-ped and --bim.
- --bim <bim_filename>
- Argument used to define the filename of the BIM file. Called alongside --binary-ped and --fam.
Output Command-line Arguments¶
- --out <output_filename>
- Argument used to define the complete output filename, overrides --out-prefix.
- --out-prefix <output_prefix>
- Argument used to define the output prefix (i.e. filename without file extension).
- --out-format <vcf, vcf.gz, bcf, ped, ped-12, binary-ped, eigenstrat>
- Argument used to define the desired output format. Formats include: uncompressed VCF (vcf); compressed VCF (vcf.gz); BCF (bcf); PLINK text file (ped); PLINK "12" coded text file (ped-12); binary PLINK file (binary-ped); and eigenstrat file (eigenstrat).
- --overwrite
- Argument used to define if previous output should be overwritten.
Other Command-line Arguments¶
- --delete-original
- Argument used to define that the original file should be deleted once converted.
- --threads <thread_int>
- Argument used to define the number of threads. This argument is currently only supported by conversions to/from PED and Binary-PED.