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

RuntimeError: exception: vector::_M_range_check: __n Error #95

Closed
dxy257 opened this issue May 31, 2024 · 2 comments
Closed

RuntimeError: exception: vector::_M_range_check: __n Error #95

dxy257 opened this issue May 31, 2024 · 2 comments

Comments

@dxy257
Copy link

dxy257 commented May 31, 2024

RuntimeError: exception: vector::_M_range_check: __n (which is 18446744072511363440) >= this->size() (which is 779354)

@dxy257 dxy257 closed this as completed Jun 24, 2024
@dxy257
Copy link
Author

dxy257 commented Jun 24, 2024 via email

@XuanxiaoLi
Copy link

Hi dxy257,

I am encountering a similar problem with my use of fit1 in mixer.py:

  • Software Version: 1.2.0
  • Call Command:
    ./mixer.py fit1 \
        --out /hdd/yinquanting/T2d_heart/hypertension.fit.rep1 \
        --lib /hdd/yinquanting/mixer/src/build/lib/libbgmg.so \
        --bim-file /hdd/yinquanting/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.bim \
        --ld-file /hdd/yinquanting/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.1.run4.ld \
        --trait1-file /hdd/yinquanting/T2d_heart/hypertension.txt.gz \
        --extract /hdd/yinquanting/mixer/1000G_EUR_Phase3_plink/1000G.EUR.QC.prune_maf0p05_rand2M_r2p8.rep1.snps
  • Error Message:
    INFO:root:__init__(lib_name=/hdd/yinquanting/mixer/src/build/lib/libbgmg.so, context_id=0)
    Traceback (most recent call last):
      File "/hdd/yinquanting/mixer/precimed/mixer.py", line 23, in <module>
        args.func(args)
      File "/hdd/yinquanting/mixer/precimed/mixer/cli.py", line 646, in execute_fit1_or_test1_parser
        libbgmg = initialize_mixer_plugin(args)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/hdd/yinquanting/mixer/precimed/mixer/cli.py", line 562, in initialize_mixer_plugin
        libbgmg.set_ld_r2_coo_from_file(chr_label, args.ld_file.replace('@', str(chr_label)))
      File "/hdd/yinquanting/mixer/precimed/mixer/libbgmg.py", line 126, in set_ld_r2_coo_from_file
        return self._check_error(self.cdll.bgmg_set_ld_r2_coo_from_file(self._context_id, chr_label, _p2n(filename)))
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/hdd/yinquanting/mixer/precimed/mixer/libbgmg.py", line 418, in _check_error
        raise RuntimeError(self.get_last_error())
    RuntimeError: exception:  vector::_M_range_check: __n (which is 540606976) >= this->size() (which is 779354)
    

I have followed the suggestion in issue #82 and removed NA and 0 SNPs from my GWAS data, but I am still encountering this error. Could you please help me troubleshoot this issue? Is there any additional step or check I should perform to resolve this?

Thank you!

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