pachterlab / kb_python

A wrapper for the kallisto | bustools workflow for single-cell RNA-seq pre-processing
https://www.kallistobus.tools/
BSD 2-Clause "Simplified" License
141 stars 24 forks source link

kb count error #177

Closed mostafa-ti closed 1 year ago

mostafa-ti commented 1 year ago

Describe the issue I ran kb count command from this tutorial: https://www.kallistobus.tools/tutorials/kb_velocity/python/kb_velocity/#pre-processing

What is the exact command that was run? %%time !kb count --h5ad -i index.idx -g t2g.txt -x 10xv2 -o SRR6470906 \ -c1 spliced_t2c.txt -c2 unspliced_t2c.txt --workflow lamanno --filter bustools -t 2 \ SRR6470906_S1_L001_R1_001.fastq.gz \ SRR6470906_S1_L001_R2_001.fastq.gz \ SRR6470906_S1_L002_R1_001.fastq.gz \ SRR6470906_S1_L002_R2_001.fastq.gz

kb count ... I run the command on my google colab pro account

Command output (with --verbose flag)


Please copy and paste *VERBOSE* output here.
[2019-12-12 17:59:33,838]    INFO Generating BUS file from
[2019-12-12 17:59:33,838]    INFO         SRR6470906_S1_L001_R1_001.fastq.gz
[2019-12-12 17:59:33,838]    INFO         SRR6470906_S1_L001_R2_001.fastq.gz
[2019-12-12 17:59:33,838]    INFO         SRR6470906_S1_L002_R1_001.fastq.gz
[2019-12-12 17:59:33,838]    INFO         SRR6470906_S1_L002_R2_001.fastq.gz
[bus] Note: Strand option was not specified; setting it to --fr-stranded for specified technology
[index] k-mer length: 31
[index] number of targets: 845,338
[index] number of k-mers: 271,648,279
tcmalloc: large alloc 12884901888 bytes == 0x55803d284000 @  0x7f9bd10da887 0x55803b863352 0x55803b85dc14 0x55803b824d97 0x7f9bcff5ac87 0x55803b82c10a
[2022-11-08 20:03:50,202]   ERROR [main] An exception occurred
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/kb_python/main.py", line 1305, in main
    COMMAND_TO_FUNCTION[args.command](parser, args, temp_dir=temp_dir)
  File "/usr/local/lib/python3.7/dist-packages/kb_python/main.py", line 520, in parse_count
    by_name=args.gene_names
  File "/usr/local/lib/python3.7/dist-packages/ngs_tools/logging.py", line 62, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/kb_python/count.py", line 1600, in count_velocity
    strand=strand
  File "/usr/local/lib/python3.7/dist-packages/kb_python/validate.py", line 116, in inner
    results = func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/kb_python/count.py", line 150, in kallisto_bus
    run_executable(command)
  File "/usr/local/lib/python3.7/dist-packages/kb_python/dry/__init__.py", line 25, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.7/dist-packages/kb_python/utils.py", line 203, in run_executable
    raise sp.CalledProcessError(p.returncode, ' '.join(command))
subprocess.CalledProcessError: Command '/usr/local/lib/python3.7/dist-packages/kb_python/bins/linux/kallisto/kallisto bus -i index.idx -o SRR6470906 -x 10xv2 -t 2 SRR10069003_1.fastq.gz SRR10069003_2.fastq.gz' died with <Signals.SIGKILL: 9>.
CPU times: user 176 ms, sys: 130 ms, total: 306 ms
Wall time: 19.9 s
Yenaled commented 1 year ago

Make sure you have enough memory on your server (e.g. upward of 60 gigabytes). Colab will not be enough.

mostafa-ti commented 1 year ago

Make sure you have enough memory on your server (e.g. upward of 60 gigabytes). Colab will not be enough.

Thanks for the reply. But this is from the official tutorial, which ran on the free version of colab. I just re-run it, but on the pro version of colab so probably the issue shouldn't be related to the amount of memory.

Yenaled commented 1 year ago

Sigkill 9 (the issue you're having) usually means a memory problem. From my experience, kb count with a cDNA+intron index can cause out of memory problems frequently because the index is so large. Is the behavior reproducible (e.g. does it always run on colab free-tier but crash on colab pro?)?

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days