On 22 Aug 2016, at 21:15, Yuelin Zhu <[email protected]> wrote:
> I got Segmentation fault whenever doing bcftools index on the following file:
> 
>  http://gbnci-abcc.ncifcrf.gov/fileman/temp/1348518/geno.TRA.bcf 
[...]
> 
> $ bcftools index geno.TRA.bcf
> Segmentation fault

Thanks for the bug report.  Your file contains a couple of records with a POS 
field of 0:

chrUn_gl000237 0       TRA00075433     N       [etc]
chrUn_gl000241 0       TRA00075451     N       [etc]

and it is these that is causing bcftools index to crash.  If I remove those two 
records, the file can be indexed fine.

The VCF spec says that POS=0 indicates that the variant record is in a 
telomere.  Is it intentional that there are a couple of telomeric entries in 
your file, or is this perhaps a bug or artefact of the analysis program in use?

In any case, (1) bcftools index shouldn't crash and (2) if POS=0 is meaningful 
and valid in VCF/BCF files, bcftools needs to handle it.  So we'll fix this, 
and thanks again for the bug report [1].

    John

[1] Which I've filed as https://github.com/samtools/htslib/issues/406

-- 
 The Wellcome Trust Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 

------------------------------------------------------------------------------
_______________________________________________
Samtools-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/samtools-help

Reply via email to