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 when running trust4-stats.py #314

Open
oO828 opened this issue Sep 28, 2024 · 1 comment
Open

Error when running trust4-stats.py #314

oO828 opened this issue Sep 28, 2024 · 1 comment

Comments

@oO828
Copy link

oO828 commented Sep 28, 2024

Hello,

Thank you for developing TRUST4!
I am writing to seek your assistance with the trust4-stats.py script. I am attempting to process an output file named trust_report.tsv generated by TRUST4 using the trust4-stats.py script. However, I have encountered some errors that I am unable to resolve on my own.
When I run the following command:
Python trust-stats.py -r Con_1_report.tsv -f TRUST4_report --ntaa nt
Traceback (most recent call last):
File "trust-stats.py", line 102, in
chainType = GetChainType(cols[4], cols[6], cols[7])
File "trust-stats.py", line 23, in GetChainType
return (0, isotypeRanks[c])
KeyError: 'IGHA'
To address this error, I added 'IGHA': 9 to the isotypeRanks dictionary and updated the isotypeOrder list accordingly. However, upon re-running the script, I encountered a new error:
Traceback (most recent call last):
File "trust-stats.py", line 106, in
if (cols[3] not in immrep[chainType]):
KeyError: (0, 10)
I suspect that the issue might be related to the nested structure of the subsequent code, but I am not certain how to modify it to resolve it correctly. Any guidance or suggestions you could provide would be greatly appreciated.

@mourisl
Copy link
Collaborator

mourisl commented Oct 1, 2024

Sorry for the delayed reply. I think you may also need to update line91 so the immrep array have the element pre-allocated. I'll modify the scripts later to make it easier to use/update.

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