openvax / topiary

Predict mutated T-cell epitopes from sequencing data
Apache License 2.0
27 stars 9 forks source link

Error of unknown origin #51

Closed kippakers closed 8 years ago

kippakers commented 8 years ago

Hey Guys,

I did some topiary runs this week and a handful are failing (repeatedly) for reasons I can't figure out. Have you seen this before? Not sure how to get the topiary version, but I updated it March 7, 2016. I ran 24 samples, 22 finished fine. 1 failed for all epitope lengths, another failed for all but 1 epitope length (I run these separately to distribute jobs). I'll be trying to sort it out, but let me know if this looks familiar to you. THANKS!

death 1:

...
INFO:root:Removing directory /tmp/45770235.tmpdir/tmp_netMHCcons_length_10lejBEz
Traceback (most recent call last):
  File "/hpc/users/akersn01/.local/bin/topiary", line 64, in <module>
    main()
  File "/hpc/users/akersn01/.local/bin/topiary", line 46, in main
    epitopes = predict_epitopes_from_args(args)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 296, in predict_epitopes_from_args
    raise_on_variant_effect_error=not args.skip_variant_errors)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 263, in predict_epitopes_from_variants
    wildtype_ligandome_dict=wildtype_ligandome_dict)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 159, in predict_epitopes_from_mutation_effects
    binding_predictions = mhc_model.predict(protein_subsequences)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/base_commandline_predictor.py", line 264, in predict
    process_limit=self.process_limit)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/process_helpers.py", line 141, in run_multiple_commands_redirect_stdout
    processes.get().wait()
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/process_helpers.py", line 59, in wait
    raise CalledProcessError(ret_code, self.cmd)
subprocess.CalledProcessError: Command 'netMHCcons' returned non-zero exit status 2

Death 2:

...
INFO:root:Removing directory /tmp/45423031.tmpdir/tmp_netMHCcons_length_8RFHkY2
Traceback (most recent call last):
  File "/hpc/users/akersn01/.local/bin/topiary", line 64, in <module>
    main()
  File "/hpc/users/akersn01/.local/bin/topiary", line 46, in main
    epitopes = predict_epitopes_from_args(args)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 296, in predict_epitopes_from_args
    raise_on_variant_effect_error=not args.skip_variant_errors)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 263, in predict_epitopes_from_variants
    wildtype_ligandome_dict=wildtype_ligandome_dict)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 159, in predict_epitopes_from_mutation_effects
    binding_predictions = mhc_model.predict(protein_subsequences)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/base_commandline_predictor.py", line 264, in predict
    process_limit=self.process_limit)
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/process_helpers.py", line 141, in run_multiple_commands_redirect_stdout
    processes.get().wait()
  File "/hpc/users/akersn01/.local/lib/python2.7/site-packages/mhctools/process_helpers.py", line 59, in wait
    raise CalledProcessError(ret_code, self.cmd)
subprocess.CalledProcessError: Command 'netMHCcons' returned non-zero exit status 2
cat: /tmp/45770238.tmpdir/tmp_netMHCcons_length_86W8dib/tmpATisht/bl.res: No such file or directory
Unable to open(r) file /tmp/45770238.tmpdir/tmp_netMHCcons_length_86W8dib/tmpATisht/0.dat
Traceback (most recent call last):
  File "/hpc/users/akersn01/netmhc/netMHC-3.4/netMHC.py", line 542, in <module>
    main()
  File "/hpc/users/akersn01/netmhc/netMHC-3.4/netMHC.py", line 529, in main
    preds[entry] = predfile2predlist(predfilename, NNpred, peplen, approxpred, ave)
  File "/hpc/users/akersn01/netmhc/netMHC-3.4/netMHC.py", line 281, in predfile2predlist
    predfile  = open(filename, 'r')
IOError: [Errno 2] No such file or directory: '/tmp/45770238.tmpdir/tmp_netMHCcons_length_86W8dib/tmpATisht/tmpfd3uOB'

netMHC-3.3 produced an error
iskandr commented 8 years ago

Hey @kippakers,

Those do indeed look strange!

1) Can you give us test data to reproduce these problems on?

2) To get the version of Topiary you can check topiary.__version__ in Python.

3) Any idea why the second error says "netMHC-3.3 produced an error" when the path points to netMHC-3.4?

kippakers commented 8 years ago

Thanks @iskandr! 1) I'll email you the test data.
2) ?

Python 2.7.6 (default, Apr  4 2014, 11:24:54) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import topiary
/hpc/users/akersn01/.local/lib/python2.7/site-packages/matplotlib/font_manager.py:273: UserWarning: Matplotlib is building the font cache using fc-list. This may take a moment.
  warnings.warn('Matplotlib is building the font cache using fc-list. This may take a moment.')
>>> topiary.__version__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute '__version__'

3) I noticed that too! I don't know. netMHC is definitely sourced to version 3.4, I don't think I even have 3.3 on my computer. That could be the problem but I think it makes more sense that it's something specific to the .hla or .vcf files (because it worked for most of my files).

kippakers commented 8 years ago

Got the version:

pip list  |grep topiary
topiary (0.0.7)
iskandr commented 8 years ago

I'm not sure if it will make a difference, but can you try updating Topiary to the most recent version (0.0.18)?

On Thu, May 26, 2016 at 11:29 AM, kippakers notifications@github.com wrote:

Got the version:

pip list |grep topiary topiary (0.0.7)

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/hammerlab/topiary/issues/51#issuecomment-221905776

kippakers commented 8 years ago

OK, that did not fix the issue, but updating my netMHCcons did fix both issues above. Turns out there were no epitopes predicted, this was causing die-offs. Now topiary outputs a file with just a header. The other error (number 1) I don't know what was causing it but it's fixed by the update.
Thanks Alex!

iskandr commented 8 years ago

I tried running topiary --vcf MG02_Tumor.somatic.vcf --mhc-alleles-file MG02.hla --mhc-predictor netmhc and got the following error:

AssertionError: Allele has too many parts: Usage: -Users-iskander-code-netmhc-bundle-netMHC-4.0-Darwinx8664-bin-netMHC [-h] [args] [fastafile-peptidefile]

Seems like you have 8-digit and 6-digit HLA types in there?

kippakers commented 8 years ago

Yeah I do...I thought topiary was dealing with that for me? That's weird, I've never gotten that error.

iskandr commented 8 years ago

You're right Topiary does handle that. Looks like the allele name that's problematic is the string: "Usage: -Users-iskander-code-netmhc-bundle-netMHC-4.0-Darwinx8664-bin-netMHC [-h] [args] [fastafile-peptidefile]" -- which looks like another issue with netMHC 4.0. @tavinathanson Any idea what's going on?

kippakers commented 8 years ago

Just tried it, it works for me with netMHC 4.0a. Beats me why, but I did just put a fresh install of netMHC 4.0a in.