Use when you need to reorder sample columns in a VCF file to match the column order of a template VCF.
vcf-shuffle-cols -t template.vcf[.gz] input.vcf[.gz] > output.vcf/home/vimalinx/miniforge3/envs/bio/bin/vcf-shuffle-cols/home/vimalinx/miniforge3/envs/bio/bin/perl /home/vimalinx/miniforge3/envs/bio/bin/vcf-shuffle-colsreferences/help.md# 1) Reorder one VCF to match a template
/home/vimalinx/miniforge3/envs/bio/bin/perl \
/home/vimalinx/miniforge3/envs/bio/bin/vcf-shuffle-cols \
-t template.vcf.gz \
input.vcf.gz > reordered.vcf
# 2) Stream the input VCF from stdin
gunzip -c input.vcf.gz | \
/home/vimalinx/miniforge3/envs/bio/bin/perl \
/home/vimalinx/miniforge3/envs/bio/bin/vcf-shuffle-cols \
-t template.vcf.gz > reordered.vcf
# 3) Reorder before a phased join
/home/vimalinx/miniforge3/envs/bio/bin/perl \
/home/vimalinx/miniforge3/envs/bio/bin/vcf-shuffle-cols \
-t chunk1.vcf \
chunk2.vcf > chunk2.reordered.vcf
.vcf.gz plus tabix.Can't locate Vcf.pm; activate the bio environment first or call the script through /home/vimalinx/miniforge3/envs/bio/bin/perl.-t; the script errors if sample names do not match one-to-one..vcf.gz, but the script itself can read a file argument or stdin; compression is not the core requirement.