huguesrichard / Allopipe

AlloPipe is a computational method to assess the alloreactivity expected from a donor/recipient transplantation pair
MIT License
0 stars 0 forks source link

AAMS run: donor/recipient input name #8

Closed PierreLaville closed 4 months ago

PierreLaville commented 4 months ago

Error happening when the input name differs from "donor.vcf" & "recipient.vcf", such as in the tutorial.

This happens in the very last step of aams_pipeline.py , just before this appears:

Entering netMHCpan handler : running netMHCpan will last a long time

Full error:

Traceback (most recent call last):
  File "/home/plaville/anaconda3/envs/Allopipe_01_17/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3361, in get_loc
    return self._engine.get_loc(casted_key)
  File "pandas/_libs/index.pyx", line 76, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/index.pyx", line 108, in pandas._libs.index.IndexEngine.get_loc
  File "pandas/_libs/hashtable_class_helper.pxi", line 5198, in pandas._libs.hashtable.PyObjectHashTable.get_item
  File "pandas/_libs/hashtable_class_helper.pxi", line 5206, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'aa_ref_indiv_x'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/plaville/Documents/AlloGenomics/test-vcf-name/Allopipe/src/aams_pipeline.py", line 27, in <module>
    main()
  File "/home/plaville/Documents/AlloGenomics/test-vcf-name/Allopipe/src/aams_pipeline.py", line 18, in main
    fasta_path,pep_indiv_path = aams_helpers.build_peptides(aams_run_tables,str_params,args)
  File "/home/plaville/Documents/AlloGenomics/test-vcf-name/Allopipe/src/tools/aams_helpers.py", line 347, in build_peptides
    transcripts_pair = aa_ref(transcripts_pair)
  File "/home/plaville/Documents/AlloGenomics/test-vcf-name/Allopipe/src/tools/aams_helpers.py", line 94, in aa_ref
    transcripts_pair["aa_ref_indiv_x"].notna()
  File "/home/plaville/anaconda3/envs/Allopipe_01_17/lib/python3.9/site-packages/pandas/core/frame.py", line 3458, in __getitem__
    indexer = self.columns.get_loc(key)
  File "/home/plaville/anaconda3/envs/Allopipe_01_17/lib/python3.9/site-packages/pandas/core/indexes/base.py", line 3363, in get_loc
    raise KeyError(key) from err
KeyError: 'aa_ref_indiv_x'

Changing the "donor" hardcoded string, like here : https://github.com/huguesrichard/Allopipe/blob/e3422e2895b1df58be38f1546265b067f4fde698/src/tools/table_operations.py#L98 or other occurrences in the same file to fit the chosen input name doesn't fix the issue.

PierreLaville commented 4 months ago

To be more precise, I tried:

This let me think that the error is caused earlier in the pipeline or that the files carry the "donor" information somewhere.

A file containing "-D0" such as in https://github.com/huguesrichard/Allopipe/blob/e3422e2895b1df58be38f1546265b067f4fde698/src/tools/table_operations.py#L290

works, but fixing this line didn't help neither.