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
I ran into the following issue while running freyja demix on a VCF generate by bcftools:
building mix/depth matrices
Traceback (most recent call last):
File "/PHShome/nm104/mambaforge/envs/phonebook/bin/freyja", line 10, in <module>
sys.exit(cli())
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/freyja/_cli.py", line 124, in demix
mix, depths_, cov = build_mix_and_depth_arrays(variants, depths, muts,
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/freyja/sample_deconv.py", line 64, in build_mix_and_depth_arrays
df = read_snv_frequencies_vcf(fn, depthFn, muts)
File "/PHShome/nm104/mambaforge/envs/phonebook/lib/python3.9/site-packages/freyja/sample_deconv.py", line 104, in read_snv_frequencies_vcf
df["ALT_FREQ"] = vcf_info[j].str.split('=')\
ValueError: could not convert string to float: '0,0,1,6'
The specific command I used was: freyja demix OUG-1858.variants-filled.vcf OUG-1858.depth.txt --output test.txt --barcodes freyja-barcodes/usher_barcodes.feather
Based on my debugging, it seems the function assumes that all variants have the same number of fields in the INFO column, but I guess VCFs produced by bcftools don't (indels have extra fields in my files). As a result, I was able to workaround the problem by just extracting the value of the AF field using regex.
Environment:
python 3.9.19
pandas 2.2.3
usher 0.6.3
freyja 1.5.2
The text was updated successfully, but these errors were encountered:
Hi all,
I ran into the following issue while running freyja demix on a VCF generate by
bcftools
:The specific command I used was:
freyja demix OUG-1858.variants-filled.vcf OUG-1858.depth.txt --output test.txt --barcodes freyja-barcodes/usher_barcodes.feather
All the files are attached. freyja_demix_files.zip
The traceback points to the following code:
Freyja/freyja/sample_deconv.py
Lines 116 to 124 in af5f46a
Based on my debugging, it seems the function assumes that all variants have the same number of fields in the
INFO
column, but I guess VCFs produced by bcftools don't (indels have extra fields in my files). As a result, I was able to workaround the problem by just extracting the value of the AF field using regex.Environment:
The text was updated successfully, but these errors were encountered: