Closed wushyer closed 1 year ago
I have experienced the same error. I used a human genome 30x coverage (short-read) data (bam and vcf). I had no errors in the preceding steps such as 1) cnvpytor -root file.pytor -rd bamfile.bam 2) cnvpytor -root file.pytor -his 100 3) cnvpytor -root file.pytor -partition 100 4) cnvpytor -root file.pytor -call 100 5) cnvpytor -root file.pytor -snp vcffile.vcf.gz -sample sample_name 6) cnvpytor -root file.pytor -mask_snps 7) cnvpytor -root file.pytor -baf 100 and had the same error after implementing the following command: cnvpytor -root file.pytor -call combined 100 > calls.file.combined.100.tsv
Hi, did any of you figure out how to solve this problem? I have the exact same thing myself. I followed these steps:
cnvpytor -root file.pytor -rd ${BAM}
cnvpytor -root file.pytor -his ${BIN_SIZE}
cnvpytor -root file.pytor -snp ${VCF}
cnvpytor -root file.pytor -mask_snps
cnvpytor -root file.pytor -baf ${BIN_SIZE}
cnvpytor -root file.pytor -call combined ${BIN_SIZE} > file.cnvpytor.tsv
All the ${...} variables have been properly defined beforehand, so the error is not coming from those.
Hi all, I didn't solve this. I am using another tool instead
Hi, I finally solved it!
I explained it a bit better here (https://github.com/abyzovlab/CNVpytor/issues/167), but for me the problem was with the FILTER column of the .vcf file. I added "-nofilter" to the -snp step to ignore that column and it worked.
@wushyer sorry for long delay. @lunalvan thank you for your solution. In some cases it will work.
This error is result of no bins with BAF=0.5. Those bins are used to normalize RD levels using just diploid regions. Sometimes it is caused by a lack of SNP-s, and -nofilter can be solution than. However, sometimes depending on sequencing quality, or on nature of sample there is small split in BAF genome wide. In that case only solution is to use parameter (-mindbaf) and set up some small value 0.01 - 0.05. This parameter will set range of BAF values around 0.5 (0.5+-mindbaf) that will be used for normalization. This is not yet documented, we are working on it.
Hi, could you help me check this error?? Thanks cnvpytor -conf ./example_ref_genome_conf.py -root file.pytor -call combined 10000 > calls.combined.10000.tsv 2023-01-19 17:36:29,042 - cnvpytor.genome - INFO - Reading configuration file './example_ref_genome_conf.py'. 2023-01-19 17:36:29,043 - cnvpytor.genome - INFO - Importing reference genome data: 'Tak'. 2023-01-19 17:36:29,083 - cnvpytor.root - WARNING - No bins with BAF=0.5! Using all bins for RD normalisation. Traceback (most recent call last): File "/users/shuangyang.wu/miniconda3/envs/tools3/bin/cnvpytor", line 8, in
sys.exit(main())
File "/users/shuangyang.wu/miniconda3/envs/tools3/lib/python3.7/site-packages/cnvpytor/main.py", line 434, in main
use_hom=args.use_hom, anim=args.animation)
File "/users/shuangyang.wu/miniconda3/envs/tools3/lib/python3.7/site-packages/cnvpytor/root.py", line 3127, in call_2d
dmin = np.min(data)
File "<__array_function__ internals>", line 6, in amin
File "/users/shuangyang.wu/miniconda3/envs/tools3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2880, in amin
keepdims=keepdims, initial=initial, where=where)
File "/users/shuangyang.wu/miniconda3/envs/tools3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
ValueError: zero-size array to reduction operation minimum which has no identity