abyzovlab / CNVpytor

a python extension of CNVnator -- a tool for CNV analysis from depth-of-coverage by mapped reads
MIT License
178 stars 26 forks source link

Error during Manhattan and Circular plot #177

Open BiodeB opened 1 year ago

BiodeB commented 1 year ago

Hi,

Thank you for this wonderful software. However, I'm getting below error during plotting the pytor file in manhattan. It will be an immense help if you kindly suggest where I'm getting wrong and potential solution.

I'm using below code for plotting manhattan:

for id in $ids
do
time srun cnvpytor -root $CNV/${id}_cnv.pytor -plot manhattan 10000 -chrom chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chrX chrY chrM -o $CNV/${id}_cnv_manhattan.jpg
done

Error:

/home/dk1187/.local/lib/python3.9/site-packages/cnvpytor/viewer.py:2571: UserWarning: Attempting to set identical bottom == top == 0 results in singular transformations; automatically expanding.
  ax.set_ylim([self.rd_manhattan_range[0] * mean, self.rd_manhattan_range[1] * mean])
Traceback (most recent call last):
  File "/home/dk1187/.local/bin/cnvpytor", line 8, in <module>
    sys.exit(main())
  File "/home/dk1187/.local/lib/python3.9/site-packages/cnvpytor/__main__.py", line 296, in main
    view.plot_command(args.plot)
  File "/home/dk1187/.local/lib/python3.9/site-packages/cnvpytor/viewer.py", line 407, in plot_command
    self.parse(command)
  File "/home/dk1187/.local/lib/python3.9/site-packages/cnvpytor/viewer.py", line 390, in parse
    self.circular()
  File "/home/dk1187/.local/lib/python3.9/site-packages/cnvpytor/viewer.py", line 2752, in circular
    dt = 2.0 * np.pi / plot_len
ZeroDivisionError: float division by zero
srun: error: hal0193: task 0: Exited with exit code 1

Thanks

suvakov commented 1 year ago

Do you have imported SNP data, and run histograms for 10000 bin size (both -his and -baf step)?