tjiangHIT / cuteSV

Long read based human genomic structural variation detection with cuteSV
MIT License
251 stars 36 forks source link

A question about -Ivcf #22

Closed dxkeac closed 3 years ago

dxkeac commented 3 years ago

Hi, when I use -Ivcf argument in different platforms, such as PB CLR, ONT or PB HiFi, do I need to adjust the arguments about the platform (--max_cluster_bias_DEL , etc.) ?

tjiangHIT commented 3 years ago

Hello @DuanXiaoKe,

The force calling function in cuteSV mainly calculate the number of reads supporting reference allele and alternative allele in your given SV region (i.e. provided in -Ivcf file). This operation takes no account of signatures clustering, that is, users no need to set or adjust the parameters involved in clustering.

Best, Tao

dxkeac commented 3 years ago

I've tried to run cuteSV with the command cuteSV -t 4 --genotype -Ivcf HG002_SVs_Tier1_v0.6_12745_PASS.vcf -S HG002 -L 150000 HG002_minimap2_sorted_30x.bam hs37d5.fa.gz PB30x_HG002_minimap2_cuteSV.vcf $Work_dir . But I encountered the following error: ... 2020-12-17 11:30:53,946 [INFO] Finished hs37d5:20000000-30000000. 2020-12-17 11:30:54,668 [INFO] Rebuilding signatures of structural variants. 2020-12-17 11:33:35,733 [INFO] Check聽the聽parameter聽-Ivcf: OK. 2020-12-17 11:33:35,917 [INFO] Enable to perform force calling. Traceback (most recent call last): File "/public/home/fan_lab/xkduan/miniconda3/bin/cuteSV", line 791, in run(sys.argv[1:]) File "/public/home/fan_lab/xkduan/miniconda3/bin/cuteSV", line 787, in run main_ctrl(args, argv) File "/public/home/fan_lab/xkduan/miniconda3/bin/cuteSV", line 656, in main_ctrl max_cluster_bias_dict, args.gt_round, args.threads) File "/public/home/fan_lab/xkduan/miniconda3/lib/python3.7/site-packages/cuteSV/cuteSV_forcecalling.py", line 158, in force_calling read_id_list = find_in_list(sv_type, search_id_list, search_start, search_end, pos, sv_len) File "/public/home/fan_lab/xkduan/miniconda3/lib/python3.7/site-packages/cuteSV/cuteSV_forcecalling.py", line 76, in find_in_list if abs(var_list[i][2] - sv_end) < 1000: TypeError: unsupported operand type(s) for -: 'int' and 'list' Command exited with non-zero status 1

I am not clear about how to solve this problem and hope to get your guidance. Thank you.

tjiangHIT commented 3 years ago

Hello @DuanXiaoKe,

Thank you for pointing this out. This error is mainly due that PYVCF resolve the SVLEN in INFO field as a LIST type whereas cuteSV consider it as a INT type by mistake. We have repaired this TypeError. However, we find a new serious bug that will lead to produce incorrect genotypes especially in INV/DUP/BND calls. We are revising the bug now and expect to release a corrective version a few days later. Thank you again and hope you can wait for a moment. Best, Tao

dxkeac commented 3 years ago

I tried it again, and it had a break as follow:

2020-12-22 12:07:55,222 [INFO] Enable to perform force calling. Traceback (most recent call last): File "/public/home/fan_lab/xkduan/software/cuteSV_v1.0.9/cuteSV/src/cuteSV/cuteSV", line 791, in run(sys.argv[1:]) File "/public/home/fan_lab/xkduan/software/cuteSV_v1.0.9/cuteSV/src/cuteSV/cuteSV", line 787, in run main_ctrl(args, argv) File "/public/home/fan_lab/xkduan/software/cuteSV_v1.0.9/cuteSV/src/cuteSV/cuteSV", line 656, in main_ctrl max_cluster_bias_dict, args.gt_round, args.threads) File "/public/home/fan_lab/xkduan/miniconda3/lib/python3.7/site-packages/cuteSV/cuteSV_forcecalling.py", line 133, in force_calling sv_len = -record.INFO['SVLEN'] if sv_type == 'DEL' else record.INFO['SVLEN'] TypeError: bad operand type for unary -: 'list' Command exited with non-zero status 1

tjiangHIT commented 3 years ago

Hello @DuanXiaoKe,

Sorry for reply so late. Now I have updated the force calling module, please git clone the latest code and check it. In the current version, the parameters of clustering are activated and more credible genotypes in force calling can be calculated accurately. Please use the recommended parameters with specific technology to perform force calling. BTW, I will be very happy for hearing about more questions and bug reports.

Thank you, Tao