I decided to index a file and found that it would not be indexed, giving me the following output:
[ti_index_core] the chromosome blocks not continuous at line 7086, is the file sorted? [pos 4397121]
Then I try sorting the file, giving me the following output:
Writing to /tmp/bcftools-sort.a8aIlN
[W::bcf_hdr_check_sanity] GL should be declared as Number=G
[W::vcf_parse_info] INFO 'ISTP' is not defined in the header, assuming Type=String
Error encountered while parsing the input at chr1:4397121
Cleaning
I checked the line that is considered a problem here, and it did seem somewhat off, in that there is no tab following the "." after the position of the chromosome in the vcf file. I was hoping to gain some guidance regarding this issue.
Thank you
1 answer
Based on your output the files are not properly sorted. Rather than concatenating using cat, you should use bcftools or another approach to ensure that the output VCF is sorted. In the worst extremity you can use LC_COLLATE=C sort -k1,1 -k2,2n, though this will sort contigs lexicographically and therefore you may need to re-sort the header also.
TL;DR you merged these files improperly, try again with bcftools concat
Log in to answer this question.
how did you get that vcf ile ? what is the origin of the VCF ?
how about your previous questions like; Issues with bcftools
I deleted the empty files and ended up concatenating the files into the vcf file I am having issues with currently. I concatenated files for a set of samples and then merged the resulting file with another sample's concatenated file.
What do you see with a
grep -C 4 4397121 <yourvcf>? I suspect you concatenated headers into the vcf.This is the output:
It seems pretty standard except for line 4397121.