Reading and writing data: io

Reading and writing data: io#

scmorph can read data from a variety of sources, including data exported by CellProfiler. Once loaded in, all data is treated as an AnnData object. This has the advantage of being a fast, standard format that can be used with many existing single-cell tools, such as scanpy.

Note

If you would like to learn more about the h5ad file format, please see anndata, which is used to read and write these files.

Note

scmorph only processes continuous, non-radial features, i.e. features like number of nearest neighbors (discrete), X/Y coordinates (discrete and unfinformative) and BoundingBox (rotation-sensitive) are discarded. You may see a warning message about this: consider this an information rather than as an error.

read(filename, **kwargs)

Read csv, h5ad or sql files.

read_cellprofiler_csv(filename[, n_headers, ...])

Read a matrix from a .csv file created with CellProfiler

read_cellprofiler_batches(path, output_file)

Read CellProfiler data from directories

read_sql(filename[, backup_url])

Read sql files.

make_AnnData(df[, meta_cols, feature_delim])

Make annotated data matrix from DataFrame

split_feature_names(features[, feature_delim])

Split feature names into a DataFrame