In [1]:
import scanpy.api as sc
sc.settings.set_figure_params(dpi=70) # dots (pixels) per inch determine size of inline figures
We illustrate the concept using the subsampled data, simply replace the filename... An indepth analysis with 1.3M cells will follow in the first half of 2018.
In [2]:
filename = './write/subsampled.h5ad'
Opening an '.h5ad' file in "backed" mode does not load the data into memory.
In [3]:
adata = sc.read(filename, backed='r') # open file in backed mode for reading ('r')
sc.pl.tsne(adata, color='louvain_groups')
In [5]:
sc.logging.print_memory_usage()
Loading the data in "memory" mode needs 100 MB for the subsampled data.
In [6]:
adata = sc.read(filename, backed=False) # backed=False is the default of sc.read(...)
In [7]:
sc.logging.print_memory_usage()