How to extract all columns of CSQ using split-vep plugin of bcftools?
1
6
Entering edit mode
3.6 years ago
DareDevil ★ 4.3k

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 • 4.7k 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
1
Entering edit mode

Ya it does. here

ADD REPLY
8
Entering edit mode
3.6 years ago
David Parry ▴ 150
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
0
Entering edit mode

Hi David,

Love the code, thanks! Do you know if its possible to get the ensembl vep headers onto the output? Thanks! Amy

ADD REPLY

Login before adding your answer.

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