nebiolabs / EM-seq

Tools and Data related to Enzymatic Methylation Sequencing
GNU Affero General Public License v3.0
15 stars 3 forks source link

Zero division error in TSS_cpg_bins.py #1

Open mksamur opened 2 years ago

mksamur commented 2 years ago

Hi,

I'm testing this pipeline on some EM-seq samples we have recently generated and getting following error with TSS_cpg_bins.py File "/Software/EM-seq/TSS_cpg_bins.py", line 254, in normal_all_bins = [(all_bins[x] / all_bins[x]) * 100 for x in range(len(all_bins))] ZeroDivisionError: division by zero

It looks like line 254 in TSS_cpg_bins.py suppose to return 100 always except when it is 0 which cause 0/0 error.

Script was started by using

/Software/EM-seq/TSS_cpg_bins.py --methylkit MS1_md_extract_CpG.methylKit.gz --fasta grch38_core_bs_controls.fa --prefix MS1_md_extract_CpG.methylKit.TSS_cpg --annotation gencode.v38.annotation.gtf --plot True

and neither all_bins nor methylation_bins were specified, so calculation was done by the script

Thanks for the support!

bwlang commented 2 years ago

@mksamur : I'm sorry we did not see this report sooner - we had this repository with the wrong permissions. @mattsoup : Can you try to reproduce?