Numpy versioning issues
Closed this issue · 1 comments
Glfrey commented
Hi @arunhpatil,
While working on our other issue, I triggered an error in miRge3.0:
gillianreynolds@Gillians-MacBook-Pro split_lib % miRge3.0 -s /Users/gillianreynolds/Documents/split_lib/B.fastq -db miRBase -lib /Users/gillianreynolds/prog/miRge3_Lib/ -on human
bowtie version: 1.3.0
cutadapt version: 4.4
Samtools version: 1.17
Collecting and validating input files...
miRge3.0 will process 1 out of 1 input file(s).
Cutadapt finished for file B in 69.2629 second(s)
Collapsing finished for file B in 3.0039 second(s)
Matrix creation finished in 3.8595 second(s)
Data pre-processing completed in 79.0497 second(s)
Alignment in progress ...
Alignment completed in 139.2648 second(s)
Summarizing and tabulating results...
Traceback (most recent call last):
File "/Users/gillianreynolds/Library/Python/3.7/bin/miRge3.0", line 8, in <module>
sys.exit(main())
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/mirge/__main__.py", line 166, in main
summarize(args, workDir, ref_db, base_names, pdMapped, sampleReadCounts, trimmedReadCounts, trimmedReadCountsUnique)
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/mirge/libs/summary.py", line 744, in summarize
subpdMapped['miRNA_cbind'] = subpdMapped[['exact miRNA', 'isomiR miRNA']].apply(lambda x: ''.join(x), axis = 1)
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/frame.py", line 6878, in apply
return op.get_result()
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/apply.py", line 180, in get_result
return self.apply_empty_result()
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/apply.py", line 220, in apply_empty_result
return self.obj._constructor_sliced(r, index=self.agg_axis)
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/series.py", line 305, in __init__
data = sanitize_array(data, index, dtype, copy, raise_cast_failure=True)
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/construction.py", line 465, in sanitize_array
subarr = construct_1d_arraylike_from_scalar(value, len(index), dtype)
File "/Users/gillianreynolds/Library/Python/3.7/lib/python/site-packages/pandas/core/dtypes/cast.py", line 1452, in construct_1d_arraylike_from_scalar
subarr = np.empty(length, dtype=dtype)
TypeError: Cannot interpret '<attribute 'dtype' of 'numpy.generic' objects>' as a data type
It was caused by the use of a higher version of numpy, which I downgraded to fix the problem:
gillianreynolds@Gillians-MacBook-Pro split_lib % python -m pip install numpy==1.19.5
Collecting numpy==1.19.5
Downloading numpy-1.19.5-cp37-cp37m-macosx_10_9_x86_64.whl (15.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.6/15.6 MB 9.2 MB/s eta 0:00:00
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.21.6
Uninstalling numpy-1.21.6:
Successfully uninstalled numpy-1.21.6
I've been having issues installing older versions of packages recently, so there's a chance the higher version of numpy was installed unwillingly. Either way, just thought I'd make a note of it in case any future users come across this error.
arunhpatil commented
Hi @Glfrey,
Thanks you. The latest release of miRge3.0 can handle the higher versions of numpy. (Bioconda didn't allow the update until I fixed this dependency issue with numpy).
Thank you,
Arun