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

Problem with "gff3_ID_generator.py" #129

Open
MesYosra opened this issue Mar 6, 2023 · 8 comments
Open

Problem with "gff3_ID_generator.py" #129

MesYosra opened this issue Mar 6, 2023 · 8 comments

Comments

@MesYosra
Copy link

MesYosra commented Mar 6, 2023

Hello,
So I have a gff3 file where there are lines missing ID (column 9). Those lines mainly concerns CDS' and stop codons. I tried to use "gff3_ID_generator.py" with the command :
"python3 gff3_ID_generator.py -g ../../../UK0001.gff3 -og UK0001Mo.gff3" .
With UK0001.gff3 being my gff file with missing IDs and UK0001Mo.gff3 being my desired output.

I get this error as the output:

INFO Reading input gff3 file: (../../../UK0001.gff3)
INFO Generate new ID for features in (../../../UK0001.gff3)
Traceback (most recent call last):
File "/home/mestiri/GFF3toolkit/gff3tool/lib/gff3_ID_generator.py", line 333, in
main(in_gff=args.gff, merge_report=args.merge_report, out_merge_report=args.out_merge_report, out_gff=args.output_gff, uuid_on=args.universally_unique_identifier, prefix=args.idprefix, digitlen=args.digitlen, report=args.report, alias=args.alias)
File "/home/mestiri/GFF3toolkit/gff3tool/lib/gff3_ID_generator.py", line 260, in main
if descend['attributes']['ID'] not in ID_dict:
KeyError: 'ID'

I don't understand what it means, to be honest. Is there something that I misunderstood concerning this python script ?

Thanks for your help ! Have a nice day !

@mpoelchau
Copy link
Contributor

@MesYosra Sorry about the issues. Are you able to share a snippet (or all) of the gff3 so I can debug? Thanks!

@MesYosra
Copy link
Author

MesYosra commented Mar 6, 2023

Thank you for your reply @mpoelchau. I am sending you the gff ziper file.
UK0001.zip

@MesYosra
Copy link
Author

MesYosra commented Mar 7, 2023

@mpoelchau Please, Should I add a header ?

@mpoelchau
Copy link
Contributor

Thanks for sharing the file @MesYosra. I am not sure why this is not working for you. The -uuid option works (instead of the -diglen + -idpre options) - will this help you move forward in the meantime, while I investigate the problem?

@MesYosra
Copy link
Author

MesYosra commented Mar 8, 2023

Thank you for your reply @mpoelchau .When I tried with the option (-uuid ) , it worked but it just changed column 10 (parent) but where there was no ID, there is not yet. Thank you and sorry for the inconvenience

@mpoelchau
Copy link
Contributor

I ran the program as follows with the file that you provided, and obtained the attached output. I am not sure why it didn't add IDs in your case. Were there any other error messages from the program?

$ python -V
Python 3.7.4
$ python repos/GFF3toolkit/gff3tool/lib/gff3_ID_generator.py -g UK0001.gff3 -uuid -og UK-ids.gff3
INFO     Reading input gff3 file: (UK0001.gff3)
INFO     Generate new ID for features in (UK0001.gff3)
INFO     Write out gff3 file: (UK-ids.gff3)
$

UK-ids.gff3.gz

@MesYosra
Copy link
Author

MesYosra commented Mar 9, 2023

Hello, thank you for your time. Yes it works, sorry I didn't see that he put the ID after the parent. Please, is it possible to keep the ID and the parent the same way it is in the base file. Thank you @mpoelchau

@mpoelchau
Copy link
Contributor

@MesYosra sorry, we don't have enough people right now to support this. Perhaps you could ask the Braker developers to support providing IDs for all feature types.

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

2 participants