How to extract all columns of CSQ using split-vep plugin of bcftools?
1
5
Entering edit mode
7 months ago
dare_devil ★ 1.5k

I have a vcf file containing CSQ column which has 350 parameters. How can extract all of them as table using bcftools +split-vep

plugin samtools bcftools vcf split-vep • 998 views
ADD COMMENT
0
Entering edit mode

extract all of them as table using

is this plugin able to convert vcf to a tabular format ?

ADD REPLY
0
Entering edit mode

Ya it does. here

ADD REPLY
5
Entering edit mode
7 months ago
David Parry ▴ 120
bcftools +split-vep -f '%CHROM\t%POS\t%REF\t%ALT\t%CSQ\n' -d -A tab input.vcf

And if you need headers:

echo -e "CHROM\tPOS\tREF\tALT\t$(bcftools +split-vep -l input.vcf | cut -f 2 | tr '\n' '\t' | sed 's/\t$//')" > output.tsv
bcftools +split-vep -f '%CHROM\t%POS\t%REF\t%ALT\t%CSQ\n' -d -A tab input.vcf >> output.tsv
ADD COMMENT

Login before adding your answer.

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