Skip to content

ML predictor integration into pvacseq#1333

Open
jyao36 wants to merge 25 commits into7.0.0from
ml_predictor3
Open

ML predictor integration into pvacseq#1333
jyao36 wants to merge 25 commits into7.0.0from
ml_predictor3

Conversation

@jyao36
Copy link
Copy Markdown

@jyao36 jyao36 commented Nov 3, 2025

…odel artifacts; modified argument parser and pvacseq run.py file to run the predictor as part of pvacseq; added test files and script.

…odel artifacts; modified argument parser and pvacseq run.py file to run the predictor as part of pvacseq; added test files and script.
@jyao36 jyao36 changed the title Incorporate ml_predictor module into pvactools; Uploaded associated m… ML predictor integration into pvacseq Nov 3, 2025
Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good. I added some comments for improvements that could be made.

I would also like to see the addition of a standalone pvacseq add_ml_predictions command that someone could run standalone to add ml_predictions to the output from their pipeline if the ml option was not enabled in the original run. Have a look at pvactools/tools/pvacseq/mark_genes_of_interest.py and its test tests/test_pvacseq_mark_genes_of_interest.py to see how to do so. This command addition also requires an update to pvactools/tools/pvacseq/main.py and pvactools/tools/pvacseq/__init__.py to add this command.

Additionally, this new command should then be documented in docs/pvacseq/optional_downstream_analysis_tools.rst. Most of the documentation can be auto-generated from the command line docs by using the program-output tool but this would also be the spot to put any additional documentation you want to have around this feature.

Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/run_argument_parser.py Outdated
Comment thread pvactools/tools/pvacview/server.R
@susannasiebert susannasiebert added this to the 7.0 milestone Nov 10, 2025
Base automatically changed from percentile_cutoffs to 7.0.0 November 14, 2025 13:32
Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a couple of code suggestions to convert named required parameters to positional parameters in your parser.

Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
jyao36 and others added 4 commits November 26, 2025 14:41
Co-authored-by: Susanna Kiwala <susanna.kiwala@wustl.edu>
Co-authored-by: Susanna Kiwala <susanna.kiwala@wustl.edu>
Co-authored-by: Susanna Kiwala <susanna.kiwala@wustl.edu>
…or; updated argument format for add_ml_predictions.py
Comment thread pvactools/lib/ml_predictor.py Outdated
Comment thread pvactools/tools/pvacview/server.R Outdated
Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some copy editing suggestions. Two thoughts I had while reviewing this:

  • It would be great to have some additional exploration of different candidates in ML section of the pVACview vignette. I wrote down some examples in a comment in that part of the text.
  • Have you and Malachi discussed whether it would be worthwhile to make the reject threshold configurable? It seems a bit weird to me to hardcode the reject threshold but make the accept threshold configurable.

Comment thread docs/pvacseq/optional_downstream_analysis_tools.rst Outdated
Comment thread docs/pvacseq/optional_downstream_analysis_tools.rst Outdated
Comment thread docs/pvacseq/optional_downstream_analysis_tools.rst Outdated
Comment thread docs/pvacseq/output_files.rst Outdated
Comment thread pvactools/lib/run_argument_parser.py
Comment thread docs/pvacview/pvacseq_module/pvacseq_vignette.rst Outdated
Comment thread docs/pvacview/pvacseq_module/pvacseq_vignette.rst
Comment thread docs/pvacview/pvacseq_module/pvacseq_vignette.rst Outdated
Comment thread docs/pvacview/pvacseq_module/pvacseq_vignette.rst Outdated
Comment thread docs/pvacview/pvacseq_module/pvacseq_vignette.rst
@jyao36 jyao36 marked this pull request as ready for review December 15, 2025 16:47
Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Comment thread docs/pvacseq/output_files.rst
Comment thread docs/pvacseq/output_files.rst Outdated
- Directory containing image files for pVACview. Not generated when running with presentation and immunogenicity algorithms only.
* - ``ml_predict/<sample_name>_predict_pvacview.tsv`` (optional)
- ML-based neoantigen evaluation predictions file. Generated when both MHC Class I and Class II predictions are run and the ``--run-ml-predictions`` flag is set.
- Directory containing image files for pVACview. Not generated when running only with presentation and immunogenicity algorithms only.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Directory containing image files for pVACview. Not generated when running only with presentation and immunogenicity algorithms only.

This should fix the issue with this table not rendering.

Copy link
Copy Markdown
Contributor

@susannasiebert susannasiebert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good. Just two minor change requests.

Comment thread docs/pvacseq/output_files.rst Outdated
Comment thread pvactools/lib/ml_predictor.py Outdated
parser.add_argument(
"output_dir",
help="Directory where the ML prediction TSV files should be written."
nargs="?",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using nargs="?" and a positional parameter for optional parameters, we've been using the -- convention (like for the --ml-threshold-accept and --ml-threshold-predict). If you rename the parameter to --output-dir it will automatically be optional. It should also be moved behind all of the positional parameters, i.e between sample_name and --ml-threshold-accept).

jyao36 and others added 3 commits March 10, 2026 10:37
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

Successfully merging this pull request may close these issues.

2 participants