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

RecursionError: maximum recursion depth exceeded in comparison #24

Open
adbeggs opened this issue May 23, 2024 · 1 comment
Open

RecursionError: maximum recursion depth exceeded in comparison #24

adbeggs opened this issue May 23, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@adbeggs
Copy link

adbeggs commented May 23, 2024

Hi team

Command used:

spectre CNVCaller --coverage mosdepth/"$A".regions.bed.gz --sample-id $A --output-dir spectre2 --reference ~/beggsa-clinicalnanopore/genomes/grch38/genome.fa --metadata ~/beggsa-clinicalnanopore/genomes/grch38/grch38spectremetadata.mdr --blacklist ~/beggsa-clinicalnanopore/genomes/grch38/grch38_blacklist_spectre.bed --snv clair/merge_output.vcf.gz

Output:

spectre::2024-05-23 16:25:49,087::INFO::spectre.spectre>  Spectre input: CNVCaller --coverage mosdepth/BRCA19.regions.bed.gz --sample-id BRCA19 --output-dir spectre2 --reference /rds/homes/b/beggsa/beggsa-clinicalnanopore/genomes/grch38/genome.fa --metadata /rds/homes/b/beggsa/beggsa-clinicalnanopore/genomes/grch38/grch38spectremetadata.mdr --blacklist /rds/homes/b/beggsa/beggsa-clinicalnanopore/genomes/grch38/grch38_blacklist_spectre.bed --snv clair/merge_output.vcf.gz
spectre::2024-05-23 16:25:49,088::INFO::spectre.spectre>  Spectre version: 0.2.1
spectre::2024-05-23 16:25:49,088::INFO::spectre.spectre>  Starting spectre
spectre::2024-05-23 16:25:49,088::INFO::spectre.spectre>  Evaluate if a new .mdr file needs to be created
spectre::2024-05-23 16:25:49,118::INFO::spectre.spectre>  Using existing metadata file /rds/homes/b/beggsa/beggsa-clinicalnanopore/genomes/grch38/grch38spectremetadata.mdr
spectre::2024-05-23 16:25:49,207::INFO::spectre.spectreCNV>  Spectre calculating for: mosdepth/BRCA19.regions.bed.gz
spectre::2024-05-23 16:25:49,231::INFO::spectre.spectreCNV>  Analysing CN neutral state from SNV data
spectre::2024-05-23 16:25:49,417::DEBUG::spectre.analysis.snv_analysis>  Starting SNV Copy number state compute ...
spectre::2024-05-23 16:25:49,417::DEBUG::spectre.analysis.snv_analysis>  Het sites count per chromosome
spectre::2024-05-23 16:26:11,222::DEBUG::spectre.analysis.snv_analysis>  chr1   348064  34372   35735   5.61x   49.03% het pass | 9.88% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr2   360835  35100   34955   5.03x   50.1% het pass | 9.73% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr3   301628  29810   29345   5.0x    50.39% het pass | 9.88% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr4   311748  29295   34509   5.74x   45.91% het pass | 9.4% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr5   267189  26028   25446   5.31x   50.57% het pass | 9.74% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr6   267229  26282   26283   4.84x   50.0% het pass | 9.84% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr7   244566  25388   24447   5.03x   50.94% het pass | 10.38% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr8   222152  21960   21678   4.93x   50.32% het pass | 9.89% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr9   185783  19339   17906   5.21x   51.92% het pass | 10.41% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr10  210841  21484   20617   5.78x   51.03% het pass | 10.19% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr11  214518  20288   23947   4.91x   45.86% het pass | 9.46% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr12  203810  19444   20429   4.89x   48.76% het pass | 9.54% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr13  166597  15197   20132   5.5x    43.02% het pass | 9.12% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr14  139807  13814   14842   5.15x   48.21% het pass | 9.88% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr15  124321  12076   12731   4.95x   48.68% het pass | 9.71% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr16  125786  13380   12426   7.2x    51.85% het pass | 10.64% het all
spectre::2024-05-23 16:26:11,224::DEBUG::spectre.analysis.snv_analysis>  chr17  116927  12944   11131   5.76x   53.77% het pass | 11.07% het all
spectre::2024-05-23 16:26:11,225::DEBUG::spectre.analysis.snv_analysis>  chr18  124000  11796   13121   5.28x   47.34% het pass | 9.51% het all
spectre::2024-05-23 16:26:11,228::DEBUG::spectre.analysis.snv_analysis>  chr19  86274   9538    7477    5.33x   56.06% het pass | 11.06% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr20  106365  14681   8842    6.65x   62.41% het pass | 13.8% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr21  68940   9203    7310    7.39x   55.73% het pass | 13.35% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr22  62161   8543    5257    6.61x   61.91% het pass | 13.74% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chrX   183860  16011   14272   4.77x   52.87% het pass | 8.71% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chrY   5266    815     1541    19.96x  34.59% het pass | 15.48% het all
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  Use chromsomes based on proportion of het sites
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr1   5.61
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr2   5.03
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr3   5.0
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr4   5.74
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr5   5.31
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr6   4.84
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr7   5.03
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr8   4.93
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr9   5.21
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr10  5.78
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr11  4.91
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr12  4.89
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr13  5.5
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr14  5.15
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr15  4.95
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr16  7.2
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr17  5.76
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr18  5.28
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr19  5.33
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr20  6.65
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr21  7.39
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chr22  6.61
spectre::2024-05-23 16:26:11,229::DEBUG::spectre.analysis.snv_analysis>  chrX   4.77
spectre::2024-05-23 16:26:33,908::DEBUG::spectre.analysis.snv_analysis>  n het sites used for normalization = 1174573
spectre::2024-05-23 16:26:34,094::DEBUG::spectre.analysis.snv_analysis>  p98 HET filter = 8.0
spectre::2024-05-23 16:26:34,643::DEBUG::spectre.analysis.snv_analysis>  HET: 1174573 |  p98 HET 1153663
Traceback (most recent call last):
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/bin/spectre", line 8, in <module>
    sys.exit(main())
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/spectre.py", line 642, in main
    spectre_run.spectre_exe()
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/spectre.py", line 356, in spectre_exe
    spectre_main.cnv_call()
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/spectreCNV.py", line 71, in cnv_call
    self.snv_analysis.snv_copy_number_state()
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/analysis/snv_analysis.py", line 231, in snv_copy_number_state
    self.snv_multimodal_detect()
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/analysis/snv_analysis.py", line 106, in snv_multimodal_detect
    dist_detected = detect_miltimodal.run()
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 51, in run
    modidxs = self._unidip(0, len(self.dat), True, self.debug)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 154, in _unidip
    rhidx = self._unidip(start+h_idx[1], end, False, debug)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 154, in _unidip
    rhidx = self._unidip(start+h_idx[1], end, False, debug)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 154, in _unidip
    rhidx = self._unidip(start+h_idx[1], end, False, debug)
  [Previous line repeated 975 more times]
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 135, in _unidip
    rmidx = self._unidip(start+modidx[0], start+modidx[1], True, debug)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/unidip.py", line 117, in _unidip
    _, pval, modidx = diptst(dat, self.is_hist, self.ntrials)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/dip.py", line 55, in diptst
    unif_dips = np.apply_along_axis(dip_fn, 1, unifs, is_hist, True)
  File "<__array_function__ internals>", line 200, in apply_along_axis
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/numpy/lib/shape_base.py", line 379, in apply_along_axis
    res = asanyarray(func1d(inarr_view[ind0], *args, **kwargs))
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/site-packages/spectre/libs/unidip/dip.py", line 75, in dip_fn
    counts = collections.Counter(dat)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/collections/__init__.py", line 577, in __init__
    self.update(iterable, **kwds)
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/collections/__init__.py", line 661, in update
    if isinstance(iterable, _collections_abc.Mapping):
  File "/rds/projects/b/beggsa-clinicalnanopore/software/condaenvs/spectre2/lib/python3.10/abc.py", line 119, in __instancecheck__
    return _abc_instancecheck(cls, instance)
RecursionError: maximum recursion depth exceeded in comparison
@philippesanio philippesanio added the bug Something isn't working label May 29, 2024
@abelhj
Copy link

abelhj commented Oct 13, 2024

I've run in to this error as well. Is there any workaround?

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

4 participants