lmdu / pyfastx

a python package for fast random access to sequences from plain and gzipped FASTA/Q files
https://pyfastx.readthedocs.io
MIT License
262 stars 23 forks source link

SystemError with fa.fetch #40

Closed imk1 closed 2 years ago

imk1 commented 2 years ago

I am getting the following error with fa.fetch:

SystemError: /tmp/build/80754af9/python_1578510683607/work/Objects/longobject.c:415: bad argument to internal function

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/home/ikaplow/RegulatoryElementEvolutionProject/src/RegElEvoCode/prepareDataForPrank.py", line 160, in prepareDataForPrank(options) File "/home/ikaplow/RegulatoryElementEvolutionProject/src/RegElEvoCode/prepareDataForPrank.py", line 149, in prepareDataForPrank currentSequence = fa.fetch(bedDict[peak][0], (bedDict[peak][1], bedDict[peak][2]))

I have checked that the chromosome is in the fasta file and that the coordinates are within the chromosome boundaries. I am using pyfastx version 0.8.4 with python 3.7.6.

It would be great if someone could help me figure out what to do about this. Thanks!

imk1 commented 2 years ago

It seems like the problem is that my positions were floats and not ints.