Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add script for sorting vcf file(s) #144

Open
bw2 opened this Issue Feb 11, 2014 · 0 comments

Comments

Projects
None yet
1 participant

bw2 commented Feb 11, 2014

I've written a simple in-memory VCF sorting script that uses PyVCF to sort one or more files into a particular chromosome ordering. Since this is a prerequisite for utils.walk_together(..), I think it would make sense to add it to PyVCF/scripts.

It has command line options for choosing the chromosome sort order to be alphabetical (1,10,2,..), numerical (1,2,3,), or based on the chromosome order in another .vcf, .bed, .txt, or .dict file. It also has options for stripping or prepending 'chr', and for discarding super-contig records.

Version 1.0 is at: https://github.com/bw2/ngs_utils/blob/master/vcf/sort_vcf.py

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