odelaneau / shapeit5

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

Error when trying to export graph #36

Closed JosephLalli closed 1 year ago

JosephLalli commented 1 year ago

I'm trying to get shapeit5 to export graphs for subsequent determination of recombination sites in trios using duohmm. However, I get the following 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      : 04/06/2023 - 16:32:08

Files:
  * Input         : [input.bcf.gz]
  * Genetic Map   : [PAR2.gmap.gz]
  * Output        : [output.graph]
  * Output format : [graph]

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

Reading genotype data:
  * VCF/BCF scanning done (0.02s)
      + Variants [#sites=3018 / region=chrX:153925834-154259566]
         - 5290 sites removed in main panel [below MAF threshold]
      + Samples [#target=3202 / #reference=0]
  * VCF/BCF parsing done (0.09s)
      + Genotypes [0/0=86.805%, 0/1=8.267%, 1/1=4.854%, ./.=0.075%, 0|1=0.000%]

Setting up genetic map:
  * GMAP parsing [n=179] (0.02s)
  * cM interpolation [s=178 / i=2840] (0.00s)
  * Region length [319083 bp / 0.4 cM]
  * HMM parameters [Ne=15000 / Error=0.0001 / #rare=0]

....

Finalization:
  * HAP solving (0.04s)
  * HAP update (0.02s)
  * H2V transpose (0.01s)
terminate called after throwing an instance of 'boost::wrapexcept<boost::bad_any_cast>'
  what():  boost::bad_any_cast: failed conversion using boost::any_cast
Aborted (core dumped)

I am using the PAR2 region as a short test region, but the error applies to any chromosomal region I test. Can this bug be fixed?

odelaneau commented 1 year ago

Sorry about this. Please keep using S4 for this as I have not yet ported/tested this code into S5.