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

Deprecated numpy.int call in preprocess/CreateTensorPileupFromCffi.py #165

Closed
AJTDaedalus opened this issue Jan 27, 2023 · 3 comments
Closed
Labels
enhancement New feature or request

Comments

@AJTDaedalus
Copy link
Contributor

preprocess/CreateTensorPileupFroCffi.py contains a call to numpy.int as np.int. This results in an empty vcf file but doesn't throw an error. Numpy.int has been deprecated since version 1.20.0 and creates an error using the dockerfile provided by the repo. Numpy recommends replacing numpy.int with int. I can fork a branch and make this change for a PR if needed.

Traceback from run_clair3.log below.

[INFO] 1/7 Call variants using pileup model
Calling variants ...
Traceback (most recent call last):
File "/opt/bin/scripts/../clair3.py", line 105, in
main()
File "/opt/bin/scripts/../clair3.py", line 99, in main
submodule.main()
File "/opt/bin/clair3/CallVariantsFromCffi.py", line 347, in main
Run(args)
File "/opt/bin/clair3/CallVariantsFromCffi.py", line 61, in Run
call_variants_from_cffi(args=args, output_config=output_config, output_utilities=output_utilities)
File "/opt/bin/clair3/CallVariantsFromCffi.py", line 117, in call_variants_from_cffi
tensor, all_position, all_alt_info = CT(args)
File "/opt/bin/preprocess/CreateTensorPileupFromCffi.py", line 329, in CreateTensorPileup
chunk_result, all_alt_info_list, gvcf_output = pileup_counts_clair3(region,
File "/opt/bin/preprocess/CreateTensorPileupFromCffi.py", line 84, in pileup_counts_clair3
chunk_results, all_alt_info_list, gvcf_output = __enforce_pileup_chunk_contiguity(results)
File "/opt/bin/preprocess/CreateTensorPileupFromCffi.py", line 194, in __enforce_pileup_chunk_contiguity
for counts, positions, alt_info_list, gvcf_output in pileups:
File "/opt/conda/envs/clair3/lib/python3.9/concurrent/futures/_base.py", line 600, in result_iterator
yield fs.pop().result()
File "/opt/conda/envs/clair3/lib/python3.9/concurrent/futures/_base.py", line 440, in result
return self.__get_result()
File "/opt/conda/envs/clair3/lib/python3.9/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
File "/opt/conda/envs/clair3/lib/python3.9/concurrent/futures/thread.py", line 52, in run
result = self.fn(*self.args, **self.kwargs)
File "/opt/bin/preprocess/CreateTensorPileupFromCffi.py", line 63, in _process_region
np_counts, positions, alt_info_string_list, gvcf_output = _plp_data_to_numpy(
File "/opt/bin/preprocess/CreateTensorPileupFromCffi.py", line 141, in _plp_data_to_numpy
size_sizet = np.dtype(np.int).itemsize
File "/opt/conda/envs/clair3/lib/python3.9/site-packages/numpy/init.py", line 284, in getattr
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'

@zhengzhenxian
Copy link
Collaborator

Hi,

Thanks for reporting the issue. Much appreciated if you can make a PR, we will check and test the modification before merging, Thanks!

@AJTDaedalus
Copy link
Contributor Author

Opened #166 to resolve this issue.

@aquaskyline aquaskyline added the enhancement New feature or request label Feb 10, 2023
@aquaskyline
Copy link
Member

Merged into v1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants