Closed mt1022 closed 1 year ago
Thank you for reporting the bug. Let me see how to deal with it.
The problem is that the 'start_codon' line is missing, and the code calculate start codon position with stop codon, resulting in frame shift error. The t.cds_start(cdna=True) should be 0 instead of 2, and t.cds_stop(cdna=True) should be 1335. Deleting the second stop_codon line should be fine. I have find a way to fix the bug.
Thanks for the timely response.
By the way, I am not sure whether self.cds_start
have similar problems when "start_codon" lines are present in gtf. It is possible that a start codon might be distributed over two exons in rare cases, which might also lead to incorrect results in cds_start()
class mehtod.
You are right. The split of start codon should also be considered.
Dear developer,
I came across this error when running ribotish with the following command:
Error message:
This error seems to be caused by incorrect parsing of stop_codon position in
src/zbio/gtf.py
when the stop codon overlaps with a splice junction and is reprensented by two stop_codon lines in the gtf file: https://github.com/zhpn1024/ribotish/blob/607ab539267b4234ef8f7ec4f274f46637ce63f9/src/zbio/gtf.py#L395 And the stop codon position is stored as an interval rather than a list of two intervals: https://github.com/zhpn1024/ribotish/blob/607ab539267b4234ef8f7ec4f274f46637ce63f9/src/zbio/gtf.py#L278Here is the full gtf file used above:
Here is a demo of this error:
I am not sure how to deal with this issue. Can I get expected results by just deleting all the lines with "stop_codon" in third column of the gtf file?