Skip to content

ERROR in getAnnoFastaFromJoingenes.py: The sequence data given to a Seq object should be a string (not another Seq object etc) #432

@reubwn

Description

@reubwn

Hello,

When running the script getAnnoFastaFromJoingenes.py at the end of the BRAKER3 pipeline I'm seeing an error:

ERROR in file braker.pl at line 8515
Failed to execute: python3 getAnnoFastaFromJoingenes.py -g genome.fa -f augustus.hints.gtf -o augustus.hints 1> getAnnoFastaFromJoingenes.augustus.hints_tmp.stdout 2>getAnnoFastaFromJoingenes.augustus.hints_tmp.stderr

Details from the error file:

Traceback (most recent call last):
  File "getAnnoFastaFromJoingenes.py", line 165, in <module>
    codingseq[tx].seq += Seq(record.seq[cds_line['start'] -
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/braker3/lib/python3.12/site-packages/Bio/Seq.py", line 95, in __init__
    raise TypeError(
TypeError: The sequence data given to a Seq object should be a string (not another Seq object etc)

It seems like a simple fix, editing line 165 in getAnnoFastaFromJoingenes.py to pass a string to Seq using str, i.e.

codingseq[tx].seq += Seq(str(record.seq[cds_line['start'] -

Executing the above command then completes without error.

I can see that a similar edit was made to line 153 a few months ago, so posting here in case there are other instances of this elsewhere that might need adjusting.

Cheers,
reubwn

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions