Cloufield / gwaslab

A Python package for handling and visualizing GWAS summary statistics. https://cloufield.github.io/gwaslab/
GNU General Public License v3.0
118 stars 22 forks source link

seed error #65

Open swvanderlaan opened 8 months ago

swvanderlaan commented 8 months ago

I am using the command below.

gwas_data_sumstats_sample = gwas_data_sumstats.random_variants(n=200000)

It throws this error:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
[project/notebook.ipynb Cell 76 line 1
----> [1](vscode-notebook-cell:project/notebook.ipynb#Y135sZmlsZQ%3D%3D?line=0) gwas_data_sumstats_sample = gwas_data_sumstats.random_variants(n=200000)
...
File _mt19937.pyx:166, in numpy.random._mt19937.MT19937._legacy_seeding()

File _mt19937.pyx:180, in numpy.random._mt19937.MT19937._legacy_seeding()

ValueError: Seed must be between 0 and 2**32 - 1

How can I fix this?

Cloufield commented 8 months ago

Sorry for the error. Please manually set a seed like gwas_data_sumstats.random_variants(n=200000, random_state=123). I think the default random seed sometimes exceeds 2**32 - 1. Will be fixed in next version.