zyndagj / BSMAPz

Updated and optimized fork of BSMAP
Other
21 stars 6 forks source link

ZeroDivisionError: float division by zero #33

Closed praxsubba closed 3 years ago

praxsubba commented 3 years ago

Hello,

I am trying to run the methratio.py script with the following code:

PBS -N Methratio_G1SI199

PBS -l select=1:ncpus=12:mem=62gb:interconnect=fdr,walltime=24:00:00

PBS -m abe

PBS -j oe

cd $PBS_O_WORKDIR python ~/miniconda2/envs/methratio/bin/methratio.py -o G1SI199_methratio.txt -d /scratch1/psubba/GCF_008822105.2_bTaeGut2.pat.W.v2_genomic.fna -z -x CG /home/psubba/BSMAP_output_BAM/G1SI199_interval.bam

OUTPUT/ERROR:

[methratio] @Wed May 12 09:05:20 2021 loading reference file: /scratch1/psubba/GCF_008822105.2_bTaeGut2.pat.W.v2_genomic.fna ... [main_samview] incorrect number of arguments for -X option. Aborting. [methratio] @Wed May 12 09:05:49 2021 read 0 lines [methratio] @Wed May 12 09:05:49 2021 writing G1SI199_methratio.txt ... Traceback (most recent call last): File "/home/psubba/miniconda2/envs/methratio/bin/methratio.py", line 257, in disp('total %d valid mappings, %d covered cytosines, average coverage: %.2f fold.' % (nmap, nc, float(nd)/nc)) ZeroDivisionError: float division by zero

I am not sure how to fix this error because I have successfully used the same script in the past and it has worked. Please let me know if I am doing something wrong. Please also let me know if I can provide you with any other information. Thank you in advance!

praxsubba commented 3 years ago

Hello @zyndagj,

I am trying to run the methratio.py script with the following code:

PBS -N Methratio_G1SI199

PBS -l select=1:ncpus=12:mem=62gb:interconnect=fdr,walltime=24:00:00

PBS -m abe

PBS -j oe

cd $PBS_O_WORKDIR python ~/miniconda2/envs/methratio/bin/methratio.py -o G1SI199_methratio.txt -d /scratch1/psubba/GCF_008822105.2_bTaeGut2.pat.W.v2_genomic.fna -z -x CG /home/psubba/BSMAP_output_BAM/G1SI199_interval.bam

OUTPUT/ERROR:

[methratio] @wed May 12 09:05:20 2021 loading reference file: /scratch1/psubba/GCF_008822105.2_bTaeGut2.pat.W.v2_genomic.fna ... [main_samview] incorrect number of arguments for -X option. Aborting. [methratio] @wed May 12 09:05:49 2021 read 0 lines [methratio] @wed May 12 09:05:49 2021 writing G1SI199_methratio.txt ... Traceback (most recent call last): File "/home/psubba/miniconda2/envs/methratio/bin/methratio.py", line 257, in disp('total %d valid mappings, %d covered cytosines, average coverage: %.2f fold.' % (nmap, nc, float(nd)/nc)) ZeroDivisionError: float division by zero

I am not sure how to fix this error because I have successfully used the same script in the past and it has worked. Please let me know if I am doing something wrong. Please also let me know if I can provide you with any other information. Thank you in advance!