rajanil / fastStructure

A variational framework for inferring population structure from SNP genotype data.
MIT License
134 stars 50 forks source link

Missing module #5

Closed andremrsantos closed 10 years ago

andremrsantos commented 10 years ago

When I try to run the program, it always return the following error:

Traceback (most recent call last):
  File "structure.py", line 3, in <module>
    import fastStructure
  File "admixprop.pxd", line 5, in init fastStructure (fastStructure.c:8424)
ImportError: No module named admixprop
aabiddanda commented 10 years ago

I am getting this as well when I try to run the testing dataset. Have you found a solution to this problem?

mkanai commented 10 years ago

You should build library extensions first.

cd ~/proj/fastStructure/vars
python setup.py build_ext --inplace
andremrsantos commented 10 years ago

It works fine now. Thank you

LS246908 commented 2 years ago

You should build library extensions first.

cd ~/proj/fastStructure/vars
python setup.py build_ext --inplace

I'm actually having an issue with this part- when I try to build the extensions, I get a Cyton compiler error:

`Error compiling Cython file:

...

use an iterative fixed-point solver to update parameter estimates.

    var_beta, var_gamma = self._unconstrained_solver(Dvarbeta, Dvargamma)

    # if a variable violates positivity constraint,
    # set it to an estimate from the previous update
    bad_beta = reduce(utils.OR,[(var_beta<=0),np.isnan(var_beta)])
              ^

allelefreq.pyx:148:19: undeclared name not builtin: reduce Traceback (most recent call last): File "/Users/lindseyschwartz/Documents/ULL/fromLouis/fastStructure/vars/setup.py", line 25, in ext_modules = cythonize(ext_modules) File "/Users/lindseyschwartz/miniconda3/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1127, in cythonize cythonize_one(*args) File "/Users/lindseyschwartz/miniconda3/lib/python3.9/site-packages/Cython/Build/Dependencies.py", line 1250, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: allelefreq.pyx `

Any ideas? Thanks!!