Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SMNCOPYNUMBERCALLER ZeroDivisionError: float division by zero #447

Open
yunhua1031 opened this issue Nov 21, 2023 · 4 comments
Open

SMNCOPYNUMBERCALLER ZeroDivisionError: float division by zero #447

yunhua1031 opened this issue Nov 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@yunhua1031
Copy link

Description of the bug

Hello,
I've got the basic test run to work, and now I'm trying the pipeline on real data, which I have trouble to get the pipeline to work...
I got error at SMNCOPYNUMBERCALLER step:

...
Caused by:
Process NFCORE_RAREDISEASE:RAREDISEASE:SMNCOPYNUMBERCALLER (justhusky) terminated with an error exit status (1)

Command executed:

echo earlycasualcaiman_sorted_md.bam slowlycivilbuck_sorted_md.bam hugelymodelbat_sorted_md.bam | tr ' ' '
' > manifest.txt
smn_caller.py
--genome 38
--manifest manifest.txt
--prefix justhusky
--outDir "out"
--threads 2

cat <<-END_VERSIONS > versions.yml
"NFCORE_RAREDISEASE:RAREDISEASE:SMNCOPYNUMBERCALLER":
SMNCopyNumberCaller: 1.1.2
END_VERSIONS

Command exit status:
1

Command output:
(empty)

Command error:
INFO:root:Processing sample earlycasualcaiman_sorted_md at 2023-11-20 23:57:42.498223
/usr/local/lib/python3.10/site-packages/numpy/core/fromnumeric.py:3432: RuntimeWarning: Mean of empty slice.
return _methods._mean(a, axis=axis, dtype=dtype,
/usr/local/lib/python3.10/site-packages/numpy/core/_methods.py:190: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
/usr/local/bin/depth_calling/bin_count.py:85: RuntimeWarning: divide by zero encountered in divide
y_counts = y_counts / np.median(y_counts)
/usr/local/bin/depth_calling/bin_count.py:85: RuntimeWarning: invalid value encountered in divide
y_counts = y_counts / np.median(y_counts)
/usr/local/bin/depth_calling/bin_count.py:77: RuntimeWarning: divide by zero encountered in divide
y_counts = y_counts / np.median(y_counts)
/usr/local/bin/depth_calling/bin_count.py:77: RuntimeWarning: invalid value encountered in divide
y_counts = y_counts / np.median(y_counts)
Traceback (most recent call last):
File "/usr/local/bin/smn_caller.py", line 298, in
main()
File "/usr/local/bin/smn_caller.py", line 267, in main
smn_call = smn_cn_caller(
File "/usr/local/bin/smn_caller.py", line 118, in smn_cn_caller
gcall_exon16 = gmm_exon16.gmm_call(normalized_depth.normalized["exon16"])
File "/usr/local/bin/depth_calling/gmm.py", line 96, in gmm_call
fcall = self.call_post_prob(val_new, POSTERIOR_CUTOFF)
File "/usr/local/bin/depth_calling/gmm.py", line 125, in call_post_prob
post_prob = [float(a) / sum_prob for a in prob]
File "/usr/local/bin/depth_calling/gmm.py", line 125, in
post_prob = [float(a) / sum_prob for a in prob]
ZeroDivisionError: float division by zero

variant_catalog_hg38_TEST.json
wholegenome.interval_list.txt
chrY.interval_list.txt

Command used and terminal output

$ cat nf-params.json
{
    "input": "samplesheet.csv",
    "outdir": "RD_Results",
    "save_reference": true,
    "genome": "GRCh38",
    "intervals_wgs": "wholegenome.interval_list.txt",
    "intervals_y" : "chrY.interval_list.txt",
    "target_bed" : "GRCh38.p14.bed",
    "variant_catalog" : "variant_catalog_hg38_TEST.json",
    "skip_cnv_calling": true,
    "skip_mt_analysis": true,
    "skip_snv_annotation": true,
    "skip_sv_annotation": true,
    "variant_type": "snp,indel"
}

$ cat samplesheet.csv
sample,single_end,lane,fastq_1,fastq_2,sex,phenotype,paternal_id,maternal_id,case_id
earlycasualcaiman_T1,False,1,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_earlycasualcaiman_XXXXXX_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_earlycasualcaiman_XXXXXX_2.fastq.gz,1,1,0,0,justhusky
slowlycivilbuck_T1,False,1,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_slowlycivilbuck_XXXXXX_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_slowlycivilbuck_XXXXXX_2.fastq.gz,2,1,0,0,justhusky
hugelymodelbat_T1,False,1,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_hugelymodelbat_XXXXXX_1.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/1_171015_HHT5NDSXX_hugelymodelbat_XXXXXX_2.fastq.gz,1,2,earlycasualcaiman,slowlycivilbuck,justhusky

$ cat GRCh38.p14.bed
chr1    0       248956422
chr2    0       242193529
chr3    0       198295559
chr4    0       190214555
chr5    0       181538259
chr6    0       170805979
chr7    0       159345973
chr8    0       145138636
chr9    0       138394717
chr10   0       133797422
chr11   0       135086622
chr12   0       133275309
chr13   0       114364328
chr14   0       107043718
chr15   0       101991189
chr16   0       90338345
chr17   0       83257441
chr18   0       80373285
chr19   0       58617616
chr20   0       64444167
chr21   0       46709983
chr22   0       50818468
chrX    0       156040895
chrY    0       57227415

$ nohup nextflow run nf-core/raredisease -r 1.1.1 -profile docker -params-file nf-params.json

Relevant files

No response

System information

N E X T F L O W ~ version 23.10.0
Hardware: HPC
OS: CentOS
nf-core/raredisease: 1.1.1

@yunhua1031 yunhua1031 added the bug Something isn't working label Nov 21, 2023
@ramprasadn
Copy link
Collaborator

ramprasadn commented Nov 23, 2023

Can you share the fasta file you used for this run somehow?

@yunhua1031
Copy link
Author

yunhua1031 commented Nov 27, 2023

Hi @ramprasadn, I was using the iGenome reference, so I didn't input a fasta file.

@yunhua1031
Copy link
Author

Hi @ramprasadn, just want to follow up :)
Any insight?

@ramprasadn
Copy link
Collaborator

Hi @yunhua1031! Sorry I have been on vacation, and just catching up with pending tasks. Could you run smncopynumbercaller outside of the pipeline with the same input file and see if the error persists?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants