griffithlab / pVACtools

http://www.pvactools.org
BSD 3-Clause Clear License
141 stars 59 forks source link

ERROR:netmhccons_1_1_executable.netmhccons_1_1_python_interface:len(peptide_list) != len(scores) -- 14 != 0 #328

Closed ktroule closed 5 years ago

ktroule commented 5 years ago

Describe the bug I install pvactools in conda, then execute a test.vcf file and it stops, from what I can read it's not a specific problem of pvactools, but not sure how to solve it. I've just keep missense mutations in order to avoid possible problems from mutations not accounted in pvactools, just in case.

Thanks

To Reproduce conda create --name pvactools.test python=3.5 conda activate pvactools.test pip install pvactools pvactools -v 1.3.3

pvacseq run /local/Outputs/Test.vcf Test HLA-A*02:02 NetMHCcons /local/Outputs -e 8,9,10 -m median --iedb-install-directory /local/App/Aljub_snake/Programs/iedb -m median -b 1000 -c 1 --fasta-size 100 --downstream-sequence-length 100 Log Output

Executing MHC Class I predictions
Converting .vcf to TSV
Completed
Splitting TSV into smaller chunks
Splitting TSV into smaller chunks - Entries 1-23
Completed
Generating Variant Peptide FASTA and Key Files
Generating Variant Peptide FASTA and Key Files - Entries 1-46
Completed
Making binding predictions for Allele HLA-A*02:02 and Epitope Length 8 - Entries 1-46
Making binding predictions on Allele HLA-A*02:02 and Epitope Length 8 with Method NetMHCcons - Entries 1-46
ERROR:netmhccons_1_1_executable.netmhccons_1_1_python_interface:len(peptide_list) != len(scores) -- 14 != 0
The two methods NetMHCpan and NetMHC produced different outputs, number of peptides not the same

Traceback (most recent call last):
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/predict_binding.py", line 426, in <module>
    Prediction().main()
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/predict_binding.py", line 418, in main
    self.commandline_input(args)
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/predict_binding.py", line 95, in commandline_input
    mhc_scores = mhc_predictor.predict(input.input_protein.as_amino_acid_text())
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/seqpredictor.py", line 819, in predict
    scores.append(predictor.predict_sequence(sequence,pred))
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/seqpredictor.py", line 406, in predict_sequence
    scores = predict_netmhccons(sequence, (allele_name_or_sequence, self.length))
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/../method/netmhccons-1.1-executable/netmhccons_1_1_executable/netmhccons_1_1_python_interface.py", line 19, in predict_sequence
    scores = predict_peptide_list(peptide_list, allele_length_pair)
  File "/local/App/Aljub_snake/Programs/iedb/mhc_i/src/../method/netmhccons-1.1-executable/netmhccons_1_1_executable/netmhccons_1_1_python_interface.py", line 81, in predict_peptide_list
    raise Exception(msg)
Exception: len(peptide_list) != len(scores) -- 14 != 0
Traceback (most recent call last):
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 396, in call_iedb
    lib.call_iedb.main(arguments)
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/call_iedb.py", line 56, in main
    (response_text, output_mode) = prediction_class_object.predict(args.input_file, args.allele, args.epitope_length, args.iedb_executable_path, args.iedb_retries)
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/prediction_class.py", line 62, in predict
    response = run("/bin/bash -c \"source activate pvactools_py27; python {}\"".format(arguments), stdout=PIPE, check=True, shell=True)
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/subprocess.py", line 398, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '/bin/bash -c "source activate pvactools_py27; python /local/App/Aljub_snake/Programs/iedb/mhc_i/src/predict_binding.py netmhccons HLA-A*02:02 8 /local/Outputs/MHC_Class_I/tmp/onlyTumor_cleanNOTPASS_pan105_21.fa.split_1-46"' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 398, in call_iedb
    p4.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - Entries %s - Completed" % (a, epl, method, fasta_chunk))
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/pymp/__init__.py", line 148, in __exit__
    raise exc_t(exc_val)
TypeError: __init__() missing 1 required positional argument: 'cmd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 398, in call_iedb
    p4.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - Entries %s - Completed" % (a, epl, method, fasta_chunk))
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/pymp/__init__.py", line 148, in __exit__
    raise exc_t(exc_val)
TypeError: __init__() missing 1 required positional argument: 'cmd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 398, in call_iedb
    p4.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - Entries %s - Completed" % (a, epl, method, fasta_chunk))
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/pymp/__init__.py", line 148, in __exit__
    raise exc_t(exc_val)
TypeError: __init__() missing 1 required positional argument: 'cmd'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/anaconda3/envs/pvactools.test/bin/pvacseq", line 11, in <module>
    sys.exit(main())
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/tools/pvacseq/main.py", line 99, in main
    args[0].func.main(args[1])
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/tools/pvacseq/run.py", line 172, in main
    pipeline.execute()
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 488, in execute
    self.call_iedb(chunks)
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/lib/pipeline.py", line 398, in call_iedb
    p4.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - Entries %s - Completed" % (a, epl, method, fasta_chunk))
  File "/home/anaconda3/envs/pvactools.test/lib/python3.5/site-packages/pymp/__init__.py", line 148, in __exit__
    raise exc_t(exc_val)
TypeError: __init__() missing 1 required positional argument: 'cmd'

Output File If your bug is related to the contents of an output file, please paste the output file here.

Expected behavior A clear and concise description of what you expected to happen.

susannasiebert commented 5 years ago

This issue is duplicate to #324. I will close this issue and ask you to please follow #324 instead.

In my experience, this error is non-deterministic and restarting your process will get past this point of failure. We have an open PR #325 that would change pVACseq's behavior to retry the prediction if it encounters this error. This PR will be deployed in version 1.4.0.

ktroule commented 5 years ago

Yes, I've read before posting all those two threads.

In my case, after executing the same line 5 times I keep getting the same error, so I cannot proceed with the analysis. Just in case it helps.

Thanks

susannasiebert commented 5 years ago

Would you be able to share a test VCF with us so that we can reproduce this error on our end?

This error is specific to NetMHCcons, so switching to a different prediction algorithm would get around this problem. NetMHCcons uses NetMHC, NetMHCpan, and PickPocket so switching to those three algorithms individually might be an option.

ktroule commented 5 years ago

Indeed, I've tried with NetMHC and no problem seems to occur. Attached you'll find the vcf which works with NetMHC but not with NetMHCcons.

Thanks

Test.vcf.zip

susannasiebert commented 5 years ago

Unfortunately, I'm unable to reproduce this error. The VCF you provided processes without error for me. I'm using the griffithlab/pvactools:1.3.3 Docker container. Which version of IEDB are you running? Maybe try upgrading to the latest one, if you haven't already. Otherwise, I would give the docker container a try.

ktroule commented 5 years ago

I'm using the 2.19 which I believe is the latest version Could you show the command line for the docker so I can try to reproduce it.

Thanks

susannasiebert commented 5 years ago
docker run -v <path to the directory that contains Test.vcf>:/pvacseq_data -it griffithlab/pvactools:1.3.3
pvacseq run /pvacseq_data/Test.vcf Test HLA-A*02:02 NetMHCcons /local/Outputs -e 8,9,10 -m median --iedb-install-directory /opt/iedb -m median -b 1000 -c 1 --fasta-size 100 --downstream-sequence-length 100
susannasiebert commented 5 years ago

The 1.3.3 docker container uses IEDB MHC I version 2.19.1.

ktroule commented 5 years ago

Thanks for your time!

Running it via docker seems to be solving the issue, also seems to be solving another issue I was having with other vcf, just in case it helps.

The analysis was getting stuck with one vcd, just had to cancel it, and relaunch and it would end normally.