You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're looking at using vcf2maf to prepare our VCF files for import into cBioPortal, but I've run into the issue:
$ python3 vcf2maf.py -i ../vcf-noann-FTatleast1PASS/solace2-0003.vcf --tumor-id tumour --normal-id germline
Loading data from file: ../vcf-noann-FTatleast1PASS/solace2-0003.vcf
Traceback (most recent call last):
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 1640, in<module>main()
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/venv/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/venv/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/venv/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/venv/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 1628, in main
generate_maf_from_input_data(
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 1552, in generate_maf_from_input_data
maf_data = extract_vcf_data_from_file(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 1496, in extract_vcf_data_from_file
maf_record = create_maf_record_from_vcf(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 1048, in create_maf_record_from_vcf
resolve_vcf_counts_data(
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 630, in resolve_vcf_counts_data
(t_ref_count, t_alt_count, t_depth) = resolve_vcf_allele_depth_values(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/vast/projects/staffordfox-cbioportal/genome-nexus_annotation-tools/vcf2maf.py", line 511, in resolve_vcf_allele_depth_values
mapped_sample_format_data["DP"] = str(sum(map(float, allele_depth_values)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: could not convert string to float: ''
I believe this is because .,237 is the AD value, and the . is being converted to an empty string, which is not accepted by float. I've traced this back to line 341.
# attempt to parse values as int - if not an int then set value to empty stringallele_depth_values= []
forvalueinmapped_sample_format_data["AD"].split(","):
ifis_valid_integer(value):
allele_depth_values.append(value)
else:
allele_depth_values.append("")
Should "0" be appended instead of ""? For our data, this would make sense.
Please let me know how best to resolve this, and I will create a pull request.
The text was updated successfully, but these errors were encountered:
Hi,
We're looking at using vcf2maf to prepare our VCF files for import into cBioPortal, but I've run into the issue:
I believe this is because
.,237
is the AD value, and the.
is being converted to an empty string, which is not accepted byfloat
. I've traced this back to line 341.Should
"0"
be appended instead of""
? For our data, this would make sense.Please let me know how best to resolve this, and I will create a pull request.
The text was updated successfully, but these errors were encountered: