I have vcf file named "trio_example.vcf" . I am trying the following commands:
bgzip -c trio_example.vcf > trio_example.vcf.gz
htsfile trio_example.vcf.gz
tabix -p vcf trio_example.vcf.gz
But it is showing the following error:
[E::hts_idx_push] Unsorted positions on sequence #1: 60066 followed by 60043
tbx_index_build failed: trio_example.vcf.gz
How can I solve this?Why indexing is necessary?
By my count, that's already two questions unrelated to your original problem. You are yet to acknowledge the help you received, either verbally or by upvoting the answers. Instead, it is like "I need help, so it doesn't matter how many unrelated questions I ask in the same thread."
One would think this is your first time asking a question rather than having done it 100+ times. I guess there is some truth to the saying that if one doesn't learn something properly the first 3-4 times they do it, chances are they will never learn.