iqbal-lab / Mykrobe-predictor

Antibiotic resistance predictions in minutes on a laptop
Other
50 stars 19 forks source link

SegFault in TB species enum goes out of defined values #7

Closed Phelimb closed 10 years ago

Phelimb commented 10 years ago

./Mykrobe.predictor.tb --file /Net/wombat/dipro/mmm/gorm/v3/dat/Mtub/stampy/00023000/C00023875_R00000039.bam --install_dir ~/dev/git/myKrobe-predictor --method InSilicoOligos myKrobe.predictor for Mycoplasma tuberculosis, version 0.0.0.1 Command: ./Mykrobe.predictor.tb --file /Net/wombat/dipro/mmm/gorm/v3/dat/Mtub/stampy/00023000/C00023875_R00000039.bam --install_dir /home/zam/dev/git/myKrobe-predictor --method InSilicoOligos Sun Sep 7 00:09:35 2014 Sun Sep 7 00:09:35 2014 * Start time Sun Sep 7 00:09:35 2014 * Sample: UnknownSample Sun Sep 7 00:09:35 2014 Sun Sep 7 00:09:36 2014 Segmentation fault (core dumped)

If I go in with gdb I find this:

Backtrace

0 0x000000000041b92f in get_stats_pure_MTBC (expected_covg=86, err_rate=0.00500000000000000\

01, lambda_g_err=0.66741851212588221, lambda_e=0.0011179539566597693, arr_perc_covg=0x7ffffff\ fe340, arr_median=0x7fffffffe390, arr_tkmers=0x7fffffffe260, arr_tkmers_snps=0x7fffffffe290, \ arr_tkmers_mobile=0x7fffffffe2c0, arr_prop_snps=0x7fffffffe3e0, arr_prop_mobile=0x7fffffffe43\ 0, kmer_size=21, sm=0x686780, sp=9999) at src/predictor/tb/species.c:555

1 0x000000000041b5eb in get_species_model (max_branch_len=11000, install_dir=0x64a1d0, lamb\

da_g_err=0.66741851212588221, lambda_e_err=0.0011179539566597693, err_rate=0.0050000000000000\ 001, expected_covg=86, ignore_first=1, ignore_last=1, best_model=0x686250) at src/predictor/t\ b/species.c:436

2 0x0000000000403e53 in main (argc=7, argv=0x7fffffffe758) at src/predictor/tb/main.c:292

(gdb)

Crash occurs here in species.c

=>if (arr_perc_covg[sp] > 0.75*recovery_expected) { lpr=0; }

(gdb) p arr_perc_covg[sp] Cannot access memory at address 0x800000011bb8 (gdb) p sp $2 = 9999

Didn't debug further, but I assume sp is not meant to be 9999

Phelimb commented 10 years ago

@zamiqbal What sample is this? C00023875 isn't in my filelist.

I also can't reproduce this issue: phelimb@sequoia:~/myKrobe-predictor/bin$ ./Mykrobe.predictor.tb --file /Net/wombat/dipro/mmm/gorm/v3/dat/Mtub/stampy/00023000/C00023875_R00000039.bam --install_dir /home/phelimb/myKrobe-predictor/ --method InSilicoOligos

`myKrobe.predictor for Mycoplasma tuberculosis, version 0.0.0.1

Command: ./Mykrobe.predictor.tb --file /Net/wombat/dipro/mmm/gorm/v3/dat/Mtub/stampy/00023000/C00023875_R00000039.bam --install_dir /home/phelimb/myKrobe-predictor/ --method InSilicoOligos

Mon Sep 8 15:51:03 2014

Mon Sep 8 15:51:03 2014

\ Start time

Mon Sep 8 15:51:03 2014

\ Sample:

UnknownSample

Mon Sep 8 15:51:03 2014

Mon Sep 8 15:51:05 2014

\ Species

Non-MTBC?'5?

No AMR predictions given.

\ End time

Mon Sep 8 15:52:37 2014 `

with commit 43669ec881ff5ea679b211cd2af3cbbf74ff0ec7

iqbal-lab commented 10 years ago

Hm - well I was on an older version of the code. Happy to close if not reproducible with latest