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
146 stars 23 forks source link

Signals.SIGILL: 4 when running kb ref #222

Closed yquint21 closed 9 months ago

yquint21 commented 11 months ago

Describe the issue Hi, I'm unable to create a Kallisto index. When running the kb ref command (python 3.10.13 and kb 0.27.3) all files files are generated with the exception of the index file. When it starts creating the index file it gives an error and returns a SIGILL: 4 signal. I'm not sure if I'm doing something wrong. Any help would be greatly appreciated.

What is the exact command that was run?

kb ref "/genomes/hg38/hg38.fa" "/genomes/hg38/hg38.annotation.gtf" -i hg38.idx -g hg38_t2g.txt -f1 hg38_cdna.fa -f2 hg38_intron.fa -c1 hg38_cdna_t2c.txt -c2 hg38_intron_t2c.txt --workflow lamanno --verbose

Command output (with --verbose flag)

[2023-10-30 09:59:58,624]   DEBUG [main] Printing verbose output
[2023-10-30 10:00:00,830]   DEBUG [main] kallisto binary located at /vol/mbconda/yquint/kb_python/bin/kallisto
[2023-10-30 10:00:00,830]   DEBUG [main] bustools binary located at /vol/mbconda/yquint/kb_python/bin/bustools
[2023-10-30 10:00:00,830]   DEBUG [main] Creating `tmp` directory
[2023-10-30 10:00:01,136]   DEBUG [main] Namespace(list=False, command='ref', tmp=None, keep_tmp=False, verbose=True, i='hg38.idx', g='hg38_t2g.txt', f1='hg38_cdna.fa', include_attribute=None, exclude_attribute=None, f2='hg38_intron.fa', c1='hg38_cdna_t2c.txt', c2='hg38_intron_t2c.txt', d=None, k=None, workflow='lamanno', overwrite=False, kallisto='kallisto', bustools='bustools', fasta='/home/yquint/genomes/hg38/hg38.fa', gtf='/home/yquint/genomes/hg38/hg38.annotation.gtf', feature=None, no_mismatches=False, flank=None)
[2023-10-30 10:00:01,136]    INFO [ref_lamanno] Preparing /home/yquint/genomes/hg38/hg38.fa, /home/yquint/genomes/hg38/hg38.annotation.gtf
[2023-10-30 10:01:07,613]    INFO [ref_lamanno] Splitting genome /home/yquint/genomes/hg38/hg38.fa into cDNA at /home/yquint/test_KB_index/tmp/tmp_a9aq2i6
[2023-10-30 10:02:17,598]    INFO [ref_lamanno] Creating cDNA transcripts-to-capture at /home/yquint/test_KB_index/tmp/tmpw0m8i3r3
[2023-10-30 10:02:19,201]    INFO [ref_lamanno] Splitting genome into introns at /home/yquint/test_KB_index/tmp/tmpbqw0q731
[2023-10-30 10:09:36,057]    INFO [ref_lamanno] Creating intron transcripts-to-capture at /home/yquint/test_KB_index/tmp/tmp9safbpe0
[2023-10-30 10:09:48,726]    INFO [ref_lamanno] Concatenating 1 cDNA FASTAs to hg38_cdna.fa
[2023-10-30 10:10:08,485]    INFO [ref_lamanno] Concatenating 1 cDNA transcripts-to-captures to hg38_cdna_t2c.txt
[2023-10-30 10:10:12,186]    INFO [ref_lamanno] Concatenating 1 intron FASTAs to hg38_intron.fa
[2023-10-30 10:10:45,153]    INFO [ref_lamanno] Concatenating 1 intron transcripts-to-captures to hg38_intron_t2c.txt
[2023-10-30 10:10:52,284]    INFO [ref_lamanno] Concatenating cDNA and intron FASTAs to /home/yquint/test_KB_index/tmp/tmpmu1gex2r
[2023-10-30 10:11:27,343]    INFO [ref_lamanno] Creating transcript-to-gene mapping at hg38_t2g.txt
[2023-10-30 10:11:54,122]    INFO [ref_lamanno] Indexing /home/yquint/test_KB_index/tmp/tmpmu1gex2r to hg38.idx
[2023-10-30 10:11:54,122]   DEBUG [ref_lamanno] kallisto index -i hg38.idx -k 31 /home/yquint/test_KB_index/tmp/tmpmu1gex2r
[2023-10-30 10:11:55,225]   DEBUG [ref_lamanno]
[2023-10-30 10:11:55,225]   ERROR [ref_lamanno]
[2023-10-30 10:11:55,225]   ERROR [main] An exception occurred
Traceback (most recent call last):
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/main.py", line 1305, in main
    COMMAND_TO_FUNCTION[args.command](parser, args, temp_dir=temp_dir)
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/main.py", line 249, in parse_ref
    ref_lamanno(
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/ngs_tools/logging.py", line 62, in inner
    return func(*args, **kwargs)
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/ref.py", line 746, in ref_lamanno
    index_result = kallisto_index(combined_path, index_path, k=k or 31)
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/ref.py", line 239, in kallisto_index
    run_executable(command)
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/dry/__init__.py", line 25, in inner
    return func(*args, **kwargs)
  File "/vol/mbconda/yquint/kb_python/lib/python3.10/site-packages/kb_python/utils.py", line 203, in run_executable
    raise sp.CalledProcessError(p.returncode, ' '.join(command))
subprocess.CalledProcessError: Command '/vol/mbconda/yquint/kb_python/bin/kallisto index -i hg38.idx -k 31 /home/yquint/test_KB_index/tmp/tmpmu1gex2r' died with <Signals.SIGILL: 4>.
[2023-10-30 10:11:55,939]   DEBUG [main] Removing `tmp` directory
Yenaled commented 11 months ago

You probably ran out of memory. Run it on a machine that has over 64 gb of memory.

yquint21 commented 11 months ago

Thank you for your response. The server I'm using has well over 64 gb of memory, so that should not be the problem.

Yenaled commented 11 months ago

There are a couple of possibilities I can think of:

yquint21 commented 10 months ago

Installing the Kallisto from source fixed the problem. Thank you!!

github-actions[bot] commented 9 months 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