Tutorial 7: Download ST data from SODB and SpatialDB

We Download ST data from SODB and SpatialDB by STABox. The downloaded data will be saved in ‘/STABox/src/stabox/dataset/’. For more information about SpatialDB and the SODB database, see: https://www.spatialomics.org/SpatialDB/ and https://gene.ai.tencent.com/SpatialOmics/

Down ST data from SODB database

[1]:
from stabox.dataset.SODB import SODB
from stabox.dataset.SpatiaIDB import SpatialDB
D:\Users\lqlu\work\software\Anaconda\envs\new_STABox_env\lib\site-packages\tqdm\auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
[2]:
sodb = SODB()
[ ]:
sodb.list_dataset()
[ ]:
sodb.list_dataset_by_category('Spatial Transcriptomics')
[13]:
sodb.list_experiment_by_dataset('Sanchez2021A')
[13]:
['GSM4861204_Visium-C1_10xvisium',
 'GSM4861203_Visium-B1_10xvisium',
 'GSM4861205_Visium-D1_10xvisium',
 'GSM4861202_Visium-A1_10xvisium']
[14]:
# load_experiment(experiment_type, data_type)
sodb.load_experiment('Sanchez2021A','GSM4861204_Visium-C1_10xvisium')
download experiment[GSM4861204_Visium-C1_10xvisium] in dataset[Sanchez2021A]
dst_dir is D:\Users\lqlu\work\Codes\work\STABox\src\stabox\dataset\cache\Sanchez2021A
100%|███████████████████████████████████████████████████████████████████████████████| 123M/123M [00:10<00:00, 12.6MB/s]
f.name is D:\Users\lqlu\work\Codes\work\STABox\src\stabox\dataset\cache\Sanchez2021A\tmptexady42
dst is D:\Users\lqlu\work\Codes\work\STABox\src\stabox\dataset\cache\Sanchez2021A\GSM4861204_Visium-C1_10xvisium.h5ad
load experiment[GSM4861204_Visium-C1_10xvisium] in dataset[Sanchez2021A]

Down ST data from SpatialDB database

[16]:
# Spatial transcriptomics, st_27365449
spatialdb = SpatialDB()
[17]:
spatialdb.file_exist()
[23]:
spatialdb.get_download_data_type()
[23]:
['Spatial transcriptomics',
 'Slide-seq',
 'LCM-seq',
 'seqFISH',
 'MERFISH',
 'Liver single cell zonation',
 'Geo-seq',
 'Tomo-seq']
[18]:
spatialdb.get_download_data_info('Spatial transcriptomics')
[18]:
['st_27365449.tar.gz',
 'st_29021611.tar.gz',
 'st_29925878.tar.gz',
 'st_30154148.tar.gz',
 'st_30948552.tar.gz']
[29]:
spatialdb.download('st_30948552.tar.gz')
[ ]: