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

Errors when writing XLSX file #178

Open
code12412f opened this issue Jun 13, 2019 · 6 comments
Open

Errors when writing XLSX file #178

code12412f opened this issue Jun 13, 2019 · 6 comments

Comments

@code12412f
Copy link

I'm running Vaxrank and I'm getting two errors. I'm trying to get a XLSX neoepitope report as output:
vaxrank --vcf 303Aligned.sortedByCoord.out.bam_dup.bam.vcf --bam 303Aligned.sortedByCoord.out.bam_dup.bam --output-neoepitope-report test.csv --genome GRCm38 --mhc-predictor netmhc4 --mhc-alleles H2-Kb,H2-Db

with traceback: Traceback (most recent call last):
File "/home/kam9898/.local/lib/python3.6/site-packages/vaxrank/epitope_prediction.py", line 110, in predict_epitopes
{protein_fragment.gene_name: protein_fragment.amino_acids})
File "/home/kam9898/.local/lib/python3.6/site-packages/mhctools/base_predictor.py", line 208, in predict_subsequences
binding_predictions = self.predict_peptides(peptide_list)
File "/home/kam9898/.local/lib/python3.6/site-packages/mhctools/base_commandline_predictor.py", line 326, in predict_peptides
temp_dir_list=dirs)
File "/home/kam9898/.local/lib/python3.6/site-packages/mhctools/base_commandline_predictor.py", line 271, in _run_commands_and_collect_predictions
process_limit=self.process_limit)
File "/home/kam9898/.local/lib/python3.6/site-packages/mhctools/process_helpers.py", line 114, in run_multiple_commands_redirect_stdout
assert len(multiple_args_dict) > 0
AssertionError

Traceback (most recent call last):
File "/home/kam9898/.local/bin/vaxrank", line 10, in
sys.exit(main())
File "/home/kam9898/.local/lib/python3.6/site-packages/vaxrank/cli.py", line 407, in main
excel_report_path=args.output_neoepitope_report)
File "/home/kam9898/.local/lib/python3.6/site-packages/vaxrank/report.py", line 506, in make_minimal_neoepitope_report
'%.2f nM' % epitope_prediction.wt_ic50),
TypeError: must be real number, not NoneType

@code12412f code12412f changed the title Errors when writing CSV file Errors when writing XLSX file Jun 13, 2019
@iskandr
Copy link
Contributor

iskandr commented Jul 3, 2019

Hi Kim / @code12412f!

Sorry no one else caught this on here...can you help me recreate the error?

I am able to run this on my machine:

mhctools --mhc-predictor netmhc4 --mhc-alleles H2-Kb,H2-Db --sequence SIINFEKL

What happens when you run the same command on yours?

@code12412f
Copy link
Author

2019-07-03 09:18:51,494 - mhctools.cli.args - INFO - Building MHC binding prediction type for alleles ['H-2-Kb', 'H-2-Db'] and epitope lengths None
2019-07-03 09:18:53,592 - mhctools.base_commandline_predictor - INFO - Skipping allele BoLA-D18.4: The suffix '.4' of 'D18.4' was not parsed
2019-07-03 09:18:53,593 - mhctools.base_commandline_predictor - INFO - Skipping allele BoLA-JSP.1: The suffix 'SP.1' of 'JSP.1' was not parsed
2019-07-03 09:18:53,593 - mhctools.base_commandline_predictor - INFO - Skipping allele BoLA-T2C: The suffix 'C' of 'T2C' was not parsed
2019-07-03 09:18:53,593 - mhctools.base_commandline_predictor - INFO - Skipping allele BoLA-T2a: The suffix 'a' of 'T2a' was not parsed
2019-07-03 09:18:53,593 - mhctools.base_commandline_predictor - INFO - Skipping allele BoLA-T2b: The suffix 'b' of 'T2b' was not parsed
2019-07-03 09:18:56,455 - mhctools.process_helpers - INFO - Ran 2 commands in 2.8485 seconds
2019-07-03 09:18:56,467 - mhctools.cli.script - INFO -
source_sequence_name offset peptide allele affinity percentile_rank prediction_method_name length
0 PEPLIST 0 SIINFEKL H-2-Kb 19.37 0.06 netMHC 8
1 PEPLIST 0 SIINFEKL H-2-Db 3220.94 0.90 netMHC 8

@iskandr
Copy link
Contributor

iskandr commented Jul 3, 2019

OK, so the MHC binding predictor works.

I tried running on some small mouse data locally and this command succeeded:

vaxrank --vcf b16.expressed.vcf --bam b16.combined.bam --output-neoepitope-report test.xlsx --genome GRCm38 --mhc-predictor netmhc4 --mhc-alleles H2-Kb,H2-Db

So...it must be something data dependent.

What happens if you run varcode --vcf 303Aligned.sortedByCoord.out.bam_dup.bam.vcf --one-per-variant --only-coding? How many coding effects are predicted?

Alternatively, if you want to upload the data somewhere I can access, I'll try running Vaxrank with it.

@code12412f
Copy link
Author

I emailed you the VCF file

Varcode
Version: 0.9.1
Path: /home/kam9898/.local/lib/python3.6/site-packages/varcode
Traceback (most recent call last):
File "/home/kam9898/.local/bin/varcode", line 10, in
sys.exit(main())
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/cli/effects_script.py", line 66, in main
variants = variant_collection_from_args(args)
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/cli/variant_args.py", line 131, in variant_collection_from_args
variant_collections.append(load_vcf(vcf_path, genome=genome))
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/vcf.py", line 141, in load_vcf
reference_vcf_key)
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/vcf.py", line 483, in infer_genome_from_vcf
return infer_genome(reference_path)
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/reference.py", line 119, in infer_genome
reference_name = infer_reference_name(genome_object_string_or_int)
File "/home/kam9898/.local/lib/python3.6/site-packages/varcode/reference.py", line 98, in infer_reference_name
"Failed to infer genome assembly name for %s" % reference_name_or_path)
ValueError: Failed to infer genome assembly name for /projects/b1093/ezh2/mouse.fa

@iskandr
Copy link
Contributor

iskandr commented Jul 3, 2019

If the reference isn't obvious in the VCF then you need to add --genome GRCm38 to the arguments for Varcode.

Can you also send me a link to the BAM? I won't be able to run Vaxrank without both.

@code12412f
Copy link
Author

2041

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