odelaneau / shapeit5

Segmented HAPlotype Estimation and Imputation Tool
https://odelaneau.github.io/shapeit5/
MIT License
66 stars 9 forks source link

Segmentation fault when using genetic map #101

Closed GenevieveKrause closed 3 months ago

GenevieveKrause commented 4 months ago

I am attempting to run phase_common_static from the docker image loaded from shapeit5_v5.1.1.docker.tar.gz on the All of Us research platform. I was able to successfully run the program using the following command:
phase_common_static --input E300-2024-06-05.vcf.gz --region chr20 --output E300-phase_common-map.bcf --thread 8 However, when I added the --map to the same dataset I got a seg fault. phase_common_static --input E300-2024-06-05.vcf.gz --region chr20 --map chr20.b38.gmap.gz --output E300-phase_common-map.bcf --thread 8 Here is what the output looks like: `[SHAPEIT5] phase_common (jointly phase multiple common markers)

Files:

Parameters:

Reading genotype data:

Setting up genetic map:

Unfortunately, because I am running this using data from the All of Us platform I am unable to share the files.

dtaliun commented 3 months ago

Hi @GenevieveKrause ,

GMAP parsing [n=0] (0.11s) indicates that it read 0 lines from your chr20.b38.gmap.gz file. Could it be that the file is empty, or something went wrong when mounting data to the image?

If there were 0 positions read from the genetic map file, then this line inside variant_map::interpolateCentiMorgan will result in segmentation fault because it assumes that the vector holding genetic map coordinates is never empty and accesses the first element using [] operator.

GenevieveKrause commented 3 months ago

Hello,

You were correct. The file got corrupted somewhere in the process. I got a clean copy of the file and it worked fine. Thank you.