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

Fix/ipf np int #115

Merged
merged 2 commits into from
Feb 22, 2023
Merged

Fix/ipf np int #115

merged 2 commits into from
Feb 22, 2023

Conversation

singjc
Copy link
Contributor

@singjc singjc commented Feb 22, 2023

Info: Conducting peptidoform-level inference.
Traceback (most recent call last):
  File "/home/roestlab/anaconda3/envs/py39_JS/bin/pyprophet", line 33, in <module>
    sys.exit(load_entry_point('pyprophet', 'console_scripts', 'pyprophet')())
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/media/roestlab/Data1/User/JustinS/Development/for_pr/pyprophet/pyprophet/main.py", line 142, in ipf
    infer_peptidoforms(infile, outfile, ipf_ms1_scoring, ipf_ms2_scoring, ipf_h0, ipf_grouped_fdr, ipf_max_precursor_pep, ipf_max_peakgroup_pep, ipf_max_precursor_peakgroup_pep, ipf_max_transition_pep)
  File "/media/roestlab/Data1/User/JustinS/Development/for_pr/pyprophet/pyprophet/ipf.py", line 371, in infer_peptidoforms
    peptidoform_data = peptidoform_inference(peptidoform_table, precursor_data, ipf_grouped_fdr)
  File "/media/roestlab/Data1/User/JustinS/Development/for_pr/pyprophet/pyprophet/ipf.py", line 352, in peptidoform_inference
    pf_pp_data['qvalue'] = pd.merge(pf_pp_data, transition_data_bm[['feature_id', 'num_peptidoforms']].drop_duplicates(), on=['feature_id'], how='inner').groupby('num_peptidoforms')['pep'].transform(compute_model_fdr)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 428, in transform
    return self._transform(
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/pandas/core/groupby/groupby.py", line 1642, in _transform
    return self._transform_general(func, *args, **kwargs)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/site-packages/pandas/core/groupby/generic.py", line 459, in _transform_general
    res = func(group, *args, **kwargs)
  File "/media/roestlab/Data1/User/JustinS/Development/for_pr/pyprophet/pyprophet/ipf.py", line 18, in compute_model_fdr
    ranks = np.zeros(data.shape[0], dtype=np.int)
  File "/home/roestlab/anaconda3/envs/py39_JS/lib/python3.9/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

@grosenberger grosenberger merged commit 6ea82ca into PyProphet:master Feb 22, 2023
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

Successfully merging this pull request may close these issues.

2 participants