shiquan / PISA

A collection of tools to process single-cell omics datasets.
MIT License
39 stars 8 forks source link

segmentation fault #15

Closed HuangCZNJMU closed 5 days ago

HuangCZNJMU commented 3 weeks ago

I am encountering a segmentation fault when running the PISA corr command on my BAM file. Below is the command I used and the error message I received: $ PISA corr -tag UR -new-tag UB -tags-block CB,GN -o final.bam -@ 1 sorted.bam [2024-08-20 14:21:17] Building index .. [1] 115320 segmentation fault PISA corr -tag UR -new-tag UB -tags-block CB,GN -o final.bam -@ 1 sorted.bam

PS: The command didn't generate final.bam

shiquan commented 3 weeks ago

Sorry for the inconvenience. Could you let me know which version of PISA you are testing? Have you tried the latest version?

If you’re still encountering a segmentation fault with the latest version, please share your sorted.bam file with me, and I’ll look into it.

HuangCZNJMU commented 3 weeks ago

PISA --version PISA - a collection of tools for single cell data pre-processing and interpretation. Version: v1.1 + htslib: 1.10.2 I followed the tutorial on this website https://shiquan.github.io/workflow1.html, and the data I used was downloaded from the link provided in the tutorial: http://cf.10xgenomics.com/samples/cell-exp/3.0.0/pbmc_1k_v3/pbmc_1k_v3_fastqs.tar.

shiquan commented 3 weeks ago

I wasn’t able to reproduce this error on my server. I noticed that the corr step used around 18GB of memory. Could you let me know how much memory your server has? I suspect this error might be due to insufficient memory, as this step requires loading all UMIs first.

If that’s the case, you can skip this step and use the raw UMIs instead of the corrected ones in the next step. For example,

PISA count -tags CB -anno-tag GN -umi UR -outdir raw_gene_expression -@ 5 final.bam
Liuzekai666 commented 1 week ago

I checked the memory on my server, and it appears that the memory is sufficient for the task. Here are the details from the free -h command: $ free -h total used free shared buff/cache available Mem: 503G 184G 35G 15M 283G 317G Swap: 31G 15G 16G (base)

As you can see, there is a total of 503GB of memory, with 317GB still available. The corr step used around 18GB of memory on my server without any issues. Therefore, I suspect the error might be due to something other than insufficient memory.

Liuzekai666 commented 1 week ago

跳过correct这步直接运行PISA count会报错:No barcode

$ PISA count -tags CB -anno-tag GN -umi UB -outdir raw_gene_expression -@ 5 sorted.bam [error] [func: write_outs, line: 839] No barcode found.

shiquan commented 1 week ago

跳过correct这步直接运行PISA count会报错:No barcode

$ PISA count -tags CB -anno-tag GN -umi UB -outdir raw_gene_expression -@ 5 sorted.bam [error] [func: write_outs, line: 839] No barcode found.

因为你没有corr,所以这时候umi的tag还是UR,没有UB。count时需要将-umi 设置成UR即可。另外方便把你的sorted.bam传给我么?我要重复下。

Liuzekai666 commented 1 week ago

链接: https://pan.baidu.com/s/1aDa_Sk-d-JHhGMtiX-IcUQ?pwd=wekm 提取码: wekm --来自百度网盘超级会员v5的分享 sorted.bam文件上传至百度网盘,麻烦您了。

shiquan commented 1 week ago

链接: https://pan.baidu.com/s/1aDa_Sk-d-JHhGMtiX-IcUQ?pwd=wekm 提取码: wekm --来自百度网盘超级会员v5的分享 sorted.bam文件上传至百度网盘,麻烦您了。

不好意思,我用了你提供的sorted.bam还是没能重复出问题。这有个命令看看能否在你那边服务器运行。

gdb --args PISA corr -tag UR -new-tag UB -tags-block CB,GN -o final.bam -@ 1 sorted.bam

输入后会进入一个交互界面,此时输入run然后回车,看看是什么结果。

如果没有输出东西,或者命令无法运行。方便的话把你的联系方式发到我的邮箱 quan.shi@bio.ku.dk 我可能要具体看看。多谢。

Liuzekai666 commented 6 days ago

麻烦你了 $ gdb --args PISA corr -tag UR -new-tag UB -tags-block CB,GN -o final.bam -@ 1 sorted.bam GNU gdb (GDB) 11.2 Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-conda-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: https://www.gnu.org/software/gdb/bugs/. Find the GDB manual and other documentation resources online at: http://www.gnu.org/software/gdb/documentation/.

For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from PISA... (gdb) run Starting program: /data/liuzekai/project/name_test/PISA/PISA corr -tag UR -new-tag UB -tags-block CB,GN -o final.bam -@ 1 sorted.bam [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". [2024-09-06 10:21:26] Building index .. [New Thread 0x7ffff2bcb700 (LWP 319537)] [New Thread 0x7ffff23ca700 (LWP 319538)]

Thread 1 "PISA" received signal SIGSEGV, Segmentation fault. 0x0000000000444557 in __ac_X31_hash_string ()