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

[KeyError] arcasHLA convert - using "group" #122

Closed
jinhys opened this issue Feb 5, 2024 · 4 comments
Closed

[KeyError] arcasHLA convert - using "group" #122

jinhys opened this issue Feb 5, 2024 · 4 comments

Comments

@jinhys
Copy link

jinhys commented Feb 5, 2024

Hi, I'm getting KeyErrors when I run arcasHLA convert using the -r parameter like the commands as follows:

./arcasHLA convert -r p-group <genotypes.tsv> <outfile.tsv>
./arcasHLA convert -r g-group <genotypes.tsv> <outfile.tsv>

1. error message from running -r p-group:

Traceback (most recent call last):
  File "/home/user/tool/arcasHLA/arcasHLA_master/scripts/convert.py", line 196, in <module>
    genotypes[subject][gene] = convert_allele(allele, resolution)
  File "/home/user/tool/arcasHLA/arcasHLA_master/scripts/convert.py", line 98, in convert_allele
    if allele in p_group[i]:
KeyError: 3

2. error message from running -r g-group:

Traceback (most recent call last):
  File "/home/user/tool/arcasHLA/arcasHLA_master/scripts/convert.py", line 196, in <module>
    genotypes[subject][gene] = convert_allele(allele, resolution)
  File "/home/user/tool/arcasHLA/arcasHLA_master/scripts/convert.py", line 90, in convert_allele
    if allele in g_group[i]:
KeyError: 3

*For your reference, these commands work well without any errors:

./arcasHLA convert -r 1 <genotypes.tsv> <outfile.tsv>
./arcasHLA convert -r 2 <genotypes.tsv> <outfile.tsv>
./arcasHLA convert -r 3 <genotypes.tsv> <outfile.tsv>

It would be greatly appreciated if you could fix these KeyErrors! - Please let me know if you need further details.

@jinhys
Copy link
Author

jinhys commented Feb 5, 2024

Hi @abuendia - If you're available, could you please take a look at these KeyErrors? Thank you!

@jinhys jinhys changed the title [KeyError] arcasHLA convert - using "group" [KeyError] arcasHLA convert - using "group" Feb 5, 2024
@GaryZhangYue
Copy link

Hi @abuendia - If you're available, could you please take a look at these KeyErrors? Thank you!

This worked:
#91

@abuendia
Copy link
Collaborator

abuendia commented Feb 7, 2024

Hi @jinhys - Please pull latest from master and let me know if the error persists. Fixed in #94.

@jinhys
Copy link
Author

jinhys commented Feb 7, 2024

Hi @abuendia, thanks for fixing this issue. I pulled the latest version (v0.5.1) - Now I can generate the output files (both p-group and g-group) successfully using this version. Thank you!

@abuendia abuendia closed this as completed Feb 8, 2024
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

3 participants