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

Demo doesn't work #162

Open
NeginValizadegan opened this issue May 31, 2024 · 1 comment
Open

Demo doesn't work #162

NeginValizadegan opened this issue May 31, 2024 · 1 comment

Comments

@NeginValizadegan
Copy link

NeginValizadegan commented May 31, 2024

In installed the tool via command line (conda) using the instructions on Github. Then trying to replicate the demo code, I get the following error about a deprecated attribute for module 'numpy':

sourcetracker2 gibbs -i otu_table.biom -m map.txt -o example1/

Traceback (most recent call last):
  File "/Users/valizad2/miniconda/envs/st2/bin/sourcetracker2", line 8, in <module>
    sys.exit(cli())
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/sourcetracker/_cli/gibbs.py", line 214, in gibbs
    f(sample)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/sourcetracker/_sourcetracker.py", line 822, in _cli_sink_source_prediction_runner
    results = gibbs_sampler(cp, sink_data, restarts, draws_per_restart, burnin,
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/sourcetracker/_sourcetracker.py", line 530, in gibbs_sampler
    order = np.arange(sink_sum, dtype=np.int)
  File "/Users/valizad2/miniconda/envs/st2/lib/python3.8/site-packages/numpy/__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'int'.
`np.int` was a deprecated alias for the builtin `int`. To avoid this error in existing code, use `int` by itself. Doing this will not modify any behavior and is safe. When replacing `np.int`, you may wish to use e.g. `np.int64` or `np.int32` to specify the precision. If you wish to review your current use, check the release note link for additional information.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
@gene-knight9
Copy link

You can re-download the Sourcetracker2 package on GitHub to fix the problem.【pip install https://github.com/biota/sourcetracker2/archive/master.zip】

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