-
Notifications
You must be signed in to change notification settings - Fork 211
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
compare_gos.py namedtuple error #187
Comments
I figured out it's a typing issue. This works: compare_gos.py --gaf=../blah.gaf -o compare.tab X502S0.tab X805S0.tab X806S0.tab X808S0.tab X810S0.tab |
Thanks for your interest in GOATOOLS and taking your time to write us. That is great that compare_gos.py is working for you. Can we close this issue? |
The problem isn't solved. It seems the least you could do is document this issue so that others do not experience the problem, but fixing it would be better. |
Seems like it will be an easy fix. Thank you for bringing this to our attention. |
Yes, I agree. I appreciate your work on this. |
The filename is no longer used as a field in a namedtuple, so now the compare GO terms script can support filenames of any format. @tanghaibao , can you create a new release and upload to PyPI so that @marade and others may have access to the changes? |
Updated to |
@marade , The changes are in. Please upgrade your GOATOOLS and give it a try. Please let us know how it works for you. Thank you so much for taking your time to report this issue. |
Thanks for this. I think you can close the issue now. |
Okay. Terrific. Thank you for identifying and reporting this issue. We appreciate you taking your time to do that. And thank you for your interest in GOATOOLS. Closing the issue... |
It looks like the NamedTuple is being incorrectly created?
[06:30:08 ~/GO]$ compare_gos.py --gaf=../blah.gaf -o compare.tab 502S0.tab 805S0.tab 806S0.tab 808S0.tab 810S0.tab
requests.get(http://purl.obolibrary.org/obo/go/go-basic.obo, stream=True)
WROTE: go-basic.obo
go-basic.obo: fmt(1.2) rel(2020-10-09) 47,313 GO Terms; optional_attrs(relations
hip)
107 GO IDs READ: 502S0.tab
15 GO IDs READ: 805S0.tab
6 GO IDs READ: 806S0.tab
5 GO IDs READ: 808S0.tab
247 GO IDs READ: 810S0.tab
HMS:0:00:00.318155 15,333 annotations READ: ../blah.gaf
GoSubDag: 363 sources in 715 GOs rcnt(True). 0 alt GO IDs
GoSubDag: namedtuple fields: NS level depth reldepth GO alt GO_name dcnt D1 tcnt tfreq tinfo childcnt REL REL_short rel id
GoSubDag: relationships: {'negatively_regulates', 'positively_regulates', 'part_of', 'regulates'}
Traceback (most recent call last):
File "/usr/local/bin/compare_gos.py", line 17, in
run()
File "/usr/local/bin/compare_gos.py", line 12, in run
obj = CompareGOsCli()
File "/usr/local/lib/python3.6/dist-packages/goatools/cli/compare_gos.py", line 77, in init
self.objgrpd = _ini.get_grouped(self.go_ntsets, self.go_all, self.gosubdag,
**self.kws)
File "/usr/local/lib/python3.6/dist-packages/goatools/cli/compare_gos.py", line 217, in get_grouped
kws_grpd['go2nt'] = self._init_go2ntpresent(go_ntsets, go_all, gosubdag)
File "/usr/local/lib/python3.6/dist-packages/goatools/cli/compare_gos.py", line 224, in _init_go2ntpresent
ntobj = namedtuple('NtPresent', " ".join(nt.hdr for nt in go_ntsets))
File "/usr/lib/python3.6/collections/init.py", line 401, in namedtuple
'identifiers: %r' % name)
ValueError: Type names and field names must be valid identifiers: '502S0'
The text was updated successfully, but these errors were encountered: