Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in generation of antismash regions using "generate_antismash_gbk.py" #49

Open
mfrand-7 opened this issue Apr 28, 2022 · 0 comments

Comments

@mfrand-7
Copy link

Hi,

I apologise in advance if this is a rather simple question, I am a newbie in this area and my learning process is slow.

I am trying to generate antismash regions from my DeepBGC output. Using the proposed script I manage to convert my first 5 regions. However, for the rest I get this output:

Parsing region coordinates...
CDS ['JJQ97_RS05155'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05160'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05165'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05170'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05175'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05180'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05185'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
CDS ['JJQ97_RS05185'] is not translated (don't have 'translation' qualifier)! translating with BioPython (default transl_table=11 if not filled)..
Traceback (most recent call last):
  File "/home/mfrand/.local/lib/python3.8/site-packages/Bio/Seq.py", line 1232, in translate
    table_id = int(table)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'list'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "generate_antismash_gbk.py", line 131, in <module>
    main()
  File "generate_antismash_gbk.py", line 111, in main
    feature.translate(region_gbk).seq]
  File "/home/mfrand/.local/lib/python3.8/site-packages/Bio/SeqFeature.py", line 462, in translate
    return feat_seq.translate(
  File "/home/mfrand/.local/lib/python3.8/site-packages/Bio/SeqRecord.py", line 1320, in translate
    self.seq.translate(
  File "/home/mfrand/.local/lib/python3.8/site-packages/Bio/Seq.py", line 1251, in translate
    raise ValueError("Bad table argument")
ValueError: Bad table argument

My first thought was that there was an error in my coordinates table, however, I am not able to find it as its format seems to be the same as example.csv ( I attached a sample of my table below; starting from the row marked in bold it gives the error). I have tried to modify the script to solve this problem but I haven't been able to do it yet.

#record_name,start_loc,end_loc
NZ_CP068034.2,431183,432377
NZ_CP068034.2,477321,504096
NZ_CP068034.2,505213,506620
NZ_CP068034.2,520667,529185
NZ_CP068034.2,603185,636668
NZ_CP068034.2,1171217,1207238
NZ_CP068034.2,1261449,1269122
NZ_CP068034.2,1277741,1294683
NZ_CP068034.2,1329947,1331198
NZ_CP068034.2,1348002,1372261
NZ_CP068034.2,1631019,1638565

Thank you in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant