epi2me-labs / wf-single-cell

Other
75 stars 39 forks source link

Error due to number deprecation #143

Closed Coracollar closed 1 month ago

Coracollar commented 1 month ago

Operating System

CentOS 7

Other Linux

No response

Workflow Version

v 2.1.0, 2.2.0, 2.3.0

Workflow Execution

Command line (Local)

Other workflow execution

No response

EPI2ME Version

No response

CLI command run

nextflow run tools/epi2me-labs-wf-single-cell_v2.1.0/v2_1_0/ \ --expected_cells 100 \ --fastq 'wf-single-cell-demo/chr17.fq.gz' \ --kit '3prime:v3' \ --ref_genome_dir 'wf-single-cell-demo' \ --genes_of_interest 'wf-single-cell-demo/umap_plot_genes.csv' \ -profile singularity \ --threads 4

Workflow Execution - CLI Execution Profile

None

What happened?

I have tried several versions of the workflow, downloading them with nfcore download and downloading the singularity image and in all of them I have the same error running the test command. There seems to be an error with numba that is killing the workflow, I have tried to install different numba versions but it does not solve it. Any idea?

Relevant log output

[29/c477ed] fastcat (1)                    | 1 of 1 ✔
[2e/53731b] parse_kit_metadata (1)         | 1 of 1 ✔
[50/2ee2c2] pipeline:getVersions           | 1 of 1 ✔
[12/7a91ad] pipeline:getParams             | 1 of 1 ✔
[43/028286] pip…e:preprocess:call_paftools | 1 of 1 ✔
[6d/d55cf2] pip…preprocess:get_chrom_sizes | 1 of 1 ✔
[99/0cfe3a] pip…rocess:build_minimap_index | 1 of 1 ✔
[16/cb4276] pip…cess:call_adapter_scan (1) | 1 of 1 ✔
[bc/ba1cb8] pip…ummarize_adapter_table (1) | 1 of 1 ✔
[9c/687e85] pip…s_bams:split_gtf_by_chroms | 1 of 1 ✔
[75/11383c] pip…ams:generate_whitelist (1) | 1 of 1 ✔
[d0/303c90] pip…s_bams:assign_barcodes (1) | 1 of 1 ✔
[bf/2a361e] pip…bams:cat_tags_by_chrom (1) | 1 of 1 ✔
[50/e60bfd] pip…rocess_bams:merge_bams (1) | 1 of 1 ✔
[87/d76043] pip…process_bams:stringtie (1) | 1 of 1 ✔
[35/bc619a] pip…align_to_transcriptome (1) | 1 of 1 ✔
[bd/cdaf17] pip…s_bams:assign_features (1) | 1 of 1 ✔
[02/68b46c] pip…ess_bams:create_matrix (1) | 1 of 1 ✔
[16/0c9301] pip…ss_bams:process_matrix (2) | 1 of 2, failed: 1
[59/7ba812] pip…ms:merge_transcriptome (1) | 1 of 1 ✔
[e3/57dc03] pip…ombine_final_tag_files (1) | 1 of 1 ✔
[-        ] pipeline:process_bams:tag_bam  | 0 of 1
[-        ] pip…s_bams:umi_gene_saturation | 0 of 1
Plus 3 more processes waiting for tasks…
ERROR ~ Error executing process > 'pipeline:process_bams:process_matrix (2)'

Caused by:
  Process `pipeline:process_bams:process_matrix (2)` terminated with an error exit status (1)

Command executed:

  export NUMBA_NUM_THREADS=1
  workflow-glue process_matrix         inputs/matrix*.hdf         --feature gene         --raw gene_raw_feature_bc_matrix         --processed gene_processed_feature_bc_matrix         --per_cell_mito gene.expression.mito-per-cell.tsv         --per_cell_expr gene.expression.mean-per-cell.tsv         --umap_tsv gene.expression.umap.tsv         --enable_filtering         --min_features 200         --min_cells 3         --max_mito 20         --mito_prefixes MT-         --norm_count 10000         --enable_umap         --replicates 3

Command exit status:
  1

Command output:
  (empty)

Command error:
  [14:50:01 - workflow_glue] Bootstrapping CLI.
  /home/epi2melabs/conda/lib/python3.8/site-packages/umap/distances.py:1063: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
    @numba.jit()
  /home/epi2melabs/conda/lib/python3.8/site-packages/umap/distances.py:1071: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
    @numba.jit()
  /home/epi2melabs/conda/lib/python3.8/site-packages/umap/distances.py:1086: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
    @numba.jit()
  Traceback (most recent call last):
    File "/tools/epi2me-labs-wf-single-cell_v2.1.0/v2_1_0/bin/workflow-glue", line 7, in <module>
      cli()
    File "/tools/epi2me-labs-wf-single-cell_v2.1.0/v2_1_0/bin/workflow_glue/__init__.py", line 66, in cli
      components = get_components(allowed_components=[sys.argv[1]])
    File "/tools/epi2me-labs-wf-single-cell_v2.1.0/v2_1_0/bin/workflow_glue/__init__.py", line 29, in get_components
      mod = importlib.import_module(f"{_package_name}.{name}")
    File "/home/epi2melabs/conda/lib/python3.8/importlib/__init__.py", line 127, in import_module
      return _bootstrap._gcd_import(name[level:], package, level)
    File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
    File "<frozen importlib._bootstrap>", line 991, in _find_and_load
    File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
    File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
    File "<frozen importlib._bootstrap_external>", line 843, in exec_module
    File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
    File "/group/tran3/ccollar/tools/epi2me-labs-wf-single-cell_v2.1.0/v2_1_0/bin/workflow_glue/process_matrix.py", line 8, in <module>
      import umap
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/umap/__init__.py", line 2, in <module>
      from .umap_ import UMAP
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/umap/umap_.py", line 41, in <module>
      from umap.layouts import (
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/umap/layouts.py", line 40, in <module>
      def rdist(x, y):
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/numba/core/decorators.py", line 234, in wrapper
      disp.enable_caching()
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/numba/core/dispatcher.py", line 863, in enable_caching
      self._cache = FunctionCache(self.py_func)
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/numba/core/caching.py", line 601, in __init__
      self._impl = self._impl_class(py_func)
    File "/home/epi2melabs/conda/lib/python3.8/site-packages/numba/core/caching.py", line 337, in __init__
      raise RuntimeError("cannot cache function %r: no locator available "
  RuntimeError: cannot cache function 'rdist': no locator available for file '/home/epi2melabs/conda/lib/python3.8/site-packages/umap/layouts.py'

Work dir:
/work/16/0c930133534d66326b6bf9683eec72

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

 -- Check '.nextflow.log' file for details
WARN: Killing running tasks (1)

Application activity log entry

No response

Were you able to successfully run the latest version of the workflow with the demo data?

no

Other demo data information

No response

nrhorner commented 1 month ago

Hi @Coracollar

The troubleshooting section mentions this issue: https://github.com/epi2me-labs/wf-single-cell?tab=readme-ov-file#troubleshooting.

Could you try following the suggestion there please?

Coracollar commented 1 month ago

Hello Neil, Which nexflow.config should I change? Because I created a config file in the configs/confs directory and then added it to nfcore_custom.config, but the workflow seems to refuse to use any custom config claiming it does not exist (even the ones that are already there like wehi). Then I tried to modify the nextflow.config inside the v2_1_0 directory adding runOptions = '--writable-tmpfs' in the singularity profile: Like in here:

profiles {

// the "standard" profile is used implicitely by nextflow

// if no other profile is given on the CLI

standard {

    docker {

        enabled = true

        // this ensures container is run as host user and group, but

        //    also adds host user to the within-container group

        runOptions = "--user \$(id -u):\$(id -g) --group-add 100"

    }

}

// using singularity instead of docker

singularity {

    singularity {

        enabled = true

        autoMounts = true

        runOptions = '--writable-tmpfs'

    }

}

Then I ran the pipeline again and had the exact same error.

Is there any other config files hidden? Do you know why the pipeline might be ignoring the custom config even when they were downloaded? Cheers, Cora

nrhorner commented 1 month ago

Hi @Coracollar

Just create a a new config file anywhere that is readable, and point the workflow to it using -c path/to/config

The workflow log should indicate whic config files are being used for a run, for example:

||||||||||  | ____|  _ \_ _|___ \|  \/  | ____|    | | __ _| |__  ___
|||||       |  _| | |_) | |  __) | |\/| |  _| _____| |/ _` | '_ \/ __|
|||||       | |___|  __/| | / __/| |  | | |__|_____| | (_| | |_) \__ \
||||||||||  |_____|_|  |___|_____|_|  |_|_____|    |_|\__,_|_.__/|___/
||||||||||  wf-single-cell v2.3.0
--------------------------------------------------------------------------------
Core Nextflow options
 ...
  configFiles        : /Users/user/.nextflow/config, /Users/user/git/workflows/wf-single-cell/nextflow.config
nrhorner commented 1 month ago

Hi @Coracollar Did you have any luck with this?

Coracollar commented 4 weeks ago

Hi sorry for the late reply, no luck. Same problem, same error. I've given up using epi2me and changed to flames.

On Tue, Oct 22, 2024 at 3:25 AM Neil Horner @.***> wrote:

Hi @Coracollar https://github.com/Coracollar Did you have any luck with this?

— Reply to this email directly, view it on GitHub https://github.com/epi2me-labs/wf-single-cell/issues/143#issuecomment-2427149745, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZ7PMCTDXUTTRM7IXTEIDDZ4UTFRAVCNFSM6AAAAABPLEDFHOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMRXGE2DSNZUGU . You are receiving this because you were mentioned.Message ID: @.***>