gravatar for 4galaxy77

3 hours ago by

United Kingdom

There could be a more elegant way, but this could work. The first line splits up the snps into chunks of whatever size you want (-l) and then the next line loops over each file and subsets the vcf according.

bcftools query -f'%CHROMt%POSn' in.bcf | split -l 1000
for file in x*; do bcftools view -T $file -Ob in.bcf > in.$file.bcf; done

link

modified 2 hours ago

written
3 hours ago
by

4galaxy77360



Source link