icbi-lab / nextNEOpi

nextNEOpi: a comprehensive pipeline for computational neoantigen prediction
Other
67 stars 24 forks source link

Random error with NetMHCII #31

Closed mantczakaus closed 1 year ago

mantczakaus commented 1 year ago

Hi, I would like to ask for help in consequences of swapping containers for pVACtools. But first I want to explain why I'm doing this. 1) I was running predictions with your original containers but I was getting an error for MHC class II peptides while predicting binding affinity using NetMHCIIpan

Making binding predictions on Allele DRB1*13:01 and Epitope Length 23 with Method NetMHCIIpan - File MHC_Class_II/tmp/patient1_tumor.NetMHCIIpan.DRB1*13:01.23.tsv_201-400 - Completed
  Making binding predictions on Allele DRB1*13:01 and Epitope Length 24 with Method NetMHCIIpan - File MHC_Class_II/tmp/patient1_tumor.NetMHCIIpan.DRB1*13:01.24.tsv_1-200 - Completed

Command error:
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1110.
  Use of uninitialized value $Score in numeric lt (<) at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1123.
  Use of uninitialized value $output_allele in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1241.
  Use of uninitialized value $reliability in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1241.
  Use of uninitialized value $score_BA in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1241.
  Use of uninitialized value $scores[10] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1287, <IN> line 15.
  Use of uninitialized value $scores[11] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1288, <IN> line 15.
  Use of uninitialized value $scores[12] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.0-executable/netmhciipan_4_0_executable/NetMHCIIpan-4.0.pl line 1289, <IN> line 15.
  list index out of range
  list index out of range
  CRITICAL:pymp:An exception occured in thread 7: (<class 'subprocess.CalledProcessError'>, Command '['/opt/conda/bin/python', '/opt/iedb/mhc_ii/mhc_II_binding.py', 'NetMHCIIpan', 'DRB1*13:01', 'MHC_Class_II/tmp/patient1_tumor.25.fa.split_401-600', '25']' returned non-zero exit status 1.).
  Traceback (most recent call last):
    File "/opt/conda/bin/pvacseq", line 8, in <module>
      sys.exit(main())
    File "/opt/conda/lib/python3.8/site-packages/pvactools/tools/pvacseq/main.py", line 116, in main
      args[0].func.main(args[1])
    File "/opt/conda/lib/python3.8/site-packages/pvactools/tools/pvacseq/run.py", line 158, in main
      pipeline.execute()
    File "/opt/conda/lib/python3.8/site-packages/pvactools/lib/pipeline.py", line 473, in execute
      self.call_iedb(chunks)
    File "/opt/conda/lib/python3.8/site-packages/pvactools/lib/pipeline.py", line 380, in call_iedb
      p.print("Making binding predictions on Allele %s and Epitope Length %s with Method %s - File %s - Completed" % (a, epl, method, filename))
    File "/opt/conda/lib/python3.8/site-packages/pymp/__init__.py", line 148, in __exit__
      raise exc_t(exc_val)
  TypeError: __init__() missing 1 required positional argument: 'cmd'

I did some research and I did not see this error reported by anyone else and also I could not reproduce it consistently! I thought maybe it's some of the nodes on the HPC or maybe it depends on the order the predictions I made. Either way, I didn't want to investigate but first I thought I'd try to use a newer versions of mhc_i and mhc_ii tools. 2) I renamed the nextNEOpi_1.3_resources/databases/iedb folder and I replaced the urls in params.config with the following

  IEDB_MHCI_url  = "https://downloads.iedb.org/tools/mhci/3.1.4/IEDB_MHC_I-3.1.4.tar.gz"
  IEDB_MHCII_url = "https://downloads.iedb.org/tools/mhcii/3.1.8/IEDB_MHC_II-3.1.8.tar.gz"

This way I thought I tricked the pipeline to re-install them. The new MHCI was installed fine but MHCII wasn't. THe process downloaded the tar.gz file, unpacked it but then during running configure.py the pipeline threw the following error:

/opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9060 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:28: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9090 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:18: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
../opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9153 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:33: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9200 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:38: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9246 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:13: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen('echo example').read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9247 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:23: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
F/opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9294 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:43: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./opt/conda/lib/python3.8/subprocess.py:942: ResourceWarning: subprocess 9341 is still running
  _warn("subprocess %s is still running" % self.pid,
ResourceWarning: Enable tracemalloc to get the object allocation traceback
./configure.py:48: ResourceWarning: unclosed file <_io.TextIOWrapper name=3 encoding='UTF-8'>
  result=os.popen(cmd).read()
ResourceWarning: Enable tracemalloc to get the object allocation traceback
.
======================================================================
FAIL: test_recommended (__main__.Test_test)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./configure.py", line 24, in test_recommended
    self.assertEqual(result, 'allele\tseq_num\tstart\tend\tlength\tmethod\tpeptide\tconsensus_percentile_rank\tadjusted_consensus_percentile_rank\tcomblib_core\tcomblib_score\tcomblib_rank\tadjusted_comblib_rank\tsmm_align_core\tsmm_align_ic50\tsmm_align_rank\tadjusted_smm_align_rank\tnn_align_core\tnn_align_ic50\tnn_align_rank\tadjusted_nn_align_rank\tnetmhciipan_core\tnetmhciipan_ic50\tnetmhciipan_rank\tadjusted_netmhciipan_rank\tsturniolo_core\tsturniolo_score\tsturniolo_rank\tadjusted_sturniolo_rank\nHLA-DRB1*03:01\t1\t8\t22\t15\tSMM-NN-Sturniolo\tEGVSGATWVDLVLEG\t59.0\t59.00\t-\t-\t-\t-\tVSGATWVDL\t5932.0\t59.0\t59.00\tTWVDLVLEG\t3356.9\t50.0\t50.00\t-\t-\t-\t-\tVSGATWVDL\t-1.34\t88.0\t88.00\nHLA-DRB1*03:01\t1\t4\t18\t15\tSMM-NN-Sturniolo\tRDFLEGVSGATWVDL\t85.0\t85.00\t-\t-\t-\t-\tFLEGVSGAT\t8523.0\t69.0\t69.00\tVSGATWVDL\t12707.7\t85.0\t85.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t5\t19\t15\tSMM-NN-Sturniolo\tDFLEGVSGATWVDLV\t85.0\t85.00\t-\t-\t-\t-\tFLEGVSGAT\t18841.0\t85.0\t85.00\tVSGATWVDL\t10634.4\t81.0\t81.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t6\t20\t15\tSMM-NN-Sturniolo\tFLEGVSGATWVDLVL\t85.0\t85.00\t-\t-\t-\t-\tFLEGVSGAT\t18363.0\t85.0\t85.00\tVSGATWVDL\t8154.8\t74.0\t74.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t1\t15\t15\tSMM-NN-Sturniolo\tMSNRDFLEGVSGATW\t87.0\t87.00\t-\t-\t-\t-\tFLEGVSGAT\t9343.0\t71.0\t71.00\tDFLEGVSGA\t17372.9\t92.0\t92.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t2\t16\t15\tSMM-NN-Sturniolo\tSNRDFLEGVSGATWV\t87.0\t87.00\t-\t-\t-\t-\tFLEGVSGAT\t8986.0\t70.0\t70.00\tDFLEGVSGA\t18531.9\t93.0\t93.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t3\t17\t15\tSMM-NN-Sturniolo\tNRDFLEGVSGATWVD\t87.0\t87.00\t-\t-\t-\t-\tFLEGVSGAT\t9085.0\t70.0\t70.00\tDFLEGVSGA\t18458.2\t93.0\t93.00\t-\t-\t-\t-\tFLEGVSGAT\t-1.2\t87.0\t87.00\nHLA-DRB1*03:01\t1\t7\t21\t15\tSMM-NN-Sturniolo\tLEGVSGATWVDLVLE\t88.0\t88.00\t-\t-\t-\t-\tSGATWVDLV\t26621.0\t91.0\t91.00\tVSGATWVDL\t5473.3\t63.0\t63.00\t-\t-\t-\t-\tVSGATWVDL\t-1.34\t88.0\t88.00\n')
AssertionError: 'alle[28 chars]gth\tcore_peptide\tpeptide\tscore\tpercentile_[594 chars].0\n' != 'alle[28 chars]gth\tmethod\tpeptide\tconsensus_percentile_ran[1976 chars]00\n'
Diff is 2429 characters long. Set self.maxDiff to None to see it.

----------------------------------------------------------------------
Ran 9 tests in 5.695s

FAILED (failures=1)

3) I tried to install manually MHCII tools but I run into problems with installing some perl modules. I skipped this because I don't really like troubleshooting perl problems. Instead, I reverted the IEDB installation folder but decided to use the newer pVACtools container that have them. 4) So I pulled the container from here https://hub.docker.com/r/griffithlab/pvactools/tags and changed the singularity run options, i.e. I removed binding of IEDB and MHCflurry folders. I changed this runOptions = "--no-home --containall" + " -H " + params.singularityTmpMount + " -B " + params.singularityAssetsMount + " -B " + params.singularityTmpMount + " -B " + params.resourcesBaseDir + params.singularityHLAHDmount + " -B " + params.databases.IEDB_dir + ":/opt/iedb" + " -B " + params.databases.MHCFLURRY_dir + ":/opt/mhcflurry_data" into this: runOptions = "--no-home --containall" + " -H " + params.singularityTmpMount + " -B " + params.singularityAssetsMount + " -B " + params.singularityTmpMount + " -B " + params.resourcesBaseDir + params.singularityHLAHDmount And I changed the container in process.config

    withName:pVACseq {
        container = '/scratch/project_mnt/S0091/mantczak/.nextflow/NXF_SINGULARITY_CACHEDIR/pvactools.sif'
        cpus = 10
        memory = '64G'
    }

This didn't help either though. I'm still getting a similar error:

  Making binding predictions on Allele DRB3*02:02 and Epitope Length 24 with Method NetMHCIIpan - File MHC_Class_II/tmp/patient1_tumor.NetMHCIIpan.DRB3*02:02.24.tsv_1-200 - Completed

Command error:
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric ge (>=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1149.
  Use of uninitialized value $Score in numeric lt (<) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1162.
  Use of uninitialized value $output_allele in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1288.
  Use of uninitialized value $peptide in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1288.
  Use of uninitialized value $reliability in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1288.
  Use of uninitialized value $score_BA in concatenation (.) or string at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1288.
  Use of uninitialized value $lengthRef in numeric ne (!=) at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1213, <IN> line 17.
  Argument "<=WB" isn't numeric in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1328, <IN> line 20.
  Use of uninitialized value $scores[10] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1334, <IN> line 20.
  Use of uninitialized value $scores[11] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1335, <IN> line 20.
  Use of uninitialized value $scores[12] in sprintf at /opt/iedb/mhc_ii/methods/netmhciipan-4.1-executable/netmhciipan_4_1_executable/NetMHCIIpan-4.1.pl line 1336, <IN> line 20.
  list index out of range
  CRITICAL:pymp:An exception occured in thread 2: (<class 'subprocess.CalledProcessError'>, Command '['/usr/local/bin/python', '/opt/iedb/mhc_ii/mhc_II_binding.py', 'NetMHCIIpan', 'DRB3*02:02', 'MHC_Class_II/tmp/patient1_tumor.25.fa.split_1-200', '25']' returned non-zero exit status 1.).
  Traceback (most recent call last):
    File "/usr/local/bin/pvacseq", line 8, in <module>
      sys.exit(main())
               ^^^^^^
    File "/usr/local/lib/python3.11/site-packages/pvactools/tools/pvacseq/main.py", line 123, in main
      args[0].func.main(args[1])
    File "/usr/local/lib/python3.11/site-packages/pvactools/tools/pvacseq/run.py", line 165, in main
      pipeline.execute()
    File "/usr/local/lib/python3.11/site-packages/pvactools/lib/pipeline.py", line 451, in execute
      self.call_iedb(chunks)
    File "/usr/local/lib/python3.11/site-packages/pvactools/lib/pipeline.py", line 348, in call_iedb
      with pymp.Parallel(self.n_threads) as p:
    File "/usr/local/lib/python3.11/site-packages/pymp/__init__.py", line 148, in __exit__
      raise exc_t(exc_val)
            ^^^^^^^^^^^^^^
  TypeError: CalledProcessError.__init__() missing 1 required positional argument: 'cmd'

I'll reach out to developers of NetMHCII too but maybe you have some recommendations how to work around that? Best wishes, Magda

mantczakaus commented 1 year ago

Hi,

I did some investigation and I think the problem lies in the concurrent runs.

I have submitted the following command five times almost at once and directing results into different folders, here is just an example:

/opt/conda/bin/python /opt/iedb/mhc_ii/mhc_II_binding.py NetMHCIIpan DRB1*13:01 patient1_tumor.25.fa.split_401-600 25 > results_15/result_1131.txt 2> results_15/error_1131.txt

I think it’s because of the concurrent runs because when I run NetMHCIIpan sequentially one by one it all goes well.

I contacted Morten Nielsen who provides technical support for NetMHCIIpan and I'm waiting for his advice but in the meantime I tried to force the pipeline to run pVACseq sequentially instead of in parallel. I tried to do this by using buffer directive in pVACseq process like so:

process 'pVACseq' {

    tag "${meta.sampleName}"

    label 'pVACtools'

    input:
    tuple(
        val(meta),
        path(vep_phased_vcf_gz),
        path(anno_vcf),
        val(hla_types),
        val(tumor_purity),
        path(iedb_install_ok)
    ) from mkPhasedVCF_out_pVACseq_ch0
        .join(vcf_vep_ex_gz, by: [0])
        .combine(hlas.splitText(), by: 0)
        .combine(purity_estimate_ch1, by: 0)
        .combine(iedb_install_out_ch)
        .buffer(1)

But all it did was it did not trigger any of the pVACseq processes. Could you recommend a workaround? Sth that will make pVACseq run one by one and not in parallel for all the HLA alleles?

riederd commented 1 year ago

Hi, that's interesting. I never hit that issue. I'll have a look into it as well, but right now I'm a bit busy. Did you try to reduce the number of cpus for pVACseq, e.g.: change confg/process.config form

    withName:pVACseq {
        cpus = 10
    }

to

    withName:pVACseq {
        cpus = 2
    }
mantczakaus commented 1 year ago

Hi, thanks for coming back to me. The developer of NetMHCIIpan was unable to reproduce, he recommended for me to contact IEDB support - which is what I'm going to do. In the meantime someone from Nextflow community recommended to set maxForks to 1 which worked! pVACseq is run one by one and the pipelien run successfully! Was your recommendation to setting cpus to 1 with the same aim? https://www.nextflow.io/docs/latest/process.html#maxforks

riederd commented 1 year ago

Hi, I'm glad that the maxForks worked. It is not exactly the same as setting the cpus, but I'd expect that the effect will be similar.