using samtools to verify tabix. Query in python generates error.
1
0
Entering edit mode
4.4 years ago
richyanicky ▴ 30

I have the following file with index :

-rw-rw-r--  1 ryanicky ryanicky        335M Nov 22 16:15 multiallel.csv.gz drwxrwxrw- 18 ryanicky root            4.0K Nov 22
 16:17 .
 -rw-rw-r--  1 ryanicky ryanicky          70 Nov 22 16:32 multiallel.csv.gz.tbi

When I run the following in python I receive a failure error?

 Traceback (most recent call last):
      File "./LinRegAssociationTest_v3.py", line 154, in <module>
        cis_strs = GetCisSTRs(STRGTFILE, CHROM, start-DISTFROMGENE, end+DISTFROMGENE)
      File "./LinRegAssociationTest_v3.py", line 38, in GetCisSTRs
        records = tb.query(chrom, start-1, end+1)
    tabix.TabixError: query failed

Is there a test I can do at the command line using samtools?

Thanks,

Richard

samtools python tabix • 1.0k views
ADD COMMENT
2
Entering edit mode
4.4 years ago
ATpoint 82k

You don't need samtools. I would simply query any region that is in the file.

For example do bgzip -c -d multiallel.csv.gz | head and then take the first coordinate. Lets say this is chr1 445566,

then get it via tabix: tabix multiallel.csv.gz chr1:445565-445567

If everything is fine the overlapping entries should be returned.

ADD COMMENT

Login before adding your answer.

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