pycytominer icon indicating copy to clipboard operation
pycytominer copied to clipboard

`count_cells` function unable to work with SQLite file without TableNumber

Open jenna-tomkinson opened this issue 1 year ago • 1 comments

When trying to use the count_cells function within the cells.py file, I am coming across this error:

OperationalError: (sqlite3.OperationalError) no such table: cells
[SQL: select TableNumber, ImageNumber, ObjectNumber from cells]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

I noticed that within this function, the query_cols are hard-coded to be query_cols = "TableNumber, ImageNumber, ObjectNumber". Since my SQLite file output from CellProfiler doesn't contain TableNumber (as I don't use groups in my pipeline), I cannot use this function.

I am not sure if it would be best to make the query_cols parameters. What would be the best way to make this function more flexible?

jenna-tomkinson avatar Mar 01 '23 20:03 jenna-tomkinson