Testing an issue found while using pyfastx.
Dockerfile to reproduce the issue. This uses Ubuntu 18.04
and Pyfastx 0.8.4
,
:warning: while at the moment Python version is not (3.9.5 used at the time of writing).
sudo docker build -t pyfastx:test .
In my test I got this output (relevant part):
Step 13/14 : RUN python --version
---> Running in b32ed95ec437
Python 3.9.5
Removing intermediate container b32ed95ec437
---> 83c5c2fd5bbd
Step 14/14 : RUN python /test/test.py /test/test.fa
---> Running in 077ba0ce4146
Pyfastx version 0.8.4
1 comment
nocomment comment
ERROR: Sequence nocomment should have no comments
last butlast
last butlast
Removing intermediate container 077ba0ce4146
Using pyfastx version 0.8.4, I tried iterating over records but the "comment" attribute is not reset. Is there a safer way to iterate (I would like not to assume FASTA format) or did I just miss something obvious?
File (test.fa
):
>1 comment
TTTTTTTT
>3
atatat
Code:
import pyfastx
fa = pyfastx.Fastx("test.fa")
for name,seq,comment in fa:
print(comment)
Output:
comment
comment