Skip to content

Instantly share code, notes, and snippets.

@obenshaindw
Last active February 4, 2022 09:03
Show Gist options
  • Save obenshaindw/c1afbedb0e317c1483e0 to your computer and use it in GitHub Desktop.
Save obenshaindw/c1afbedb0e317c1483e0 to your computer and use it in GitHub Desktop.
Split VCF by Chromosome
seq 1 22 | xargs -n1 -P4 -I {} /usr/bin/vcftools/vcftools_0.1.11/bin/vcftools --gzvcf largevcf.vcf.gz --chr {} --recode --recode-INFO-all --out /split_by_chr/largevcf.chr{}
@jianxinwang
Copy link

NIce tool. Can you explain this command-line?

Jason

@stephenwilliams22
Copy link

Very nice. for chr1 vs 1 you can replace the beginning with seq -f "chr%1g" 22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment