broadinstitute / gistic2

Genomic Identification of Significant Targets in Cancer (GISTIC), version 2
MIT License
47 stars 12 forks source link

about Segmentation fault (core dumped) bug #9

Open mugpeng opened 2 years ago

mugpeng commented 2 years ago

Hi,

Recently, I wanna calculate gistics from the tcga, but the program was interrupted with below error info in my log:

$ tail /home/yzpeng/matlab_crash_dump.2314-1
[117] 0x00007f6a6e07d609          /usr/lib/x86_64-linux-gnu/libpthread.so.0+00038409
[118] 0x00007f6a6dfa4293                /usr/lib/x86_64-linux-gnu/libc.so.6+01188499 clone+00000067
If this problem is reproducible, please submit a Service Request via:
    http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.

And the output document only including:

$ ls ~/1.pipeline/01_wes/15-cnv-diff/gistics_output/2ed4.0/
D.cap1.5.mat       gistic_inputs.mat      scores.0.5.mat
focal_dat.0.5.mat  sample_seg_counts.txt

The only difference of this file is the size, because this segment file is pretty bigger(combination of tcga data)

I saw this error was might be a bug that due to a matlab version problem.

But I am still puzzle, because the problem never happen when I handle other data in the past.

My os: 20.04.1-Ubuntu

My command:

nohup ./gistic2 -b ~/1.pipeline/01_wes/15-cnv-diff/gistics_output/1st3.0 -seg ~/1.pipeline/01_wes/15-cnv-diff/tumor.low.seg.txt -refgene refgenefiles/hg19.UCSC.add_miR.140312.refgene.mat  -genegistic 1 -smallmem 1 -broad 1 -brlen 0.5 -conf 0.95 -armpeel 1 -savegene 1 -twosize 1 -maxseg 10000 -gcm extreme 1>2ed.log 2>&1 &

Thanks.

mkfeng1988 commented 2 years ago

I also confronted this fatal error. Even I try to install the latest MCR version, the gistic 2.23 version is not compatible and could not be installed successfully. Then I downloaded the MCR 2014a from https://ww2.mathworks.cn/products/compiler/matlab-runtime.html to replace the tar.gz file version (ftp://ftp.broadinstitute.org/pub/GISTIC2.0/), gistic could not be installed successfully. I search the google and MCR forum, but none of the solution worked. I think the biggest problem was from the gp_gistic2_from_seg file which had been compiled via MATLAB.

Here is my gistic setting FOLLOW the guideline:

!/bin/sh

set MCR environment and launch GISTIC executable

NOTE: change the line below if you have installed the Matlab MCR in an alternative location

MCR_ROOT=$HOME/MATLAB_Compiler_Runtime MCR_VER=v83 echo Setting Matlab MCR root to $MCR_ROOT

set up environment variables

LD_LIBRARY_PATH=$MCR_ROOT/$MCR_VER/runtime/glnxa64:$LD_LIBRARY_PATH LD_LIBRARY_PATH=$MCR_ROOT/$MCR_VER/bin/glnxa64:$LD_LIBRARY_PATH LD_LIBRARY_PATH=$MCR_ROOT/$MCR_VER/sys/os/glnxa64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH XAPPLRESDIR=$MCR_ROOT/$MCR_VER/v83/X11/app-defaults export XAPPLRESDIR

launch GISTIC executable

$HOME/gistic/gp_gistic2_from_seg $@

When I execute the run_gistic_example script, this fatal error is reproducible. Screenshot at 2022-01-18 12-40-18

Here I post my crash report: matlab_crash_dump.41081-1.txt matlab_crash_dump.41081-2.txt

mkfeng1988 commented 2 years ago

Hi, mugpeng When I debugged these fatal error occurred, I found a solution to solve these bug. Since MCR version is different from the entire MATLAB version installation, there is no graphical user interface (GUI) instead of command line operation. Thus, after finishing the installation, we should set the DISPLAY off to inhibit the dynamic linking library activation. You shall run the command firstly before executing GISTIC as listed below: Terminal: unset DISPLAY

or you can add the 'unset DISPLAY' command in the shell script file as illustrated below: #!/bin/sh

before running GISTIC analysis

unset DISPLAY

running the GISTIC analysis

results directory

basedir=$HOME/results

segment file

segfile=$HOME/biosoft/segment.seg

reference file hg19

refgenefile=$HOME/biosoft/refgenefiles/hg19.mat

GISTIC execution

$HOME/biosoft/gistic2 -b $basedir -seg $segfile -refgene $refgenefile -genegistic 1 -smallmem 1 -broad 1 -brlen 0.5 -conf 0.90 -armpeel 1 -savegene 1 -gcm extreme -rx 0

Here I post my successful results: Screenshot at 2022-01-19 13-33-03

Hope you succeed!

TylerMclaughlin commented 2 years ago

Hello! @mkfeng1988 @mugpeng

I was also experiencing this issue.

unset DISPLAY did not help me.

However,

Lowering the number of CPU cores used in my docker run command solved the issue. Here's how to do that.

😊

mkfeng1988 commented 2 years ago

Hello @TylerMclaughlin Thanks for your experience sharing. As I am not good at MATLAB programming, GISTIC2 encoded via MATLAB complier does exit various problem depending on the environment of your operation Linux System setting. Hope We have a good luck and find the solution to fix the problem we confront.