-
Notifications
You must be signed in to change notification settings - Fork 48
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
AttributeError: 'CollapsedCalls' object has no attribute 'consolidate' | version 4.2.1 #196
Comments
Actually I have the same bug with version 4.2.0 but 4.1.0 is working |
Hello, You have exposed a gap in my functional tests' coverage. I have added a putative fix to develop, but it's going to take time to ensure it works while I make synthetic data that reaches that line of code. I will keep you updated. If you'd like to move ahead and test it, keep me updated on if it works. Alternatively, since this is caused by the Thanks |
functional tests failed to hit chain collapse
Thanks for your fast answer. Leonardo |
A single site, but it covers the logic
The test coverage is complete. There were a couple of more tweaks I had to make to get it to work for the test data. You can install from develop directly from the repository:
Edit: I'm unsure when I'll cut a release for this since I just put out a patch last week and I'm currently halfway into implementing a new minor release. So I don't know how long you'll have to use develop. Below are some notes I need to make related to this ticket so I remember them:
Still need tests to reach conditions around e.g. Variant C in the test example will be added to the |
Version : Truvari v4.2.1
Describe the bug :
2024-02-11 15:51:37,661 [INFO] Truvari v4.2.1
2024-02-11 15:51:37,662 [INFO] Command /home/fabbial/truvari/bin/truvari collapse --gt het --chain -i sample_merged.vcf.gz -o truvari_merge.vcf -c truvari_collapsed.vcf -f /home/fabbial/reference/all.chrs.con.fasta
2024-02-11 15:51:37,669 [INFO] Params:
{
"input": "sample_merged.vcf.gz",
"output": "truvari_merge.vcf",
"collapsed_output": "truvari_collapsed.vcf",
"reference": "/home/fabbial/reference/all.chrs.con.fasta",
"keep": "first",
"bed": null,
"gt": "het",
"intra": false,
"median_info": false,
"debug": false,
"refdist": 500,
"pctseq": 0.95,
"minhaplen": 50,
"pctsize": 0.95,
"pctovl": 0.0,
"typeignore": false,
"hap": false,
"chain": true,
"no_consolidate": true,
"null_consolidate": null,
"sizemin": 50,
"sizemax": 50000,
"passonly": false,
"chunksize": 500,
"bSample": null,
"cSample": null,
"sizefilt": 50,
"no_ref": false
}
2024-02-11 15:51:37,676 [WARNING] Unresolved SVs (e.g. ALT=
) are filtered when--pctseq != 0
Traceback (most recent call last):
File "/home/fabbial/truvari/bin/truvari", line 8, in
sys.exit(main())
^^^^^^
File "/home/fabbial/truvari/lib/python3.11/site-packages/truvari/main.py", line 105, in main
TOOLSargs.cmd
File "/home/fabbial/truvari/lib/python3.11/site-packages/truvari/collapse.py", line 799, in collapse_main
for call in itertools.chain.from_iterable(map(m_collap, even_smaller_chunks)):
File "/home/fabbial/truvari/lib/python3.11/site-packages/truvari/collapse.py", line 148, in collapse_chunk
if not matcher.chain or not chain_collapse(m_collap, ret, matcher):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/fabbial/truvari/lib/python3.11/site-packages/truvari/collapse.py", line 110, in chain_collapse
m_collap.consolidate(cur_collapse)
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'CollapsedCalls' object has no attribute 'consolidate'
Expected behavior :
Working
Example Data :
If applicable/possible, add example data to help recreate your problem.
Additional context :
I tried both installing with python venv (your instruction) and with pip in a clear conda environment. Same results. Operating on svim2 vcf.
The text was updated successfully, but these errors were encountered: