<p>Hello everyone, I'm handling self-made VCF files and I need to bgzip and tabix -p them ibn order to use some vcf-tools perl scripts. When I apply the tabiz command:
Tabix -p vcf file1.vcf.gz
the following error appears:</p>

<p><strong>[ti_index_core] the file out of order at line 8</strong></p>

<p>I had previous errors because I had an extra withespace at the end of each line which I removed using:</p>

<p>sed -e 's/ $//' file1.vcf </p>

<p>I have to say that the VCF file is all tab separated.</p>

<p>So, there are the first 20 lines of my vcf file:</p>

<pre><code>##fileformat=VCFv4.1
##source=pseq
##FILTER=&lt;ID=PASS,Description="Passed variant FILTERs"&gt;
#CHROM    POS    ID    REF    ALT    QUAL    FILTER    INFO    FORMAT    45125
1    109440678    1KG_1_109440678    I    D    .    PASS    .    GT    1/1
1    110655430    1KG_1_110655430    I    D    .    PASS    .    GT    1/1
1    113933669    1KG_1_113933669    I    D    .    PASS    .    GT    1/1
1    1158675    1KG_1_1158675    I    D    .    PASS    .    GT    1/1
1    12343587    1KG_1_12343587    I    D    .    PASS    .    GT    1/1
1    12632789    1KG_1_12632789    I    D    .    PASS    .    GT    1/1
1    1323216    1KG_1_1323216    I    D    .    PASS    .    GT    1/1
1    14106394    1KG_1_14106394    D    I    .    PASS    .    GT    1/1
1    150201529    1KG_1_150201529    I    D    .    PASS    .    GT    1/1
1    150938672    1KG_1_150938672    I    D    .    PASS    .    GT    1/1
1    152085296    1KG_1_152085296    I    D    .    PASS    .    GT    1/1
1    153641026    1KG_1_153641026    I    D    .    PASS    .    GT    1/1
1    167097500    1KG_1_167097500    I    D    .    PASS    .    GT    1/1
1    169512078    1KG_1_169512078    I    D    .    PASS    .    GT    1/1
1    170967308    1KG_1_170967308    I    D    .    PASS    .    GT    1/1
1    171079942    1KG_1_171079942    I    D    .    PASS    .    GT    1/1
</code></pre>

<p>Hope you can help me</p>

<p>your VCF must be sorted on CHROM/POS . It is not.</p>

<blockquote>
  <p><a href='http://samtools.sourceforge.net/tabix.shtml'>http://samtools.sourceforge.net/tabix.shtml</a></p>
  
  <p>" The input data file must be position <strong>sorted</strong> and compressed by
  bgzip..."</p>
</blockquote>
