scmorph.io.read_cellprofiler_csv#
- scmorph.io.read_cellprofiler_csv(filename, n_headers=1, meta_cols=None, feature_delim='_', sep=',', backup_url=None)[source]#
Read a matrix from a .csv file created with CellProfiler
Note
Depending on the CellProfiler version, you may have one or two header rows. Before using this function, do check the csv file to see if feature names are contained only in the first row or split over two and set
n_headersaccordingly.- Parameters:
- filename
str Path to .csv file
- n_headers
int(default:1) Number of header rows.
- meta_cols list
Names of metadata columns.
Nonefor automatic detection.- feature_delim
str(default:'_') Feature deliminator.
- backup_url
str|None(default:None) Retrieve the file from an URL if not present on disk.
- sep
str(default:',') Column deliminator.
- filename
- Return type:
- Returns:
The read in AnnData object
Note
Depending on the size of the input matrix, this function can take a lot of memory. If needed, try exporting CellProfiler in batches of smaller csv files and read them in using
io.read_cellprofiler_batches().