openvax / topiary

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

Invalid percentile rank epitopes #42

Open rschenck opened 8 years ago

rschenck commented 8 years ago

Error received:

Traceback (most recent call last):
  File "/Users/Ryan/anaconda2/bin/topiary", line 64, in <module>
    main()
  File "/Users/Ryan/anaconda2/bin/topiary", line 46, in main
    epitopes = predict_epitopes_from_args(args)
  File "/Users/Ryan/anaconda2/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 "/Users/Ryan/anaconda2/lib/python2.7/site-packages/topiary/predict_epitopes.py", line 263, in predict_epitopes_from_variants
    wildtype_ligandome_dict=wildtype_ligandome_dict)
  File "/Users/Ryan/anaconda2/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 "/Users/Ryan/anaconda2/lib/python2.7/site-packages/mhctools/base_commandline_predictor.py", line 276, in predict
    prediction_method_name=self.program_name)
  File "/Users/Ryan/anaconda2/lib/python2.7/site-packages/mhctools/file_formats.py", line 249, in parse_netmhciipan_stdout
    contains_class2_columns=True)
  File "/Users/Ryan/anaconda2/lib/python2.7/site-packages/mhctools/file_formats.py", line 236, in parse_netmhcpan_stdout
    log_ic50=log_affinity)
  File "/Users/Ryan/anaconda2/lib/python2.7/site-packages/mhctools/epitope_collection_builder.py", line 96, in add_binding_prediction
    rank, peptide, allele))
ValueError: Invalid percentile rank 14631.83 for QRASPRAPAPC w/ allele DRB1_0101``

When running topiary as follows: $ topiary --vcf test.vcf --mhc-predictor netmhciipan --mhc-alleles DRB1*01:23 --output-csv epitope_test.csv --skip-variant-errors --reference-name grch37

Things I have tried:

  1. Running the script with and without --skip-variant-errors option. This didn't change anything.
  2. Changing the allele selected for netmhciipan (the local install appears to be working fine)
  3. Running the script with a different genome assembly (GRCH38; couldn't get it to work with Ensembl release 74; only release 75

I went so far as to find the portion of code raising this error and I put a pass in place of the error just to see what would happen (Line 96 of epitope_collection_builder.py). The process finished, but I receive %rank values ranging from 11.56 to 43258.78. Any help would be appreciated.

-Ryan

iskandr commented 8 years ago

Hey @rschenck, sorry for the trouble. The Class II epitope prediction is definitely the least used/tested part of Topiary so I guess I'm not surprised something is wonky there. Can you paste the variant which is causing this error (or email it to me if don't want it on github)?

rschenck commented 8 years ago

Sending you an email now. Thanks.

iskandr commented 8 years ago

@tavinathanson Just a reminder for both of us that we should fix this soon.

tavinathanson commented 8 years ago

Looks like this is an issue with NetMHCIIpan 3.0 output vs 3.1 output; we should (at the least) be more clear about which versions we support, and (better yet) support 3.1 soon.

rschenck commented 8 years ago

Thanks for the help gentlemen.