Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGSEGV: Illegal storage access. (Attempt to read from nil?) #120

Open
pamelaxu213 opened this issue Aug 21, 2023 · 2 comments
Open

SIGSEGV: Illegal storage access. (Attempt to read from nil?) #120

pamelaxu213 opened this issue Aug 21, 2023 · 2 comments

Comments

@pamelaxu213
Copy link

Hi Brent,

I was running somalier relate on 28 somalier files using the command:
$somalier/somalier relate --infer --ped $ped *.somalier

somalier version: 0.2.17
[somalier] starting read of 28 samples
[somalier] time to read files and get per-sample stats for 28 samples: 0.02
[somalier] time to get expected relatedness from pedigree graph: 0.00
[somalier] time to calculate all vs all relatedness for all 378 combinations: 0.00
[somalier] wrote interactive HTML output for 378 pairs to: somalier.html
[somalier] NOTE: updating paternal_id for TR_346 to TR_360
[somalier] NOTE: updating maternal_id for TR_346 to TR_361
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault

Do you have any insight into what the message means? the somalier.samples.tsv output is empty. It seems to happen randomly. When I ran the command on individual files it worked fine. I'm looking at a lot of samples so it would be super helpful to solve this error.

Thanks so much for your help!

@brentp
Copy link
Owner

brentp commented Aug 22, 2023

Hi, --infer is more buggy and that's probably where the problem is. If you run without that, it should be fine.
I am attaching a debug version of somalier that should give more information on the error. If you run and report the full output, I will have a look.

just use gunzip somalier_debug.gz && chmod +x ./somalier_debug && ./somalier_debug ...
somalier_debug.gz

@pamelaxu213
Copy link
Author

pamelaxu213 commented Aug 22, 2023

Thanks for your quick reply! For my purposes, I would like to look at inferred sex and relatedness.
After I ran the debug version with command $somalier_debug relate --infer --ped $ped *.somalier, now the message is:

somalier version: 0.2.17
[somalier] starting read of 28 samples
[somalier] time to read files and get per-sample stats for 28 samples: 0.20
[somalier] time to get expected relatedness from pedigree graph: 0.01
[somalier] time to calculate all vs all relatedness for all 378 combinations: 0.03
[somalier] wrote interactive HTML output for 378 pairs to: somalier.html
/home/brentp/src/somalier/src/somalier.nim(276) somalier
/home/brentp/src/somalier/src/somalier.nim(263) main
/home/brentp/src/somalier/src/somalierpkg/relate.nim(1048) rel_main
/home/brentp/src/somalier/src/somalierpkg/relate.nim(826) write_ped
/home/brentp/src/somalier/src/somalierpkg/relate.nim(536) add_parents_and_check_sex
/home/brentp/src/somalier/src/somalierpkg/relate.nim(487) unrelated
/home/brentp/src/somalier/src/somalierpkg/relate.nim(227) relatedness
/nim-1.6.6/lib/system/fatal.nim(53) sysFatal
Error: unhandled exception: index 592 not in 0 .. 27 [IndexDefect].

The --infer command failed.

A second question I had was when I ran without --infer, the somalier html wasn't colored by pedigree relationships even when ped is provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants