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

truvari指标 #37

Open
Bigdata20688 opened this issue Oct 18, 2024 · 5 comments
Open

truvari指标 #37

Bigdata20688 opened this issue Oct 18, 2024 · 5 comments

Comments

@Bigdata20688
Copy link

Bigdata20688 commented Oct 18, 2024

你好,我在使用HG00733.svision.s5.graph.vcf.gz结果文件和pav_HG00733_CLR_SS_FLYE_PA.vcf.gz基准文件使用Truvari进行基准测试查看准确率和召回率出现Traceback (most recent call last):
File "/opt/conda/bin/truvari", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.9/site-packages/truvari/main.py", line 105, in main
TOOLSargs.cmd
File "/opt/conda/lib/python3.9/site-packages/truvari/bench.py", line 766, in bench_main
output = m_bench.run()
File "/opt/conda/lib/python3.9/site-packages/truvari/bench.py", line 495, in run
for match in itertools.chain.from_iterable(map(self.compare_chunk, chunks)):
File "/opt/conda/lib/python3.9/site-packages/truvari/matching.py", line 327, in chunker
if not matcher.filter_call(entry, key == 'base'):
File "/opt/conda/lib/python3.9/site-packages/truvari/matching.py", line 164, in filter_call
size = truvari.entry_size(entry)
File "/opt/conda/lib/python3.9/site-packages/truvari/comparisons.py", line 362, in entry_size
size = abs(entry.info["SVLEN"][0])
TypeError: bad operand type for abs(): 'str'

@jiadong324
Copy link
Collaborator

You might want to change the header of the PAV VCF header. The SVLEN in the info header should be somthing like this ##INFO=<ID=SVLEN,Number=1,Type=Integer,Description="Difference in length between REF and ALT alleles">.

Hope this help!

@Bigdata20688
Copy link
Author

感谢您提供的帮助,但是按照您的操作,我尝试在pav_HG00733_CLR_SS_FLYE_PA.vcf文件开头加入您给的头部信息后,运行truvari bench -b /root/SVision/copmpare/pav_HG00733_CLR_SS_FLYE_PA.vcf.gz -c /root/SVision/home/user/svision_out/HG00733.svision.s5.graph.vcf.gz -o output_dir/该命令后,提示
Traceback (most recent call last):
File "/opt/conda/bin/truvari", line 8, in
sys.exit(main())
File "/opt/conda/lib/python3.9/site-packages/truvari/main.py", line 105, in main
TOOLSargs.cmd
File "/opt/conda/lib/python3.9/site-packages/truvari/bench.py", line 751, in bench_main
if check_params(args) or check_inputs(args):
File "/opt/conda/lib/python3.9/site-packages/truvari/bench.py", line 177, in check_inputs
b_check, args.bSample = check_sample(args.base, args.bSample)
File "/opt/conda/lib/python3.9/site-packages/truvari/bench.py", line 159, in check_sample
vcf_file = pysam.VariantFile(vcf_fn)
File "pysam/libcbcf.pyx", line 4117, in pysam.libcbcf.VariantFile.init
File "pysam/libcbcf.pyx", line 4347, in pysam.libcbcf.VariantFile.open
ValueError: invalid file b'/root/SVision/copmpare/pav_HG00733_CLR_SS_FLYE_PA.vcf.gz' (mode=b'r') - is it VCF/BCF format?错误,有没有解决办法呢?

@Bigdata20688
Copy link
Author

You might want to change the header of the PAV VCF header. The SVLEN in the info header should be somthing like this ##INFO=<ID=SVLEN,Number=1,Type=Integer,Description="Difference in length between REF and ALT alleles">.

Hope this help!

感谢您提供的帮助,但目前采用您的建议后遇到了问题,您可以再帮忙看一下吗?

@Bigdata20688
Copy link
Author

或者您可以告诉一下我您的结果对比指标(准确率、召回率)是采用了什么方法吗?

@jiadong324
Copy link
Collaborator

We also use truvari bench in the paper, but it was a very old version of truvari (like v3.*)

Looks like it is the truvari issue, which version did you use? Please also check and confirm whether pav_HG00733_CLR_SS_FLYE_PA.vcf.gz is a valid VCF format or not. You can simply use bcftools view.

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