NCGG-MGC / IMSindel

IMSindel: An accurate intermediate-size indel detection tool incorporating de novo assembly and gapped global-local alignment with split read analysis
https://www.nature.com/articles/s41598-018-23978-z
MIT License
15 stars 0 forks source link

imsindel error #13

Closed SIJAE-WOO closed 4 years ago

SIJAE-WOO commented 4 years ago

Hi,

I tried running imsindel, but I got error like below.

**imsindel --bam /home/users/sijaewoo/bam/120_1.bam --chr 11 --outd /home/users/sijaewoo/imsindel/120_1/ --indelsize 100000 --reffa /home/users/sijaewoo/common_files/hg38/hg38.fa

/home/users/sijaewoo/bin/IMSindel/lib/ims_indel/read_collector.rb:1:in require_relative': /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/sam_reader.rb:16: syntax error, unexpected ',' (SyntaxError) def each(chr:, filter_flag: nil, output_flag: nil, &block) ^ /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/sam_reader.rb:16: Can't assign to nil def each(chr:, filter_flag: nil, output_flag: nil, &block) ^ /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/sam_reader.rb:16: Can't assign to nil def each(chr:, filter_flag: nil, output_flag: nil, &block) ^ /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/sam_reader.rb:29: syntax error, unexpected keyword_end, expecting end-of-input from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/read_collector.rb:1:in<top (required)>' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel.rb:1:in require_relative' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel.rb:1:in<top (required)>' from /home/users/sijaewoo/bin/IMSindel/bin/imsindel:41:in require_relative' from /home/users/sijaewoo/bin/IMSindel/bin/imsindel:41:in

'**

If you know how to solve this problem, please let me know.

Thank you,

Sijaewoo

holrock commented 4 years ago

Hi, what is your ruby version?

SIJAE-WOO commented 4 years ago

Ruby version is ruby-2.2.3-0. I'll try after updating ruby version. Thank you.

SIJAE-WOO commented 4 years ago

Hi,

I have tried using IMSindel, but I got error.

The below are my command line and error message.

**imsindel --bam /home/users/sijaewoo/bam/120_1.bam --chr chr11 --outd /home/users/sijaewoo/imsindel/120_1/ --indelsize 1000000 --reffa /home/users/sijaewoo/common_files/hg38/hg38.fa

Parameters: Avg. base quality: 20 Maping quality: 20 Read group: within 3bp paired B and F: within 5bp Support reads for making consensus sequence: 3 mimimum clipping fragment base: 5bp support clip length: 5bp bam: /home/users/sijaewoo/bam/120_1.bam chr: chr11 outd: /home/users/sijaewoo/imsindel/120_1/ indelsize: 1000000 reffa: /home/users/sijaewoo/common_files/hg38/hg38.fa glsearch: glsearch36 glsearch mat: /home/users/sijaewoo/bin/IMSindel/lib/../data/mydna.mat mafft: mafft samtools: samtools temp: /tmp thread: 1 exclude-region:

  1. collecting indel related reads... samtools view -F 1024 -f 2 /home/users/sijaewoo/bam/120_1.bam chr11

    backward_clips: 395215

    forward_clips: 395403

    non_clips: 845801

  2. collecting indel related reads...done
  3. collecting unmapped reads... samtools view -F 1024 -f 8 /home/users/sijaewoo/bam/120_1.bam chr11 mate_unmapped_read_names: 122871 samtools view -F 1024 -f 4 /home/users/sijaewoo/bam/120_1.bam chr11 Insert size Avg: 243.29782796590175 SD: 127.56648165791391

    unmapped reads: 7473

  4. collecting unmapped reads...done
  5. considering support reads...

    backward clip with support reads: 2359

    forward clip with support reads: 1573

    non_clips with suport reads: 42634

  6. considering support reads...done
  7. making consensus seqs from support reads...

    <Thread:0x00002acd813adc10 /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:84 run> terminated with exception (report_on_exception is true):

    /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:163:in mafft_consensus': mafft exec error: pid 32946 exit 1 (RuntimeError) mafft stderr: /usr/bin/mafft: line 2719: 33087 Segmentation fault (core dumped) "$prefix/tbfast" _ -u $unalignlevel $localparam -C $numthreads $seqtype $model -g $lexp -f $lgop -Q $spfactor -h $laof -O $LGOP -E $LEXP -N $usenaivepairscore $focusarg _ -+ $iterate -W $minimumweight -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreadstb $rnaopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -f "-"$gop -Q $spfactor -h $aof $param_fft $localparam $algopt $treealg $scoreoutarg $focusarg < infile > /dev/null 2>> "$progressfile" from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:101:inblock in make_consensus' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:in each' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:inwith_index' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:in make_consensus' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:85:inblock (2 levels) in make_consensus_with_threads' /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:163:in mafft_consensus': mafft exec error: pid 32946 exit 1 (RuntimeError) mafft stderr: /usr/bin/mafft: line 2719: 33087 Segmentation fault (core dumped) "$prefix/tbfast" _ -u $unalignlevel $localparam -C $numthreads $seqtype $model -g $lexp -f $lgop -Q $spfactor -h $laof -O $LGOP -E $LEXP -N $usenaivepairscore $focusarg _ -+ $iterate -W $minimumweight -V "-"$gopdist -s $unalignlevel $legacygapopt $mergearg $termgapopt $outnum $addarg $add2ndhalfarg -C $numthreadstb $rnaopt $weightopt $treeinopt $treeoutopt $distoutopt $seqtype $model -f "-"$gop -Q $spfactor -h $aof $param_fft $localparam $algopt $treealg $scoreoutarg $focusarg < infile > /dev/null 2>> "$progressfile" from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:101:inblock in make_consensus' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:in each' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:inwith_index' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:100:in make_consensus' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/consensus.rb:85:inblock (2 levels) in make_consensus_with_threads'**

Could you tell me what should I do?

Thanks.

holrock commented 4 years ago

Thanks for the report. It seems to be an error in mafft. Please let me know what version of mafft you have so I can investigate the cause.

SIJAE-WOO commented 4 years ago

mafft version is v7.450.


MAFFT v7.450 (2019/Aug/23)

    MBE 30:772-780 (2013), NAR 30:3059-3066 (2002)
    https://mafft.cbrc.jp/alignment/software/

Thanks.

holrock commented 4 years ago

I tried it on mafft-7.471 and did not get the error (v7.450 was not available.) I have changed it to output additional logs.

By the way, this is probably a mafft issue. We can't fix it if inputs was correct.

SIJAE-WOO commented 4 years ago

Hi,

Thanks for your help. I'm really sorry for continuous questions.

I couldn't change mafft version and tried imsindel by sorted bam file. I got another error message.

**#backward_clips: 395215

forward_clips: 395403

non_clips: 845801

  1. collecting indel related reads...done
  2. collecting unmapped reads... samtools view -F 1024 -f 8 /home/users/sijaewoo/bam/120_1_sorted.bam chr11 mate_unmapped_read_names: 122871 samtools view -F 1024 -f 4 /home/users/sijaewoo/bam/120_1_sorted.bam chr11 Insert size Avg: 243.29782796590175 SD: 127.56648165791391

    unmapped reads: 7473

  3. collecting unmapped reads...done
  4. considering support reads...

    backward clip with support reads: 2359

    forward clip with support reads: 1573

    non_clips with suport reads: 42634

  5. considering support reads...done
  6. making consensus seqs from support reads...

    backward clip with consensus: 2359 --> 1753

    forward clip with consensus: 1573 --> 1124

    shot indel with consensus: 42634 --> 33223

  7. making consensus seqs from support reads...done
  8. making consensus seq from B and F.. making consensus seq for long deletion...done
  9. detection of indels...

    paired long indel candidates: 248

    unpaired long indel candidates: 989

    short indel candidates: 33223

    /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/pairwise_consensus.rb:190:in exec_glsearch': glsearch exec error: pid 103755 SIGSEGV (signal 11) (core dumped) (RuntimeError) glsearch36 -s /home/users/sijaewoo/bin/IMSindel/lib/../data/mydna.mat -g0 -f20 /tmp/gls_seq20200728-143220-1kecvsi /tmp/gls_ref20200728-143220-1kfj7m9 from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/pairwise_consensus.rb:23:inmake_consensus' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/indel_detector.rb:96:in block in detect_indels' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/indel_detector.rb:62:ineach' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/indel_detector.rb:62:in each_with_index' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/indel_detector.rb:62:indetect_indels' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel/indel_detector.rb:15:in indel_call' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel.rb:108:inrun_detect_indels' from /home/users/sijaewoo/bin/IMSindel/lib/ims_indel.rb:34:in run' from /home/users/sijaewoo/bin/IMSindel/bin/imsindel:44:in

    '**

I think this error is related to glsearch, so I added path to glsearch36 executable file to bashrc. Did I got error because of not adding '--glsearch-mat /path/to/foo.mat [data/mydna.mat]' option?

Best, Sijae

holrock commented 4 years ago

No problem 😄 --glsearch-mat is not the cause of the problem. From the log, mat path is correct. glsearch36 -s /home/users/sijaewoo/bin/IMSindel/lib/../data/mydna.mat

SIJAE-WOO commented 4 years ago

Then, what should I do for handling the new error?

holrock commented 4 years ago

I have updated the master branch. If glsearch gets an error, IMSidel will print the command. Can you check the input file and execute command?

Sorry it's not a direct solution.

SIJAE-WOO commented 4 years ago

Okay. Thank you. I'll try again and let you know if there are something change.