split vcf file into multiple files
0
1
Entering edit mode
3.0 years ago
lz1903 ▴ 10

Hi,

I have tried to split vcf into multiple file with following codes:

for file in *.vcf*; do
 for sample in `bcftools query -l $file`; do
 bcftools view -c1 -Oz -s $sample -o ${file/.vcf*/.$sample.vcf.gz} $file
 done
done

But it gives me error: Could not parse argument: --compression-level $file

What does it mean, how can I get rid of it. Thanks in advance!

WGS vcf bcftools • 1.3k views
ADD COMMENT
0
Entering edit mode

what is your shell ? what is the output of ${SHELL} ? are you using bash ? replace "bcftools view" with "echo" , what is the output ?

ADD REPLY

Login before adding your answer.

Traffic: 3555 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