Visualizing VCF file on IGV
0
0
Entering edit mode
3.1 years ago
Buffo ★ 2.4k

Hi all, This is my first time trying to understand and visualize a VCF file on IGV, I make my vcf as follows:

samtools mpileup -I -u -f genome.fa alignment.bam > pileup.bcf
bcftools call -cv pileup.bcf > variant.bcf

Everything worked, the final result looks like the manual said it should be, but IGV says:

Error loading /variant.bcf: Unable to parse header with error: Input stream does not contain a BCF encoded file; BCF magic header info not found, at record 0 with position 0:, for input source: ./mysource

Any suggestion?

BCFTOOLS VCF IGV • 3.5k views
ADD COMMENT
0
Entering edit mode

What does file variant.bcf say?

ADD REPLY
0
Entering edit mode

the first few lines:

##fileformat=VCFv4.2
##FILTER=<ID=PASS,Description="All filters passed">
##samtoolsVersion=1.11+htslib-1.11
##samtoolsCommand=samtools mpileup -I -u -f genome.fa alignment.bam 

the last ones:

contig56    100 .   A   C   86.0076 .   DP=22;VDB=0.00217227;SGB=-0.616816;RPB=0.922371;MQB=0.723806;BQB=0.881383;MQ0F=0.136364;AF1=0.5;AC1=1;DP4=11,0,6,0;MQ=35;FQ=89.0021;PV4=1,1,1,0.479574  GT:PL   0/1:116,0,141
contig56    101 .   A   G   88.0076 .   DP=20;VDB=0.00217227;SGB=-0.616816;RPB=0.749585;MQB=0.555306;BQB=0.976745;MQ0F=0.1;AF1=0.5;AC1=1;DP4=10,0,6,0;MQ=35;FQ=90.93;PV4=1,1,1,0.304041 GT:PL   0/1:118,0,135
contig4356  557 .   C   T   97.0078 .   DP=21;VDB=0.000211583;SGB=-0.662043;RPB=0.499352;MQB=0.367879;BQB=0.778801;MQ0F=0.0952381;AF1=0.5;AC1=1;DP4=0,6,0,9;MQ=34;FQ=93.0426;PV4=1,0.0565043,0.0680361,1    GT:PL   0/1:127,0,121
contig5678  558 .   G   T   98.0078 .   DP=23;VDB=0.000211583;SGB=-0.662043;RPB=0.499352;MQB=0.367879;BQB=0.778801;MQ0F=0.130435;AF1=0.5;AC1=1;DP4=0,6,0,9;MQ=34;FQ=93.2257;PV4=1,0.0645577,0.0680361,1 GT:PL   0/1:128,0,121
ADD REPLY
2
Entering edit mode
3.1 years ago
GenoMax 141k

This is a VCF format file in plain text (not BCF which would be binary). Perhaps IGV is expecting this file to be in the right format based on the extension. You could try renaming the file to VCF and see if it works. You will need to index the VCF file using tabix or igvtools.

ADD COMMENT
0
Entering edit mode

Brilliant! it worked by changing to .vcf. Many thanks GenoMax.

ADD REPLY

Login before adding your answer.

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