Whole Genome .vcf file split by Chromosome with BCFTools without index file
1
0
Entering edit mode
17 months ago
S • 0
for i in {1..22}; do bcftools view "$(input)" --regions chr$i --output "$(output)" --output-type z; done

Hello, this is my current code that I am using to try to split a whole genome vcf file into 22 vcf files by chromosome. Unfortunately, it keeps spitting out an error that says I need an index file. Is there any way I could alter my code such that I do not need an index file to do so. I would imagine just like vcftools that bcftools could split by chromosome without the need for an index.

Thank you!

vcf bcftools • 822 views
ADD COMMENT
1
Entering edit mode
17 months ago

Use --targets instead of --regions

ADD COMMENT
0
Entering edit mode

Thank you, this worked great!

ADD REPLY

Login before adding your answer.

Traffic: 1630 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6