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

Error with chisel_nonormal #32

Open
parth2608 opened this issue Jan 30, 2024 · 2 comments
Open

Error with chisel_nonormal #32

parth2608 opened this issue Jan 30, 2024 · 2 comments

Comments

@parth2608
Copy link

Hi,

I am encountering the same error as mentioned. I have scDNAseq fastq files. I am running the following pipeline in nonormal mode:

chisel_prep \
-r /rsrch5/home/tdccct/ppshah/shared/gencode/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta \
-x /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded \
-o Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.barcodedcells.bam \
/rsrch5/home/tdccct/ppshah/shared/scdna/bam/92.1D3/fastq/Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.fastq.gz


bcftools mpileup -Ou -f /rsrch5/home/tdccct/ppshah/shared/gencode/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.barcodedcells.bam --ignore-RG | bcftools call -mv -Ov -o /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.calls.vcf


chisel_nonormal -t /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.barcodedcells.bam \
-x /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded \
-r /rsrch5/home/tdccct/ppshah/shared/gencode/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta \
-l /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/Sample_SC359_chip_2_R0C20yesS_921_D_W_A1.calls.vcf

I am getting the following error:

Selecting phased SNPs
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/BAFEstimator.py", line 326, in <module>
    main()
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/BAFEstimator.py", line 104, in main
    snps = selecting(args, phased)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/BAFEstimator.py", line 170, in selecting
    pool = Pool(processes=min(args['J'], len(phased)), initializer=init_selecting, initargs=initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/__init__.py", line 232, in Pool
    return Pool(processes, initializer, initargs, maxtasksperchild)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 154, in __init__
    raise ValueError("Number of processes must be at least 1")
ValueError: Number of processes must be at least 1
[2024-Jan-30 14:57:25]Combining RDRs and BAFs
[2024-Jan-30 14:57:36]Parsing and checking arguments
[2024-Jan-30 14:57:36]Arguments:
	maxerror : None
	restarts : 100
	bootstrap : 100
	gccorr : /rsrch5/home/tdccct/ppshah/shared/gencode/Homo_sapiens/GATK/GRCh38/Sequence/WholeGenomeFasta/Homo_sapiens_assembly38.fasta
	minerror : 0.001
	rdr : /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/rdr/rdr.tsv
	blocksize : 50000
	j : 80
	baf : /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/baf/baf.tsv
	phasecorr : True
	seed : None
	listofcells : /rsrch5/home/tdccct/ppshah/shared/ascat/barcoded/rdr/total.tsv
	significance : 0.05
	missingsnps : (10, 0)
	minimumsnps : 0.08
	alphagc : 0.05
[2024-Jan-30 14:57:36]Read list of cells
[2024-Jan-30 14:57:36]Reading RDR
[2024-Jan-30 14:57:36]Reading BAF
[2024-Jan-30 14:57:36]Combining
Process PoolWorker-1:
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
Process PoolWorker-2:
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
Process PoolWorker-3:
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
Process PoolWorker-4:
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
Process PoolWorker-5:
Traceback (most recent call last):
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    self.run()
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
    self.run()
    self.run()
    self.run()
    self._target(*self._args, **self._kwargs)
    self.run()
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
    self._target(*self._args, **self._kwargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
    self._target(*self._args, **self._kwargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
    self._target(*self._args, **self._kwargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
    initializer(*initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
Process PoolWorker-6:
ZeroDivisionError: float division by zero
Traceback (most recent call last):
    initializer(*initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
    initializer(*initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 267, in _bootstrap
    initializer(*initargs)
    initializer(*initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
ZeroDivisionError: float division by zero
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
ZeroDivisionError: float division by zero
ZeroDivisionError: float division by zero
ZeroDivisionError: float division by zero
    self.run()
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/process.py", line 114, in run
    self._target(*self._args, **self._kwargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/multiprocessing/pool.py", line 97, in worker
    initializer(*initargs)
  File "/rsrch5/home/tdccct/ppshah/shared/pipelines/chisel/conda/envs/chisel/lib/python2.7/site-packages/chisel/Combiner.py", line 234, in init
    alpha_correct = args['significance'] / (20 * float(sum(len(snps[c]) for c in snps)))
ZeroDivisionError: float division by zero

Any guidance to resolve this would be helpful.

Thank you

@simozacca
Copy link
Collaborator

Hi there; the issue might be related to have a chromosomes without any SNP provided in the phased list, or phased SNPs provided with a mismatched chromosome name (for example, having the chr notation in the phased list but not in the BAM file). Could you please check if this is the case? Also, please provide the full log of the run if the issue persists.

An important note too: it is not reccomended to use SNPs gentoyped from WES, as those are not generally enough. Rather, we reccomend to genotype the single-cell barcoed BAM file itself using a list of known SNPs (for example HRC), as described in 3. of https://github.com/raphael-group/chisel?tab=readme-ov-file#requireddata

@LYC-vio
Copy link

LYC-vio commented Feb 2, 2024

Hi, I've also encountered this issue, updating bcftools to the newest version solved it. bcftools 1.8 seems to have some running issues.

Not sure if this can work for you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants