Closed BenAuxier closed 3 years ago
Would you be able to upload a couple of files you are having issues with? I've tested mostly with GFFs downloaded from NCBI, but files generated by Augustus should also work.
Here is the output. First I use the gff that comes straight out of Augustus. It complains about
ben@iMac-van-iMac locus_5 % /Users/ben/Library/Python/3.8/bin/clinker -p gff.html *.gff [13:35:11] INFO - Starting clinker [13:35:11] INFO - Parsing GenBank files: ['locus5_A1163.gff', 'locus5_Af293.gff', 'locus5_p20.gff', 'locus5_p21.gff'] Traceback (most recent call last): File "/Users/ben/Library/Python/3.8/bin/clinker", line 10, in <module> sys.exit(main()) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/main.py", line 208, in main clinker( File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/main.py", line 71, in clinker clusters = parse_files(paths) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/classes.py", line 200, in parse_files cluster = parse_gff(path) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/classes.py", line 92, in parse_gff seqid = feature.attributes["ID"][0] File "/Users/ben/Library/Python/3.8/lib/python/site-packages/gffutils/attributes.py", line 63, in __getitem__ v = self._d[k] KeyError: 'ID'
Then I try with using the --gff3=on option, and get a similar error message about uid
ben@iMac-van-iMac locus_5 % /Users/ben/Library/Python/3.8/bin/clinker -p gff.html *.gff3 [13:36:14] INFO - Starting clinker [13:36:14] INFO - Parsing GenBank files: ['locus5_A1163.gff3', 'locus5_Af293.gff3', 'locus5_p20.gff3', 'locus5_p21.gff3'] /Users/ben/Library/Python/3.8/lib/python/site-packages/Bio/Seq.py:2334: BiopythonWarning: Partial codon, len(sequence) not a multiple of three. Explicitly trim the sequence or add trailing N before translation. This may become an error in future. warnings.warn( [13:36:14] INFO - Starting cluster alignments Traceback (most recent call last): File "/Users/ben/Library/Python/3.8/bin/clinker", line 10, in <module> sys.exit(main()) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/main.py", line 208, in main clinker( File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/main.py", line 81, in clinker globaligner = align.align_clusters(*clusters, cutoff=identity, jobs=jobs) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/align.py", line 51, in align_clusters aligner.add_clusters(*args) File "/Users/ben/Library/Python/3.8/lib/python/site-packages/clinker/align.py", line 325, in add_clusters self._genes[gene.uid] = gene AttributeError: 'NoneType' object has no attribute 'uid'
I can get clinker to work, using the gff2gbSmall.pl script from the Augustus distribution, but the output does not recognize that they are coming from the same DNA strand, and things they are all separate contigs.
I have attached the .gff files, gff3, gb and fast files if that helps.
Thanks for the files, think I've narrowed down to the issue.
By default, Augustus produces GTF files, which is the source of the first error (see https://github.com/daler/gffutils/issues/65). In each row, the parser used by clinker expects an 'ID' key/value pair, which that file does not have. Perhaps in the future I'll try to add a fallback to try and catch this.
Using the -gff3 option like you did fixes that, but then you hit a clinker bug, where gene coordinates were read in incorrectly from GFF files. I've fixed that in https://github.com/gamcil/clinker/pull/44 which should land in the next release.
Using your GFF3 files:
Thanks, very excited to use this!
I am trying to get clinker to work with the output of Augustus. I see that the new GFF file support may make this much easier than trying to convert to GenBank format. Currently I cannot get Augustus gff files to work, and I have tried several converters with no luck yet. Can you add sample gff files to the examples folder?