Hello,
I have a large 155mb vcf file that I am trying to sort lexicographically by chromosome number (in the order 1,10, 11, 12 .. etc ) and then by position. I am trying to use vcf-sort from the vcf-tools perl package.
I have been running the command :
perl vcf-sort myfile.vcf > output.vcf
however, the output file loses all chromosome, position, and ref information for some reason and sorts variants by ID. According to the help page, this is suppose to sort the variants in lexicographic order.
I tried the command:
perl -c vcf-sort myfile.vcf > output.vcf
and the output file is sorted in chromosomally chronological order (1,2,3,4..) and all of the necessary information is retained.
Any idea on how to obtain a lexicographical sort by chromosome number (and then position)?
- Parth
Could you please post the command again...I am having some issues with the following command. Thanks.
error as follows:
http://stackoverflow.com/questions/10627989/how-do-i-insert-a-tab-character-in-iterm
Use
$'\t'
Oops... I got it. Thanks.
But the random chromosomes are really giving some problems...