This is a test version of Biostars. For the public version, visit https://www.biostars.org.
split vcf, choice

Hi,

I have to split a multisample VCF (the output of GATK4) into single vcfs (per sample). What is the best code? Then I have to annotate them with AnnovaR.

vcf-subset -c samplename -e inputvcf > sample.vcf

bcftools view -Oz -s samplename inputvcf > sample.vcf.gz

Is it correct to add the -e option in the vcf-subset code? or I'm going to lose data?

Best

vcf mergedvcf spltvcf

If that particular sample doesn't contain a variant i.e either not called or "reference homozygous", it will not be printed, which makes sense.

0 answers

No answers yet.

Log in to answer this question.