cuteSV
cuteSV copied to clipboard
Bug when force genotyping
Hi, I got a strange error when force-genotyping with cuteSV 2.0.0:
Traceback (most recent call last):
File "/scratch1/users/geibel/chicken_sv_intermediateWD/.snakemake/conda/b45e007a7e1849624bdc995d3ef377b6/bin/cuteSV", line 882, in <module>
run(sys.argv[1:])
File "/scratch1/users/geibel/chicken_sv_intermediateWD/.snakemake/conda/b45e007a7e1849624bdc995d3ef377b6/bin/cuteSV", line 878, in run
main_ctrl(args, argv)
File "/scratch1/users/geibel/chicken_sv_intermediateWD/.snakemake/conda/b45e007a7e1849624bdc995d3ef377b6/bin/cuteSV", line 843, in main_ctrl
generate_pvcf(args, result, contigINFO, argv, ref_g)
File "/scratch1/users/geibel/chicken_sv_intermediateWD/.snakemake/conda/b45e007a7e1849624bdc995d3ef377b6/lib/python3.9/site-packages/cuteSV/cuteSV_genotype.py", line 398, in generate_pvcf
info_list += ';STRAND=' + i[12]
TypeError: can only concatenate str (not "tuple") to str
When going through the code, i
was:
['chr1', 21365, '0/1', 'INV', 31485, '.', '.', [3, 4, '0/1', '11,0,21', 10, 11.1], 'm64077_201026_004829/98763165/ccs,m64077_201026_004829/59769239/ccs,m64077_201026_004829/158335795/ccs', '0_cuteSV.INV.0', 'C', '<INV>', ('--',), '<INV>']
at this position and the according record in the IVCF was:
chr1 21365 0_cuteSV.INV.0 C <INV> 0 q5 IMPRECISE;SVTYPE=INV;SVLEN=10120;END=31485;RE=4;STRAND=--;RNAMES=m64077_201030_135306/136249648/ccs,m64077_201030_135306/66585243/ccs,m64077_201030_135306/86313294/ccs,m64077_201030_135306/90374401/ccs;AF=0.1739;IRIS_PROCESSED=1;IRIS_REFINED=0;OLDTYPE=INV;STARTVARIANCE=0.222222;ENDVARIANCE=0.000000;AVG_LEN=10119.666667;AVG_START=21365.333333;AVG_END=31485.000000;SUPP_VEC_EXT=110100;IDLIST_EXT=cuteSV.INV.0,cuteSV.INV.0,cuteSV.INV.0;SUPP_EXT=3;SUPP_VEC=110100;SUPP=3;SVMETHOD=JASMINE;IDLIST=cuteSV.INV.0,cuteSV.INV.0,cuteSV.INV.0;REFINEDALT=.
This problem also occured at other positions, but a fix transforming potential tuples at that position helped:
if i[12] != '.':
if(i[12].__class__.__name__ == "tuple"):
i[12] = i[12][0]
info_list += ';STRAND=' + i[12]
nevertheless, this does most likely not solve the underlying problem and I have no clue where the bug is initially introduced, as the vcf record looks totally normal to me...
Thanks, Johannes
Hello, @johannesgeibel
Thanks for pointing this out clearly. We have fixed this problem and updated it in GitHub. Please git clone the latest code and check the results.
Best regards, Shuqi