ValueError: Found array with 0 sample(s) (shape=(0, 5000)) while a minimum of 1 is required by MinMaxScaler
renruichen opened this issue · comments
Hello, I'm glad to learn this excellent paper. There is a problem with the running of this paper, which takes up your time. I hope to get your reply.
After pip install scTAPE1.1.1, I continued to attempt to calculate the error of cell-type-specific gene expression profile (GEP) using a single sample. The error message was as follows:
Sigm, Pred = Deconvolution(simulated_data, '/picb/neurosys/chenrenrui/TAPE/GSE190939/GSE190939_AL_6mo_00.txt',sep='\t',
datatype='counts', genelenfile='./GeneLength_mouse.txt',
mode='overall', adaptive=True,
save_model_name = None)
Reading training data
Reading is done
Reading test data
Reading test data is done
Using counts data to train model
Cutting variance...
Finding intersected genes...
Intersected gene number is 0
Scaling...
Using minmax scaler...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/scTAPE-1.1.1-py3.8.egg/TAPE/deconvolution.py", line 71, in Deconvolution
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/scTAPE-1.1.1-py3.8.egg/TAPE/utils.py", line 128, in ProcessInputData
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/utils/_set_output.py", line 140, in wrapped
data_to_wrap = f(self, X, *args, **kwargs)
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/base.py", line 878, in fit_transform
return self.fit(X, **fit_params).transform(X)
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/preprocessing/_data.py", line 427, in fit
return self.partial_fit(X, y)
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/preprocessing/_data.py", line 466, in partial_fit
X = self._validate_data(
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/base.py", line 565, in _validate_data
X = check_array(X, input_name="X", **check_params)
File "/home/chenrenrui/miniconda3/envs/scTAPE_CUDA11.1/lib/python3.8/site-packages/sklearn/utils/validation.py", line 931, in check_array
raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 5000)) while a minimum of 1 is required by MinMaxScaler.`
Are you sure that the data contain samples? I test it on the example data and it works. Please make sure the format is consistent with example data.
Are you sure that the data contain samples? I test it on the example data and it works. Please make sure the format is consistent with example data.
Hello! Thanks for your prompt reply. I checked the data and software again, and tried both GPU and CPU versions of the software, and found my problems as follows:
- Using sample data, it can run normally.
- I wanted to try a single sample calculation, so I changed the 'kidney_test.txt' in the sample data to keep only one line so that the program would report an error.
- So if I only have a sample of RNA-seq, how should I proceed with the calculation?
I am looking forward to your reply, which will be greatly appreciated.