Hi Scott,
Chunks 1-3 ran fine, but I got an error on chunk 4. I pasted the text of the validation log below if you can’t see it, run ID is 1771449255044-12064d00-2ec9-4c2d-a3f7-0ceb6ad26034. It looks like there’s an NA somewhere (or several of them) that is causing the problem, but I checked the cell names and the count matrix in R and couldn’t find any NA’s. Could NA’s be introduced in the conversion to an .h5ad file or conversion between gene symbols and ENSEMBL IDs?
Log text:
5.10693e-04 seconds == WARNING: Input data is in CSV format; converting to h5ad file at MSA.ctrl.PD.snRNAseq.countmatrix.slice4.csv-2026-02-18-21-19-51.h5ad
7.94722e+01 seconds == an ERROR occurred ====
Traceback (most recent call last):
File cell_type_mapper/validation/csv_utils.py, line 99, in convert_csv_to_h5ad
adata = anndata.io.read_csv(
File anndata/_io/read.py, line 49, in read_csv
return read_text(filename, delimiter, first_column_names, dtype)
File anndata/_io/read.py, line 351, in read_text
return _read_text(f, delimiter, first_column_names, dtype)
File anndata/_io/read.py, line 440, in _read_text
data.append(np.array(line_list[1:], dtype=dtype))
ValueError: could not convert string to float: ‘NA’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File cell_type_mapper/cli/validate_h5ad.py, line 242, in run
result_path, has_warnings = validate_h5ad(
File cell_type_mapper/validation/validate_h5ad.py, line 97, in validate_h5ad
result = _validate_h5ad(
File cell_type_mapper/validation/validate_h5ad.py, line 136, in _validate_h5ad
write_to_new_path) = convert_csv_to_h5ad(
File cell_type_mapper/validation/csv_utils.py, line 110, in convert_csv_to_h5ad
raise RuntimeError(full_msg)
RuntimeError: =======An error occurred when reading your CSV with anndata:
Traceback (most recent call last):
File cell_type_mapper/validation/csv_utils.py, line 99, in convert_csv_to_h5ad
adata = anndata.io.read_csv(
File anndata/_io/read.py, line 49, in read_csv
return read_text(filename, delimiter, first_column_names, dtype)
File anndata/_io/read.py, line 351, in read_text
return _read_text(f, delimiter, first_column_names, dtype)
File anndata/_io/read.py, line 440, in _read_text
data.append(np.array(line_list[1:], dtype=dtype))
ValueError: could not convert string to float: ‘NA’
Please confirm that your CSV is a table in which each row is a cell and each column is a gene.
7.94722e+01 seconds == CLEANING UP
7.95488e+01 seconds == Mapping algorithm failed because of application errors.
7.95488e+01 seconds == Validation error: e=RuntimeError(‘=======An error occurred when reading your CSV with anndata:\nTraceback (most recent call last):\n File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/csv_utils.py”, line 99, in convert_csv_to_h5ad\n adata = anndata.io.read_csv(\n File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 49, in read_csv\n return read_text(filename, delimiter, first_column_names, dtype)\n File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 351, in read_text\n return _read_text(f, delimiter, first_column_names, dtype)\n File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 440, in _read_text\n data.append(np.array(line_list[1:], dtype=dtype))\nValueError: could not convert string to float: ‘NA’\n\nPlease confirm that your CSV is a table in which each row is a cell and each column is a gene.’), type(e)=<class ‘RuntimeError’>, fname=‘run.py’, lineno=153
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/csv_utils.py”, line 99, in convert_csv_to_h5ad
adata = anndata.io.read_csv(
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 49, in read_csv
return read_text(filename, delimiter, first_column_names, dtype)
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 351, in read_text
return _read_text(f, delimiter, first_column_names, dtype)
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 440, in _read_text
data.append(np.array(line_list[1:], dtype=dtype))
ValueError: could not convert string to float: ‘NA’
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/apps/run.py”, line 153, in run
runner.run()
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/cli/validate_h5ad.py”, line 242, in run
result_path, has_warnings = validate_h5ad(
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/validate_h5ad.py”, line 97, in validate_h5ad
result = _validate_h5ad(
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/validate_h5ad.py”, line 136, in _validate_h5ad
write_to_new_path) = convert_csv_to_h5ad(
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/csv_utils.py”, line 110, in convert_csv_to_h5ad
raise RuntimeError(full_msg)
RuntimeError: =======An error occurred when reading your CSV with anndata:
Traceback (most recent call last):
File “/usr/local/lib/python3.10/site-packages/cell_type_mapper/validation/csv_utils.py”, line 99, in convert_csv_to_h5ad
adata = anndata.io.read_csv(
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 49, in read_csv
return read_text(filename, delimiter, first_column_names, dtype)
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 351, in read_text
return _read_text(f, delimiter, first_column_names, dtype)
File “/usr/local/lib/python3.10/site-packages/anndata/_io/read.py”, line 440, in _read_text
data.append(np.array(line_list[1:], dtype=dtype))
ValueError: could not convert string to float: ‘NA’
Please confirm that your CSV is a table in which each row is a cell and each column is a gene.