Dear,
Thanks for this fantastic package. I saved one of my analysis to get .csv files output using the cmd adata.write_csv('./ouput'). I modified some of these files (the obs.csv and obsm) for pecific purposes related to a collaborative project while respecting the dimensions and the order of the cells. How can I reload back these files into an anndata object?
adata = sc.read_csv('./ouput/*') ??
The documentation for AnnData.write_csvs tells you
It is not possible to recover the full AnnData from the output of this function. Use write() for this.
Sorry for that! We thought that not having a function to read back those CSVs, we won鈥檛 lull people into the false security that the AnnData object can be safely restored from CSVs.
But if you have nothing else but those files, you can of course try to use pandas.read_csv to read the .obs and .var dataframes and do something like
adata = AnnData(
pd.read_csv('output/X.csv').asarray(),
pd.read_csv('output/obs.csv'),
pd.read_csv('output/var.csv'),
{ # adata.uns
'some_thing': pd.read_csv('output/some_thing.csv'),
},
pd.read_csv('output/obsm.csv'),
pd.read_csv('output/varm.csv'),
)
You might have to fiddle with parameters to pandas.read_csv, like index_col, and obsm/varm might not be able to be specified as data frames.
From a gene matrix, tsne and cluster .csv files obtained from cell ranger output I was able to load these into scanpy and display a tsne plot that look exactly like the output of cellranger cloupe file. This is great thanks!

Most helpful comment
From a gene matrix, tsne and cluster .csv files obtained from cell ranger output I was able to load these into scanpy and display a tsne plot that look exactly like the output of cellranger cloupe file. This is great thanks!