odelaneau / shapeit5

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

Segmentation fault #53

Closed klmartinez closed 1 year ago

klmartinez commented 1 year ago

Hello,

I am using the static binaries to run phase_common on a ~1 million bp locus on chromosome 9. I am using a cloud environment with 16 CPUs and 104 GB RAM.

When I run phase_common (./phase_common_static --input mt_chr9_serology_subset_locus_srwgs_v7.bcf --filter-maf 0.001 --region chr9 --map chr9.b38.gmap.gz --output tmp/target.scaffold.bcf --thread 16), I get the following output and error:

[SHAPEIT5] phase_common (jointly phase multiple common markers)
  * Author        : Olivier DELANEAU, University of Lausanne
  * Contact       : olivier.delaneau@gmail.com
  * Version       : 5.1.1 / commit = 990ed0d / release = 2023-05-08
  * Run date      : 02/08/2023 - 20:06:51

Files:
  * Input         : [mt_chr9_serology_subset_locus_srwgs_v7.bcf]
  * Genetic Map   : [chr9.b38.gmap.gz]
  * Output        : [tmp/target.scaffold.bcf]
  * Output format : [bcf]

Parameters:
  * Seed    : 15052011
  * Threads : 16 threads
  * MCMC    : 15 iterations [5b + 1p + 1b + 1p + 1b + 1p + 5m]
  * PBWT    : [window = 4cM / depth = auto / modulo = auto / mac = 5 / missing = 0.1]
  * HMM     : [window = 4cM / Ne = 15000 / Recombination rates given by genetic map]
  * FILTERS : [snp only = 0 / MAF = 0.001]

Reading genotype data:
  * VCF/BCF scanning done (3.00s)
      + Variants [#sites=17931 / region=chr9]
         - 25623 sites removed in main panel [below MAF threshold]
      + Samples [#target=18929 / #reference=0]
  * VCF/BCF parsing done (13.97s)
      + Genotypes [0/0=63.313%, 0/1=7.923%, 1/1=3.768%, ./.=24.996%, 0|1=0.000%]

Setting up genetic map:
  * GMAP parsing [n=0] (0.00s)
bash: line 1:  2076 Segmentation fault      (core dumped) ./phase_common_static --input mt_chr9_serology_subset_locus_srwgs_v7.bcf --filter-maf 0.001 --region chr9 --map chr9.b38.gmap.gz --output tmp/target.scaffold.bcf --thread 16
---------------------------------------------------------------------------
CalledProcessError                        Traceback (most recent call last)
/tmp/ipykernel_329/2112237477.py in <module>
----> 1 get_ipython().run_cell_magic('bash', '', './phase_common_static --input mt_chr9_serology_subset_locus_srwgs_v7.bcf --filter-maf 0.001 --region chr9 --map chr9.b38.gmap.gz --output tmp/target.scaffold.bcf --thread 16\n')

/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
   2460             with self.builtin_trap:
   2461                 args = (magic_arg_s, cell)
-> 2462                 result = fn(*args, **kwargs)
   2463             return result
   2464 

/opt/conda/lib/python3.7/site-packages/IPython/core/magics/script.py in named_script_magic(line, cell)
    140             else:
    141                 line = script
--> 142             return self.shebang(line, cell)
    143 
    144         # write a basic docstring:

<decorator-gen-103> in shebang(self, line, cell)

/opt/conda/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
    185     # but it's overkill for just that one bit of state.
    186     def magic_deco(arg):
--> 187         call = lambda f, *a, **k: f(*a, **k)
    188 
    189         if callable(arg):

/opt/conda/lib/python3.7/site-packages/IPython/core/magics/script.py in shebang(self, line, cell)
    243             sys.stderr.flush()
    244         if args.raise_error and p.returncode!=0:
--> 245             raise CalledProcessError(p.returncode, cell, output=out, stderr=err)
    246 
    247     def _run_script(self, p, cell, to_close):

CalledProcessError: Command 'b'./phase_common_static --input mt_chr9_serology_subset_locus_srwgs_v7.bcf --filter-maf 0.001 --region chr9 --map chr9.b38.gmap.gz --output tmp/target.scaffold.bcf --thread 16\n'' returned non-zero exit status 139.

Any suggestions on how to resolve this issue would be greatly appreciated.

srubinacci commented 1 year ago

Hi,

It's likely a problem in your map? The line: * GMAP parsing [n=0] (0.00s) Indicates that there are zero records found int the map file. This should not be the case. Can you check if the path is correctly specified?

Hope this helps.

Simone

klmartinez commented 1 year ago

Hi Simone,

Thank you for your reply. I was making a very silly mistake and instead of actually pulling the map file you offer under resources, I was pulling the path to the HTML site that hosts the raw data. This issue has now been resolved.

Many thanks, Kiana