Skip to content

Getting ValueError: Found array with 0 sample(s) #8

@mddoctorcode

Description

@mddoctorcode

Enjoying trying out your library for my own research, but currently facing a value error issue on my gene expression matrix.
My matrix is in a tsv file (532 rows and 25_000 columns) and formatted according to the input specification in your instructions, here is a small subset with dummy-values:

,A1BG,A1BG-AS1,
patient_1,4.79958059136717,8.50538531670602,
patient_2,4.79958059136717,6.48580010706974,

When running the following code:

from puree import *

p = PUREE()
purities_and_logs = p.get_output(test_data_path="my_gene_file.tsv", gene_id_nomenclature='HGNC')

I get the Value Error shown below:

****Error****
Traceback (most recent call last):
  File "predict_purity.py", line 99, in <module>
    main()
  File "predict_purity.py", line 81, in main
    imputed_values = values_imputer.transform(predictor.data)
  File "/usr/local/lib/python3.8/site-packages/sklearn/impute/_base.py", line 470, in transform
    X = self._validate_input(X, in_fit=False)
  File "/usr/local/lib/python3.8/site-packages/sklearn/impute/_base.py", line 287, in _validate_input
    raise ve
  File "/usr/local/lib/python3.8/site-packages/sklearn/impute/_base.py", line 270, in _validate_input
    X = self._validate_data(
  File "/usr/local/lib/python3.8/site-packages/sklearn/base.py", line 557, in _validate_data
    X = check_array(X, **check_params)
  File "/usr/local/lib/python3.8/site-packages/sklearn/utils/validation.py", line 797, in check_array
    raise ValueError(
ValueError: Found array with 0 sample(s) (shape=(0, 158)) while a minimum of 1 is required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions