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

cannot find the common mouse alleles with "pvacseq valid_alleles" #1210

Open
Xiao-Zhong opened this issue Feb 24, 2025 · 4 comments
Open

cannot find the common mouse alleles with "pvacseq valid_alleles" #1210

Xiao-Zhong opened this issue Feb 24, 2025 · 4 comments

Comments

@Xiao-Zhong
Copy link

Xiao-Zhong commented Feb 24, 2025

Hi, the command output doesn't have the mouse alleles.
`xzhong@kaya1:~/scratch/11_pVACtools/AB1HA$ pvacseq valid_alleles | grep H2

xzhong@kaya1:~/scratch/11_pVACtools/AB1HA$ pvacseq valid_alleles | grep H-2`

so I cannot run pvacbind:
`xzhong@kaya1:~/scratch/11_pVACtools/AB1HA$ pvacbind run AB1HA_MHC-I.fa Test H2-Kd,H2-Dd,H2-Ld NetMHCpan ./ -e1 8,9,10 -e2 15
Allele H2-Dd not valid. Skipping.
Allele H2-Kd not valid. Skipping.
Allele H2-Ld not valid. Skipping.
No MHC class I alleles chosen. Skipping MHC class I predictions.
No MHC class II prediction algorithms chosen. Skipping MHC class II predictions.

xzhong@kaya1:~/scratch/11_pVACtools/AB1HA$ pvacbind run AB1HA_MHC-I.fa Test H2-Kd,H2-Dd,H2-Ld all ./ -e1 8,9,10 -e2 15
Allele H2-Dd not valid. Skipping.
Allele H2-Kd not valid. Skipping.
Allele H2-Ld not valid. Skipping.
No MHC class I alleles chosen. Skipping MHC class I predictions.
No MHC class II alleles chosen. Skipping MHC class II predictions.`

The pvactools version I'm using is 5.2.0.

Can anyone help on the issue? Thank you!

@susannasiebert
Copy link
Contributor

susannasiebert commented Feb 24, 2025

By default, the pvacseq valid_alleles command is scoped to only return human alleles. To enable mouse alleles, you can use the -s flag:

$ pvacseq valid_alleles -s mouse
H-2-Db
H-2-Dd
H-2-Dk
H-2-Dp
H-2-Kb
H-2-Kd
H-2-Kk
H-2-Kq
H-2-Ld
H-2-Lq
H2-IAb
H2-IAd
H2-IAk
H2-IAs
H2-IAu
H2-IEd
H2-IEk

Please see the documentation for this command here for all available options or run pvacseq valid_alleles -h.

Updating your command to the following should work:

pvacbind run AB1HA_MHC-I.fa Test H-2-Kd,H-2-Dd,H-2-Ld all ./ -e1 8,9,10 -e2 15

@Xiao-Zhong
Copy link
Author

Thanks a lot! I referred to an old link and the solution there is out of date (#554). OK. I'll check the documentation further.

May I ask another help on the error below? I guess it's about tensorflow used by MHCflurry. The whole running log/err file is attached.

slurm-618790.out.txt

Making binding predictions on Allele H-2-Dd and Epitope Length 8 with Method MHCflurry - File /scratch/ms002/xzhong/11_pVACtools/AB1HA_test/MHC_Class_I/tmp/Test.MHCflurry.H-2-Dd.8.tsv_1-200
CRITICAL:pymp:An exception occured in thread 0: (<class 'Exception'>, An error occurred while calling MHCflurry:
2025-02-27 10:13:03.185466: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0.
2025-02-27 10:13:03.206381: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:485] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2025-02-27 10:13:03.224227: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:8454] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2025-02-27 10:13:03.229634: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1452] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2025-02-27 10:13:03.245064: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2025-02-27 10:13:05.645216: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Traceback (most recent call last):
File "/group/ms002/software/conda_environments/bioinfo/bin/mhcflurry-predict", line 8, in
sys.exit(run())
^^^^^
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/predict_command.py", line 204, in run
predictor = Class1PresentationPredictor.load(models_dir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/class1_presentation_predictor.py", line 956, in load
affinity_predictor = Class1AffinityPredictor.load(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/class1_affinity_predictor.py", line 608, in load
optimized = result.optimize()
^^^^^^^^^^^^^^^^^
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/class1_affinity_predictor.py", line 653, in optimize
Class1NeuralNetwork.merge(
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/class1_neural_network.py", line 1148, in merge
configure_tensorflow()
File "/group/ms002/software/conda_environments/bioinfo/lib/python3.12/site-packages/mhcflurry/common.py", line 131, in configure_tensorflow
tensorflow.compat.v1.keras.backend.set_session(session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'keras._tf_keras.keras.backend' has no attribute 'set_session'. Did you mean: 'set_epsilon'?
).

Thank you!

@susannasiebert
Copy link
Contributor

The -s flag is relatively new, so that makes sense that the old command no longer works.

What version of tensorflow do you have installed? I believe there are some incompatibilities of MHCflurry with newer versions of tensorflow. I have found that 2.15.1 works fine on our end. However, that tensorflow version is not available in python 3.12. so you will need to use 3.11 or older.

@Xiao-Zhong
Copy link
Author

Xiao-Zhong commented Mar 4, 2025

Thanks! I believe the problem has been solved by downgrading python (Python 3.11.11) and tensorflow (Version: 2.15.1) as you suggested.

Sorry. I have the last issue as below, though the pipeline seems running successfully. Thank you!

...
Combining Parsed Prediction Files
Completed
Creating aggregated report
Completed
Calculating Manufacturability Metrics
Completed
Running Binding Filters
Completed
Running Top Score Filter
Completed

Done: Pipeline finished successfully. File /scratch/ms002/xzhong/11_pVACtools/AB1HA_test/output/MHC_Class_I/Test.filtered.tsv contains list of filtered putative neoantigens.

No MHC class II alleles chosen. Skipping MHC class II predictions.
Traceback (most recent call last):
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
self.run()
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/managers.py", line 600, in _run_server
server.serve_forever()
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/managers.py", line 184, in serve_forever
sys.exit(0)
SystemExit: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/util.py", line 303, in _run_finalizers
finalizer()
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/util.py", line 227, in call
res = self._callback(*self._args, **self._kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/multiprocessing/util.py", line 136, in _remove_temp_dir
rmtree(tempdir, onerror=onerror)
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/shutil.py", line 752, in rmtree
_rmtree_safe_fd(fd, path, onerror)
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/shutil.py", line 703, in _rmtree_safe_fd
onerror(os.unlink, fullname, sys.exc_info())
File "/group/ms002/software/conda_environments/bioinfo/envs/pVACtools_env/lib/python3.11/shutil.py", line 701, in _rmtree_safe_fd
os.unlink(entry.name, dir_fd=topfd)
OSError: [Errno 16] Device or resource busy: '.nfs003e0000007a3f55004f2424'

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

2 participants