LRI and CCC discovery in super-resolved NPC data

Main functions

  • Function 1: SpatialDM: identify spatially co-expressed ligand-receptor interaction

  • Function 2: SpatialDE: get spatial clustering of local spots, if spot number < 5000

  • Function 3: SparseSEH: get spatial clustering of local sub-spots or single-cells (large samples)

  • Function 4: Pathway enrichment analysis based on the database CellChatDB (version.1.1.3))

[ ]:
import os
import time
import torch
import pickle
import numpy as np
import pandas as pd
import scanpy as sc
import warnings
warnings.filterwarnings('ignore')
import matplotlib.pyplot as plt
import matplotlib.colors as clr

import spatialdm as sdm
from spatialdm.datasets import dataset
import spatialdm.plottings as pl
import matplotlib.pyplot as plt
print("SpatailDM version: %s" %sdm.__version__)

# import FineST as fst
# from FineST.datasets import dataset
# import FineST.plottings as fstplt
# print("FineST version: %s" %fst.__version__)
SpatailDM version: 0.2.0
[2]:
## From GPU2
path = '/mnt/lingyu/nfs_share2/Python/'
os.chdir(str(path) + 'FineST/FineST/')
import FineST as fst
from FineST.datasets import dataset
import FineST.plottings as fstplt
[3]:
path = '/mnt/lingyu/nfs_share2/Python/'

fst.setup_seed(666)

if torch.cuda.is_available():
    dev = "cuda:2"
else:
    dev = "cpu"
device = torch.device(dev)

colors = ["#000003",  "#3b0f6f",  "#8c2980",   "#f66e5b", "#fd9f6c", "#fbfcbf"]
cnt_color = clr.LinearSegmentedColormap.from_list('magma', colors, N=256)

1. Load single-nuclei-level adata of all spots (paper Fig. 2G)

[ ]:
patientxy = 'patient1'
os.chdir(f"{path}/FineST/FineST_local/Dataset/ImputData/{patientxy}/")
adata_impt_all_sc_fst = sc.read_h5ad(filename=f"{patientxy}_adata_imput_all_sc.h5ad")    # subspot
# adata_impt_all_sc = sc.read_h5ad(filename=f"{patientxy}_adata_imput_all_sc_scale.h5ad")    # subspot
print(adata_impt_all_sc_fst)
AnnData object with n_obs × n_vars = 40068 × 596
    obs: 'x', 'y'
    uns: 'spatial'
    obsm: 'spatial'
[ ]:
adata_impt_all_spot = sc.read_h5ad(filename=str(patientxy)+'_adata_imput_all_spot_scale.h5ad')
print(adata_impt_all_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial'
    obsm: 'spatial'
[ ]:
## mapping sc to spot, keep spot coords
adata_impt_all_sc_spot,_,_ = fst.align_adata_fst2hd(adata_impt_all_sc_fst, adata_impt_all_spot)
print(adata_impt_all_sc_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial'
    obsm: 'spatial'
[ ]:
print('adata_impt_all_sc_fst SHAPE:', adata_impt_all_sc_fst.shape)
print(adata_impt_all_sc_fst.obsm['spatial'])
print('adata_impt_all_spot SHAPE:', adata_impt_all_spot.shape)
print(adata_impt_all_spot.obsm['spatial'])
print('adata_impt_all_sc_spot SHAPE:', adata_impt_all_sc_spot.shape)
print(adata_impt_all_sc_spot.obsm['spatial'])
adata_impt_all_sc_fst SHAPE: (40068, 596)
[[10000  9328]
 [10000  9579]
 [10000  3421]
 ...
 [ 9998  4261]
 [ 9999  9944]
 [ 9999  3912]]
adata_impt_all_spot SHAPE: (5039, 596)
[[10014.  10023. ]
 [10015.   9649. ]
 [10016.   9276. ]
 ...
 [ 9979.   2650. ]
 [ 9980.   2277. ]
 [ 9980.5  2090.5]]
adata_impt_all_sc_spot SHAPE: (5039, 596)
[[10030 10047]
 [10031  9673]
 [10026  9300]
 ...
 [ 9975  2627]
 [ 9964  2301]
 [10019  2101]]
[ ]:
scale_factors = fst.json_load(f"{path}/FineST/FineST_local/Dataset/NPC/{patientxy}/")
print(scale_factors)
{'tissue_hires_scalef': 0.115267135, 'tissue_lowres_scalef': 0.03458014, 'fiducial_diameter_fullres': 225.25885592749816, 'spot_diameter_fullres': 139.44595843130838}
[ ]:
spot_diameter_fullres=100
# spot_diameter_fullres = scale_factors['spot_diameter_fullres']

fst.weight_matrix(adata_impt_all_sc_spot, l = spot_diameter_fullres,
                  cutoff = 0.001, single_cell = True, n_nearest_neighbors=6)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[ ]:
## Visualize the range of interaction
plt.figure(figsize=(5, 5))
plt.scatter(adata_impt_all_sc_spot.obsm['spatial'][:,0], adata_impt_all_sc_spot.obsm['spatial'][:,1],
            c=adata_impt_all_sc_spot.obsp['weight'].A[500], s=3)
plt.gca().invert_yaxis()
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/weight_matrix_neibor_all_sc_spot.pdf", format='pdf', dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_12_0.png
[ ]:
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_sc_spot/sparseAEH/')

2.2 extract valid LR pairs from the database

[ ]:
## find overlapping LRs from CellChatDB
start = time.time()
sdm.extract_lr(adata_impt_all_sc_spot, 'human', min_cell=3)
print("%.3f seconds" %(time.time()-start))
print(adata_impt_all_sc_spot)
33.064 seconds
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[ ]:
## see the condidiate LR pairs for this NPC datset
adata_impt_all_sc_spot.uns['geneInter']
interaction_name pathway_name agonist antagonist co_A_receptor co_I_receptor evidence annotation interaction_name_2
EFNA5_EPHB2 EFNA5_EPHB2 EPHA NaN NaN NaN NaN PMID:15107857; PMID: 15114347 Cell-Cell Contact EFNA5 - EPHB2
EFNB1_EPHA4 EFNB1_EPHA4 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHA4
EFNB1_EPHB1 EFNB1_EPHB1 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB1
EFNB1_EPHB2 EFNB1_EPHB2 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB2
EFNB1_EPHB3 EFNB1_EPHB3 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB3
... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 CCL3_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL3 - CCR5
CCL5_CCR5 CCL5_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL5 - CCR5
CCL4_CCR5 CCL4_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL4 - CCR5
CXCL1_ACKR1 CXCL1_ACKR1 CXCL NaN NaN NaN NaN PMID: 26740381 Secreted Signaling CXCL1 - ACKR1
CORT_SSTR2 CORT_SSTR2 SEMATOSTATIN NaN NaN NaN NaN KEGG: hsa04080 Secreted Signaling CORT - SSTR2

1129 rows × 9 columns

2.3 Global selection (z-score approach)

[ ]:
## Identify dataset-specific interacting LR pairs (global selection)
start = time.time()
# global Moran selection
sdm.spatialdm_global(adata_impt_all_sc_spot, n_perm=1000, specified_ind=None, method='z-score', nproc=1)
# select significant pairs
sdm.sig_pairs(adata_impt_all_sc_spot, method='z-score', fdr=True, threshold=0.05)  # , threshold=0.1
print("%.3f seconds" %(time.time()-start))
print(adata_impt_all_sc_spot)
1.966 seconds
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[ ]:
spa_coexp_pair_all_sc_spot = fst.anno_LRpair(adata_impt_all_sc_spot)
spa_coexp_pair_all_sc_spot
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected evidence annotation
WNT5B_FZD5 WNT5B None FZD5 None None 0.0 44.444518 0.0 True KEGG: hsa04310 Secreted Signaling
COL4A5_ITGA11_ITGB1 COL4A5 None ITGA11 ITGB1 None 0.0 60.526273 0.0 True KEGG: hsa04512 ECM-Receptor
BMP7_BMPR1A_ACVR2A BMP7 None BMPR1A ACVR2A None 0.0 50.459090 0.0 True KEGG: hsa04350; PMID:26893264 Secreted Signaling
BMP7_BMPR1A_ACVR2B BMP7 None BMPR1A ACVR2B None 0.0 49.134068 0.0 True KEGG: hsa04350; PMID:26893264 Secreted Signaling
COL4A2_ITGA11_ITGB1 COL4A2 None ITGA11 ITGB1 None 0.0 72.589146 0.0 True KEGG: hsa04512 ECM-Receptor
... ... ... ... ... ... ... ... ... ... ... ...
EDN1_EDNRA EDN1 None EDNRA None None 1.0 -5.925181 1.0 False KEGG: hsa04080 Secreted Signaling
LAMA2_ITGAV_ITGB8 LAMA2 None ITGAV ITGB8 None 1.0 -15.229466 1.0 False KEGG: hsa04512 ECM-Receptor
LAMA4_ITGAV_ITGB8 LAMA4 None ITGAV ITGB8 None 1.0 -9.127654 1.0 False KEGG: hsa04512 ECM-Receptor
SELL_PODXL SELL None PODXL None None 1.0 -12.917234 1.0 False PMID: 22814396 Cell-Cell Contact
CTSG_F2R CTSG None F2R None None 1.0 -19.233300 1.0 False KEGG: hsa04080 Secreted Signaling

1129 rows × 11 columns

[ ]:
## save 798 significant LR pairs
spa_coexp_pair_all_sc_spot.to_csv("NPC_spa_coexp_pair_all_sc_spot.csv", index=True, header=True)
[ ]:
## see the unique gene of sig LR pairs
spa_coexp_pairTgene_all_sc_spot = fst.LRpair_gene(spa_coexp_pair_all_sc_spot)
print("spa_coexp_pairTgene_all_sc_spot shape:", len(spa_coexp_pairTgene_all_sc_spot))
spa_coexp_pairTgene_all_sc_spot shape: 467
[ ]:
spa_coexp_pairTgene_all_sc_spot.to_csv("NPC_spa_coexpr_LRgene_all_sc_spot.csv", index=True, header=True)
[ ]:
## use fdr corrected global p-values and a threshold FDR < 0.1 (default)
print(adata_impt_all_sc_spot.uns['global_res'].selected.sum())
adata_impt_all_sc_spot.uns['global_res'].sort_values(by='fdr')
931
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected
WNT5B_FZD5 WNT5B None FZD5 None None 0.0 44.444518 0.0 True
COL4A5_ITGA11_ITGB1 COL4A5 None ITGA11 ITGB1 None 0.0 60.526273 0.0 True
BMP7_BMPR1A_ACVR2A BMP7 None BMPR1A ACVR2A None 0.0 50.459090 0.0 True
BMP7_BMPR1A_ACVR2B BMP7 None BMPR1A ACVR2B None 0.0 49.134068 0.0 True
COL4A2_ITGA11_ITGB1 COL4A2 None ITGA11 ITGB1 None 0.0 72.589146 0.0 True
... ... ... ... ... ... ... ... ... ...
EDN1_EDNRA EDN1 None EDNRA None None 1.0 -5.925181 1.0 False
LAMA2_ITGAV_ITGB8 LAMA2 None ITGAV ITGB8 None 1.0 -15.229466 1.0 False
LAMA4_ITGAV_ITGB8 LAMA4 None ITGAV ITGB8 None 1.0 -9.127654 1.0 False
SELL_PODXL SELL None PODXL None None 1.0 -12.917234 1.0 False
CTSG_F2R CTSG None F2R None None 1.0 -19.233300 1.0 False

1129 rows × 9 columns

2.4 Local selection (z-score approach)

[ ]:
## Local selection is then run for the selected 787 pairs to identify where the LRI takes place
adata_impt_all_sc_spot.raw = adata_impt_all_sc_spot

start = time.time()

# local spot selection
sdm.spatialdm_local(adata_impt_all_sc_spot, n_perm=1000, method='z-score', specified_ind=None, nproc=1)
# significant local spots
sdm.sig_spots(adata_impt_all_sc_spot, method='z-score', fdr=False, threshold=0.05)  # , threshold=0.1
print("%.3f seconds" %(time.time()-start))
3.618 seconds
[ ]:
print(adata_impt_all_sc_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[ ]:
adata_impt_all_sc_spot.uns["local_z_p"]
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0.78612 0.636503 0.395378 0.606160 1.000000 0.214061 1.000000e+00 1.000000 1.000000 1.000000 ... 4.408963e-01 1.000000 1.000000 0.563468 1.000000 1.000000 1.000000 6.827249e-01 1.000000 1.000000
EFNB1_EPHA4 1.00000 0.382340 1.000000 0.613905 0.135041 0.268614 9.927158e-01 0.999999 1.000000 1.000000 ... 1.000000e+00 0.678307 0.601075 1.000000 0.340325 0.435212 0.579031 5.478963e-01 0.641761 0.849660
EFNB1_EPHB1 1.00000 0.864002 1.000000 0.652497 0.975747 0.060418 1.000000e+00 1.000000 1.000000 0.889150 ... 1.000000e+00 0.573724 0.742001 0.592350 0.194472 0.189180 0.185998 5.492717e-01 0.596874 0.241387
EFNB1_EPHB2 1.00000 0.906502 1.000000 0.699478 0.633362 0.000000 1.000000e+00 1.000000 1.000000 1.000000 ... 5.783877e-01 1.000000 1.000000 0.503803 0.538371 0.731433 0.578204 4.212351e-01 0.547937 0.924715
EFNB1_EPHB3 1.00000 0.857628 1.000000 0.389864 0.979669 0.870772 1.000000e+00 1.000000 1.000000 1.000000 ... 1.000000e+00 1.000000 1.000000 1.000000 0.808096 0.726545 0.218472 4.550628e-01 0.609588 0.909224
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 1.00000 1.000000 1.000000 1.000000 0.990577 0.972862 1.000000e+00 0.424194 1.000000 1.000000 ... 2.108991e-149 0.815607 0.718010 1.000000 0.457606 1.000000 1.000000 5.958044e-01 1.000000 1.000000
CCL5_CCR5 1.00000 0.988598 1.000000 0.597325 0.910813 0.506594 9.347463e-01 0.288852 0.000000 0.623750 ... 6.715117e-01 0.724819 0.869368 0.975839 0.718374 1.000000 1.000000 5.672180e-01 1.000000 1.000000
CCL4_CCR5 1.00000 1.000000 1.000000 1.000000 0.987047 0.992772 1.000000e+00 0.267259 0.000000 0.909694 ... 9.771385e-02 0.761595 0.744561 0.999916 0.987102 0.936280 1.000000 5.381908e-01 1.000000 1.000000
CXCL1_ACKR1 1.00000 1.000000 0.515760 0.787532 1.000000 1.000000 1.000000e+00 1.000000 1.000000 1.000000 ... 1.000000e+00 1.000000 1.000000 0.441706 1.000000 1.000000 1.000000 1.000000e+00 1.000000 1.000000
CORT_SSTR2 1.00000 0.520238 1.000000 1.000000 1.000000 1.000000 1.835868e-11 0.400662 0.999381 1.000000 ... 5.487656e-01 1.000000 0.615516 0.812451 1.000000 1.000000 0.999445 5.466303e-08 0.772694 0.419097

931 rows × 5039 columns

2.5 Visualize pairs

[ ]:
fst.topLRpairs(adata_impt_all_sc_spot, spa_coexp_pair_all_sc_spot, num=10)
['MDK_SDC4',
 'CDH4_CDH4',
 'CADM1_CADM1',
 'PECAM1_PECAM1',
 'MDK_ITGA6_ITGB1',
 'CDH1_CDH1',
 'MDK_NCL',
 'MPZL1_MPZL1',
 'F11R_F11R',
 'CD99_CD99']
[ ]:
fstplt.global_plot(adata_impt_all_sc_spot, pairs = fst.topLRpairs(adata_impt_all_sc_spot, spa_coexp_pair_all_sc_spot, num=10),
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2, max_step=0.2, min_step=0.2)
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_all_sc_spot_top10.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_30_0.png
[ ]:
fstplt.global_plot(adata_impt_all_sc_spot, pairs=['CD70_CD27', 'CXCL16_CXCR6', "MIF_ACKR3", 'PVR_TIGIT'],
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2, max_step=0.2, min_step=0.2)
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_all_sc_spot.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_31_0.png
[ ]:
fstplt.plot_pairs_dot(adata_impt_all_sc_spot, ['CD70_CD27'], marker_size =9,
                      pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/all_sc_spot_pair_CD70_CD27")
fstplt.plot_pairs_dot(adata_impt_all_sc_spot, ['MIF_ACKR3'], marker_size =9,
                      pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/all_sc_spot_pair_MIF_ACKR3")
_images/NPC_LRI_CCC_count_32_0.png
_images/NPC_LRI_CCC_count_32_1.png

2.6 Local cell-cell communication pattern detection using SpatialDE

SpatialDE allows clustering of spatially auto-correlated genes. For sample number (n<=5000), SpatialDE can identify spatially auto-correlated interactions using about 40-50 mins.

Here, we used the P-value from local Moran’s R using Z-score method to Quantify the ligand-receptor interaction strength, users can use binary or continuous local selection status as input.
- binary: bin_spots = adata.uns['selected_spots'].astype(int)[adata.uns['local_stat']['n_spots']>2]
- continuous: bin_spots = (1-adata.uns["local_z_p"])[adata.uns['local_stat']['n_spots']>2]
[ ]:
bin_allsc_spots = (1-adata_impt_all_sc_spot.uns["local_z_p"])[adata_impt_all_sc_spot.uns['local_stat']['n_spots']>2]
print(bin_allsc_spots.shape[0], " pairs used for spatial clustering")
bin_allsc_spots = bin_allsc_spots.fillna(0)
bin_allsc_spots
931  pairs used for spatial clustering
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0.21388 0.363497 6.046218e-01 0.393840 0.000000 7.859386e-01 0.000000 0.000000e+00 0.000000e+00 0.000000 ... 0.559104 0.000000 0.000000 0.436532 0.000000e+00 0.000000e+00 0.000000 0.317275 0.000000 0.000000
EFNB1_EPHA4 0.00000 0.617660 2.659165e-08 0.386095 0.864959 7.313859e-01 0.007284 7.633999e-07 0.000000e+00 0.000000 ... 0.000000 0.321693 0.398925 0.000000 6.596748e-01 5.647884e-01 0.420969 0.452104 0.358239 0.150340
EFNB1_EPHB1 0.00000 0.135998 0.000000e+00 0.347503 0.024253 9.395817e-01 0.000000 0.000000e+00 0.000000e+00 0.110850 ... 0.000000 0.426276 0.257999 0.407650 8.055283e-01 8.108202e-01 0.814002 0.450728 0.403126 0.758613
EFNB1_EPHB2 0.00000 0.093498 0.000000e+00 0.300522 0.366638 1.000000e+00 0.000000 0.000000e+00 0.000000e+00 0.000000 ... 0.421612 0.000000 0.000000 0.496197 4.616295e-01 2.685673e-01 0.421796 0.578765 0.452063 0.075285
EFNB1_EPHB3 0.00000 0.142372 0.000000e+00 0.610136 0.020331 1.292282e-01 0.000000 0.000000e+00 0.000000e+00 0.000000 ... 0.000000 0.000000 0.000000 0.000000 1.919035e-01 2.734548e-01 0.781528 0.544937 0.390412 0.090776
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 0.00000 0.000000 0.000000e+00 0.000000 0.009423 2.713785e-02 0.000000 5.758058e-01 1.047104e-08 0.000000 ... 1.000000 0.184393 0.281990 0.000000 5.423940e-01 0.000000e+00 0.000000 0.404196 0.000000 0.000000
CCL5_CCR5 0.00000 0.011402 0.000000e+00 0.402675 0.089187 4.934061e-01 0.065254 7.111482e-01 1.000000e+00 0.376250 ... 0.328488 0.275181 0.130632 0.024161 2.816261e-01 0.000000e+00 0.000000 0.432782 0.000000 0.000000
CCL4_CCR5 0.00000 0.000000 0.000000e+00 0.000000 0.012953 7.227802e-03 0.000000 7.327406e-01 1.000000e+00 0.090306 ... 0.902286 0.238405 0.255439 0.000084 1.289809e-02 6.371963e-02 0.000000 0.461809 0.000000 0.000000
CXCL1_ACKR1 0.00000 0.000000 4.842403e-01 0.212468 0.000000 0.000000e+00 0.000000 0.000000e+00 0.000000e+00 0.000000 ... 0.000000 0.000000 0.000000 0.558294 0.000000e+00 0.000000e+00 0.000000 0.000000 0.000000 0.000000
CORT_SSTR2 0.00000 0.479762 0.000000e+00 0.000000 0.000000 8.184564e-13 1.000000 5.993376e-01 6.193936e-04 0.000000 ... 0.451234 0.000000 0.384484 0.187549 4.779321e-11 1.110223e-16 0.000555 1.000000 0.227306 0.580903

931 rows × 5039 columns

[ ]:
bin_allsc_spots_binary = adata_impt_all_sc_spot.uns['selected_spots'].astype(int)[adata_impt_all_sc_spot.uns['local_stat']['n_spots']>2]
print(bin_allsc_spots_binary.shape[0], " pairs used for spatial clustering")
bin_allsc_spots_binary = bin_allsc_spots_binary.fillna(0)
bin_allsc_spots_binary
931  pairs used for spatial clustering
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHA4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB2 0 0 0 0 0 1 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB3 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 0 0 0 0 0 0 0 0 0 0 ... 1 0 0 0 0 0 0 0 0 0
CCL5_CCR5 0 0 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
CCL4_CCR5 0 0 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
CXCL1_ACKR1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CORT_SSTR2 0 0 0 0 0 0 1 0 0 0 ... 0 0 0 0 0 0 0 1 0 0

931 rows × 5039 columns

[ ]:
start = time.time()
gaussian_allsc_spot = fst.MixedGaussian(spatial = adata_impt_all_sc_spot.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))
--- 1.555 seconds ---
[ ]:
start = time.time()
gaussian_allsc_spot.run_cluster(np.array(bin_allsc_spots.transpose()), 3, iter=50)
print("--- %.3f seconds ---" %(time.time()-start))
Iteration 0
updating variance
Iteration 1
--- 9.338 seconds ---
[ ]:
fstplt.sparseAEH_clusters(gaussian_allsc_spot, w=3, s=3, marker='o',
                          save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_all_sc_spot_SparseAEH.pdf")
_images/NPC_LRI_CCC_count_39_0.png
[ ]:
start = time.time()
gaussian_allsc_spot_binary = fst.MixedGaussian(spatial = adata_impt_all_sc_spot.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))
--- 1.696 seconds ---
[ ]:
start = time.time()
gaussian_allsc_spot_binary.run_cluster(np.array(bin_allsc_spots_binary.transpose()), 3, iter=50)    # run three times?
print("--- %.3f seconds ---" %(time.time()-start))
Iteration 0
updating variance
Iteration 1
--- 9.100 seconds ---
[ ]:
fstplt.sparseAEH_clusters(gaussian_allsc_spot_binary, w=3, s=3, marker='o',    # figsize=(21,5) : Run two times
                          save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_all_sc_spot_SparseAEH_binary.pdf")
_images/NPC_LRI_CCC_count_42_0.png
[ ]:
from threadpoolctl import threadpool_limits
import NaiveDE
import SpatialDE

with threadpool_limits(limits=1, user_api='blas'):
    start = time.time()
    results = SpatialDE.run(adata_impt_all_sc_spot.obsm['spatial'], bin_allsc_spots_binary.transpose())
    print("--- %.3f seconds ---" %(time.time()-start))

    start = time.time()
    histology_results_allsc_spot, patterns_allsc_spot = SpatialDE.aeh.spatial_patterns(
        adata_impt_all_sc_spot.obsm['spatial'], bin_allsc_spots_binary.transpose(), results, C=3, l=3, verbosity=1)
    print("--- %.3f seconds ---" %(time.time()-start))
INFO:root:Performing DE test
INFO:root:Pre-calculating USU^T = K's ...
INFO:root:Done: 2.1e+02s
INFO:root:Fitting gene models
Models:   0%|                                                                                                                 | 0/10 [00:00<?, ?it/s]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/931 [00:00<00:09, 99.06it/s]
  2%|██▍                                                                                                           | 21/931 [00:00<00:08, 101.12it/s]
  3%|███▊                                                                                                          | 32/931 [00:00<00:08, 102.21it/s]
  5%|█████                                                                                                         | 43/931 [00:00<00:08, 103.13it/s]
  6%|██████▍                                                                                                       | 54/931 [00:00<00:08, 103.65it/s]
  7%|███████▋                                                                                                      | 65/931 [00:00<00:08, 104.13it/s]
  8%|████████▉                                                                                                     | 76/931 [00:00<00:08, 103.86it/s]
  9%|██████████▎                                                                                                   | 87/931 [00:00<00:08, 103.69it/s]
 11%|███████████▌                                                                                                  | 98/931 [00:00<00:08, 103.24it/s]
 12%|████████████▊                                                                                                | 109/931 [00:01<00:07, 103.30it/s]
 13%|██████████████                                                                                               | 120/931 [00:01<00:07, 102.70it/s]
 14%|███████████████▎                                                                                             | 131/931 [00:01<00:07, 102.31it/s]
 15%|████████████████▋                                                                                            | 142/931 [00:01<00:07, 102.04it/s]
 16%|█████████████████▉                                                                                           | 153/931 [00:01<00:07, 101.28it/s]
 18%|███████████████████▏                                                                                         | 164/931 [00:01<00:07, 100.39it/s]
 19%|████████████████████▍                                                                                        | 175/931 [00:01<00:07, 100.37it/s]
 20%|█████████████████████▊                                                                                       | 186/931 [00:01<00:07, 100.60it/s]
 21%|███████████████████████                                                                                      | 197/931 [00:01<00:07, 101.02it/s]
 22%|████████████████████████▎                                                                                    | 208/931 [00:02<00:07, 101.66it/s]
 24%|█████████████████████████▋                                                                                   | 219/931 [00:02<00:07, 101.48it/s]
 25%|██████████████████████████▉                                                                                  | 230/931 [00:02<00:06, 100.49it/s]
 26%|████████████████████████████▏                                                                                | 241/931 [00:02<00:06, 100.24it/s]
 27%|█████████████████████████████▌                                                                               | 252/931 [00:02<00:06, 100.27it/s]
 28%|███████████████████████████████                                                                               | 263/931 [00:02<00:06, 98.92it/s]
 29%|████████████████████████████████▎                                                                             | 273/931 [00:02<00:06, 98.91it/s]
 31%|█████████████████████████████████▌                                                                            | 284/931 [00:02<00:06, 99.52it/s]
 32%|██████████████████████████████████▋                                                                           | 294/931 [00:02<00:06, 99.63it/s]
 33%|███████████████████████████████████▋                                                                         | 305/931 [00:03<00:06, 100.42it/s]
 34%|████████████████████████████████████▉                                                                        | 316/931 [00:03<00:06, 101.45it/s]
 35%|██████████████████████████████████████▎                                                                      | 327/931 [00:03<00:05, 101.51it/s]
 36%|███████████████████████████████████████▌                                                                     | 338/931 [00:03<00:05, 102.07it/s]
 37%|████████████████████████████████████████▊                                                                    | 349/931 [00:03<00:05, 102.63it/s]
 39%|██████████████████████████████████████████▏                                                                  | 360/931 [00:03<00:05, 102.85it/s]
 40%|███████████████████████████████████████████▍                                                                 | 371/931 [00:03<00:05, 103.29it/s]
 41%|████████████████████████████████████████████▋                                                                | 382/931 [00:03<00:05, 102.17it/s]
 42%|██████████████████████████████████████████████                                                               | 393/931 [00:03<00:05, 101.64it/s]
 43%|███████████████████████████████████████████████▎                                                             | 404/931 [00:03<00:05, 101.49it/s]
 45%|████████████████████████████████████████████████▌                                                            | 415/931 [00:04<00:05, 101.66it/s]
 46%|█████████████████████████████████████████████████▉                                                           | 426/931 [00:04<00:04, 102.01it/s]
 47%|███████████████████████████████████████████████████▏                                                         | 437/931 [00:04<00:04, 102.16it/s]
 48%|████████████████████████████████████████████████████▍                                                        | 448/931 [00:04<00:04, 102.68it/s]
 49%|█████████████████████████████████████████████████████▋                                                       | 459/931 [00:04<00:04, 102.94it/s]
 50%|███████████████████████████████████████████████████████                                                      | 470/931 [00:04<00:04, 102.74it/s]
 52%|████████████████████████████████████████████████████████▎                                                    | 481/931 [00:04<00:04, 102.27it/s]
 53%|█████████████████████████████████████████████████████████▌                                                   | 492/931 [00:04<00:04, 102.03it/s]
 54%|██████████████████████████████████████████████████████████▉                                                  | 503/931 [00:04<00:04, 101.70it/s]
 55%|████████████████████████████████████████████████████████████▏                                                | 514/931 [00:05<00:04, 102.02it/s]
 56%|█████████████████████████████████████████████████████████████▍                                               | 525/931 [00:05<00:04, 101.49it/s]
 58%|██████████████████████████████████████████████████████████████▊                                              | 536/931 [00:05<00:03, 100.62it/s]
 59%|████████████████████████████████████████████████████████████████▋                                             | 547/931 [00:05<00:03, 99.91it/s]
 60%|█████████████████████████████████████████████████████████████████▊                                            | 557/931 [00:05<00:03, 98.79it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                           | 567/931 [00:05<00:03, 98.30it/s]
 62%|████████████████████████████████████████████████████████████████████▏                                         | 577/931 [00:05<00:03, 98.46it/s]
 63%|█████████████████████████████████████████████████████████████████████▎                                        | 587/931 [00:05<00:03, 98.59it/s]
 64%|██████████████████████████████████████████████████████████████████████▌                                       | 597/931 [00:05<00:03, 98.87it/s]
 65%|███████████████████████████████████████████████████████████████████████▋                                      | 607/931 [00:05<00:03, 98.81it/s]
 66%|█████████████████████████████████████████████████████████████████████████                                     | 618/931 [00:06<00:03, 99.53it/s]
 68%|█████████████████████████████████████████████████████████████████████████▋                                   | 629/931 [00:06<00:03, 100.20it/s]
 69%|██████████████████████████████████████████████████████████████████████████▉                                  | 640/931 [00:06<00:02, 100.28it/s]
 70%|████████████████████████████████████████████████████████████████████████████▏                                | 651/931 [00:06<00:02, 100.54it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▌                               | 662/931 [00:06<00:02, 100.18it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▌                              | 673/931 [00:06<00:02, 99.91it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▋                             | 683/931 [00:06<00:02, 98.80it/s]
 75%|█████████████████████████████████████████████████████████████████████████████████▉                            | 694/931 [00:06<00:02, 99.68it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▎                          | 705/931 [00:06<00:02, 99.96it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████▊                         | 716/931 [00:07<00:02, 100.37it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████                        | 727/931 [00:07<00:02, 100.57it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▍                      | 738/931 [00:07<00:01, 101.02it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▋                     | 749/931 [00:07<00:01, 101.24it/s]
 82%|████████████████████████████████████████████████████████████████████████████████████████▉                    | 760/931 [00:07<00:01, 101.26it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▎                  | 771/931 [00:07<00:01, 101.39it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▌                 | 782/931 [00:07<00:01, 100.92it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▊                | 793/931 [00:07<00:01, 101.06it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▏              | 804/931 [00:07<00:01, 100.83it/s]
 88%|███████████████████████████████████████████████████████████████████████████████████████████████▍             | 815/931 [00:08<00:01, 100.79it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▌            | 826/931 [00:08<00:01, 99.37it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▊           | 836/931 [00:08<00:00, 99.10it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▉          | 846/931 [00:08<00:00, 98.56it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▎        | 857/931 [00:08<00:00, 99.46it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▍       | 867/931 [00:08<00:00, 99.28it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▌      | 877/931 [00:08<00:00, 98.09it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 888/931 [00:08<00:00, 98.87it/s]
 96%|██████████████████████████████████████████████████████████████████████████████████████████████████████████    | 898/931 [00:08<00:00, 99.12it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▍  | 909/931 [00:09<00:00, 99.69it/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 920/931 [00:09<00:00, 100.31it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 931/931 [00:09<00:00, 101.02it/s]
Models:  10%|██████████▌                                                                                              | 1/10 [00:09<01:23,  9.24s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▎                                                                                                            | 11/931 [00:00<00:09, 102.21it/s]
  2%|██▌                                                                                                           | 22/931 [00:00<00:08, 101.63it/s]
  4%|███▉                                                                                                           | 33/931 [00:00<00:08, 99.90it/s]
  5%|█████▏                                                                                                         | 43/931 [00:00<00:08, 99.21it/s]
  6%|██████▎                                                                                                        | 53/931 [00:00<00:08, 98.73it/s]
  7%|███████▌                                                                                                       | 63/931 [00:00<00:08, 98.93it/s]
  8%|████████▋                                                                                                      | 73/931 [00:00<00:08, 99.22it/s]
  9%|█████████▉                                                                                                     | 83/931 [00:00<00:08, 99.00it/s]
 10%|███████████                                                                                                    | 93/931 [00:00<00:08, 99.06it/s]
 11%|████████████▏                                                                                                 | 103/931 [00:01<00:08, 98.74it/s]
 12%|█████████████▎                                                                                                | 113/931 [00:01<00:08, 99.00it/s]
 13%|██████████████▋                                                                                               | 124/931 [00:01<00:08, 99.63it/s]
 14%|███████████████▊                                                                                              | 134/931 [00:01<00:08, 99.22it/s]
 15%|█████████████████                                                                                             | 144/931 [00:01<00:07, 98.45it/s]
 17%|██████████████████▏                                                                                           | 154/931 [00:01<00:07, 97.67it/s]
 18%|███████████████████▍                                                                                          | 164/931 [00:01<00:07, 97.64it/s]
 19%|████████████████████▌                                                                                         | 174/931 [00:01<00:07, 98.08it/s]
 20%|█████████████████████▊                                                                                        | 185/931 [00:01<00:07, 99.00it/s]
 21%|███████████████████████                                                                                       | 195/931 [00:01<00:07, 99.09it/s]
 22%|████████████████████████▎                                                                                     | 206/931 [00:02<00:07, 99.47it/s]
 23%|█████████████████████████▋                                                                                    | 217/931 [00:02<00:07, 99.72it/s]
 24%|██████████████████████████▋                                                                                  | 228/931 [00:02<00:07, 100.23it/s]
 26%|███████████████████████████▉                                                                                 | 239/931 [00:02<00:06, 100.22it/s]
 27%|█████████████████████████████▌                                                                                | 250/931 [00:02<00:06, 99.55it/s]
 28%|██████████████████████████████▌                                                                              | 261/931 [00:02<00:06, 100.23it/s]
 29%|████████████████████████████████▏                                                                             | 272/931 [00:02<00:06, 99.62it/s]
 30%|█████████████████████████████████▏                                                                           | 283/931 [00:02<00:06, 100.11it/s]
 32%|██████████████████████████████████▍                                                                          | 294/931 [00:02<00:06, 100.15it/s]
 33%|████████████████████████████████████                                                                          | 305/931 [00:03<00:06, 99.67it/s]
 34%|█████████████████████████████████████▏                                                                        | 315/931 [00:03<00:06, 99.28it/s]
 35%|██████████████████████████████████████▍                                                                       | 325/931 [00:03<00:06, 98.70it/s]
 36%|███████████████████████████████████████▌                                                                      | 335/931 [00:03<00:06, 97.74it/s]
 37%|████████████████████████████████████████▉                                                                     | 346/931 [00:03<00:05, 98.95it/s]
 38%|██████████████████████████████████████████                                                                    | 356/931 [00:03<00:05, 98.60it/s]
 39%|███████████████████████████████████████████▏                                                                  | 366/931 [00:03<00:05, 97.61it/s]
 40%|████████████████████████████████████████████▍                                                                 | 376/931 [00:03<00:05, 97.64it/s]
 41%|█████████████████████████████████████████████▌                                                                | 386/931 [00:03<00:05, 97.55it/s]
 43%|██████████████████████████████████████████████▊                                                               | 396/931 [00:04<00:05, 96.70it/s]
 44%|███████████████████████████████████████████████▉                                                              | 406/931 [00:04<00:05, 94.31it/s]
 45%|█████████████████████████████████████████████████▏                                                            | 416/931 [00:04<00:05, 94.37it/s]
 46%|██████████████████████████████████████████████████▎                                                           | 426/931 [00:04<00:05, 95.04it/s]
 47%|███████████████████████████████████████████████████▋                                                          | 437/931 [00:04<00:05, 96.57it/s]
 48%|████████████████████████████████████████████████████▉                                                         | 448/931 [00:04<00:04, 97.76it/s]
 49%|██████████████████████████████████████████████████████                                                        | 458/931 [00:04<00:04, 97.67it/s]
 50%|███████████████████████████████████████████████████████▎                                                      | 468/931 [00:04<00:04, 97.23it/s]
 51%|████████████████████████████████████████████████████████▍                                                     | 478/931 [00:04<00:04, 97.87it/s]
 52%|█████████████████████████████████████████████████████████▋                                                    | 488/931 [00:04<00:04, 98.47it/s]
 53%|██████████████████████████████████████████████████████████▊                                                   | 498/931 [00:05<00:04, 98.64it/s]
 55%|████████████████████████████████████████████████████████████                                                  | 508/931 [00:05<00:04, 98.73it/s]
 56%|█████████████████████████████████████████████████████████████▏                                                | 518/931 [00:05<00:04, 98.78it/s]
 57%|██████████████████████████████████████████████████████████████▍                                               | 528/931 [00:05<00:04, 98.10it/s]
 58%|███████████████████████████████████████████████████████████████▌                                              | 538/931 [00:05<00:03, 98.29it/s]
 59%|████████████████████████████████████████████████████████████████▋                                             | 548/931 [00:05<00:03, 98.61it/s]
 60%|█████████████████████████████████████████████████████████████████▉                                            | 558/931 [00:05<00:03, 98.10it/s]
 61%|███████████████████████████████████████████████████████████████████                                           | 568/931 [00:05<00:03, 98.18it/s]
 62%|████████████████████████████████████████████████████████████████████▎                                         | 578/931 [00:05<00:03, 97.71it/s]
 63%|█████████████████████████████████████████████████████████████████████▍                                        | 588/931 [00:05<00:03, 97.63it/s]
 64%|██████████████████████████████████████████████████████████████████████▊                                       | 599/931 [00:06<00:03, 99.15it/s]
 66%|████████████████████████████████████████████████████████████████████████                                      | 610/931 [00:06<00:03, 99.74it/s]
 67%|█████████████████████████████████████████████████████████████████████████▎                                    | 620/931 [00:06<00:03, 99.22it/s]
 68%|█████████████████████████████████████████████████████████████████████████▉                                   | 631/931 [00:06<00:02, 100.01it/s]
 69%|███████████████████████████████████████████████████████████████████████████▋                                  | 641/931 [00:06<00:02, 96.87it/s]
 70%|████████████████████████████████████████████████████████████████████████████▉                                 | 651/931 [00:06<00:02, 96.00it/s]
 71%|██████████████████████████████████████████████████████████████████████████████                                | 661/931 [00:06<00:02, 96.37it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▎                              | 671/931 [00:06<00:02, 96.91it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▌                             | 682/931 [00:06<00:02, 98.62it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▉                            | 693/931 [00:07<00:02, 99.65it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▏                          | 704/931 [00:07<00:02, 99.98it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████▋                         | 715/931 [00:07<00:02, 101.36it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████▉                        | 726/931 [00:07<00:02, 101.99it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▎                      | 737/931 [00:07<00:01, 102.53it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                     | 748/931 [00:07<00:01, 102.88it/s]
 82%|████████████████████████████████████████████████████████████████████████████████████████▊                    | 759/931 [00:07<00:01, 103.18it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▏                  | 770/931 [00:07<00:01, 102.94it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▍                 | 781/931 [00:07<00:01, 101.73it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▋                | 792/931 [00:07<00:01, 102.37it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████               | 803/931 [00:08<00:01, 102.68it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▎             | 814/931 [00:08<00:01, 103.07it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████▌            | 825/931 [00:08<00:01, 103.62it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████▉           | 836/931 [00:08<00:00, 104.00it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▏         | 847/931 [00:08<00:00, 104.14it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████▍        | 858/931 [00:08<00:00, 104.20it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▋       | 869/931 [00:08<00:00, 104.32it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████      | 880/931 [00:08<00:00, 104.67it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎    | 891/931 [00:08<00:00, 104.68it/s]
 97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▌   | 902/931 [00:09<00:00, 104.44it/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉  | 913/931 [00:09<00:00, 104.19it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 924/931 [00:09<00:00, 103.98it/s]
Models:  20%|█████████████████████                                                                                    | 2/10 [00:18<01:14,  9.30s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▎                                                                                                            | 11/931 [00:00<00:08, 104.89it/s]
  2%|██▌                                                                                                           | 22/931 [00:00<00:08, 104.65it/s]
  4%|███▉                                                                                                          | 33/931 [00:00<00:08, 104.35it/s]
  5%|█████▏                                                                                                        | 44/931 [00:00<00:08, 104.52it/s]
  6%|██████▍                                                                                                       | 55/931 [00:00<00:08, 103.78it/s]
  7%|███████▊                                                                                                      | 66/931 [00:00<00:08, 103.77it/s]
  8%|█████████                                                                                                     | 77/931 [00:00<00:08, 103.68it/s]
  9%|██████████▍                                                                                                   | 88/931 [00:00<00:08, 103.37it/s]
 11%|███████████▋                                                                                                  | 99/931 [00:00<00:08, 103.36it/s]
 12%|████████████▉                                                                                                | 110/931 [00:01<00:07, 102.74it/s]
 13%|██████████████▏                                                                                              | 121/931 [00:01<00:08, 101.09it/s]
 14%|███████████████▍                                                                                             | 132/931 [00:01<00:07, 100.44it/s]
 15%|████████████████▉                                                                                             | 143/931 [00:01<00:07, 98.90it/s]
 17%|██████████████████▏                                                                                           | 154/931 [00:01<00:07, 99.39it/s]
 18%|███████████████████▍                                                                                          | 165/931 [00:01<00:07, 99.88it/s]
 19%|████████████████████▌                                                                                        | 176/931 [00:01<00:07, 100.29it/s]
 20%|█████████████████████▉                                                                                       | 187/931 [00:01<00:07, 100.30it/s]
 21%|███████████████████████▏                                                                                     | 198/931 [00:01<00:07, 101.00it/s]
 22%|████████████████████████▍                                                                                    | 209/931 [00:02<00:07, 101.69it/s]
 24%|█████████████████████████▊                                                                                   | 220/931 [00:02<00:06, 102.06it/s]
 25%|███████████████████████████                                                                                  | 231/931 [00:02<00:06, 102.45it/s]
 26%|████████████████████████████▎                                                                                | 242/931 [00:02<00:06, 101.08it/s]
 27%|█████████████████████████████▌                                                                               | 253/931 [00:02<00:06, 100.59it/s]
 28%|██████████████████████████████▉                                                                              | 264/931 [00:02<00:06, 101.66it/s]
 30%|████████████████████████████████▏                                                                            | 275/931 [00:02<00:06, 102.31it/s]
 31%|█████████████████████████████████▍                                                                           | 286/931 [00:02<00:06, 101.15it/s]
 32%|██████████████████████████████████▊                                                                          | 297/931 [00:02<00:06, 100.92it/s]
 33%|████████████████████████████████████                                                                         | 308/931 [00:03<00:06, 101.39it/s]
 34%|█████████████████████████████████████▎                                                                       | 319/931 [00:03<00:06, 101.95it/s]
 35%|██████████████████████████████████████▋                                                                      | 330/931 [00:03<00:05, 100.78it/s]
 37%|███████████████████████████████████████▉                                                                     | 341/931 [00:03<00:05, 100.97it/s]
 38%|█████████████████████████████████████████▏                                                                   | 352/931 [00:03<00:05, 101.62it/s]
 39%|██████████████████████████████████████████▍                                                                  | 363/931 [00:03<00:05, 101.90it/s]
 40%|███████████████████████████████████████████▊                                                                 | 374/931 [00:03<00:05, 102.36it/s]
 41%|█████████████████████████████████████████████                                                                | 385/931 [00:03<00:05, 102.76it/s]
 43%|██████████████████████████████████████████████▎                                                              | 396/931 [00:03<00:05, 102.95it/s]
 44%|███████████████████████████████████████████████▋                                                             | 407/931 [00:03<00:05, 103.19it/s]
 45%|████████████████████████████████████████████████▉                                                            | 418/931 [00:04<00:04, 103.20it/s]
 46%|██████████████████████████████████████████████████▏                                                          | 429/931 [00:04<00:04, 102.79it/s]
 47%|███████████████████████████████████████████████████▌                                                         | 440/931 [00:04<00:04, 101.03it/s]
 48%|████████████████████████████████████████████████████▊                                                        | 451/931 [00:04<00:04, 100.85it/s]
 50%|██████████████████████████████████████████████████████                                                       | 462/931 [00:04<00:04, 101.55it/s]
 51%|███████████████████████████████████████████████████████▍                                                     | 473/931 [00:04<00:04, 102.08it/s]
 52%|████████████████████████████████████████████████████████▋                                                    | 484/931 [00:04<00:04, 102.77it/s]
 53%|█████████████████████████████████████████████████████████▉                                                   | 495/931 [00:04<00:04, 103.13it/s]
 54%|███████████████████████████████████████████████████████████▏                                                 | 506/931 [00:04<00:04, 103.35it/s]
 56%|████████████████████████████████████████████████████████████▌                                                | 517/931 [00:05<00:03, 103.51it/s]
 57%|█████████████████████████████████████████████████████████████▊                                               | 528/931 [00:05<00:03, 103.55it/s]
 58%|███████████████████████████████████████████████████████████████                                              | 539/931 [00:05<00:03, 102.39it/s]
 59%|████████████████████████████████████████████████████████████████▍                                            | 550/931 [00:05<00:03, 102.69it/s]
 60%|█████████████████████████████████████████████████████████████████▋                                           | 561/931 [00:05<00:03, 102.83it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                          | 572/931 [00:05<00:03, 102.65it/s]
 63%|████████████████████████████████████████████████████████████████████▎                                        | 583/931 [00:05<00:03, 102.56it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 594/931 [00:05<00:03, 102.48it/s]
 65%|██████████████████████████████████████████████████████████████████████▊                                      | 605/931 [00:05<00:03, 102.52it/s]
 66%|████████████████████████████████████████████████████████████████████████                                     | 616/931 [00:06<00:03, 102.32it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                   | 627/931 [00:06<00:02, 102.23it/s]
 69%|██████████████████████████████████████████████████████████████████████████▋                                  | 638/931 [00:06<00:02, 102.31it/s]
 70%|███████████████████████████████████████████████████████████████████████████▉                                 | 649/931 [00:06<00:02, 100.95it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▎                               | 660/931 [00:06<00:02, 100.85it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▌                              | 671/931 [00:06<00:02, 101.01it/s]
 73%|███████████████████████████████████████████████████████████████████████████████▊                             | 682/931 [00:06<00:02, 101.36it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▏                           | 693/931 [00:06<00:02, 100.88it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▏                          | 704/931 [00:06<00:02, 99.61it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████▋                         | 715/931 [00:07<00:02, 100.46it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████▉                        | 726/931 [00:07<00:02, 101.21it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▎                      | 737/931 [00:07<00:01, 101.75it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                     | 748/931 [00:07<00:01, 102.61it/s]
 82%|████████████████████████████████████████████████████████████████████████████████████████▊                    | 759/931 [00:07<00:01, 102.88it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▏                  | 770/931 [00:07<00:01, 103.11it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▍                 | 781/931 [00:07<00:01, 103.44it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▋                | 792/931 [00:07<00:01, 103.43it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████               | 803/931 [00:07<00:01, 103.75it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▎             | 814/931 [00:07<00:01, 103.67it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████▌            | 825/931 [00:08<00:01, 103.86it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████▉           | 836/931 [00:08<00:00, 103.40it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▏         | 847/931 [00:08<00:00, 102.81it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████▍        | 858/931 [00:08<00:00, 102.58it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▋       | 869/931 [00:08<00:00, 102.18it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████      | 880/931 [00:08<00:00, 102.35it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎    | 891/931 [00:08<00:00, 102.54it/s]
 97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▌   | 902/931 [00:08<00:00, 102.95it/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉  | 913/931 [00:08<00:00, 102.70it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 924/931 [00:09<00:00, 102.67it/s]
Models:  30%|███████████████████████████████▌                                                                         | 3/10 [00:27<01:04,  9.22s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▎                                                                                                            | 11/931 [00:00<00:08, 105.88it/s]
  2%|██▌                                                                                                           | 22/931 [00:00<00:08, 105.14it/s]
  4%|███▉                                                                                                          | 33/931 [00:00<00:08, 104.42it/s]
  5%|█████▏                                                                                                        | 44/931 [00:00<00:08, 104.28it/s]
  6%|██████▍                                                                                                       | 55/931 [00:00<00:08, 103.76it/s]
  7%|███████▊                                                                                                      | 66/931 [00:00<00:08, 103.56it/s]
  8%|█████████                                                                                                     | 77/931 [00:00<00:08, 103.50it/s]
  9%|██████████▍                                                                                                   | 88/931 [00:00<00:08, 103.37it/s]
 11%|███████████▋                                                                                                  | 99/931 [00:00<00:08, 103.78it/s]
 12%|████████████▉                                                                                                | 110/931 [00:01<00:07, 104.11it/s]
 13%|██████████████▏                                                                                              | 121/931 [00:01<00:07, 104.28it/s]
 14%|███████████████▍                                                                                             | 132/931 [00:01<00:07, 104.48it/s]
 15%|████████████████▋                                                                                            | 143/931 [00:01<00:07, 104.43it/s]
 17%|██████████████████                                                                                           | 154/931 [00:01<00:07, 104.41it/s]
 18%|███████████████████▎                                                                                         | 165/931 [00:01<00:07, 104.37it/s]
 19%|████████████████████▌                                                                                        | 176/931 [00:01<00:07, 104.12it/s]
 20%|█████████████████████▉                                                                                       | 187/931 [00:01<00:07, 104.15it/s]
 21%|███████████████████████▏                                                                                     | 198/931 [00:01<00:07, 103.99it/s]
 22%|████████████████████████▍                                                                                    | 209/931 [00:02<00:06, 103.73it/s]
 24%|█████████████████████████▊                                                                                   | 220/931 [00:02<00:06, 102.68it/s]
 25%|███████████████████████████                                                                                  | 231/931 [00:02<00:06, 101.17it/s]
 26%|████████████████████████████▎                                                                                | 242/931 [00:02<00:06, 101.07it/s]
 27%|█████████████████████████████▌                                                                               | 253/931 [00:02<00:06, 101.31it/s]
 28%|██████████████████████████████▉                                                                              | 264/931 [00:02<00:06, 101.53it/s]
 30%|████████████████████████████████▏                                                                            | 275/931 [00:02<00:06, 102.34it/s]
 31%|█████████████████████████████████▍                                                                           | 286/931 [00:02<00:06, 102.44it/s]
 32%|██████████████████████████████████▊                                                                          | 297/931 [00:02<00:06, 102.60it/s]
 33%|████████████████████████████████████                                                                         | 308/931 [00:02<00:06, 102.47it/s]
 34%|█████████████████████████████████████▎                                                                       | 319/931 [00:03<00:06, 101.26it/s]
 35%|██████████████████████████████████████▋                                                                      | 330/931 [00:03<00:05, 101.58it/s]
 37%|███████████████████████████████████████▉                                                                     | 341/931 [00:03<00:05, 101.89it/s]
 38%|█████████████████████████████████████████▏                                                                   | 352/931 [00:03<00:05, 101.97it/s]
 39%|██████████████████████████████████████████▍                                                                  | 363/931 [00:03<00:05, 101.86it/s]
 40%|███████████████████████████████████████████▊                                                                 | 374/931 [00:03<00:05, 101.41it/s]
 41%|█████████████████████████████████████████████                                                                | 385/931 [00:03<00:05, 100.78it/s]
 43%|██████████████████████████████████████████████▎                                                              | 396/931 [00:03<00:05, 101.56it/s]
 44%|███████████████████████████████████████████████▋                                                             | 407/931 [00:03<00:05, 102.14it/s]
 45%|████████████████████████████████████████████████▉                                                            | 418/931 [00:04<00:05, 102.55it/s]
 46%|██████████████████████████████████████████████████▏                                                          | 429/931 [00:04<00:04, 102.92it/s]
 47%|███████████████████████████████████████████████████▌                                                         | 440/931 [00:04<00:04, 103.31it/s]
 48%|████████████████████████████████████████████████████▊                                                        | 451/931 [00:04<00:04, 103.47it/s]
 50%|██████████████████████████████████████████████████████                                                       | 462/931 [00:04<00:04, 103.23it/s]
 51%|███████████████████████████████████████████████████████▍                                                     | 473/931 [00:04<00:04, 103.29it/s]
 52%|████████████████████████████████████████████████████████▋                                                    | 484/931 [00:04<00:04, 103.44it/s]
 53%|█████████████████████████████████████████████████████████▉                                                   | 495/931 [00:04<00:04, 102.71it/s]
 54%|███████████████████████████████████████████████████████████▏                                                 | 506/931 [00:04<00:04, 102.45it/s]
 56%|████████████████████████████████████████████████████████████▌                                                | 517/931 [00:05<00:04, 102.40it/s]
 57%|█████████████████████████████████████████████████████████████▊                                               | 528/931 [00:05<00:03, 102.13it/s]
 58%|███████████████████████████████████████████████████████████████                                              | 539/931 [00:05<00:03, 101.92it/s]
 59%|████████████████████████████████████████████████████████████████▍                                            | 550/931 [00:05<00:03, 102.23it/s]
 60%|█████████████████████████████████████████████████████████████████▋                                           | 561/931 [00:05<00:03, 101.86it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                          | 572/931 [00:05<00:03, 102.16it/s]
 63%|████████████████████████████████████████████████████████████████████▎                                        | 583/931 [00:05<00:03, 102.45it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 594/931 [00:05<00:03, 102.44it/s]
 65%|██████████████████████████████████████████████████████████████████████▊                                      | 605/931 [00:05<00:03, 102.58it/s]
 66%|████████████████████████████████████████████████████████████████████████                                     | 616/931 [00:05<00:03, 102.72it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                   | 627/931 [00:06<00:02, 103.03it/s]
 69%|██████████████████████████████████████████████████████████████████████████▋                                  | 638/931 [00:06<00:02, 103.16it/s]
 70%|███████████████████████████████████████████████████████████████████████████▉                                 | 649/931 [00:06<00:02, 102.96it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▎                               | 660/931 [00:06<00:02, 103.12it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▌                              | 671/931 [00:06<00:02, 102.10it/s]
 73%|███████████████████████████████████████████████████████████████████████████████▊                             | 682/931 [00:06<00:02, 102.52it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▏                           | 693/931 [00:06<00:02, 102.13it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████▍                          | 704/931 [00:06<00:02, 102.54it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████▋                         | 715/931 [00:06<00:02, 102.87it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████▉                        | 726/931 [00:07<00:01, 103.19it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▎                      | 737/931 [00:07<00:01, 103.38it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                     | 748/931 [00:07<00:01, 102.96it/s]
 82%|████████████████████████████████████████████████████████████████████████████████████████▊                    | 759/931 [00:07<00:01, 103.24it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▏                  | 770/931 [00:07<00:01, 103.38it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▍                 | 781/931 [00:07<00:01, 103.29it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▋                | 792/931 [00:07<00:01, 103.25it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████               | 803/931 [00:07<00:01, 102.86it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▎             | 814/931 [00:07<00:01, 101.35it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████▌            | 825/931 [00:08<00:01, 100.29it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▊           | 836/931 [00:08<00:00, 99.85it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▉          | 846/931 [00:08<00:00, 99.07it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▎        | 857/931 [00:08<00:00, 99.93it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌       | 868/931 [00:08<00:00, 100.30it/s]
 94%|██████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 879/931 [00:08<00:00, 101.04it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 890/931 [00:08<00:00, 101.53it/s]
 97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▍   | 901/931 [00:08<00:00, 101.94it/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▊  | 912/931 [00:08<00:00, 102.58it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████ | 923/931 [00:08<00:00, 102.69it/s]
Models:  40%|██████████████████████████████████████████                                                               | 4/10 [00:36<00:54,  9.16s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▎                                                                                                            | 11/931 [00:00<00:08, 103.99it/s]
  2%|██▌                                                                                                           | 22/931 [00:00<00:08, 104.08it/s]
  4%|███▉                                                                                                          | 33/931 [00:00<00:08, 103.81it/s]
  5%|█████▏                                                                                                        | 44/931 [00:00<00:08, 104.06it/s]
  6%|██████▍                                                                                                       | 55/931 [00:00<00:08, 104.21it/s]
  7%|███████▊                                                                                                      | 66/931 [00:00<00:08, 104.30it/s]
  8%|█████████                                                                                                     | 77/931 [00:00<00:08, 104.17it/s]
  9%|██████████▍                                                                                                   | 88/931 [00:00<00:08, 103.77it/s]
 11%|███████████▋                                                                                                  | 99/931 [00:00<00:08, 103.68it/s]
 12%|████████████▉                                                                                                | 110/931 [00:01<00:07, 103.37it/s]
 13%|██████████████▏                                                                                              | 121/931 [00:01<00:07, 103.74it/s]
 14%|███████████████▍                                                                                             | 132/931 [00:01<00:07, 103.88it/s]
 15%|████████████████▋                                                                                            | 143/931 [00:01<00:07, 103.81it/s]
 17%|██████████████████                                                                                           | 154/931 [00:01<00:07, 102.63it/s]
 18%|███████████████████▎                                                                                         | 165/931 [00:01<00:07, 102.42it/s]
 19%|████████████████████▌                                                                                        | 176/931 [00:01<00:07, 102.22it/s]
 20%|█████████████████████▉                                                                                       | 187/931 [00:01<00:07, 102.87it/s]
 21%|███████████████████████▏                                                                                     | 198/931 [00:01<00:07, 102.97it/s]
 22%|████████████████████████▍                                                                                    | 209/931 [00:02<00:06, 103.37it/s]
 24%|█████████████████████████▊                                                                                   | 220/931 [00:02<00:06, 103.82it/s]
 25%|███████████████████████████                                                                                  | 231/931 [00:02<00:06, 103.91it/s]
 26%|████████████████████████████▎                                                                                | 242/931 [00:02<00:06, 104.18it/s]
 27%|█████████████████████████████▌                                                                               | 253/931 [00:02<00:06, 104.23it/s]
 28%|██████████████████████████████▉                                                                              | 264/931 [00:02<00:06, 104.31it/s]
 30%|████████████████████████████████▏                                                                            | 275/931 [00:02<00:06, 104.45it/s]
 31%|█████████████████████████████████▍                                                                           | 286/931 [00:02<00:06, 104.32it/s]
 32%|██████████████████████████████████▊                                                                          | 297/931 [00:02<00:06, 104.15it/s]
 33%|████████████████████████████████████                                                                         | 308/931 [00:02<00:05, 103.86it/s]
 34%|█████████████████████████████████████▎                                                                       | 319/931 [00:03<00:05, 103.65it/s]
 35%|██████████████████████████████████████▋                                                                      | 330/931 [00:03<00:05, 103.79it/s]
 37%|███████████████████████████████████████▉                                                                     | 341/931 [00:03<00:05, 104.00it/s]
 38%|█████████████████████████████████████████▏                                                                   | 352/931 [00:03<00:05, 104.22it/s]
 39%|██████████████████████████████████████████▍                                                                  | 363/931 [00:03<00:05, 104.22it/s]
 40%|███████████████████████████████████████████▊                                                                 | 374/931 [00:03<00:05, 104.26it/s]
 41%|█████████████████████████████████████████████                                                                | 385/931 [00:03<00:05, 103.63it/s]
 43%|██████████████████████████████████████████████▎                                                              | 396/931 [00:03<00:05, 101.75it/s]
 44%|███████████████████████████████████████████████▋                                                             | 407/931 [00:03<00:05, 102.27it/s]
 45%|████████████████████████████████████████████████▉                                                            | 418/931 [00:04<00:04, 102.69it/s]
 46%|██████████████████████████████████████████████████▏                                                          | 429/931 [00:04<00:04, 103.07it/s]
 47%|███████████████████████████████████████████████████▌                                                         | 440/931 [00:04<00:04, 103.22it/s]
 48%|████████████████████████████████████████████████████▊                                                        | 451/931 [00:04<00:04, 103.14it/s]
 50%|██████████████████████████████████████████████████████                                                       | 462/931 [00:04<00:04, 103.10it/s]
 51%|███████████████████████████████████████████████████████▍                                                     | 473/931 [00:04<00:04, 103.14it/s]
 52%|████████████████████████████████████████████████████████▋                                                    | 484/931 [00:04<00:04, 103.32it/s]
 53%|█████████████████████████████████████████████████████████▉                                                   | 495/931 [00:04<00:04, 103.02it/s]
 54%|███████████████████████████████████████████████████████████▏                                                 | 506/931 [00:04<00:04, 103.17it/s]
 56%|████████████████████████████████████████████████████████████▌                                                | 517/931 [00:04<00:04, 103.28it/s]
 57%|█████████████████████████████████████████████████████████████▊                                               | 528/931 [00:05<00:03, 103.11it/s]
 58%|███████████████████████████████████████████████████████████████                                              | 539/931 [00:05<00:03, 103.07it/s]
 59%|████████████████████████████████████████████████████████████████▍                                            | 550/931 [00:05<00:03, 102.86it/s]
 60%|█████████████████████████████████████████████████████████████████▋                                           | 561/931 [00:05<00:03, 102.63it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                          | 572/931 [00:05<00:03, 102.53it/s]
 63%|████████████████████████████████████████████████████████████████████▎                                        | 583/931 [00:05<00:03, 102.26it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 594/931 [00:05<00:03, 101.91it/s]
 65%|██████████████████████████████████████████████████████████████████████▊                                      | 605/931 [00:05<00:03, 101.78it/s]
 66%|████████████████████████████████████████████████████████████████████████                                     | 616/931 [00:05<00:03, 101.42it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                   | 627/931 [00:06<00:02, 102.23it/s]
 69%|██████████████████████████████████████████████████████████████████████████▋                                  | 638/931 [00:06<00:02, 102.67it/s]
 70%|███████████████████████████████████████████████████████████████████████████▉                                 | 649/931 [00:06<00:02, 103.21it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▎                               | 660/931 [00:06<00:02, 103.56it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▌                              | 671/931 [00:06<00:02, 103.53it/s]
 73%|███████████████████████████████████████████████████████████████████████████████▊                             | 682/931 [00:06<00:02, 103.80it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▏                           | 693/931 [00:06<00:02, 103.57it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████▍                          | 704/931 [00:06<00:02, 103.61it/s]
 77%|███████████████████████████████████████████████████████████████████████████████████▋                         | 715/931 [00:06<00:02, 103.77it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████▉                        | 726/931 [00:07<00:01, 103.54it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▎                      | 737/931 [00:07<00:01, 103.44it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                     | 748/931 [00:07<00:01, 102.53it/s]
 82%|████████████████████████████████████████████████████████████████████████████████████████▊                    | 759/931 [00:07<00:01, 102.76it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▏                  | 770/931 [00:07<00:01, 103.20it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▍                 | 781/931 [00:07<00:01, 103.54it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▋                | 792/931 [00:07<00:01, 103.76it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████               | 803/931 [00:07<00:01, 103.88it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▎             | 814/931 [00:07<00:01, 103.84it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████▌            | 825/931 [00:07<00:01, 103.27it/s]
 90%|█████████████████████████████████████████████████████████████████████████████████████████████████▉           | 836/931 [00:08<00:00, 102.66it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▏         | 847/931 [00:08<00:00, 100.18it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▎        | 858/931 [00:08<00:00, 99.77it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▌       | 868/931 [00:08<00:00, 99.08it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▋      | 878/931 [00:08<00:00, 98.86it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 888/931 [00:08<00:00, 97.40it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▏   | 899/931 [00:08<00:00, 98.52it/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 910/931 [00:08<00:00, 100.15it/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▊ | 921/931 [00:08<00:00, 101.00it/s]
Models:  50%|████████████████████████████████████████████████████▌                                                    | 5/10 [00:45<00:45,  9.12s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/931 [00:00<00:09, 95.83it/s]
  2%|██▍                                                                                                            | 20/931 [00:00<00:09, 95.14it/s]
  3%|███▌                                                                                                           | 30/931 [00:00<00:09, 93.41it/s]
  4%|████▊                                                                                                          | 40/931 [00:00<00:09, 94.25it/s]
  5%|█████▉                                                                                                         | 50/931 [00:00<00:09, 95.13it/s]
  6%|███████▏                                                                                                       | 60/931 [00:00<00:09, 95.32it/s]
  8%|████████▎                                                                                                      | 70/931 [00:00<00:09, 95.64it/s]
  9%|█████████▌                                                                                                     | 80/931 [00:00<00:08, 95.59it/s]
 10%|██████████▋                                                                                                    | 90/931 [00:00<00:08, 95.75it/s]
 11%|███████████▊                                                                                                  | 100/931 [00:01<00:08, 95.77it/s]
 12%|████████████▉                                                                                                 | 110/931 [00:01<00:08, 95.76it/s]
 13%|██████████████▏                                                                                               | 120/931 [00:01<00:08, 95.50it/s]
 14%|███████████████▎                                                                                              | 130/931 [00:01<00:08, 95.97it/s]
 15%|████████████████▌                                                                                             | 140/931 [00:01<00:08, 95.86it/s]
 16%|█████████████████▋                                                                                            | 150/931 [00:01<00:08, 95.65it/s]
 17%|██████████████████▉                                                                                           | 160/931 [00:01<00:08, 95.93it/s]
 18%|████████████████████                                                                                          | 170/931 [00:01<00:07, 95.95it/s]
 19%|█████████████████████▎                                                                                        | 180/931 [00:01<00:07, 95.86it/s]
 20%|██████████████████████▍                                                                                       | 190/931 [00:01<00:07, 95.18it/s]
 21%|███████████████████████▋                                                                                      | 200/931 [00:02<00:07, 94.49it/s]
 23%|████████████████████████▊                                                                                     | 210/931 [00:02<00:07, 94.05it/s]
 24%|█████████████████████████▉                                                                                    | 220/931 [00:02<00:07, 93.13it/s]
 25%|███████████████████████████▏                                                                                  | 230/931 [00:02<00:07, 92.28it/s]
 26%|████████████████████████████▎                                                                                 | 240/931 [00:02<00:07, 92.66it/s]
 27%|█████████████████████████████▌                                                                                | 250/931 [00:02<00:07, 93.46it/s]
 28%|██████████████████████████████▋                                                                               | 260/931 [00:02<00:07, 94.32it/s]
 29%|███████████████████████████████▉                                                                              | 270/931 [00:02<00:06, 95.31it/s]
 30%|█████████████████████████████████                                                                             | 280/931 [00:02<00:06, 95.22it/s]
 31%|██████████████████████████████████▎                                                                           | 290/931 [00:03<00:06, 95.61it/s]
 32%|███████████████████████████████████▍                                                                          | 300/931 [00:03<00:06, 95.92it/s]
 33%|████████████████████████████████████▋                                                                         | 310/931 [00:03<00:06, 95.96it/s]
 34%|█████████████████████████████████████▊                                                                        | 320/931 [00:03<00:06, 95.95it/s]
 35%|██████████████████████████████████████▉                                                                       | 330/931 [00:03<00:06, 95.76it/s]
 37%|████████████████████████████████████████▏                                                                     | 340/931 [00:03<00:06, 95.67it/s]
 38%|█████████████████████████████████████████▎                                                                    | 350/931 [00:03<00:06, 94.93it/s]
 39%|██████████████████████████████████████████▌                                                                   | 360/931 [00:03<00:06, 94.50it/s]
 40%|███████████████████████████████████████████▋                                                                  | 370/931 [00:03<00:05, 94.19it/s]
 41%|████████████████████████████████████████████▉                                                                 | 380/931 [00:04<00:05, 94.48it/s]
 42%|██████████████████████████████████████████████                                                                | 390/931 [00:04<00:05, 95.07it/s]
 43%|███████████████████████████████████████████████▎                                                              | 400/931 [00:04<00:05, 95.61it/s]
 44%|████████████████████████████████████████████████▍                                                             | 410/931 [00:04<00:05, 96.38it/s]
 45%|█████████████████████████████████████████████████▌                                                            | 420/931 [00:04<00:05, 96.40it/s]
 46%|██████████████████████████████████████████████████▊                                                           | 430/931 [00:04<00:05, 96.34it/s]
 47%|███████████████████████████████████████████████████▉                                                          | 440/931 [00:04<00:05, 96.23it/s]
 48%|█████████████████████████████████████████████████████▏                                                        | 450/931 [00:04<00:05, 96.20it/s]
 49%|██████████████████████████████████████████████████████▎                                                       | 460/931 [00:04<00:04, 95.62it/s]
 50%|███████████████████████████████████████████████████████▌                                                      | 470/931 [00:04<00:04, 93.75it/s]
 52%|████████████████████████████████████████████████████████▋                                                     | 480/931 [00:05<00:04, 92.44it/s]
 53%|█████████████████████████████████████████████████████████▉                                                    | 490/931 [00:05<00:04, 91.89it/s]
 54%|███████████████████████████████████████████████████████████                                                   | 500/931 [00:05<00:04, 92.50it/s]
 55%|████████████████████████████████████████████████████████████▎                                                 | 510/931 [00:05<00:04, 92.83it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 520/931 [00:05<00:04, 93.33it/s]
 57%|██████████████████████████████████████████████████████████████▌                                               | 530/931 [00:05<00:04, 94.04it/s]
 58%|███████████████████████████████████████████████████████████████▊                                              | 540/931 [00:05<00:04, 94.83it/s]
 59%|████████████████████████████████████████████████████████████████▉                                             | 550/931 [00:05<00:03, 95.67it/s]
 60%|██████████████████████████████████████████████████████████████████▏                                           | 560/931 [00:05<00:03, 96.21it/s]
 61%|███████████████████████████████████████████████████████████████████▎                                          | 570/931 [00:06<00:03, 96.40it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                         | 580/931 [00:06<00:03, 96.84it/s]
 63%|█████████████████████████████████████████████████████████████████████▋                                        | 590/931 [00:06<00:03, 96.59it/s]
 64%|██████████████████████████████████████████████████████████████████████▉                                       | 600/931 [00:06<00:03, 96.55it/s]
 66%|████████████████████████████████████████████████████████████████████████                                      | 610/931 [00:06<00:03, 96.24it/s]
 67%|█████████████████████████████████████████████████████████████████████████▎                                    | 620/931 [00:06<00:03, 95.79it/s]
 68%|██████████████████████████████████████████████████████████████████████████▍                                   | 630/931 [00:06<00:03, 95.55it/s]
 69%|███████████████████████████████████████████████████████████████████████████▌                                  | 640/931 [00:06<00:03, 95.51it/s]
 70%|████████████████████████████████████████████████████████████████████████████▊                                 | 650/931 [00:06<00:02, 95.20it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▉                                | 660/931 [00:06<00:02, 95.35it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▏                              | 670/931 [00:07<00:02, 95.48it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▎                             | 680/931 [00:07<00:02, 95.51it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 690/931 [00:07<00:02, 95.47it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▋                           | 700/931 [00:07<00:02, 95.53it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 710/931 [00:07<00:02, 94.94it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 720/931 [00:07<00:02, 93.28it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                       | 730/931 [00:07<00:02, 93.27it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▍                      | 740/931 [00:07<00:02, 93.97it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 750/931 [00:07<00:01, 94.19it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▊                    | 760/931 [00:08<00:01, 94.02it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▉                   | 770/931 [00:08<00:01, 93.74it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▏                 | 780/931 [00:08<00:01, 93.29it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▎                | 790/931 [00:08<00:01, 92.21it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▌               | 800/931 [00:08<00:01, 92.21it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▋              | 810/931 [00:08<00:01, 92.82it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▉             | 820/931 [00:08<00:01, 92.99it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████            | 830/931 [00:08<00:01, 93.17it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▏          | 840/931 [00:08<00:00, 93.36it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▍         | 850/931 [00:08<00:00, 93.56it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌        | 860/931 [00:09<00:00, 93.54it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 870/931 [00:09<00:00, 93.71it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 880/931 [00:09<00:00, 93.74it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 890/931 [00:09<00:00, 93.59it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▎   | 900/931 [00:09<00:00, 93.83it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 910/931 [00:09<00:00, 93.59it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 920/931 [00:09<00:00, 92.70it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 930/931 [00:09<00:00, 92.19it/s]
Models:  60%|███████████████████████████████████████████████████████████████                                          | 6/10 [00:55<00:37,  9.37s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/931 [00:00<00:09, 94.15it/s]
  2%|██▍                                                                                                            | 20/931 [00:00<00:09, 95.19it/s]
  3%|███▌                                                                                                           | 30/931 [00:00<00:09, 94.99it/s]
  4%|████▊                                                                                                          | 40/931 [00:00<00:09, 93.73it/s]
  5%|█████▉                                                                                                         | 50/931 [00:00<00:09, 92.66it/s]
  6%|███████▏                                                                                                       | 60/931 [00:00<00:09, 92.80it/s]
  8%|████████▎                                                                                                      | 70/931 [00:00<00:09, 92.96it/s]
  9%|█████████▌                                                                                                     | 80/931 [00:00<00:09, 93.22it/s]
 10%|██████████▋                                                                                                    | 90/931 [00:00<00:09, 92.58it/s]
 11%|███████████▊                                                                                                  | 100/931 [00:01<00:08, 92.38it/s]
 12%|████████████▉                                                                                                 | 110/931 [00:01<00:08, 91.99it/s]
 13%|██████████████▏                                                                                               | 120/931 [00:01<00:08, 92.39it/s]
 14%|███████████████▎                                                                                              | 130/931 [00:01<00:08, 92.44it/s]
 15%|████████████████▌                                                                                             | 140/931 [00:01<00:08, 92.60it/s]
 16%|█████████████████▋                                                                                            | 150/931 [00:01<00:08, 92.20it/s]
 17%|██████████████████▉                                                                                           | 160/931 [00:01<00:08, 93.05it/s]
 18%|████████████████████                                                                                          | 170/931 [00:01<00:08, 93.49it/s]
 19%|█████████████████████▎                                                                                        | 180/931 [00:01<00:07, 94.01it/s]
 20%|██████████████████████▍                                                                                       | 190/931 [00:02<00:07, 94.33it/s]
 21%|███████████████████████▋                                                                                      | 200/931 [00:02<00:07, 94.39it/s]
 23%|████████████████████████▊                                                                                     | 210/931 [00:02<00:07, 94.22it/s]
 24%|█████████████████████████▉                                                                                    | 220/931 [00:02<00:07, 93.22it/s]
 25%|███████████████████████████▏                                                                                  | 230/931 [00:02<00:07, 92.52it/s]
 26%|████████████████████████████▎                                                                                 | 240/931 [00:02<00:07, 92.61it/s]
 27%|█████████████████████████████▌                                                                                | 250/931 [00:02<00:07, 92.40it/s]
 28%|██████████████████████████████▋                                                                               | 260/931 [00:02<00:07, 92.94it/s]
 29%|███████████████████████████████▉                                                                              | 270/931 [00:02<00:07, 93.43it/s]
 30%|█████████████████████████████████                                                                             | 280/931 [00:03<00:06, 93.65it/s]
 31%|██████████████████████████████████▎                                                                           | 290/931 [00:03<00:06, 92.90it/s]
 32%|███████████████████████████████████▍                                                                          | 300/931 [00:03<00:06, 92.70it/s]
 33%|████████████████████████████████████▋                                                                         | 310/931 [00:03<00:06, 92.69it/s]
 34%|█████████████████████████████████████▊                                                                        | 320/931 [00:03<00:06, 93.17it/s]
 35%|██████████████████████████████████████▉                                                                       | 330/931 [00:03<00:06, 92.67it/s]
 37%|████████████████████████████████████████▏                                                                     | 340/931 [00:03<00:06, 92.47it/s]
 38%|█████████████████████████████████████████▎                                                                    | 350/931 [00:03<00:06, 92.56it/s]
 39%|██████████████████████████████████████████▌                                                                   | 360/931 [00:03<00:06, 93.46it/s]
 40%|███████████████████████████████████████████▋                                                                  | 370/931 [00:03<00:05, 93.60it/s]
 41%|████████████████████████████████████████████▉                                                                 | 380/931 [00:04<00:05, 94.13it/s]
 42%|██████████████████████████████████████████████                                                                | 390/931 [00:04<00:05, 93.92it/s]
 43%|███████████████████████████████████████████████▎                                                              | 400/931 [00:04<00:05, 94.33it/s]
 44%|████████████████████████████████████████████████▍                                                             | 410/931 [00:04<00:05, 94.31it/s]
 45%|█████████████████████████████████████████████████▌                                                            | 420/931 [00:04<00:05, 94.27it/s]
 46%|██████████████████████████████████████████████████▊                                                           | 430/931 [00:04<00:05, 94.82it/s]
 47%|███████████████████████████████████████████████████▉                                                          | 440/931 [00:04<00:05, 94.66it/s]
 48%|█████████████████████████████████████████████████████▏                                                        | 450/931 [00:04<00:05, 94.67it/s]
 49%|██████████████████████████████████████████████████████▎                                                       | 460/931 [00:04<00:05, 93.35it/s]
 50%|███████████████████████████████████████████████████████▌                                                      | 470/931 [00:05<00:04, 92.90it/s]
 52%|████████████████████████████████████████████████████████▋                                                     | 480/931 [00:05<00:04, 93.16it/s]
 53%|█████████████████████████████████████████████████████████▉                                                    | 490/931 [00:05<00:04, 93.29it/s]
 54%|███████████████████████████████████████████████████████████                                                   | 500/931 [00:05<00:04, 93.37it/s]
 55%|████████████████████████████████████████████████████████████▎                                                 | 510/931 [00:05<00:04, 90.97it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 520/931 [00:05<00:04, 92.44it/s]
 57%|██████████████████████████████████████████████████████████████▌                                               | 530/931 [00:05<00:04, 92.98it/s]
 58%|███████████████████████████████████████████████████████████████▊                                              | 540/931 [00:05<00:04, 93.44it/s]
 59%|████████████████████████████████████████████████████████████████▉                                             | 550/931 [00:05<00:04, 93.22it/s]
 60%|██████████████████████████████████████████████████████████████████▏                                           | 560/931 [00:06<00:03, 93.36it/s]
 61%|███████████████████████████████████████████████████████████████████▎                                          | 570/931 [00:06<00:03, 94.10it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                         | 580/931 [00:06<00:03, 94.23it/s]
 63%|█████████████████████████████████████████████████████████████████████▋                                        | 590/931 [00:06<00:03, 93.63it/s]
 64%|██████████████████████████████████████████████████████████████████████▉                                       | 600/931 [00:06<00:03, 92.51it/s]
 66%|████████████████████████████████████████████████████████████████████████                                      | 610/931 [00:06<00:03, 92.29it/s]
 67%|█████████████████████████████████████████████████████████████████████████▎                                    | 620/931 [00:06<00:03, 91.93it/s]
 68%|██████████████████████████████████████████████████████████████████████████▍                                   | 630/931 [00:06<00:03, 90.87it/s]
 69%|███████████████████████████████████████████████████████████████████████████▌                                  | 640/931 [00:06<00:03, 92.21it/s]
 70%|████████████████████████████████████████████████████████████████████████████▊                                 | 650/931 [00:06<00:03, 92.41it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▉                                | 660/931 [00:07<00:02, 92.27it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▏                              | 670/931 [00:07<00:02, 92.26it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▎                             | 680/931 [00:07<00:02, 92.59it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 690/931 [00:07<00:02, 92.71it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▋                           | 700/931 [00:07<00:02, 93.36it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 710/931 [00:07<00:02, 93.90it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 720/931 [00:07<00:02, 93.75it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                       | 730/931 [00:07<00:02, 93.56it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▍                      | 740/931 [00:07<00:02, 93.49it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 750/931 [00:08<00:01, 93.72it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▊                    | 760/931 [00:08<00:01, 94.00it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▉                   | 770/931 [00:08<00:01, 94.60it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▏                 | 780/931 [00:08<00:01, 94.22it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▎                | 790/931 [00:08<00:01, 94.16it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▌               | 800/931 [00:08<00:01, 94.23it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▋              | 810/931 [00:08<00:01, 94.42it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▉             | 820/931 [00:08<00:01, 93.65it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████            | 830/931 [00:08<00:01, 93.49it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▏          | 840/931 [00:09<00:00, 93.45it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▍         | 850/931 [00:09<00:00, 93.53it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌        | 860/931 [00:09<00:00, 93.43it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 870/931 [00:09<00:00, 92.97it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 880/931 [00:09<00:00, 93.27it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 890/931 [00:09<00:00, 92.47it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▎   | 900/931 [00:09<00:00, 91.87it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 910/931 [00:09<00:00, 90.68it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 920/931 [00:09<00:00, 87.98it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊| 929/931 [00:09<00:00, 87.08it/s]
Models:  70%|█████████████████████████████████████████████████████████████████████████▌                               | 7/10 [01:05<00:28,  9.59s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█                                                                                                               | 9/931 [00:00<00:10, 85.29it/s]
  2%|██▏                                                                                                            | 18/931 [00:00<00:10, 87.07it/s]
  3%|███▏                                                                                                           | 27/931 [00:00<00:10, 84.30it/s]
  4%|████▎                                                                                                          | 36/931 [00:00<00:10, 84.69it/s]
  5%|█████▎                                                                                                         | 45/931 [00:00<00:10, 85.39it/s]
  6%|██████▍                                                                                                        | 54/931 [00:00<00:10, 85.85it/s]
  7%|███████▌                                                                                                       | 63/931 [00:00<00:09, 87.03it/s]
  8%|████████▌                                                                                                      | 72/931 [00:00<00:09, 86.98it/s]
  9%|█████████▋                                                                                                     | 81/931 [00:00<00:09, 87.59it/s]
 10%|██████████▋                                                                                                    | 90/931 [00:01<00:09, 87.34it/s]
 11%|███████████▊                                                                                                   | 99/931 [00:01<00:09, 86.47it/s]
 12%|████████████▊                                                                                                 | 108/931 [00:01<00:09, 87.12it/s]
 13%|█████████████▊                                                                                                | 117/931 [00:01<00:09, 87.25it/s]
 14%|██████████████▉                                                                                               | 126/931 [00:01<00:09, 87.33it/s]
 15%|████████████████                                                                                              | 136/931 [00:01<00:09, 88.12it/s]
 16%|█████████████████▏                                                                                            | 145/931 [00:01<00:08, 87.51it/s]
 17%|██████████████████▏                                                                                           | 154/931 [00:01<00:08, 87.19it/s]
 18%|███████████████████▎                                                                                          | 163/931 [00:01<00:08, 87.63it/s]
 18%|████████████████████▎                                                                                         | 172/931 [00:01<00:08, 87.87it/s]
 19%|█████████████████████▍                                                                                        | 181/931 [00:02<00:08, 87.85it/s]
 20%|██████████████████████▍                                                                                       | 190/931 [00:02<00:08, 87.32it/s]
 21%|███████████████████████▌                                                                                      | 199/931 [00:02<00:08, 87.62it/s]
 22%|████████████████████████▌                                                                                     | 208/931 [00:02<00:08, 87.59it/s]
 23%|█████████████████████████▋                                                                                    | 217/931 [00:02<00:08, 86.94it/s]
 24%|██████████████████████████▋                                                                                   | 226/931 [00:02<00:08, 87.46it/s]
 25%|███████████████████████████▊                                                                                  | 235/931 [00:02<00:08, 86.55it/s]
 26%|████████████████████████████▊                                                                                 | 244/931 [00:02<00:07, 86.57it/s]
 27%|█████████████████████████████▉                                                                                | 253/931 [00:02<00:07, 87.49it/s]
 28%|███████████████████████████████                                                                               | 263/931 [00:03<00:07, 88.52it/s]
 29%|████████████████████████████████▏                                                                             | 272/931 [00:03<00:07, 87.61it/s]
 30%|█████████████████████████████████▏                                                                            | 281/931 [00:03<00:07, 86.32it/s]
 31%|██████████████████████████████████▍                                                                           | 291/931 [00:03<00:07, 87.58it/s]
 32%|███████████████████████████████████▌                                                                          | 301/931 [00:03<00:07, 88.77it/s]
 33%|████████████████████████████████████▋                                                                         | 311/931 [00:03<00:06, 89.06it/s]
 34%|█████████████████████████████████████▊                                                                        | 320/931 [00:03<00:06, 88.63it/s]
 35%|██████████████████████████████████████▉                                                                       | 330/931 [00:03<00:06, 89.40it/s]
 37%|████████████████████████████████████████▏                                                                     | 340/931 [00:03<00:06, 89.92it/s]
 38%|█████████████████████████████████████████▎                                                                    | 350/931 [00:03<00:06, 91.70it/s]
 39%|██████████████████████████████████████████▌                                                                   | 360/931 [00:04<00:06, 92.84it/s]
 40%|███████████████████████████████████████████▋                                                                  | 370/931 [00:04<00:06, 92.38it/s]
 41%|████████████████████████████████████████████▉                                                                 | 380/931 [00:04<00:06, 90.00it/s]
 42%|██████████████████████████████████████████████                                                                | 390/931 [00:04<00:06, 89.50it/s]
 43%|███████████████████████████████████████████████▏                                                              | 399/931 [00:04<00:05, 89.17it/s]
 44%|████████████████████████████████████████████████▎                                                             | 409/931 [00:04<00:05, 90.09it/s]
 45%|█████████████████████████████████████████████████▌                                                            | 419/931 [00:04<00:05, 89.58it/s]
 46%|██████████████████████████████████████████████████▋                                                           | 429/931 [00:04<00:05, 90.40it/s]
 47%|███████████████████████████████████████████████████▊                                                          | 439/931 [00:04<00:05, 89.84it/s]
 48%|████████████████████████████████████████████████████▉                                                         | 448/931 [00:05<00:05, 88.43it/s]
 49%|██████████████████████████████████████████████████████                                                        | 458/931 [00:05<00:05, 89.49it/s]
 50%|███████████████████████████████████████████████████████▏                                                      | 467/931 [00:05<00:05, 88.81it/s]
 51%|████████████████████████████████████████████████████████▎                                                     | 477/931 [00:05<00:05, 90.27it/s]
 52%|█████████████████████████████████████████████████████████▌                                                    | 487/931 [00:05<00:04, 89.84it/s]
 53%|██████████████████████████████████████████████████████████▌                                                   | 496/931 [00:05<00:04, 89.36it/s]
 54%|███████████████████████████████████████████████████████████▋                                                  | 505/931 [00:05<00:04, 89.43it/s]
 55%|████████████████████████████████████████████████████████████▊                                                 | 515/931 [00:05<00:04, 89.64it/s]
 56%|██████████████████████████████████████████████████████████████                                                | 525/931 [00:05<00:04, 90.29it/s]
 57%|███████████████████████████████████████████████████████████████▏                                              | 535/931 [00:06<00:04, 90.45it/s]
 59%|████████████████████████████████████████████████████████████████▍                                             | 545/931 [00:06<00:04, 90.40it/s]
 60%|█████████████████████████████████████████████████████████████████▌                                            | 555/931 [00:06<00:04, 90.39it/s]
 61%|██████████████████████████████████████████████████████████████████▊                                           | 565/931 [00:06<00:04, 90.15it/s]
 62%|███████████████████████████████████████████████████████████████████▉                                          | 575/931 [00:06<00:03, 90.63it/s]
 63%|█████████████████████████████████████████████████████████████████████                                         | 585/931 [00:06<00:03, 89.31it/s]
 64%|██████████████████████████████████████████████████████████████████████▏                                       | 594/931 [00:06<00:03, 87.59it/s]
 65%|███████████████████████████████████████████████████████████████████████▏                                      | 603/931 [00:06<00:03, 87.57it/s]
 66%|████████████████████████████████████████████████████████████████████████▎                                     | 612/931 [00:06<00:03, 87.54it/s]
 67%|█████████████████████████████████████████████████████████████████████████▎                                    | 621/931 [00:07<00:03, 87.60it/s]
 68%|██████████████████████████████████████████████████████████████████████████▌                                   | 631/931 [00:07<00:03, 88.98it/s]
 69%|███████████████████████████████████████████████████████████████████████████▋                                  | 641/931 [00:07<00:03, 89.93it/s]
 70%|████████████████████████████████████████████████████████████████████████████▉                                 | 651/931 [00:07<00:03, 90.00it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▉                                | 660/931 [00:07<00:03, 89.16it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▏                              | 670/931 [00:07<00:02, 90.46it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▎                             | 680/931 [00:07<00:02, 90.78it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 690/931 [00:07<00:02, 91.40it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▋                           | 700/931 [00:07<00:02, 92.58it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 710/931 [00:07<00:02, 91.97it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 720/931 [00:08<00:02, 91.13it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                       | 730/931 [00:08<00:02, 90.38it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▍                      | 740/931 [00:08<00:02, 91.10it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 750/931 [00:08<00:01, 91.40it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▊                    | 760/931 [00:08<00:01, 91.45it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▉                   | 770/931 [00:08<00:01, 91.85it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▏                 | 780/931 [00:08<00:01, 92.41it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▎                | 790/931 [00:08<00:01, 93.20it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▌               | 800/931 [00:08<00:01, 93.09it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▋              | 810/931 [00:09<00:01, 92.94it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▉             | 820/931 [00:09<00:01, 92.82it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████            | 830/931 [00:09<00:01, 93.65it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▏          | 840/931 [00:09<00:00, 94.03it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▍         | 850/931 [00:09<00:00, 95.02it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌        | 860/931 [00:09<00:00, 94.35it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 870/931 [00:09<00:00, 94.54it/s]
 95%|███████████████████████████████████████████████████████████████████████████████████████████████████████▉      | 880/931 [00:09<00:00, 93.85it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 890/931 [00:09<00:00, 93.47it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▎   | 900/931 [00:10<00:00, 93.39it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌  | 910/931 [00:10<00:00, 94.12it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▋ | 920/931 [00:10<00:00, 94.86it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▉| 930/931 [00:10<00:00, 95.35it/s]
Models:  80%|████████████████████████████████████████████████████████████████████████████████████                     | 8/10 [01:16<00:19,  9.84s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/931 [00:00<00:10, 89.41it/s]
  2%|██▎                                                                                                            | 19/931 [00:00<00:10, 86.97it/s]
  3%|███▎                                                                                                           | 28/931 [00:00<00:10, 87.99it/s]
  4%|████▌                                                                                                          | 38/931 [00:00<00:09, 91.29it/s]
  5%|█████▋                                                                                                         | 48/931 [00:00<00:09, 90.91it/s]
  6%|██████▉                                                                                                        | 58/931 [00:00<00:09, 91.31it/s]
  7%|████████                                                                                                       | 68/931 [00:00<00:09, 91.16it/s]
  8%|█████████▎                                                                                                     | 78/931 [00:00<00:09, 92.78it/s]
  9%|██████████▍                                                                                                    | 88/931 [00:00<00:09, 92.59it/s]
 11%|███████████▋                                                                                                   | 98/931 [00:01<00:08, 94.12it/s]
 12%|████████████▊                                                                                                 | 108/931 [00:01<00:08, 95.66it/s]
 13%|█████████████▉                                                                                                | 118/931 [00:01<00:08, 96.06it/s]
 14%|███████████████                                                                                               | 128/931 [00:01<00:08, 96.22it/s]
 15%|████████████████▎                                                                                             | 138/931 [00:01<00:08, 96.64it/s]
 16%|█████████████████▌                                                                                            | 149/931 [00:01<00:07, 97.83it/s]
 17%|██████████████████▊                                                                                           | 159/931 [00:01<00:07, 98.01it/s]
 18%|███████████████████▉                                                                                          | 169/931 [00:01<00:07, 97.59it/s]
 19%|█████████████████████▏                                                                                        | 179/931 [00:01<00:07, 95.52it/s]
 20%|██████████████████████▎                                                                                       | 189/931 [00:02<00:07, 95.72it/s]
 21%|███████████████████████▌                                                                                      | 199/931 [00:02<00:07, 94.59it/s]
 22%|████████████████████████▋                                                                                     | 209/931 [00:02<00:07, 94.14it/s]
 24%|█████████████████████████▉                                                                                    | 220/931 [00:02<00:07, 96.10it/s]
 25%|███████████████████████████▎                                                                                  | 231/931 [00:02<00:07, 98.14it/s]
 26%|████████████████████████████▌                                                                                 | 242/931 [00:02<00:06, 99.87it/s]
 27%|█████████████████████████████▊                                                                                | 252/931 [00:02<00:06, 98.92it/s]
 28%|██████████████████████████████▊                                                                              | 263/931 [00:02<00:06, 100.38it/s]
 29%|████████████████████████████████                                                                             | 274/931 [00:02<00:06, 100.75it/s]
 31%|█████████████████████████████████▎                                                                           | 285/931 [00:02<00:06, 100.99it/s]
 32%|██████████████████████████████████▋                                                                          | 296/931 [00:03<00:06, 100.12it/s]
 33%|████████████████████████████████████▎                                                                         | 307/931 [00:03<00:06, 98.09it/s]
 34%|█████████████████████████████████████▍                                                                        | 317/931 [00:03<00:06, 97.94it/s]
 35%|██████████████████████████████████████▊                                                                       | 328/931 [00:03<00:06, 99.03it/s]
 36%|███████████████████████████████████████▋                                                                     | 339/931 [00:03<00:05, 100.35it/s]
 38%|█████████████████████████████████████████▎                                                                    | 350/931 [00:03<00:05, 99.29it/s]
 39%|██████████████████████████████████████████▌                                                                   | 360/931 [00:03<00:05, 98.55it/s]
 40%|███████████████████████████████████████████▋                                                                  | 370/931 [00:03<00:05, 98.46it/s]
 41%|████████████████████████████████████████████▉                                                                 | 380/931 [00:03<00:05, 98.63it/s]
 42%|██████████████████████████████████████████████▏                                                               | 391/931 [00:04<00:05, 99.80it/s]
 43%|███████████████████████████████████████████████▍                                                              | 401/931 [00:04<00:05, 98.95it/s]
 44%|████████████████████████████████████████████████▋                                                             | 412/931 [00:04<00:05, 99.94it/s]
 45%|█████████████████████████████████████████████████▌                                                           | 423/931 [00:04<00:05, 100.92it/s]
 47%|██████████████████████████████████████████████████▊                                                          | 434/931 [00:04<00:04, 101.42it/s]
 48%|████████████████████████████████████████████████████                                                         | 445/931 [00:04<00:04, 102.25it/s]
 49%|█████████████████████████████████████████████████████▍                                                       | 456/931 [00:04<00:04, 103.18it/s]
 50%|██████████████████████████████████████████████████████▋                                                      | 467/931 [00:04<00:04, 102.31it/s]
 51%|███████████████████████████████████████████████████████▉                                                     | 478/931 [00:04<00:04, 100.77it/s]
 53%|█████████████████████████████████████████████████████████▊                                                    | 489/931 [00:05<00:04, 99.65it/s]
 54%|███████████████████████████████████████████████████████████                                                   | 500/931 [00:05<00:04, 99.77it/s]
 55%|████████████████████████████████████████████████████████████▍                                                 | 511/931 [00:05<00:04, 99.90it/s]
 56%|█████████████████████████████████████████████████████████████▌                                                | 521/931 [00:05<00:04, 98.96it/s]
 57%|██████████████████████████████████████████████████████████████▋                                               | 531/931 [00:05<00:04, 99.01it/s]
 58%|████████████████████████████████████████████████████████████████                                              | 542/931 [00:05<00:03, 99.93it/s]
 59%|█████████████████████████████████████████████████████████████████▏                                            | 552/931 [00:05<00:03, 99.40it/s]
 60%|██████████████████████████████████████████████████████████████████▍                                           | 562/931 [00:05<00:03, 96.86it/s]
 61%|███████████████████████████████████████████████████████████████████▌                                          | 572/931 [00:05<00:03, 96.84it/s]
 63%|████████████████████████████████████████████████████████████████████▊                                         | 582/931 [00:05<00:03, 97.75it/s]
 64%|█████████████████████████████████████████████████████████████████████▉                                        | 592/931 [00:06<00:03, 97.55it/s]
 65%|███████████████████████████████████████████████████████████████████████▏                                      | 602/931 [00:06<00:03, 97.12it/s]
 66%|████████████████████████████████████████████████████████████████████████▎                                     | 612/931 [00:06<00:03, 95.70it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                    | 622/931 [00:06<00:03, 96.75it/s]
 68%|██████████████████████████████████████████████████████████████████████████▊                                   | 633/931 [00:06<00:03, 97.87it/s]
 69%|███████████████████████████████████████████████████████████████████████████▉                                  | 643/931 [00:06<00:02, 97.68it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▎                                | 654/931 [00:06<00:02, 98.49it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▍                               | 664/931 [00:06<00:02, 98.84it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▋                              | 674/931 [00:06<00:02, 98.98it/s]
 74%|████████████████████████████████████████████████████████████████████████████████▏                            | 685/931 [00:07<00:02, 100.08it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▏                           | 696/931 [00:07<00:02, 98.86it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▍                          | 706/931 [00:07<00:02, 98.16it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████▌                         | 716/931 [00:07<00:02, 97.22it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▊                        | 726/931 [00:07<00:02, 96.23it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▉                       | 736/931 [00:07<00:02, 94.11it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▏                     | 746/931 [00:07<00:01, 93.38it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████▎                    | 756/931 [00:07<00:01, 94.02it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▌                   | 766/931 [00:07<00:01, 94.17it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▋                  | 776/931 [00:07<00:01, 94.19it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▉                 | 787/931 [00:08<00:01, 96.72it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▏               | 797/931 [00:08<00:01, 97.56it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▍              | 808/931 [00:08<00:01, 98.52it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▊             | 819/931 [00:08<00:01, 99.56it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▏           | 830/931 [00:08<00:01, 100.54it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▍          | 841/931 [00:08<00:00, 101.06it/s]
 92%|███████████████████████████████████████████████████████████████████████████████████████████████████▊         | 852/931 [00:08<00:00, 101.18it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████        | 863/931 [00:08<00:00, 100.60it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▎      | 874/931 [00:08<00:00, 99.18it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▍     | 884/931 [00:09<00:00, 97.55it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋    | 894/931 [00:09<00:00, 97.38it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▊   | 904/931 [00:09<00:00, 96.10it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▉  | 914/931 [00:09<00:00, 94.61it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 924/931 [00:09<00:00, 95.58it/s]
Models:  90%|██████████████████████████████████████████████████████████████████████████████████████████████▌          | 9/10 [01:25<00:09,  9.75s/it]
  0%|                                                                                                                        | 0/931 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/931 [00:00<00:09, 96.67it/s]
  2%|██▍                                                                                                            | 20/931 [00:00<00:09, 95.85it/s]
  3%|███▌                                                                                                           | 30/931 [00:00<00:09, 96.17it/s]
  4%|████▊                                                                                                          | 40/931 [00:00<00:09, 96.09it/s]
  5%|█████▉                                                                                                         | 50/931 [00:00<00:09, 94.22it/s]
  6%|███████▏                                                                                                       | 60/931 [00:00<00:09, 94.81it/s]
  8%|████████▎                                                                                                      | 70/931 [00:00<00:09, 95.66it/s]
  9%|█████████▌                                                                                                     | 80/931 [00:00<00:08, 95.83it/s]
 10%|██████████▋                                                                                                    | 90/931 [00:00<00:08, 95.87it/s]
 11%|███████████▊                                                                                                  | 100/931 [00:01<00:08, 94.50it/s]
 12%|████████████▉                                                                                                 | 110/931 [00:01<00:08, 93.69it/s]
 13%|██████████████▏                                                                                               | 120/931 [00:01<00:08, 94.77it/s]
 14%|███████████████▎                                                                                              | 130/931 [00:01<00:08, 95.16it/s]
 15%|████████████████▌                                                                                             | 140/931 [00:01<00:08, 94.90it/s]
 16%|█████████████████▋                                                                                            | 150/931 [00:01<00:08, 96.03it/s]
 17%|██████████████████▉                                                                                           | 160/931 [00:01<00:08, 95.23it/s]
 18%|████████████████████▏                                                                                         | 171/931 [00:01<00:07, 97.38it/s]
 19%|█████████████████████▍                                                                                        | 181/931 [00:01<00:07, 97.43it/s]
 21%|██████████████████████▌                                                                                       | 191/931 [00:01<00:07, 97.16it/s]
 22%|███████████████████████▋                                                                                      | 201/931 [00:02<00:07, 97.83it/s]
 23%|█████████████████████████                                                                                     | 212/931 [00:02<00:07, 99.47it/s]
 24%|██████████████████████████                                                                                   | 223/931 [00:02<00:07, 100.00it/s]
 25%|███████████████████████████▌                                                                                  | 233/931 [00:02<00:07, 99.14it/s]
 26%|████████████████████████████▋                                                                                 | 243/931 [00:02<00:07, 96.28it/s]
 27%|█████████████████████████████▉                                                                                | 253/931 [00:02<00:07, 95.63it/s]
 28%|███████████████████████████████                                                                               | 263/931 [00:02<00:06, 96.35it/s]
 29%|████████████████████████████████▎                                                                             | 273/931 [00:02<00:06, 96.24it/s]
 30%|█████████████████████████████████▍                                                                            | 283/931 [00:02<00:06, 96.78it/s]
 31%|██████████████████████████████████▌                                                                           | 293/931 [00:03<00:06, 97.07it/s]
 33%|███████████████████████████████████▊                                                                          | 303/931 [00:03<00:06, 97.63it/s]
 34%|████████████████████████████████████▉                                                                         | 313/931 [00:03<00:06, 97.14it/s]
 35%|██████████████████████████████████████▏                                                                       | 323/931 [00:03<00:06, 97.30it/s]
 36%|███████████████████████████████████████▎                                                                      | 333/931 [00:03<00:06, 97.61it/s]
 37%|████████████████████████████████████████▋                                                                     | 344/931 [00:03<00:05, 99.20it/s]
 38%|█████████████████████████████████████████▊                                                                    | 354/931 [00:03<00:05, 98.65it/s]
 39%|███████████████████████████████████████████                                                                   | 364/931 [00:03<00:05, 97.70it/s]
 40%|████████████████████████████████████████████▏                                                                 | 374/931 [00:03<00:05, 96.95it/s]
 41%|█████████████████████████████████████████████▎                                                                | 384/931 [00:03<00:05, 96.86it/s]
 42%|██████████████████████████████████████████████▌                                                               | 394/931 [00:04<00:05, 97.43it/s]
 43%|███████████████████████████████████████████████▋                                                              | 404/931 [00:04<00:05, 95.84it/s]
 44%|████████████████████████████████████████████████▉                                                             | 414/931 [00:04<00:05, 96.71it/s]
 46%|██████████████████████████████████████████████████▏                                                           | 425/931 [00:04<00:05, 97.85it/s]
 47%|███████████████████████████████████████████████████▍                                                          | 435/931 [00:04<00:05, 97.37it/s]
 48%|████████████████████████████████████████████████████▌                                                         | 445/931 [00:04<00:04, 97.51it/s]
 49%|█████████████████████████████████████████████████████▊                                                        | 455/931 [00:04<00:04, 98.20it/s]
 50%|██████████████████████████████████████████████████████▉                                                       | 465/931 [00:04<00:04, 98.10it/s]
 51%|████████████████████████████████████████████████████████                                                      | 475/931 [00:04<00:04, 97.75it/s]
 52%|█████████████████████████████████████████████████████████▎                                                    | 485/931 [00:05<00:04, 96.78it/s]
 53%|██████████████████████████████████████████████████████████▍                                                   | 495/931 [00:05<00:04, 96.91it/s]
 54%|███████████████████████████████████████████████████████████▋                                                  | 505/931 [00:05<00:04, 95.51it/s]
 55%|████████████████████████████████████████████████████████████▊                                                 | 515/931 [00:05<00:04, 93.87it/s]
 56%|██████████████████████████████████████████████████████████████                                                | 525/931 [00:05<00:04, 92.89it/s]
 57%|███████████████████████████████████████████████████████████████▏                                              | 535/931 [00:05<00:04, 93.41it/s]
 59%|████████████████████████████████████████████████████████████████▌                                             | 546/931 [00:05<00:04, 95.77it/s]
 60%|█████████████████████████████████████████████████████████████████▋                                            | 556/931 [00:05<00:03, 94.41it/s]
 61%|██████████████████████████████████████████████████████████████████▊                                           | 566/931 [00:05<00:03, 93.08it/s]
 62%|████████████████████████████████████████████████████████████████████                                          | 576/931 [00:05<00:03, 92.65it/s]
 63%|█████████████████████████████████████████████████████████████████████▏                                        | 586/931 [00:06<00:03, 94.40it/s]
 64%|██████████████████████████████████████████████████████████████████████▍                                       | 596/931 [00:06<00:03, 95.97it/s]
 65%|███████████████████████████████████████████████████████████████████████▋                                      | 607/931 [00:06<00:03, 96.76it/s]
 66%|█████████████████████████████████████████████████████████████████████████                                     | 618/931 [00:06<00:03, 99.11it/s]
 68%|██████████████████████████████████████████████████████████████████████████▎                                   | 629/931 [00:06<00:03, 99.63it/s]
 69%|███████████████████████████████████████████████████████████████████████████▍                                  | 639/931 [00:06<00:02, 98.79it/s]
 70%|████████████████████████████████████████████████████████████████████████████▋                                 | 649/931 [00:06<00:02, 96.48it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▊                                | 659/931 [00:06<00:02, 97.23it/s]
 72%|███████████████████████████████████████████████████████████████████████████████                               | 669/931 [00:06<00:02, 97.06it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▏                             | 679/931 [00:07<00:02, 97.09it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▍                            | 689/931 [00:07<00:02, 96.50it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▋                           | 700/931 [00:07<00:02, 97.88it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 710/931 [00:07<00:02, 97.40it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████▏                        | 721/931 [00:07<00:02, 98.44it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▍                       | 732/931 [00:07<00:01, 99.58it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▋                      | 742/931 [00:07<00:01, 98.02it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▊                     | 752/931 [00:07<00:01, 97.80it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▏                   | 763/931 [00:07<00:01, 98.54it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▎                  | 773/931 [00:07<00:01, 98.24it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▌                 | 783/931 [00:08<00:01, 97.38it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▋                | 793/931 [00:08<00:01, 95.11it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▉               | 803/931 [00:08<00:01, 93.85it/s]
 87%|████████████████████████████████████████████████████████████████████████████████████████████████              | 813/931 [00:08<00:01, 93.85it/s]
 88%|█████████████████████████████████████████████████████████████████████████████████████████████████▏            | 823/931 [00:08<00:01, 94.69it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████▍           | 833/931 [00:08<00:01, 95.30it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▌          | 843/931 [00:08<00:00, 96.42it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████▊         | 853/931 [00:08<00:00, 97.13it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▉        | 863/931 [00:08<00:00, 95.98it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▏      | 873/931 [00:09<00:00, 95.68it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎     | 883/931 [00:09<00:00, 96.26it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▌    | 893/931 [00:09<00:00, 96.69it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▋   | 903/931 [00:09<00:00, 96.13it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▊  | 913/931 [00:09<00:00, 96.79it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 924/931 [00:09<00:00, 98.67it/s]
Models: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [01:35<00:00,  9.53s/it]
INFO:root:Finished fitting 10 models to 931 genes
--- 304.620 seconds ---
iter 0, ELBO: -1.10e+11
iter 1, ELBO: -5.31e+10, delta_ELBO: 5.70e+10
iter 2, ELBO: -5.31e+10, delta_ELBO: 7.72e+05
iter 3, ELBO: -5.31e+10, delta_ELBO: 9.15e+04
iter 4, ELBO: -5.31e+10, delta_ELBO: 2.49e+04
iter 5, ELBO: -5.31e+10, delta_ELBO: 1.13e+03
iter 6, ELBO: -5.31e+10, delta_ELBO: 5.15e+02
iter 7, ELBO: -5.31e+10, delta_ELBO: 2.93e+03
iter 8, ELBO: -5.31e+10, delta_ELBO: 2.01e+02
iter 9, ELBO: -5.31e+10, delta_ELBO: 1.75e+02
iter 10, ELBO: -5.31e+10, delta_ELBO: 8.39e+00
iter 11, ELBO: -5.31e+10, delta_ELBO: 1.15e-01
iter 12, ELBO: -5.31e+10, delta_ELBO: 1.06e-01
iter 13, ELBO: -5.31e+10, delta_ELBO: 1.07e-01
iter 14, ELBO: -5.31e+10, delta_ELBO: 0.00e+00
Converged on iter 14
--- 8985.346 seconds ---
Note The spot-level adata patient1_adata_all.h5ad (4x resolution) can be clustered using spatialDM, but it will cost too much time (about 40 mins).
- patient1_adata_all.h5ad with 5039 samples and 596 features.
- SpatialDE.run, cost 148.496 seconds.
- SpatialDE.aeh.spatial_patterns, cost 8985.346 seconds, the details like the next cell.

— 304.620 seconds — iter 0, ELBO: -1.10e+11 iter 1, ELBO: -5.31e+10, delta_ELBO: 5.70e+10 iter 2, ELBO: -5.31e+10, delta_ELBO: 7.72e+05 iter 3, ELBO: -5.31e+10, delta_ELBO: 9.15e+04 iter 4, ELBO: -5.31e+10, delta_ELBO: 2.49e+04 iter 5, ELBO: -5.31e+10, delta_ELBO: 1.13e+03 iter 6, ELBO: -5.31e+10, delta_ELBO: 5.15e+02 iter 7, ELBO: -5.31e+10, delta_ELBO: 2.93e+03 iter 8, ELBO: -5.31e+10, delta_ELBO: 2.01e+02 iter 9, ELBO: -5.31e+10, delta_ELBO: 1.75e+02 iter 10, ELBO: -5.31e+10, delta_ELBO: 8.39e+00 iter 11, ELBO: -5.31e+10, delta_ELBO: 1.15e-01 iter 12, ELBO: -5.31e+10, delta_ELBO: 1.06e-01 iter 13, ELBO: -5.31e+10, delta_ELBO: 1.07e-01 iter 14, ELBO: -5.31e+10, delta_ELBO: 0.00e+00 Converged on iter 14 — 8985.346 seconds —

[ ]:
fst.spatialDE_clusters(histology_results_allsc_spot, patterns_allsc_spot, adata_impt_all_sc_spot.obsm['spatial'], marker='o',
                       w=3, s=3, save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_all_sc_spot_SpatialDE_scale.pdf")
_images/NPC_LRI_CCC_count_46_0.png
[ ]:
print(adata_impt_all_sc_spot)
[ ]:
# ## save adata
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_sc_spot/spatialDE/')
# histology_results_allsc_spot.to_csv('NPC1_histology_results_all_sc_spot.csv', index=False)
# patterns_allsc_spot.to_csv('NPC1_patterns_all_sc_spot.csv', index=False)
# adata_impt_all_sc_spot_save = fst.clean_save_adata(adata_impt_all_sc_spot, str(patientxy)+'_adata_pattern_all_sc_spot.h5ad')
[ ]:
# ## add histology information to adata
# histology_results_allsc_spot = pd.DataFrame({'g': bin_allsc_spots.index, 'pattern': gaussian_allsc_spot.labels})
# histology_results_allsc_spot_binary = pd.DataFrame({'g': bin_allsc_spots_binary.index, 'pattern': gaussian_allsc_spot_binary.labels})
# adata_impt_all_sc_spot.uns['histology_results_continu'] = histology_results_allsc_spot
# adata_impt_all_sc_spot.uns['histology_results_binary'] = histology_results_allsc_spot_binary
[ ]:
# ## save adata
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_sc_spot/sparseAEH/')
# adata_impt_all_sc_spot_save = fst.clean_save_adata(adata_impt_all_sc_spot, str(patientxy)+'_adata_pattern_all_sc_spot.h5ad')
[ ]:
print(adata_impt_all_sc_spot_save)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'ligand', 'receptor', 'geneInter', 'local_stat', 'local_z_p', 'selected_spots', 'histology_results_continu', 'histology_results_binary'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'

2. Load sub-spot-level adata of all spots (paper Fig. 2G)

[ ]:
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/')

# adata_impt_all_spot = sc.read_h5ad(filename=str(patientxy)+'_adata_imput_all_spot.h5ad')
adata_impt_all_spot = sc.read_h5ad(filename=str(patientxy)+'_adata_imput_all_spot_scale.h5ad')

print(adata_impt_all_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial'
    obsm: 'spatial'
[7]:
adata_impt_all_spot.to_df().head()
[7]:
TGFB1 TGFBR1 TGFBR2 TGFB2 TGFB3 ACVR1B ACVR1C ACVR1 BMP2 BMPR1A ... KDR TREM2 SEMA6A SEMA6B SEMA7A PLXNC1 SIGLEC1 THY1 VCAM1 VSIR
0 0.001822 0.001698 0.000382 0.000188 0.000483 0.000300 0.000237 0.000179 0.000269 0.000303 ... 0.000301 0.000194 0.000308 0.000268 0.003061 0.000150 0.000163 0.003330 0.004805 0.002793
1 0.008334 0.004330 0.003083 0.000167 0.000290 0.000259 0.000337 0.000287 0.001616 0.000214 ... 0.000306 0.000164 0.000411 0.001612 0.002783 0.000142 0.000152 0.004806 0.011519 0.003559
2 0.000617 0.000660 0.001656 0.000321 0.000283 0.001811 0.000081 0.000288 0.000237 0.000188 ... 0.000172 0.000150 0.000382 0.000221 0.000319 0.000088 0.000120 0.000819 0.001762 0.000782
3 0.003181 0.002924 0.003175 0.000145 0.001596 0.000291 0.000415 0.001562 0.000228 0.001581 ... 0.000280 0.000164 0.000371 0.000252 0.001737 0.000533 0.000155 0.005228 0.009239 0.002393
4 0.001212 0.000870 0.000533 0.000355 0.000369 0.000715 0.000167 0.000183 0.000458 0.000241 ... 0.000259 0.000178 0.000906 0.000231 0.000974 0.000341 0.000143 0.002873 0.005851 0.001704

5 rows × 596 columns

2.1 Get weight_matrix by rbf kernel

Note The sub-spot-level adata patient1_adata_all.h5ad (4x16x resolution) can not be clustered using spatialDM, here we use the integrated adata patient1_adata_all_spot.h5ad (4x resolution).

[8]:
scale_factors = fst.json_load(f"{path}/FineST/FineST_local/Dataset/NPC/{patientxy}/")
print(scale_factors)
{'tissue_hires_scalef': 0.115267135, 'tissue_lowres_scalef': 0.03458014, 'fiducial_diameter_fullres': 225.25885592749816, 'spot_diameter_fullres': 139.44595843130838}
[9]:
spot_diameter_fullres=100
# spot_diameter_fullres = scale_factors['spot_diameter_fullres']

fst.weight_matrix(adata_impt_all_spot, l = spot_diameter_fullres,
                  cutoff = 0.001, single_cell = False, n_nearest_neighbors=6)

print(adata_impt_all_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[10]:
## Visualize the range of interaction
plt.figure(figsize=(5, 5))
plt.scatter(adata_impt_all_spot.obsm['spatial'][:,0], adata_impt_all_spot.obsm['spatial'][:,1],
            c=adata_impt_all_spot.obsp['weight'].A[500], s=3)
plt.gca().invert_yaxis()
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/weight_matrix_neibor_all_spot.pdf", format='pdf', dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_59_0.png
[11]:
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/sparseAEH/')

2.2 extract valid LR pairs from the database

[12]:
## find overlapping LRs from CellChatDB
start = time.time()
sdm.extract_lr(adata_impt_all_spot, 'human', min_cell=3)
print("%.3f seconds" %(time.time()-start))
print(adata_impt_all_spot)
32.460 seconds
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[13]:
## see the condidiate LR pairs for this NPC datset
adata_impt_all_spot.uns['geneInter']
[13]:
interaction_name pathway_name agonist antagonist co_A_receptor co_I_receptor evidence annotation interaction_name_2
EFNA5_EPHB2 EFNA5_EPHB2 EPHA NaN NaN NaN NaN PMID:15107857; PMID: 15114347 Cell-Cell Contact EFNA5 - EPHB2
EFNB1_EPHA4 EFNB1_EPHA4 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHA4
EFNB1_EPHB1 EFNB1_EPHB1 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB1
EFNB1_EPHB2 EFNB1_EPHB2 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB2
EFNB1_EPHB3 EFNB1_EPHB3 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB3
... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 CCL3_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL3 - CCR5
CCL5_CCR5 CCL5_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL5 - CCR5
CCL4_CCR5 CCL4_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL4 - CCR5
CXCL1_ACKR1 CXCL1_ACKR1 CXCL NaN NaN NaN NaN PMID: 26740381 Secreted Signaling CXCL1 - ACKR1
CORT_SSTR2 CORT_SSTR2 SEMATOSTATIN NaN NaN NaN NaN KEGG: hsa04080 Secreted Signaling CORT - SSTR2

1129 rows × 9 columns

2.3 Global selection (z-score approach)

[14]:
## Identify dataset-specific interacting LR pairs (global selection)
start = time.time()
# global Moran selection
sdm.spatialdm_global(adata_impt_all_spot, n_perm=1000, specified_ind=None, method='z-score', nproc=1)
# select significant pairs
sdm.sig_pairs(adata_impt_all_spot, method='z-score', fdr=True, threshold=0.05)  # , threshold=0.1
print("%.3f seconds" %(time.time()-start))
print(adata_impt_all_spot)
2.636 seconds
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[15]:
spa_coexp_pair_all_spot = fst.anno_LRpair(adata_impt_all_spot)
spa_coexp_pair_all_spot
[15]:
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected evidence annotation
CORT_SSTR2 CORT None SSTR2 None None 0.000000 83.500008 0.0 True KEGG: hsa04080 Secreted Signaling
COL4A2_SDC4 COL4A2 None SDC4 None None 0.000000 79.447608 0.0 True KEGG: hsa04512 ECM-Receptor
TGFB3_TGFBR1_TGFBR2 TGFB3 None TGFBR1 TGFBR2 None 0.000000 72.607465 0.0 True KEGG: hsa04350 Secreted Signaling
COL4A4_SDC4 COL4A4 None SDC4 None None 0.000000 41.677939 0.0 True KEGG: hsa04512 ECM-Receptor
COL4A5_SDC4 COL4A5 None SDC4 None None 0.000000 111.455059 0.0 True KEGG: hsa04512 ECM-Receptor
... ... ... ... ... ... ... ... ... ... ... ...
FGF7_FGFR2 FGF7 None FGFR2 None None 1.000000 -45.703952 1.0 False PMC: 4393358 Secreted Signaling
LAMA4_SV2B LAMA4 None SV2B None None 1.000000 -14.369422 1.0 False KEGG: hsa04512 ECM-Receptor
LAMB1_SV2B LAMB1 None SV2B None None 0.955586 -1.701616 1.0 False KEGG: hsa04512 ECM-Receptor
WNT2_FZD4_LRP5 WNT2 None FZD4 LRP5 None 1.000000 -10.640432 1.0 False KEGG: hsa04310; PMID: 23209147 Secreted Signaling
WNT5A_FZD10 WNT5A None FZD10 None None 1.000000 -5.798455 1.0 False KEGG: hsa04310 Secreted Signaling

1129 rows × 11 columns

[16]:
## save 798 significant LR pairs
spa_coexp_pair_all_spot.to_csv("NPC_spa_coexp_pair_all_spot.csv", index=True, header=True)
[17]:
## see the unique gene of sig LR pairs
spa_coexp_pairTgene_all_spot = fst.LRpair_gene(spa_coexp_pair_all_spot)
print("spa_coexp_pairTgene_all_spot shape:", len(spa_coexp_pairTgene_all_spot))
spa_coexp_pairTgene_all_spot shape: 484
[19]:
spa_coexp_pairTgene_all_spot.to_csv("NPC_spa_coexpr_LRgene_all_spot.csv", index=True, header=True)
[20]:
## use fdr corrected global p-values and a threshold FDR < 0.1 (default)
print(adata_impt_all_spot.uns['global_res'].selected.sum())
adata_impt_all_spot.uns['global_res'].sort_values(by='fdr')
957
[20]:
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected
CORT_SSTR2 CORT None SSTR2 None None 0.000000 83.500008 0.0 True
COL4A2_SDC4 COL4A2 None SDC4 None None 0.000000 79.447608 0.0 True
TGFB3_TGFBR1_TGFBR2 TGFB3 None TGFBR1 TGFBR2 None 0.000000 72.607465 0.0 True
COL4A4_SDC4 COL4A4 None SDC4 None None 0.000000 41.677939 0.0 True
COL4A5_SDC4 COL4A5 None SDC4 None None 0.000000 111.455059 0.0 True
... ... ... ... ... ... ... ... ... ...
FGF7_FGFR2 FGF7 None FGFR2 None None 1.000000 -45.703952 1.0 False
LAMA4_SV2B LAMA4 None SV2B None None 1.000000 -14.369422 1.0 False
LAMB1_SV2B LAMB1 None SV2B None None 0.955586 -1.701616 1.0 False
WNT2_FZD4_LRP5 WNT2 None FZD4 LRP5 None 1.000000 -10.640432 1.0 False
WNT5A_FZD10 WNT5A None FZD10 None None 1.000000 -5.798455 1.0 False

1129 rows × 9 columns

2.4 Local selection (z-score approach)

[21]:
## Local selection is then run for the selected 787 pairs to identify where the LRI takes place
adata_impt_all_spot.raw = adata_impt_all_spot

start = time.time()

# local spot selection
sdm.spatialdm_local(adata_impt_all_spot, n_perm=1000, method='z-score', specified_ind=None, nproc=1)
# significant local spots
sdm.sig_spots(adata_impt_all_spot, method='z-score', fdr=False, threshold=0.05)  # , threshold=0.1
print("%.3f seconds" %(time.time()-start))
3.392 seconds
[22]:
print(adata_impt_all_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[23]:
adata_impt_all_spot.uns["local_z_p"]
[23]:
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0.655412 0.674908 1.000000 0.639613 0.534511 2.160452e-02 0.498840 1.000000 1.000000e+00 1.000000 ... 5.137321e-01 1.000000 1.000000 0.616307 0.580117 0.559675 0.516496 0.593055 1.000000 0.521278
EFNB1_EPHA4 0.490049 0.493251 0.878681 0.477776 0.527666 5.183444e-01 0.822428 0.974143 7.745724e-01 1.000000 ... 5.058994e-01 0.233509 0.564720 0.513904 0.500715 0.290205 0.553652 1.000000 0.567770 0.581260
EFNB1_EPHB1 1.000000 0.493372 1.000000 0.499900 0.773229 4.210246e-01 0.599023 1.000000 1.000000e+00 0.666309 ... 1.000000e+00 0.275787 0.689280 0.236128 0.288588 0.012368 0.082328 1.000000 0.537431 0.206837
EFNB1_EPHB2 1.000000 0.467399 1.000000 0.497462 0.681939 1.526749e-37 0.518635 1.000000 1.000000e+00 1.000000 ... 5.426625e-01 0.548755 1.000000 0.426666 0.321904 0.444707 0.420023 0.487306 0.542381 0.495463
EFNB1_EPHB3 1.000000 0.487862 1.000000 0.573025 0.736910 5.262393e-01 0.627169 1.000000 1.000000e+00 1.000000 ... 1.000000e+00 0.602163 1.000000 0.566052 0.627192 0.638755 0.290141 0.460339 0.560703 0.577116
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 1.000000 1.000000 1.000000 1.000000 0.622055 5.789178e-01 1.000000 0.303207 2.915547e-02 0.538026 ... 2.640185e-15 1.000000 0.199193 0.519508 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
CCL5_CCR5 1.000000 0.652384 1.000000 0.530799 0.629498 5.661529e-01 0.545639 0.127201 1.422486e-51 0.217570 ... 4.616479e-01 0.493728 0.147322 0.508680 0.608748 0.524638 1.000000 1.000000 1.000000 1.000000
CCL4_CCR5 1.000000 1.000000 1.000000 1.000000 0.679646 6.296791e-01 1.000000 0.106842 2.007657e-87 0.061468 ... 2.120163e-01 0.510394 0.091150 0.484207 0.784969 0.642598 0.500959 1.000000 1.000000 1.000000
CXCL1_ACKR1 1.000000 1.000000 0.498348 0.545119 0.491516 4.973160e-01 1.000000 1.000000 1.000000e+00 1.000000 ... 1.000000e+00 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000
CORT_SSTR2 1.000000 1.000000 1.000000 1.000000 1.000000 9.650708e-01 0.020622 0.019603 9.315005e-02 1.000000 ... 5.184607e-01 0.681865 0.809748 0.614249 0.611314 0.417791 0.459585 0.242307 1.000000 0.546604

957 rows × 5039 columns

[24]:
# adata_impt_all_spot.uns["local_z_p"]

2.5 Visualize pairs

[25]:
fst.topLRpairs(adata_impt_all_spot, spa_coexp_pair_all_spot, num=10)
[25]:
['LAMB1_ITGA9_ITGB1',
 'LAMB1_ITGA3_ITGB1',
 'MDK_SDC4',
 'PECAM1_PECAM1',
 'MDK_ITGA6_ITGB1',
 'JAM2_JAM2',
 'MPZL1_MPZL1',
 'F11R_F11R',
 'MDK_NCL',
 'CD99_CD99']
[27]:
fstplt.global_plot(adata_impt_all_spot, pairs = fst.topLRpairs(adata_impt_all_spot, spa_coexp_pair_all_spot, num=10),
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2, max_step=0.2, min_step=0.2)
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_allspot_top10.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_78_0.png
[29]:
fstplt.global_plot(adata_impt_all_spot, pairs=['CD70_CD27', 'CXCL16_CXCR6', "MIF_ACKR3", 'PVR_TIGIT'],
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2, max_step=0.2, min_step=0.2)
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_allspot.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_79_0.png
[ ]:
# Example usage
fstplt.LR_global_moranR(adata_impt_all_spot, pairs=['CD70_CD27', 'CXCL16_CXCR6', "MIF_ACKR3", 'PVR_TIGIT'],
                        fig_size=(4, 3), font_size=12,
                save_path=f'{path}/FineST/FineST_local/Dataset/ImputData/patient1/all_spot/sparseAEH_scale/LRpair_sele_globalR.svg')
[30]:
fstplt.plot_pairs_dot(adata_impt_all_spot, ['CD70_CD27'], marker_size =9,
                      pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/allspot_pair_CD70_CD27")
fstplt.plot_pairs_dot(adata_impt_all_spot, ['MIF_ACKR3'], marker_size =9,
                      pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/allspot_pair_MIF_ACKR3")
_images/NPC_LRI_CCC_count_81_0.png
_images/NPC_LRI_CCC_count_81_1.png

2.6 Local cell-cell communication pattern detection using SpatialDE

SpatialDE allows clustering of spatially auto-correlated genes. For sample number (n<=5000), SpatialDE can identify spatially auto-correlated interactions using about 40-50 mins.

Here, we used the P-value from local Moran’s R using Z-score method to Quantify the ligand-receptor interaction strength, users can use binary or continuous local selection status as input.
- binary: bin_spots = adata.uns['selected_spots'].astype(int)[adata.uns['local_stat']['n_spots']>2]
- continuous: bin_spots = (1-adata.uns["local_z_p"])[adata.uns['local_stat']['n_spots']>2]
[31]:
bin_allspots = (1-adata_impt_all_spot.uns["local_z_p"])[adata_impt_all_spot.uns['local_stat']['n_spots']>2]
print(bin_allspots.shape[0], " pairs used for spatial clustering")
bin_allspots
957  pairs used for spatial clustering
[31]:
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0.344588 0.325092 0.000000 0.360387 0.465489 0.978395 0.501160 0.000000 0.000000 0.000000 ... 0.486268 0.000000 0.000000 0.383693 0.419883 0.440325 0.483504 0.406945 0.000000 0.478722
EFNB1_EPHA4 0.509951 0.506749 0.121319 0.522224 0.472334 0.481656 0.177572 0.025857 0.225428 0.000000 ... 0.494101 0.766491 0.435280 0.486096 0.499285 0.709795 0.446348 0.000000 0.432230 0.418740
EFNB1_EPHB1 0.000000 0.506628 0.000000 0.500100 0.226771 0.578975 0.400977 0.000000 0.000000 0.333691 ... 0.000000 0.724213 0.310720 0.763872 0.711412 0.987632 0.917672 0.000000 0.462569 0.793163
EFNB1_EPHB2 0.000000 0.532601 0.000000 0.502538 0.318061 1.000000 0.481365 0.000000 0.000000 0.000000 ... 0.457337 0.451245 0.000000 0.573334 0.678096 0.555293 0.579977 0.512694 0.457619 0.504537
EFNB1_EPHB3 0.000000 0.512138 0.000000 0.426975 0.263090 0.473761 0.372831 0.000000 0.000000 0.000000 ... 0.000000 0.397837 0.000000 0.433948 0.372808 0.361245 0.709859 0.539661 0.439297 0.422884
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 0.000000 0.000000 0.000000 0.000000 0.377945 0.421082 0.000000 0.696793 0.970845 0.461974 ... 1.000000 0.000000 0.800807 0.480492 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
CCL5_CCR5 0.000000 0.347616 0.000000 0.469201 0.370502 0.433847 0.454361 0.872799 1.000000 0.782430 ... 0.538352 0.506272 0.852678 0.491320 0.391252 0.475362 0.000000 0.000000 0.000000 0.000000
CCL4_CCR5 0.000000 0.000000 0.000000 0.000000 0.320354 0.370321 0.000000 0.893158 1.000000 0.938532 ... 0.787984 0.489606 0.908850 0.515793 0.215031 0.357402 0.499041 0.000000 0.000000 0.000000
CXCL1_ACKR1 0.000000 0.000000 0.501652 0.454881 0.508484 0.502684 0.000000 0.000000 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000
CORT_SSTR2 0.000000 0.000000 0.000000 0.000000 0.000000 0.034929 0.979378 0.980397 0.906850 0.000000 ... 0.481539 0.318135 0.190252 0.385751 0.388686 0.582209 0.540415 0.757693 0.000000 0.453396

957 rows × 5039 columns

[32]:
bin_allspots_binary = adata_impt_all_spot.uns['selected_spots'].astype(int)[adata_impt_all_spot.uns['local_stat']['n_spots']>2]
print(bin_allspots_binary.shape[0], " pairs used for spatial clustering")
bin_allspots_binary
957  pairs used for spatial clustering
[32]:
0 1 2 3 4 5 6 7 8 9 ... 5029 5030 5031 5032 5033 5034 5035 5036 5037 5038
EFNA5_EPHB2 0 0 0 0 0 1 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHA4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 1 0 0 0 0
EFNB1_EPHB2 0 0 0 0 0 1 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB3 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 0 0 0 0 0 0 0 0 1 0 ... 1 0 0 0 0 0 0 0 0 0
CCL5_CCR5 0 0 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
CCL4_CCR5 0 0 0 0 0 0 0 0 1 0 ... 0 0 0 0 0 0 0 0 0 0
CXCL1_ACKR1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CORT_SSTR2 0 0 0 0 0 0 1 1 0 0 ... 0 0 0 0 0 0 0 0 0 0

957 rows × 5039 columns

[33]:
start = time.time()
gaussian_allspot = fst.MixedGaussian(spatial = adata_impt_all_spot.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))

start = time.time()
gaussian_allspot.run_cluster(np.array(bin_allspots.transpose()), 3, iter=50)
print("--- %.3f seconds ---" %(time.time()-start))
--- 2.101 seconds ---
Iteration 0
updating variance
Iteration 1
--- 9.825 seconds ---
[35]:
fstplt.sparseAEH_clusters(gaussian_allspot, w=3, s=3, marker='o',
                          save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_allspot_SparseAEH.pdf")
_images/NPC_LRI_CCC_count_87_0.png
[35]:
start = time.time()
gaussian_allspot_binary = fst.MixedGaussian(spatial = adata_impt_all_spot.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))

start = time.time()
gaussian_allspot_binary.run_cluster(np.array(bin_allspots_binary.transpose()), 3, iter=50)
print("--- %.3f seconds ---" %(time.time()-start))
--- 1.702 seconds ---
Iteration 0
updating variance
Iteration 1
--- 9.849 seconds ---
[ ]:
fstplt.sparseAEH_clusters(gaussian_allspot_binary, w=3, s=3, marker='o',    # figsize=(21,5) : Run two times
                          save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_allspot_SparseAEH_binary.pdf")
_images/NPC_LRI_CCC_count_89_0.png
[59]:
!pwd
/mnt/lingyu/nfs_share2/Python/FineST/FineST_local/Dataset/ImputData/patient1/all_spot
[60]:
from threadpoolctl import threadpool_limits
import NaiveDE
import SpatialDE

with threadpool_limits(limits=1, user_api='blas'):
    start = time.time()
    results = SpatialDE.run(adata_impt_all_spot.obsm['spatial'], bin_allspots_binary.transpose())
    print("--- %.3f seconds ---" %(time.time()-start))

    start = time.time()
    histology_results_allspot, patterns_allspot = SpatialDE.aeh.spatial_patterns(
        adata_impt_all_spot.obsm['spatial'], bin_allspots_binary.transpose(), results, C=3, l=3, verbosity=1)
    print("--- %.3f seconds ---" %(time.time()-start))
INFO:root:Performing DE test
INFO:root:Pre-calculating USU^T = K's ...
INFO:root:Done: 2.1e+02s
INFO:root:Fitting gene models
Models:   0%|                                                                                                                 | 0/10 [00:00<?, ?it/s]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:10, 92.82it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:09, 94.20it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:09, 93.28it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:09, 92.92it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 92.75it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 92.88it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 92.20it/s]
  8%|█████████▎                                                                                                     | 80/957 [00:00<00:09, 92.38it/s]
  9%|██████████▍                                                                                                    | 90/957 [00:00<00:09, 92.63it/s]
 10%|███████████▍                                                                                                  | 100/957 [00:01<00:09, 92.93it/s]
 11%|████████████▋                                                                                                 | 110/957 [00:01<00:09, 93.07it/s]
 13%|█████████████▊                                                                                                | 120/957 [00:01<00:08, 93.67it/s]
 14%|██████████████▉                                                                                               | 130/957 [00:01<00:08, 94.60it/s]
 15%|████████████████                                                                                              | 140/957 [00:01<00:08, 94.06it/s]
 16%|█████████████████▏                                                                                            | 150/957 [00:01<00:08, 93.23it/s]
 17%|██████████████████▍                                                                                           | 160/957 [00:01<00:08, 92.54it/s]
 18%|███████████████████▌                                                                                          | 170/957 [00:01<00:08, 91.64it/s]
 19%|████████████████████▋                                                                                         | 180/957 [00:01<00:08, 91.44it/s]
 20%|█████████████████████▊                                                                                        | 190/957 [00:02<00:08, 92.73it/s]
 21%|██████████████████████▉                                                                                       | 200/957 [00:02<00:08, 93.71it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:07, 93.70it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:07, 94.38it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:07, 95.48it/s]
 25%|███████████████████████████▌                                                                                  | 240/957 [00:02<00:07, 95.20it/s]
 26%|████████████████████████████▋                                                                                 | 250/957 [00:02<00:07, 95.30it/s]
 27%|█████████████████████████████▉                                                                                | 260/957 [00:02<00:07, 94.73it/s]
 28%|███████████████████████████████                                                                               | 270/957 [00:02<00:07, 95.06it/s]
 29%|████████████████████████████████▏                                                                             | 280/957 [00:02<00:07, 94.32it/s]
 30%|█████████████████████████████████▎                                                                            | 290/957 [00:03<00:07, 93.74it/s]
 31%|██████████████████████████████████▍                                                                           | 300/957 [00:03<00:07, 92.50it/s]
 32%|███████████████████████████████████▋                                                                          | 310/957 [00:03<00:07, 91.66it/s]
 33%|████████████████████████████████████▊                                                                         | 320/957 [00:03<00:06, 92.38it/s]
 34%|█████████████████████████████████████▉                                                                        | 330/957 [00:03<00:06, 93.06it/s]
 36%|███████████████████████████████████████                                                                       | 340/957 [00:03<00:06, 93.18it/s]
 37%|████████████████████████████████████████▏                                                                     | 350/957 [00:03<00:06, 94.06it/s]
 38%|█████████████████████████████████████████▍                                                                    | 360/957 [00:03<00:06, 93.99it/s]
 39%|██████████████████████████████████████████▌                                                                   | 370/957 [00:03<00:06, 95.24it/s]
 40%|███████████████████████████████████████████▋                                                                  | 380/957 [00:04<00:06, 94.94it/s]
 41%|████████████████████████████████████████████▊                                                                 | 390/957 [00:04<00:05, 94.66it/s]
 42%|█████████████████████████████████████████████▉                                                                | 400/957 [00:04<00:05, 95.36it/s]
 43%|███████████████████████████████████████████████▏                                                              | 410/957 [00:04<00:05, 96.27it/s]
 44%|████████████████████████████████████████████████▎                                                             | 420/957 [00:04<00:05, 97.31it/s]
 45%|█████████████████████████████████████████████████▍                                                            | 430/957 [00:04<00:05, 96.67it/s]
 46%|██████████████████████████████████████████████████▌                                                           | 440/957 [00:04<00:05, 97.14it/s]
 47%|███████████████████████████████████████████████████▋                                                          | 450/957 [00:04<00:05, 97.19it/s]
 48%|████████████████████████████████████████████████████▊                                                         | 460/957 [00:04<00:05, 96.32it/s]
 49%|██████████████████████████████████████████████████████                                                        | 470/957 [00:04<00:05, 95.73it/s]
 50%|███████████████████████████████████████████████████████▏                                                      | 480/957 [00:05<00:04, 96.18it/s]
 51%|████████████████████████████████████████████████████████▎                                                     | 490/957 [00:05<00:04, 96.71it/s]
 52%|█████████████████████████████████████████████████████████▍                                                    | 500/957 [00:05<00:04, 97.22it/s]
 53%|██████████████████████████████████████████████████████████▌                                                   | 510/957 [00:05<00:04, 97.42it/s]
 54%|███████████████████████████████████████████████████████████▊                                                  | 520/957 [00:05<00:04, 95.93it/s]
 55%|████████████████████████████████████████████████████████████▉                                                 | 530/957 [00:05<00:04, 94.90it/s]
 56%|██████████████████████████████████████████████████████████████                                                | 540/957 [00:05<00:04, 95.81it/s]
 57%|███████████████████████████████████████████████████████████████▏                                              | 550/957 [00:05<00:04, 96.85it/s]
 59%|████████████████████████████████████████████████████████████████▎                                             | 560/957 [00:05<00:04, 97.08it/s]
 60%|█████████████████████████████████████████████████████████████████▌                                            | 570/957 [00:06<00:04, 95.35it/s]
 61%|██████████████████████████████████████████████████████████████████▋                                           | 580/957 [00:06<00:04, 94.15it/s]
 62%|███████████████████████████████████████████████████████████████████▊                                          | 590/957 [00:06<00:03, 93.55it/s]
 63%|████████████████████████████████████████████████████████████████████▉                                         | 600/957 [00:06<00:03, 92.63it/s]
 64%|██████████████████████████████████████████████████████████████████████                                        | 610/957 [00:06<00:03, 92.02it/s]
 65%|███████████████████████████████████████████████████████████████████████▎                                      | 620/957 [00:06<00:03, 92.69it/s]
 66%|████████████████████████████████████████████████████████████████████████▍                                     | 630/957 [00:06<00:03, 92.40it/s]
 67%|█████████████████████████████████████████████████████████████████████████▌                                    | 640/957 [00:06<00:03, 92.57it/s]
 68%|██████████████████████████████████████████████████████████████████████████▋                                   | 650/957 [00:06<00:03, 91.49it/s]
 69%|███████████████████████████████████████████████████████████████████████████▊                                  | 660/957 [00:07<00:03, 93.45it/s]
 70%|█████████████████████████████████████████████████████████████████████████████                                 | 670/957 [00:07<00:03, 94.40it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▏                               | 680/957 [00:07<00:02, 94.98it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▎                              | 690/957 [00:07<00:02, 96.16it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▍                             | 700/957 [00:07<00:02, 96.50it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 710/957 [00:07<00:02, 97.45it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▊                           | 720/957 [00:07<00:02, 98.09it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 730/957 [00:07<00:02, 96.94it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 740/957 [00:07<00:02, 97.66it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▏                       | 750/957 [00:07<00:02, 96.74it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▎                      | 760/957 [00:08<00:02, 97.21it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 770/957 [00:08<00:01, 96.78it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▋                    | 780/957 [00:08<00:01, 96.16it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▊                   | 790/957 [00:08<00:01, 95.99it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▉                  | 800/957 [00:08<00:01, 97.09it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████                 | 810/957 [00:08<00:01, 96.88it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▎               | 820/957 [00:08<00:01, 97.74it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▍              | 830/957 [00:08<00:01, 98.29it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▌             | 840/957 [00:08<00:01, 98.05it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▋            | 850/957 [00:08<00:01, 98.04it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▊           | 860/957 [00:09<00:00, 98.37it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████          | 870/957 [00:09<00:00, 97.98it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 880/957 [00:09<00:00, 97.86it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎       | 890/957 [00:09<00:00, 98.30it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▍      | 900/957 [00:09<00:00, 96.78it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▋     | 911/957 [00:09<00:00, 97.94it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▊    | 921/957 [00:09<00:00, 97.78it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████   | 931/957 [00:09<00:00, 95.92it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▏ | 941/957 [00:09<00:00, 94.82it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 951/957 [00:10<00:00, 95.27it/s]
Models:  10%|██████████▌                                                                                              | 1/10 [00:10<01:30, 10.08s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█                                                                                                               | 9/957 [00:00<00:11, 84.57it/s]
  2%|██                                                                                                             | 18/957 [00:00<00:10, 87.61it/s]
  3%|███▏                                                                                                           | 28/957 [00:00<00:10, 92.34it/s]
  4%|████▍                                                                                                          | 38/957 [00:00<00:09, 93.74it/s]
  5%|█████▌                                                                                                         | 48/957 [00:00<00:09, 91.80it/s]
  6%|██████▋                                                                                                        | 58/957 [00:00<00:09, 90.81it/s]
  7%|███████▉                                                                                                       | 68/957 [00:00<00:09, 90.55it/s]
  8%|█████████                                                                                                      | 78/957 [00:00<00:09, 91.46it/s]
  9%|██████████▏                                                                                                    | 88/957 [00:00<00:09, 90.38it/s]
 10%|███████████▎                                                                                                   | 98/957 [00:01<00:09, 90.09it/s]
 11%|████████████▍                                                                                                 | 108/957 [00:01<00:09, 88.84it/s]
 12%|█████████████▌                                                                                                | 118/957 [00:01<00:09, 90.23it/s]
 13%|██████████████▋                                                                                               | 128/957 [00:01<00:09, 90.78it/s]
 14%|███████████████▊                                                                                              | 138/957 [00:01<00:08, 91.29it/s]
 15%|█████████████████                                                                                             | 148/957 [00:01<00:09, 89.13it/s]
 16%|██████████████████                                                                                            | 157/957 [00:01<00:09, 87.33it/s]
 17%|███████████████████▏                                                                                          | 167/957 [00:01<00:08, 88.91it/s]
 18%|████████████████████▏                                                                                         | 176/957 [00:01<00:08, 89.11it/s]
 19%|█████████████████████▎                                                                                        | 185/957 [00:02<00:08, 87.86it/s]
 20%|██████████████████████▎                                                                                       | 194/957 [00:02<00:08, 87.95it/s]
 21%|███████████████████████▍                                                                                      | 204/957 [00:02<00:08, 89.28it/s]
 22%|████████████████████████▍                                                                                     | 213/957 [00:02<00:08, 89.27it/s]
 23%|█████████████████████████▋                                                                                    | 223/957 [00:02<00:07, 91.76it/s]
 24%|██████████████████████████▊                                                                                   | 233/957 [00:02<00:07, 94.06it/s]
 25%|███████████████████████████▉                                                                                  | 243/957 [00:02<00:07, 92.99it/s]
 26%|█████████████████████████████                                                                                 | 253/957 [00:02<00:07, 92.78it/s]
 27%|██████████████████████████████▏                                                                               | 263/957 [00:02<00:07, 93.22it/s]
 29%|███████████████████████████████▍                                                                              | 273/957 [00:03<00:07, 94.98it/s]
 30%|████████████████████████████████▌                                                                             | 283/957 [00:03<00:07, 94.45it/s]
 31%|█████████████████████████████████▋                                                                            | 293/957 [00:03<00:07, 94.70it/s]
 32%|██████████████████████████████████▊                                                                           | 303/957 [00:03<00:06, 95.71it/s]
 33%|███████████████████████████████████▉                                                                          | 313/957 [00:03<00:06, 92.76it/s]
 34%|█████████████████████████████████████▏                                                                        | 323/957 [00:03<00:06, 91.75it/s]
 35%|██████████████████████████████████████▍                                                                       | 334/957 [00:03<00:06, 93.34it/s]
 36%|███████████████████████████████████████▌                                                                      | 344/957 [00:03<00:06, 93.99it/s]
 37%|████████████████████████████████████████▋                                                                     | 354/957 [00:03<00:06, 94.05it/s]
 38%|█████████████████████████████████████████▊                                                                    | 364/957 [00:03<00:06, 94.17it/s]
 39%|██████████████████████████████████████████▉                                                                   | 374/957 [00:04<00:06, 95.00it/s]
 40%|████████████████████████████████████████████▏                                                                 | 384/957 [00:04<00:06, 95.16it/s]
 41%|█████████████████████████████████████████████▎                                                                | 394/957 [00:04<00:05, 96.27it/s]
 42%|██████████████████████████████████████████████▍                                                               | 404/957 [00:04<00:05, 94.91it/s]
 43%|███████████████████████████████████████████████▌                                                              | 414/957 [00:04<00:05, 94.89it/s]
 44%|████████████████████████████████████████████████▋                                                             | 424/957 [00:04<00:05, 92.40it/s]
 45%|█████████████████████████████████████████████████▉                                                            | 434/957 [00:04<00:05, 94.47it/s]
 46%|███████████████████████████████████████████████████                                                           | 444/957 [00:04<00:05, 93.49it/s]
 47%|████████████████████████████████████████████████████▏                                                         | 454/957 [00:04<00:05, 92.45it/s]
 48%|█████████████████████████████████████████████████████▎                                                        | 464/957 [00:05<00:05, 93.21it/s]
 50%|██████████████████████████████████████████████████████▍                                                       | 474/957 [00:05<00:05, 92.42it/s]
 51%|███████████████████████████████████████████████████████▋                                                      | 484/957 [00:05<00:05, 89.63it/s]
 52%|████████████████████████████████████████████████████████▊                                                     | 494/957 [00:05<00:05, 90.48it/s]
 53%|█████████████████████████████████████████████████████████▉                                                    | 504/957 [00:05<00:04, 91.73it/s]
 54%|███████████████████████████████████████████████████████████▏                                                  | 515/957 [00:05<00:04, 94.61it/s]
 55%|████████████████████████████████████████████████████████████▎                                                 | 525/957 [00:05<00:04, 95.77it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 535/957 [00:05<00:04, 96.97it/s]
 57%|██████████████████████████████████████████████████████████████▊                                               | 546/957 [00:05<00:04, 98.69it/s]
 58%|███████████████████████████████████████████████████████████████▉                                              | 556/957 [00:05<00:04, 98.58it/s]
 59%|████████████████████████████████████████████████████████████████▌                                            | 567/957 [00:06<00:03, 100.01it/s]
 60%|██████████████████████████████████████████████████████████████████▍                                           | 578/957 [00:06<00:03, 99.83it/s]
 62%|███████████████████████████████████████████████████████████████████                                          | 589/957 [00:06<00:03, 100.65it/s]
 63%|████████████████████████████████████████████████████████████████████▎                                        | 600/957 [00:06<00:03, 101.11it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 611/957 [00:06<00:03, 100.78it/s]
 65%|██████████████████████████████████████████████████████████████████████▊                                      | 622/957 [00:06<00:03, 100.74it/s]
 66%|████████████████████████████████████████████████████████████████████████▊                                     | 633/957 [00:06<00:03, 98.83it/s]
 67%|██████████████████████████████████████████████████████████████████████████                                    | 644/957 [00:06<00:03, 99.26it/s]
 68%|███████████████████████████████████████████████████████████████████████████▏                                  | 654/957 [00:06<00:03, 99.45it/s]
 69%|███████████████████████████████████████████████████████████████████████████▋                                 | 665/957 [00:07<00:02, 100.59it/s]
 71%|████████████████████████████████████████████████████████████████████████████▉                                | 676/957 [00:07<00:02, 101.03it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▉                               | 687/957 [00:07<00:02, 99.68it/s]
 73%|████████████████████████████████████████████████████████████████████████████████                              | 697/957 [00:07<00:02, 98.25it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▎                            | 707/957 [00:07<00:02, 96.76it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▌                           | 718/957 [00:07<00:02, 98.67it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████                          | 729/957 [00:07<00:02, 100.56it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████▎                        | 740/957 [00:07<00:02, 100.31it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▌                       | 751/957 [00:07<00:02, 100.09it/s]
 80%|██████████████████████████████████████████████████████████████████████████████████████▊                      | 762/957 [00:08<00:01, 100.32it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████                     | 773/957 [00:08<00:01, 100.60it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▎                   | 784/957 [00:08<00:01, 100.19it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▍                  | 795/957 [00:08<00:01, 99.71it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▊                 | 806/957 [00:08<00:01, 100.04it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████                | 817/957 [00:08<00:01, 100.15it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▏              | 828/957 [00:08<00:01, 98.89it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▎             | 838/957 [00:08<00:01, 97.43it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▍            | 848/957 [00:08<00:01, 96.46it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▌           | 858/957 [00:09<00:01, 95.56it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▉          | 869/957 [00:09<00:00, 97.43it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 880/957 [00:09<00:00, 98.79it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎       | 890/957 [00:09<00:00, 97.52it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▌      | 901/957 [00:09<00:00, 98.87it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▊     | 912/957 [00:09<00:00, 99.59it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▉    | 922/957 [00:09<00:00, 98.99it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 933/957 [00:09<00:00, 99.64it/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▌ | 944/957 [00:09<00:00, 100.25it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▊| 955/957 [00:10<00:00, 99.86it/s]
Models:  20%|█████████████████████                                                                                    | 2/10 [00:20<01:20, 10.05s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:10, 90.44it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:10, 92.76it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:10, 91.56it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:10, 89.79it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 92.17it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 92.27it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 91.59it/s]
  8%|█████████▎                                                                                                     | 80/957 [00:00<00:09, 93.27it/s]
  9%|██████████▍                                                                                                    | 90/957 [00:00<00:09, 91.15it/s]
 10%|███████████▍                                                                                                  | 100/957 [00:01<00:09, 91.55it/s]
 11%|████████████▋                                                                                                 | 110/957 [00:01<00:09, 90.27it/s]
 13%|█████████████▊                                                                                                | 120/957 [00:01<00:09, 91.37it/s]
 14%|██████████████▉                                                                                               | 130/957 [00:01<00:09, 90.52it/s]
 15%|████████████████                                                                                              | 140/957 [00:01<00:08, 91.15it/s]
 16%|█████████████████▏                                                                                            | 150/957 [00:01<00:08, 92.13it/s]
 17%|██████████████████▍                                                                                           | 160/957 [00:01<00:08, 89.58it/s]
 18%|███████████████████▌                                                                                          | 170/957 [00:01<00:08, 89.91it/s]
 19%|████████████████████▋                                                                                         | 180/957 [00:01<00:08, 90.04it/s]
 20%|█████████████████████▊                                                                                        | 190/957 [00:02<00:08, 91.31it/s]
 21%|██████████████████████▉                                                                                       | 200/957 [00:02<00:08, 91.33it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:08, 91.35it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:07, 92.79it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:07, 93.79it/s]
 25%|███████████████████████████▌                                                                                  | 240/957 [00:02<00:07, 91.96it/s]
 26%|████████████████████████████▋                                                                                 | 250/957 [00:02<00:07, 91.31it/s]
 27%|█████████████████████████████▉                                                                                | 260/957 [00:02<00:07, 90.39it/s]
 28%|███████████████████████████████                                                                               | 270/957 [00:02<00:07, 90.78it/s]
 29%|████████████████████████████████▏                                                                             | 280/957 [00:03<00:07, 91.71it/s]
 30%|█████████████████████████████████▎                                                                            | 290/957 [00:03<00:07, 90.52it/s]
 31%|██████████████████████████████████▍                                                                           | 300/957 [00:03<00:07, 90.11it/s]
 32%|███████████████████████████████████▋                                                                          | 310/957 [00:03<00:07, 90.01it/s]
 33%|████████████████████████████████████▊                                                                         | 320/957 [00:03<00:07, 90.29it/s]
 34%|█████████████████████████████████████▉                                                                        | 330/957 [00:03<00:06, 91.72it/s]
 36%|███████████████████████████████████████                                                                       | 340/957 [00:03<00:06, 93.71it/s]
 37%|████████████████████████████████████████▏                                                                     | 350/957 [00:03<00:06, 93.89it/s]
 38%|█████████████████████████████████████████▍                                                                    | 360/957 [00:03<00:06, 95.48it/s]
 39%|██████████████████████████████████████████▌                                                                   | 370/957 [00:04<00:06, 95.92it/s]
 40%|███████████████████████████████████████████▋                                                                  | 380/957 [00:04<00:06, 95.40it/s]
 41%|████████████████████████████████████████████▊                                                                 | 390/957 [00:04<00:06, 93.17it/s]
 42%|█████████████████████████████████████████████▉                                                                | 400/957 [00:04<00:06, 90.93it/s]
 43%|███████████████████████████████████████████████▏                                                              | 410/957 [00:04<00:06, 90.26it/s]
 44%|████████████████████████████████████████████████▎                                                             | 420/957 [00:04<00:05, 90.88it/s]
 45%|█████████████████████████████████████████████████▍                                                            | 430/957 [00:04<00:05, 90.37it/s]
 46%|██████████████████████████████████████████████████▌                                                           | 440/957 [00:04<00:05, 91.22it/s]
 47%|███████████████████████████████████████████████████▋                                                          | 450/957 [00:04<00:05, 90.51it/s]
 48%|████████████████████████████████████████████████████▊                                                         | 460/957 [00:05<00:05, 89.89it/s]
 49%|█████████████████████████████████████████████████████▉                                                        | 469/957 [00:05<00:05, 89.84it/s]
 50%|███████████████████████████████████████████████████████                                                       | 479/957 [00:05<00:05, 90.99it/s]
 51%|████████████████████████████████████████████████████████▏                                                     | 489/957 [00:05<00:05, 91.48it/s]
 52%|█████████████████████████████████████████████████████████▎                                                    | 499/957 [00:05<00:04, 93.39it/s]
 53%|██████████████████████████████████████████████████████████▌                                                   | 510/957 [00:05<00:04, 96.10it/s]
 54%|███████████████████████████████████████████████████████████▊                                                  | 520/957 [00:05<00:04, 96.89it/s]
 55%|████████████████████████████████████████████████████████████▉                                                 | 530/957 [00:05<00:04, 96.98it/s]
 56%|██████████████████████████████████████████████████████████████                                                | 540/957 [00:05<00:04, 97.02it/s]
 57%|███████████████████████████████████████████████████████████████▏                                              | 550/957 [00:05<00:04, 97.68it/s]
 59%|████████████████████████████████████████████████████████████████▎                                             | 560/957 [00:06<00:04, 97.45it/s]
 60%|█████████████████████████████████████████████████████████████████▌                                            | 570/957 [00:06<00:03, 97.08it/s]
 61%|██████████████████████████████████████████████████████████████████▋                                           | 580/957 [00:06<00:03, 97.64it/s]
 62%|███████████████████████████████████████████████████████████████████▊                                          | 590/957 [00:06<00:03, 98.06it/s]
 63%|█████████████████████████████████████████████████████████████████████                                         | 601/957 [00:06<00:03, 98.93it/s]
 64%|█████████████████████████████████████████████████████████████████████▋                                       | 612/957 [00:06<00:03, 100.20it/s]
 65%|███████████████████████████████████████████████████████████████████████▌                                      | 623/957 [00:06<00:03, 99.64it/s]
 66%|████████████████████████████████████████████████████████████████████████▊                                     | 633/957 [00:06<00:03, 99.36it/s]
 67%|█████████████████████████████████████████████████████████████████████████▉                                    | 643/957 [00:06<00:03, 99.52it/s]
 68%|███████████████████████████████████████████████████████████████████████████                                   | 653/957 [00:07<00:03, 99.12it/s]
 69%|████████████████████████████████████████████████████████████████████████████▏                                 | 663/957 [00:07<00:02, 99.23it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▎                                | 673/957 [00:07<00:02, 97.90it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▌                               | 683/957 [00:07<00:02, 97.18it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▋                              | 693/957 [00:07<00:02, 97.82it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▊                             | 703/957 [00:07<00:02, 96.42it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████                            | 714/957 [00:07<00:02, 97.73it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▏                          | 724/957 [00:07<00:02, 98.00it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████▎                         | 734/957 [00:07<00:02, 96.80it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▌                        | 744/957 [00:07<00:02, 96.96it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▋                       | 754/957 [00:08<00:02, 97.14it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▊                      | 764/957 [00:08<00:01, 97.28it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▉                     | 774/957 [00:08<00:01, 97.29it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████                    | 784/957 [00:08<00:01, 97.54it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▍                  | 795/957 [00:08<00:01, 98.11it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▌                 | 805/957 [00:08<00:01, 97.59it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▋                | 815/957 [00:08<00:01, 97.66it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▊               | 825/957 [00:08<00:01, 97.02it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▉              | 835/957 [00:08<00:01, 96.38it/s]
 88%|█████████████████████████████████████████████████████████████████████████████████████████████████▏            | 845/957 [00:08<00:01, 97.25it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████▎           | 855/957 [00:09<00:01, 96.18it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▍          | 865/957 [00:09<00:00, 95.94it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▌         | 875/957 [00:09<00:00, 96.66it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▋        | 885/957 [00:09<00:00, 97.13it/s]
 94%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 895/957 [00:09<00:00, 96.01it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▏     | 906/957 [00:09<00:00, 98.16it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▍    | 917/957 [00:09<00:00, 99.46it/s]
 97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋   | 928/957 [00:09<00:00, 100.01it/s]
 98%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▊  | 938/957 [00:09<00:00, 99.91it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 948/957 [00:10<00:00, 98.77it/s]
Models:  30%|███████████████████████████████▌                                                                         | 3/10 [00:30<01:10, 10.09s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:10, 90.23it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:10, 92.59it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:10, 92.29it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:10, 88.78it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:10, 90.07it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:10, 89.66it/s]
  7%|████████                                                                                                       | 69/957 [00:00<00:10, 88.70it/s]
  8%|█████████▏                                                                                                     | 79/957 [00:00<00:09, 90.13it/s]
  9%|██████████▎                                                                                                    | 89/957 [00:00<00:09, 89.64it/s]
 10%|███████████▍                                                                                                   | 99/957 [00:01<00:09, 90.16it/s]
 11%|████████████▌                                                                                                 | 109/957 [00:01<00:09, 90.50it/s]
 12%|█████████████▋                                                                                                | 119/957 [00:01<00:09, 91.24it/s]
 13%|██████████████▊                                                                                               | 129/957 [00:01<00:09, 90.48it/s]
 15%|███████████████▉                                                                                              | 139/957 [00:01<00:09, 90.52it/s]
 16%|█████████████████▏                                                                                            | 149/957 [00:01<00:08, 91.18it/s]
 17%|██████████████████▎                                                                                           | 159/957 [00:01<00:08, 89.47it/s]
 18%|███████████████████▎                                                                                          | 168/957 [00:01<00:08, 89.42it/s]
 18%|████████████████████▎                                                                                         | 177/957 [00:01<00:08, 88.18it/s]
 20%|█████████████████████▍                                                                                        | 187/957 [00:02<00:08, 89.75it/s]
 20%|██████████████████████▌                                                                                       | 196/957 [00:02<00:08, 89.19it/s]
 21%|███████████████████████▌                                                                                      | 205/957 [00:02<00:08, 88.49it/s]
 22%|████████████████████████▋                                                                                     | 215/957 [00:02<00:08, 89.67it/s]
 24%|█████████████████████████▊                                                                                    | 225/957 [00:02<00:08, 90.14it/s]
 25%|███████████████████████████                                                                                   | 235/957 [00:02<00:07, 91.87it/s]
 26%|████████████████████████████▏                                                                                 | 245/957 [00:02<00:07, 91.69it/s]
 27%|█████████████████████████████▎                                                                                | 255/957 [00:02<00:07, 91.53it/s]
 28%|██████████████████████████████▍                                                                               | 265/957 [00:02<00:07, 89.72it/s]
 29%|███████████████████████████████▌                                                                              | 275/957 [00:03<00:07, 91.62it/s]
 30%|████████████████████████████████▊                                                                             | 285/957 [00:03<00:07, 91.31it/s]
 31%|█████████████████████████████████▉                                                                            | 295/957 [00:03<00:07, 88.14it/s]
 32%|██████████████████████████████████▉                                                                           | 304/957 [00:03<00:07, 87.15it/s]
 33%|███████████████████████████████████▉                                                                          | 313/957 [00:03<00:07, 87.31it/s]
 34%|█████████████████████████████████████▏                                                                        | 323/957 [00:03<00:07, 88.54it/s]
 35%|██████████████████████████████████████▎                                                                       | 333/957 [00:03<00:06, 90.99it/s]
 36%|███████████████████████████████████████▍                                                                      | 343/957 [00:03<00:06, 91.72it/s]
 37%|████████████████████████████████████████▌                                                                     | 353/957 [00:03<00:06, 90.30it/s]
 38%|█████████████████████████████████████████▋                                                                    | 363/957 [00:04<00:06, 91.61it/s]
 39%|██████████████████████████████████████████▊                                                                   | 373/957 [00:04<00:06, 90.94it/s]
 40%|████████████████████████████████████████████                                                                  | 383/957 [00:04<00:06, 90.57it/s]
 41%|█████████████████████████████████████████████▏                                                                | 393/957 [00:04<00:06, 91.38it/s]
 42%|██████████████████████████████████████████████▎                                                               | 403/957 [00:04<00:06, 90.37it/s]
 43%|███████████████████████████████████████████████▍                                                              | 413/957 [00:04<00:05, 91.58it/s]
 44%|████████████████████████████████████████████████▌                                                             | 423/957 [00:04<00:05, 90.56it/s]
 45%|█████████████████████████████████████████████████▊                                                            | 433/957 [00:04<00:05, 89.43it/s]
 46%|██████████████████████████████████████████████████▉                                                           | 443/957 [00:04<00:05, 91.20it/s]
 47%|████████████████████████████████████████████████████                                                          | 453/957 [00:05<00:05, 91.89it/s]
 48%|█████████████████████████████████████████████████████▏                                                        | 463/957 [00:05<00:05, 91.37it/s]
 49%|██████████████████████████████████████████████████████▎                                                       | 473/957 [00:05<00:05, 92.88it/s]
 50%|███████████████████████████████████████████████████████▌                                                      | 483/957 [00:05<00:05, 92.74it/s]
 52%|████████████████████████████████████████████████████████▋                                                     | 493/957 [00:05<00:04, 93.90it/s]
 53%|█████████████████████████████████████████████████████████▊                                                    | 503/957 [00:05<00:04, 95.37it/s]
 54%|███████████████████████████████████████████████████████████                                                   | 514/957 [00:05<00:04, 97.33it/s]
 55%|████████████████████████████████████████████████████████████▏                                                 | 524/957 [00:05<00:04, 97.73it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 534/957 [00:05<00:04, 98.27it/s]
 57%|██████████████████████████████████████████████████████████████▌                                               | 544/957 [00:05<00:04, 97.92it/s]
 58%|███████████████████████████████████████████████████████████████▋                                              | 554/957 [00:06<00:04, 98.07it/s]
 59%|████████████████████████████████████████████████████████████████▊                                             | 564/957 [00:06<00:04, 97.24it/s]
 60%|█████████████████████████████████████████████████████████████████▉                                            | 574/957 [00:06<00:03, 96.67it/s]
 61%|███████████████████████████████████████████████████████████████████▏                                          | 584/957 [00:06<00:03, 97.58it/s]
 62%|████████████████████████████████████████████████████████████████████▍                                         | 595/957 [00:06<00:03, 98.76it/s]
 63%|█████████████████████████████████████████████████████████████████████▋                                        | 606/957 [00:06<00:03, 99.91it/s]
 64%|██████████████████████████████████████████████████████████████████████▎                                      | 617/957 [00:06<00:03, 100.44it/s]
 66%|████████████████████████████████████████████████████████████████████████▏                                     | 628/957 [00:06<00:03, 99.34it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                    | 639/957 [00:06<00:03, 99.79it/s]
 68%|██████████████████████████████████████████████████████████████████████████▌                                   | 649/957 [00:07<00:03, 99.21it/s]
 69%|███████████████████████████████████████████████████████████████████████████▋                                  | 659/957 [00:07<00:03, 99.28it/s]
 70%|████████████████████████████████████████████████████████████████████████████▎                                | 670/957 [00:07<00:02, 100.00it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▏                               | 680/957 [00:07<00:02, 99.59it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▎                              | 690/957 [00:07<00:02, 98.88it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▍                             | 700/957 [00:07<00:02, 98.27it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 710/957 [00:07<00:02, 97.03it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▊                           | 720/957 [00:07<00:02, 95.39it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 730/957 [00:07<00:02, 95.56it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 740/957 [00:07<00:02, 95.64it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                       | 751/957 [00:08<00:02, 97.35it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                      | 762/957 [00:08<00:01, 98.43it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▋                     | 772/957 [00:08<00:01, 98.70it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████                    | 783/957 [00:08<00:01, 99.51it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▏                  | 793/957 [00:08<00:01, 99.61it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▎                 | 803/957 [00:08<00:01, 99.67it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▋                | 814/957 [00:08<00:01, 100.20it/s]
 86%|█████████████████████████████████████████████████████████████████████████████████████████████▉               | 825/957 [00:08<00:01, 101.27it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▏             | 836/957 [00:08<00:01, 100.38it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▎            | 847/957 [00:09<00:01, 99.84it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▌           | 857/957 [00:09<00:01, 99.56it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▋          | 867/957 [00:09<00:00, 99.51it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████▊         | 877/957 [00:09<00:00, 98.88it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▉        | 887/957 [00:09<00:00, 99.08it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████       | 897/957 [00:09<00:00, 99.27it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▎     | 908/957 [00:09<00:00, 99.94it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▋    | 919/957 [00:09<00:00, 100.60it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉   | 930/957 [00:09<00:00, 99.33it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████  | 940/957 [00:09<00:00, 96.21it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 950/957 [00:10<00:00, 94.83it/s]
Models:  40%|██████████████████████████████████████████                                                               | 4/10 [00:40<01:00, 10.12s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█                                                                                                               | 9/957 [00:00<00:10, 87.02it/s]
  2%|██▏                                                                                                            | 19/957 [00:00<00:10, 90.94it/s]
  3%|███▎                                                                                                           | 29/957 [00:00<00:10, 91.51it/s]
  4%|████▌                                                                                                          | 39/957 [00:00<00:10, 89.41it/s]
  5%|█████▌                                                                                                         | 48/957 [00:00<00:10, 89.56it/s]
  6%|██████▌                                                                                                        | 57/957 [00:00<00:10, 88.11it/s]
  7%|███████▋                                                                                                       | 66/957 [00:00<00:10, 87.79it/s]
  8%|████████▋                                                                                                      | 75/957 [00:00<00:10, 87.95it/s]
  9%|█████████▊                                                                                                     | 85/957 [00:00<00:09, 89.29it/s]
 10%|███████████                                                                                                    | 95/957 [00:01<00:09, 89.79it/s]
 11%|████████████                                                                                                  | 105/957 [00:01<00:09, 90.18it/s]
 12%|█████████████▏                                                                                                | 115/957 [00:01<00:09, 89.36it/s]
 13%|██████████████▎                                                                                               | 125/957 [00:01<00:09, 89.68it/s]
 14%|███████████████▍                                                                                              | 134/957 [00:01<00:09, 89.71it/s]
 15%|████████████████▌                                                                                             | 144/957 [00:01<00:09, 90.11it/s]
 16%|█████████████████▋                                                                                            | 154/957 [00:01<00:09, 88.97it/s]
 17%|██████████████████▋                                                                                           | 163/957 [00:01<00:08, 88.60it/s]
 18%|███████████████████▊                                                                                          | 172/957 [00:01<00:08, 88.09it/s]
 19%|████████████████████▊                                                                                         | 181/957 [00:02<00:08, 88.06it/s]
 20%|█████████████████████▉                                                                                        | 191/957 [00:02<00:08, 90.02it/s]
 21%|███████████████████████                                                                                       | 201/957 [00:02<00:08, 89.09it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:08, 89.22it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:08, 90.61it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:07, 91.84it/s]
 25%|███████████████████████████▌                                                                                  | 240/957 [00:02<00:07, 91.56it/s]
 26%|████████████████████████████▋                                                                                 | 250/957 [00:02<00:07, 91.76it/s]
 27%|█████████████████████████████▉                                                                                | 260/957 [00:02<00:07, 90.94it/s]
 28%|███████████████████████████████                                                                               | 270/957 [00:03<00:07, 92.67it/s]
 29%|████████████████████████████████▏                                                                             | 280/957 [00:03<00:07, 93.22it/s]
 30%|█████████████████████████████████▎                                                                            | 290/957 [00:03<00:07, 92.31it/s]
 31%|██████████████████████████████████▍                                                                           | 300/957 [00:03<00:07, 91.62it/s]
 32%|███████████████████████████████████▋                                                                          | 310/957 [00:03<00:07, 91.32it/s]
 33%|████████████████████████████████████▊                                                                         | 320/957 [00:03<00:06, 91.83it/s]
 34%|█████████████████████████████████████▉                                                                        | 330/957 [00:03<00:06, 93.15it/s]
 36%|███████████████████████████████████████                                                                       | 340/957 [00:04<00:13, 46.63it/s]
 37%|████████████████████████████████████████▏                                                                     | 350/957 [00:04<00:11, 54.61it/s]
 38%|█████████████████████████████████████████▍                                                                    | 360/957 [00:04<00:09, 62.30it/s]
 39%|██████████████████████████████████████████▌                                                                   | 370/957 [00:04<00:08, 69.18it/s]
 40%|███████████████████████████████████████████▋                                                                  | 380/957 [00:04<00:07, 74.89it/s]
 41%|████████████████████████████████████████████▋                                                                 | 389/957 [00:04<00:07, 78.39it/s]
 42%|█████████████████████████████████████████████▊                                                                | 399/957 [00:04<00:06, 81.72it/s]
 43%|██████████████████████████████████████████████▉                                                               | 408/957 [00:04<00:06, 83.19it/s]
 44%|████████████████████████████████████████████████                                                              | 418/957 [00:04<00:06, 86.04it/s]
 45%|█████████████████████████████████████████████████                                                             | 427/957 [00:05<00:06, 86.28it/s]
 46%|██████████████████████████████████████████████████▏                                                           | 437/957 [00:05<00:05, 89.03it/s]
 47%|███████████████████████████████████████████████████▍                                                          | 447/957 [00:05<00:05, 88.91it/s]
 48%|████████████████████████████████████████████████████▌                                                         | 457/957 [00:05<00:05, 89.63it/s]
 49%|█████████████████████████████████████████████████████▋                                                        | 467/957 [00:05<00:05, 87.71it/s]
 50%|██████████████████████████████████████████████████████▊                                                       | 477/957 [00:05<00:05, 88.89it/s]
 51%|███████████████████████████████████████████████████████▉                                                      | 487/957 [00:05<00:05, 90.64it/s]
 52%|█████████████████████████████████████████████████████████▏                                                    | 497/957 [00:05<00:04, 93.00it/s]
 53%|██████████████████████████████████████████████████████████▎                                                   | 507/957 [00:05<00:04, 94.93it/s]
 54%|███████████████████████████████████████████████████████████▍                                                  | 517/957 [00:06<00:04, 95.69it/s]
 55%|████████████████████████████████████████████████████████████▌                                                 | 527/957 [00:06<00:04, 95.48it/s]
 56%|█████████████████████████████████████████████████████████████▋                                                | 537/957 [00:06<00:04, 95.07it/s]
 57%|██████████████████████████████████████████████████████████████▊                                               | 547/957 [00:06<00:04, 95.74it/s]
 58%|████████████████████████████████████████████████████████████████                                              | 557/957 [00:06<00:04, 95.78it/s]
 59%|█████████████████████████████████████████████████████████████████▏                                            | 567/957 [00:06<00:04, 96.42it/s]
 60%|██████████████████████████████████████████████████████████████████▎                                           | 577/957 [00:06<00:03, 95.51it/s]
 61%|███████████████████████████████████████████████████████████████████▍                                          | 587/957 [00:06<00:03, 95.14it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                         | 597/957 [00:06<00:03, 96.32it/s]
 63%|█████████████████████████████████████████████████████████████████████▊                                        | 607/957 [00:06<00:03, 97.32it/s]
 65%|███████████████████████████████████████████████████████████████████████                                       | 618/957 [00:07<00:03, 98.46it/s]
 66%|████████████████████████████████████████████████████████████████████████▏                                     | 628/957 [00:07<00:03, 97.98it/s]
 67%|█████████████████████████████████████████████████████████████████████████▍                                    | 639/957 [00:07<00:03, 99.12it/s]
 68%|██████████████████████████████████████████████████████████████████████████▋                                   | 650/957 [00:07<00:03, 99.50it/s]
 69%|███████████████████████████████████████████████████████████████████████████▊                                  | 660/957 [00:07<00:02, 99.11it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▏                                | 671/957 [00:07<00:02, 99.97it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▎                               | 681/957 [00:07<00:02, 99.49it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▍                              | 691/957 [00:07<00:02, 98.77it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▌                             | 701/957 [00:07<00:02, 98.12it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▋                            | 711/957 [00:08<00:02, 97.06it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▊                           | 721/957 [00:08<00:02, 97.39it/s]
 76%|████████████████████████████████████████████████████████████████████████████████████                          | 731/957 [00:08<00:02, 97.57it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████▏                        | 741/957 [00:08<00:02, 97.17it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▎                       | 751/957 [00:08<00:02, 97.42it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▍                      | 761/957 [00:08<00:02, 97.56it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 771/957 [00:08<00:01, 98.02it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▊                    | 781/957 [00:08<00:01, 98.03it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▉                   | 791/957 [00:08<00:01, 96.93it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████                  | 801/957 [00:08<00:01, 95.77it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▏                | 811/957 [00:09<00:01, 96.41it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▍               | 822/957 [00:09<00:01, 97.96it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▋              | 832/957 [00:09<00:01, 98.52it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▊             | 842/957 [00:09<00:01, 98.04it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▉            | 852/957 [00:09<00:01, 98.59it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████           | 862/957 [00:09<00:00, 98.73it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▍         | 873/957 [00:09<00:00, 100.02it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▌        | 884/957 [00:09<00:00, 99.26it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▊       | 894/957 [00:09<00:00, 98.24it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████      | 905/957 [00:09<00:00, 99.78it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▏    | 915/957 [00:10<00:00, 99.49it/s]
 97%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▍   | 926/957 [00:10<00:00, 100.67it/s]
 98%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▋  | 937/957 [00:10<00:00, 100.85it/s]
 99%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▉ | 948/957 [00:10<00:00, 100.93it/s]
Models:  50%|████████████████████████████████████████████████████▌                                                    | 5/10 [00:50<00:51, 10.26s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:09, 95.49it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:09, 95.07it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:10, 91.42it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:10, 90.07it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 90.91it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 91.28it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 91.99it/s]
  8%|█████████▎                                                                                                     | 80/957 [00:00<00:09, 92.54it/s]
  9%|██████████▍                                                                                                    | 90/957 [00:00<00:09, 92.47it/s]
 10%|███████████▍                                                                                                  | 100/957 [00:01<00:09, 91.93it/s]
 11%|████████████▋                                                                                                 | 110/957 [00:01<00:09, 92.29it/s]
 13%|█████████████▊                                                                                                | 120/957 [00:01<00:09, 92.69it/s]
 14%|██████████████▉                                                                                               | 130/957 [00:01<00:08, 93.39it/s]
 15%|████████████████                                                                                              | 140/957 [00:01<00:08, 93.95it/s]
 16%|█████████████████▏                                                                                            | 150/957 [00:01<00:08, 94.20it/s]
 17%|██████████████████▍                                                                                           | 160/957 [00:01<00:08, 94.38it/s]
 18%|███████████████████▌                                                                                          | 170/957 [00:01<00:08, 94.32it/s]
 19%|████████████████████▋                                                                                         | 180/957 [00:01<00:08, 93.97it/s]
 20%|█████████████████████▊                                                                                        | 190/957 [00:02<00:08, 93.71it/s]
 21%|██████████████████████▉                                                                                       | 200/957 [00:02<00:08, 93.74it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:07, 93.76it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:07, 93.54it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:07, 93.50it/s]
 25%|███████████████████████████▌                                                                                  | 240/957 [00:02<00:07, 93.68it/s]
 26%|████████████████████████████▋                                                                                 | 250/957 [00:02<00:07, 93.37it/s]
 27%|█████████████████████████████▉                                                                                | 260/957 [00:02<00:07, 93.66it/s]
 28%|███████████████████████████████                                                                               | 270/957 [00:02<00:07, 93.37it/s]
 29%|████████████████████████████████▏                                                                             | 280/957 [00:03<00:07, 92.90it/s]
 30%|█████████████████████████████████▎                                                                            | 290/957 [00:03<00:07, 92.68it/s]
 31%|██████████████████████████████████▍                                                                           | 300/957 [00:03<00:07, 93.20it/s]
 32%|███████████████████████████████████▋                                                                          | 310/957 [00:03<00:07, 92.09it/s]
 33%|████████████████████████████████████▊                                                                         | 320/957 [00:03<00:06, 91.30it/s]
 34%|█████████████████████████████████████▉                                                                        | 330/957 [00:03<00:06, 91.52it/s]
 36%|███████████████████████████████████████                                                                       | 340/957 [00:03<00:06, 91.83it/s]
 37%|████████████████████████████████████████▏                                                                     | 350/957 [00:03<00:06, 92.12it/s]
 38%|█████████████████████████████████████████▍                                                                    | 360/957 [00:03<00:06, 92.15it/s]
 39%|██████████████████████████████████████████▌                                                                   | 370/957 [00:03<00:06, 91.38it/s]
 40%|███████████████████████████████████████████▋                                                                  | 380/957 [00:04<00:06, 91.47it/s]
 41%|████████████████████████████████████████████▊                                                                 | 390/957 [00:04<00:06, 91.50it/s]
 42%|█████████████████████████████████████████████▉                                                                | 400/957 [00:04<00:06, 91.81it/s]
 43%|███████████████████████████████████████████████▏                                                              | 410/957 [00:04<00:05, 91.99it/s]
 44%|████████████████████████████████████████████████▎                                                             | 420/957 [00:04<00:05, 92.10it/s]
 45%|█████████████████████████████████████████████████▍                                                            | 430/957 [00:04<00:05, 92.06it/s]
 46%|██████████████████████████████████████████████████▌                                                           | 440/957 [00:04<00:05, 91.24it/s]
 47%|███████████████████████████████████████████████████▋                                                          | 450/957 [00:04<00:05, 90.98it/s]
 48%|████████████████████████████████████████████████████▊                                                         | 460/957 [00:04<00:05, 91.78it/s]
 49%|██████████████████████████████████████████████████████                                                        | 470/957 [00:05<00:05, 92.08it/s]
 50%|███████████████████████████████████████████████████████▏                                                      | 480/957 [00:05<00:05, 92.86it/s]
 51%|████████████████████████████████████████████████████████▎                                                     | 490/957 [00:05<00:05, 93.20it/s]
 52%|█████████████████████████████████████████████████████████▍                                                    | 500/957 [00:05<00:04, 93.25it/s]
 53%|██████████████████████████████████████████████████████████▌                                                   | 510/957 [00:05<00:04, 93.16it/s]
 54%|███████████████████████████████████████████████████████████▊                                                  | 520/957 [00:05<00:04, 93.92it/s]
 55%|████████████████████████████████████████████████████████████▉                                                 | 530/957 [00:05<00:04, 94.42it/s]
 56%|██████████████████████████████████████████████████████████████                                                | 540/957 [00:05<00:04, 94.18it/s]
 57%|███████████████████████████████████████████████████████████████▏                                              | 550/957 [00:05<00:04, 93.49it/s]
 59%|████████████████████████████████████████████████████████████████▎                                             | 560/957 [00:06<00:04, 93.05it/s]
 60%|█████████████████████████████████████████████████████████████████▌                                            | 570/957 [00:06<00:04, 92.68it/s]
 61%|██████████████████████████████████████████████████████████████████▋                                           | 580/957 [00:06<00:04, 92.71it/s]
 62%|███████████████████████████████████████████████████████████████████▊                                          | 590/957 [00:06<00:03, 92.61it/s]
 63%|████████████████████████████████████████████████████████████████████▉                                         | 600/957 [00:06<00:03, 90.67it/s]
 64%|██████████████████████████████████████████████████████████████████████                                        | 610/957 [00:06<00:03, 90.44it/s]
 65%|███████████████████████████████████████████████████████████████████████▎                                      | 620/957 [00:06<00:03, 90.33it/s]
 66%|████████████████████████████████████████████████████████████████████████▍                                     | 630/957 [00:06<00:03, 90.89it/s]
 67%|█████████████████████████████████████████████████████████████████████████▌                                    | 640/957 [00:06<00:03, 91.38it/s]
 68%|██████████████████████████████████████████████████████████████████████████▋                                   | 650/957 [00:07<00:03, 91.70it/s]
 69%|███████████████████████████████████████████████████████████████████████████▊                                  | 660/957 [00:07<00:03, 92.37it/s]
 70%|█████████████████████████████████████████████████████████████████████████████                                 | 670/957 [00:07<00:03, 92.43it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▏                               | 680/957 [00:07<00:02, 92.70it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▎                              | 690/957 [00:07<00:02, 92.38it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▍                             | 700/957 [00:07<00:02, 92.21it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 710/957 [00:07<00:02, 91.88it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▊                           | 720/957 [00:07<00:02, 92.34it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▉                          | 730/957 [00:07<00:02, 92.04it/s]
 77%|█████████████████████████████████████████████████████████████████████████████████████                         | 740/957 [00:07<00:02, 92.61it/s]
 78%|██████████████████████████████████████████████████████████████████████████████████████▏                       | 750/957 [00:08<00:02, 92.64it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▎                      | 760/957 [00:08<00:02, 92.71it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▌                     | 770/957 [00:08<00:02, 93.20it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▋                    | 780/957 [00:08<00:01, 92.98it/s]
 83%|██████████████████████████████████████████████████████████████████████████████████████████▊                   | 790/957 [00:08<00:01, 93.01it/s]
 84%|███████████████████████████████████████████████████████████████████████████████████████████▉                  | 800/957 [00:08<00:01, 93.31it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████                 | 810/957 [00:08<00:01, 93.31it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▎               | 820/957 [00:08<00:01, 93.12it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▍              | 830/957 [00:08<00:01, 92.13it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▌             | 840/957 [00:09<00:01, 90.40it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▋            | 850/957 [00:09<00:01, 91.05it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▊           | 860/957 [00:09<00:01, 91.84it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████          | 870/957 [00:09<00:00, 89.39it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 880/957 [00:09<00:00, 90.05it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎       | 890/957 [00:09<00:00, 90.85it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▍      | 900/957 [00:09<00:00, 91.53it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▌     | 910/957 [00:09<00:00, 92.71it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋    | 920/957 [00:09<00:00, 92.92it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉   | 930/957 [00:10<00:00, 93.41it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████  | 940/957 [00:10<00:00, 93.26it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▏| 950/957 [00:10<00:00, 93.12it/s]
Models:  60%|███████████████████████████████████████████████████████████████                                          | 6/10 [01:01<00:41, 10.30s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:09, 95.34it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:09, 95.01it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:09, 94.70it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:09, 94.13it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 94.54it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 94.53it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 94.89it/s]
  8%|█████████▎                                                                                                     | 80/957 [00:00<00:09, 94.59it/s]
  9%|██████████▍                                                                                                    | 90/957 [00:00<00:09, 94.77it/s]
 10%|███████████▍                                                                                                  | 100/957 [00:01<00:08, 95.38it/s]
 11%|████████████▋                                                                                                 | 110/957 [00:01<00:08, 95.09it/s]
 13%|█████████████▊                                                                                                | 120/957 [00:01<00:08, 94.49it/s]
 14%|██████████████▉                                                                                               | 130/957 [00:01<00:08, 94.39it/s]
 15%|████████████████                                                                                              | 140/957 [00:01<00:08, 94.07it/s]
 16%|█████████████████▏                                                                                            | 150/957 [00:01<00:08, 93.28it/s]
 17%|██████████████████▍                                                                                           | 160/957 [00:01<00:08, 93.68it/s]
 18%|███████████████████▌                                                                                          | 170/957 [00:01<00:08, 93.03it/s]
 19%|████████████████████▋                                                                                         | 180/957 [00:01<00:08, 93.36it/s]
 20%|█████████████████████▊                                                                                        | 190/957 [00:02<00:08, 93.70it/s]
 21%|██████████████████████▉                                                                                       | 200/957 [00:02<00:08, 92.83it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:08, 92.16it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:07, 92.78it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:07, 92.84it/s]
 25%|███████████████████████████▌                                                                                  | 240/957 [00:02<00:07, 93.05it/s]
 26%|████████████████████████████▋                                                                                 | 250/957 [00:02<00:07, 93.25it/s]
 27%|█████████████████████████████▉                                                                                | 260/957 [00:02<00:07, 93.16it/s]
 28%|███████████████████████████████                                                                               | 270/957 [00:02<00:07, 93.52it/s]
 29%|████████████████████████████████▏                                                                             | 280/957 [00:02<00:07, 93.80it/s]
 30%|█████████████████████████████████▎                                                                            | 290/957 [00:03<00:07, 93.30it/s]
 31%|██████████████████████████████████▍                                                                           | 300/957 [00:03<00:07, 93.36it/s]
 32%|███████████████████████████████████▋                                                                          | 310/957 [00:03<00:06, 93.31it/s]
 33%|████████████████████████████████████▊                                                                         | 320/957 [00:03<00:06, 93.01it/s]
 34%|█████████████████████████████████████▉                                                                        | 330/957 [00:03<00:06, 93.15it/s]
 36%|███████████████████████████████████████                                                                       | 340/957 [00:03<00:06, 92.97it/s]
 37%|████████████████████████████████████████▏                                                                     | 350/957 [00:03<00:06, 91.79it/s]
 38%|█████████████████████████████████████████▍                                                                    | 360/957 [00:03<00:06, 92.18it/s]
 39%|██████████████████████████████████████████▌                                                                   | 370/957 [00:03<00:06, 92.57it/s]
 40%|███████████████████████████████████████████▋                                                                  | 380/957 [00:04<00:06, 91.49it/s]
 41%|████████████████████████████████████████████▊                                                                 | 390/957 [00:04<00:06, 91.43it/s]
 42%|█████████████████████████████████████████████▉                                                                | 400/957 [00:04<00:06, 91.28it/s]
 43%|███████████████████████████████████████████████▏                                                              | 410/957 [00:04<00:06, 91.15it/s]
 44%|████████████████████████████████████████████████▎                                                             | 420/957 [00:04<00:05, 90.48it/s]
 45%|█████████████████████████████████████████████████▍                                                            | 430/957 [00:04<00:05, 90.09it/s]
 46%|██████████████████████████████████████████████████▌                                                           | 440/957 [00:04<00:05, 90.48it/s]
 47%|███████████████████████████████████████████████████▋                                                          | 450/957 [00:04<00:05, 90.47it/s]
 48%|████████████████████████████████████████████████████▊                                                         | 460/957 [00:04<00:05, 91.22it/s]
 49%|██████████████████████████████████████████████████████                                                        | 470/957 [00:05<00:05, 91.33it/s]
 50%|███████████████████████████████████████████████████████▏                                                      | 480/957 [00:05<00:05, 90.11it/s]
 51%|████████████████████████████████████████████████████████▎                                                     | 490/957 [00:05<00:05, 89.56it/s]
 52%|█████████████████████████████████████████████████████████▍                                                    | 500/957 [00:05<00:05, 89.96it/s]
 53%|██████████████████████████████████████████████████████████▌                                                   | 509/957 [00:05<00:05, 89.43it/s]
 54%|███████████████████████████████████████████████████████████▌                                                  | 518/957 [00:05<00:04, 88.74it/s]
 55%|████████████████████████████████████████████████████████████▌                                                 | 527/957 [00:05<00:04, 88.76it/s]
 56%|█████████████████████████████████████████████████████████████▌                                                | 536/957 [00:05<00:04, 88.45it/s]
 57%|██████████████████████████████████████████████████████████████▊                                               | 546/957 [00:05<00:04, 89.81it/s]
 58%|███████████████████████████████████████████████████████████████▉                                              | 556/957 [00:06<00:04, 90.71it/s]
 59%|█████████████████████████████████████████████████████████████████                                             | 566/957 [00:06<00:04, 91.36it/s]
 60%|██████████████████████████████████████████████████████████████████▏                                           | 576/957 [00:06<00:04, 92.27it/s]
 61%|███████████████████████████████████████████████████████████████████▎                                          | 586/957 [00:06<00:04, 92.16it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                         | 596/957 [00:06<00:03, 92.46it/s]
 63%|█████████████████████████████████████████████████████████████████████▋                                        | 606/957 [00:06<00:03, 92.86it/s]
 64%|██████████████████████████████████████████████████████████████████████▊                                       | 616/957 [00:06<00:03, 93.38it/s]
 65%|███████████████████████████████████████████████████████████████████████▉                                      | 626/957 [00:06<00:03, 93.67it/s]
 66%|█████████████████████████████████████████████████████████████████████████                                     | 636/957 [00:06<00:03, 93.33it/s]
 68%|██████████████████████████████████████████████████████████████████████████▎                                   | 646/957 [00:06<00:03, 93.96it/s]
 69%|███████████████████████████████████████████████████████████████████████████▍                                  | 656/957 [00:07<00:03, 94.44it/s]
 70%|████████████████████████████████████████████████████████████████████████████▌                                 | 666/957 [00:07<00:03, 94.25it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▋                                | 676/957 [00:07<00:02, 93.67it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▊                               | 686/957 [00:07<00:02, 93.74it/s]
 73%|████████████████████████████████████████████████████████████████████████████████                              | 696/957 [00:07<00:02, 93.63it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▏                            | 706/957 [00:07<00:02, 93.65it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▎                           | 716/957 [00:07<00:02, 93.57it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▍                          | 726/957 [00:07<00:02, 93.48it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████▌                         | 736/957 [00:07<00:02, 93.27it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▋                        | 746/957 [00:08<00:02, 93.35it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▉                       | 756/957 [00:08<00:02, 93.34it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████                      | 766/957 [00:08<00:02, 92.87it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████▏                    | 776/957 [00:08<00:01, 90.99it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▎                   | 786/957 [00:08<00:01, 90.94it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▍                  | 796/957 [00:08<00:01, 91.01it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▋                 | 806/957 [00:08<00:01, 91.37it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▊                | 816/957 [00:08<00:01, 91.66it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▉               | 826/957 [00:08<00:01, 89.75it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▉              | 835/957 [00:09<00:01, 89.58it/s]
 88%|█████████████████████████████████████████████████████████████████████████████████████████████████             | 844/957 [00:09<00:01, 89.65it/s]
 89%|██████████████████████████████████████████████████████████████████████████████████████████████████            | 853/957 [00:09<00:01, 89.75it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████▏          | 863/957 [00:09<00:01, 90.82it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▎         | 873/957 [00:09<00:00, 91.64it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▍        | 883/957 [00:09<00:00, 92.19it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▋       | 893/957 [00:09<00:00, 92.56it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▊      | 903/957 [00:09<00:00, 92.28it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▉     | 913/957 [00:09<00:00, 92.63it/s]
 96%|██████████████████████████████████████████████████████████████████████████████████████████████████████████    | 923/957 [00:09<00:00, 92.83it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 933/957 [00:10<00:00, 92.82it/s]
 99%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▍ | 943/957 [00:10<00:00, 92.97it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▌| 953/957 [00:10<00:00, 93.03it/s]
Models:  70%|█████████████████████████████████████████████████████████████████████████▌                               | 7/10 [01:11<00:30, 10.32s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:10, 91.72it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:10, 92.40it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:10, 91.31it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:10, 91.65it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 91.74it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 91.26it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 90.84it/s]
  8%|█████████▎                                                                                                     | 80/957 [00:00<00:09, 91.90it/s]
  9%|██████████▍                                                                                                    | 90/957 [00:00<00:09, 91.47it/s]
 10%|███████████▍                                                                                                  | 100/957 [00:01<00:09, 91.43it/s]
 11%|████████████▋                                                                                                 | 110/957 [00:01<00:09, 91.76it/s]
 13%|█████████████▊                                                                                                | 120/957 [00:01<00:09, 91.55it/s]
 14%|██████████████▉                                                                                               | 130/957 [00:01<00:09, 91.69it/s]
 15%|████████████████                                                                                              | 140/957 [00:01<00:08, 91.49it/s]
 16%|█████████████████▏                                                                                            | 150/957 [00:01<00:08, 91.37it/s]
 17%|██████████████████▍                                                                                           | 160/957 [00:01<00:08, 91.78it/s]
 18%|███████████████████▌                                                                                          | 170/957 [00:01<00:08, 92.47it/s]
 19%|████████████████████▋                                                                                         | 180/957 [00:01<00:08, 92.86it/s]
 20%|█████████████████████▊                                                                                        | 190/957 [00:02<00:08, 92.90it/s]
 21%|██████████████████████▉                                                                                       | 200/957 [00:02<00:08, 92.46it/s]
 22%|████████████████████████▏                                                                                     | 210/957 [00:02<00:08, 90.98it/s]
 23%|█████████████████████████▎                                                                                    | 220/957 [00:02<00:08, 90.36it/s]
 24%|██████████████████████████▍                                                                                   | 230/957 [00:02<00:08, 89.88it/s]
 25%|███████████████████████████▍                                                                                  | 239/957 [00:02<00:08, 88.85it/s]
 26%|████████████████████████████▌                                                                                 | 248/957 [00:02<00:07, 89.03it/s]
 27%|█████████████████████████████▋                                                                                | 258/957 [00:02<00:07, 90.12it/s]
 28%|██████████████████████████████▊                                                                               | 268/957 [00:02<00:07, 89.90it/s]
 29%|███████████████████████████████▉                                                                              | 278/957 [00:03<00:07, 90.56it/s]
 30%|█████████████████████████████████                                                                             | 288/957 [00:03<00:07, 89.13it/s]
 31%|██████████████████████████████████▎                                                                           | 298/957 [00:03<00:07, 90.17it/s]
 32%|███████████████████████████████████▍                                                                          | 308/957 [00:03<00:07, 91.31it/s]
 33%|████████████████████████████████████▌                                                                         | 318/957 [00:03<00:07, 91.18it/s]
 34%|█████████████████████████████████████▋                                                                        | 328/957 [00:03<00:06, 91.00it/s]
 35%|██████████████████████████████████████▊                                                                       | 338/957 [00:03<00:06, 89.67it/s]
 36%|████████████████████████████████████████                                                                      | 348/957 [00:03<00:06, 89.56it/s]
 37%|█████████████████████████████████████████▏                                                                    | 358/957 [00:03<00:06, 90.95it/s]
 38%|██████████████████████████████████████████▎                                                                   | 368/957 [00:04<00:06, 90.75it/s]
 39%|███████████████████████████████████████████▍                                                                  | 378/957 [00:04<00:06, 89.80it/s]
 40%|████████████████████████████████████████████▍                                                                 | 387/957 [00:04<00:06, 89.73it/s]
 41%|█████████████████████████████████████████████▌                                                                | 396/957 [00:04<00:06, 88.24it/s]
 42%|██████████████████████████████████████████████▌                                                               | 405/957 [00:04<00:06, 88.28it/s]
 43%|███████████████████████████████████████████████▋                                                              | 415/957 [00:04<00:06, 90.22it/s]
 44%|████████████████████████████████████████████████▊                                                             | 425/957 [00:04<00:05, 89.07it/s]
 45%|█████████████████████████████████████████████████▉                                                            | 434/957 [00:04<00:05, 89.18it/s]
 46%|███████████████████████████████████████████████████                                                           | 444/957 [00:04<00:05, 91.62it/s]
 47%|████████████████████████████████████████████████████▏                                                         | 454/957 [00:05<00:05, 90.89it/s]
 48%|█████████████████████████████████████████████████████▎                                                        | 464/957 [00:05<00:05, 90.82it/s]
 50%|██████████████████████████████████████████████████████▍                                                       | 474/957 [00:05<00:05, 92.87it/s]
 51%|███████████████████████████████████████████████████████▋                                                      | 484/957 [00:05<00:05, 92.90it/s]
 52%|████████████████████████████████████████████████████████▊                                                     | 494/957 [00:05<00:05, 92.12it/s]
 53%|█████████████████████████████████████████████████████████▉                                                    | 504/957 [00:05<00:05, 89.60it/s]
 54%|██████████████████████████████████████████████████████████▉                                                   | 513/957 [00:05<00:04, 89.71it/s]
 55%|███████████████████████████████████████████████████████████▉                                                  | 522/957 [00:05<00:04, 88.41it/s]
 56%|█████████████████████████████████████████████████████████████▏                                                | 532/957 [00:05<00:04, 89.84it/s]
 57%|██████████████████████████████████████████████████████████████▎                                               | 542/957 [00:05<00:04, 91.50it/s]
 58%|███████████████████████████████████████████████████████████████▍                                              | 552/957 [00:06<00:04, 92.00it/s]
 59%|████████████████████████████████████████████████████████████████▌                                             | 562/957 [00:06<00:04, 90.56it/s]
 60%|█████████████████████████████████████████████████████████████████▋                                            | 572/957 [00:06<00:04, 90.23it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                           | 582/957 [00:06<00:04, 89.76it/s]
 62%|████████████████████████████████████████████████████████████████████                                          | 592/957 [00:06<00:04, 91.00it/s]
 63%|█████████████████████████████████████████████████████████████████████▏                                        | 602/957 [00:06<00:03, 90.93it/s]
 64%|██████████████████████████████████████████████████████████████████████▎                                       | 612/957 [00:06<00:03, 90.75it/s]
 65%|███████████████████████████████████████████████████████████████████████▍                                      | 622/957 [00:06<00:03, 91.97it/s]
 66%|████████████████████████████████████████████████████████████████████████▋                                     | 632/957 [00:06<00:03, 91.63it/s]
 67%|█████████████████████████████████████████████████████████████████████████▊                                    | 642/957 [00:07<00:03, 91.52it/s]
 68%|██████████████████████████████████████████████████████████████████████████▉                                   | 652/957 [00:07<00:03, 90.90it/s]
 69%|████████████████████████████████████████████████████████████████████████████                                  | 662/957 [00:07<00:03, 91.10it/s]
 70%|█████████████████████████████████████████████████████████████████████████████▏                                | 672/957 [00:07<00:03, 91.21it/s]
 71%|██████████████████████████████████████████████████████████████████████████████▍                               | 682/957 [00:07<00:03, 90.73it/s]
 72%|███████████████████████████████████████████████████████████████████████████████▌                              | 692/957 [00:07<00:02, 90.72it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▋                             | 702/957 [00:07<00:02, 90.60it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▊                            | 712/957 [00:07<00:02, 91.81it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▉                           | 722/957 [00:07<00:02, 92.40it/s]
 76%|████████████████████████████████████████████████████████████████████████████████████▏                         | 732/957 [00:08<00:02, 91.11it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▎                        | 742/957 [00:08<00:02, 89.87it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▍                       | 752/957 [00:08<00:02, 90.66it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▌                      | 762/957 [00:08<00:02, 90.43it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▋                     | 772/957 [00:08<00:02, 90.06it/s]
 82%|█████████████████████████████████████████████████████████████████████████████████████████▉                    | 782/957 [00:08<00:01, 90.81it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████                   | 792/957 [00:08<00:01, 90.52it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▏                 | 802/957 [00:08<00:01, 89.98it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▎                | 812/957 [00:08<00:01, 86.75it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▍               | 822/957 [00:09<00:01, 88.83it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▋              | 832/957 [00:09<00:01, 90.63it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▊             | 842/957 [00:09<00:01, 90.62it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▉            | 852/957 [00:09<00:01, 89.97it/s]
 90%|███████████████████████████████████████████████████████████████████████████████████████████████████           | 862/957 [00:09<00:01, 90.30it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████▏         | 872/957 [00:09<00:00, 90.71it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▍        | 882/957 [00:09<00:00, 91.22it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▌       | 892/957 [00:09<00:00, 92.37it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▋      | 902/957 [00:09<00:00, 92.65it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▊     | 912/957 [00:10<00:00, 92.44it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▉    | 922/957 [00:10<00:00, 91.88it/s]
 97%|███████████████████████████████████████████████████████████████████████████████████████████████████████████▏  | 932/957 [00:10<00:00, 92.07it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████▎ | 942/957 [00:10<00:00, 92.92it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▍| 952/957 [00:10<00:00, 94.41it/s]
Models:  80%|████████████████████████████████████████████████████████████████████████████████████                     | 8/10 [01:22<00:20, 10.38s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:09, 95.82it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:09, 95.81it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:09, 95.17it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:09, 91.74it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 94.43it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 94.65it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 94.26it/s]
  8%|█████████▍                                                                                                     | 81/957 [00:00<00:09, 96.12it/s]
 10%|██████████▌                                                                                                    | 91/957 [00:00<00:09, 96.04it/s]
 11%|███████████▌                                                                                                  | 101/957 [00:01<00:08, 95.89it/s]
 12%|████████████▊                                                                                                 | 111/957 [00:01<00:08, 96.86it/s]
 13%|█████████████▉                                                                                                | 121/957 [00:01<00:08, 96.74it/s]
 14%|███████████████                                                                                               | 131/957 [00:01<00:08, 97.05it/s]
 15%|████████████████▏                                                                                             | 141/957 [00:01<00:08, 97.07it/s]
 16%|█████████████████▎                                                                                            | 151/957 [00:01<00:08, 96.44it/s]
 17%|██████████████████▌                                                                                           | 161/957 [00:01<00:08, 96.90it/s]
 18%|███████████████████▋                                                                                          | 171/957 [00:01<00:08, 96.39it/s]
 19%|████████████████████▊                                                                                         | 181/957 [00:01<00:08, 94.76it/s]
 20%|█████████████████████▉                                                                                        | 191/957 [00:02<00:08, 94.07it/s]
 21%|███████████████████████                                                                                       | 201/957 [00:02<00:07, 95.60it/s]
 22%|████████████████████████▎                                                                                     | 211/957 [00:02<00:07, 95.67it/s]
 23%|█████████████████████████▌                                                                                    | 222/957 [00:02<00:07, 97.33it/s]
 24%|██████████████████████████▊                                                                                   | 233/957 [00:02<00:07, 98.38it/s]
 25%|███████████████████████████▉                                                                                  | 243/957 [00:02<00:07, 98.31it/s]
 26%|█████████████████████████████                                                                                 | 253/957 [00:02<00:07, 97.47it/s]
 27%|██████████████████████████████▏                                                                               | 263/957 [00:02<00:07, 96.20it/s]
 29%|███████████████████████████████▍                                                                              | 273/957 [00:02<00:07, 97.22it/s]
 30%|████████████████████████████████▌                                                                             | 283/957 [00:02<00:06, 96.86it/s]
 31%|█████████████████████████████████▊                                                                            | 294/957 [00:03<00:06, 98.06it/s]
 32%|██████████████████████████████████▉                                                                           | 304/957 [00:03<00:06, 98.35it/s]
 33%|████████████████████████████████████                                                                          | 314/957 [00:03<00:06, 97.50it/s]
 34%|█████████████████████████████████████▎                                                                        | 325/957 [00:03<00:06, 98.60it/s]
 35%|██████████████████████████████████████▌                                                                       | 336/957 [00:03<00:06, 99.46it/s]
 36%|███████████████████████████████████████▉                                                                      | 347/957 [00:03<00:06, 99.81it/s]
 37%|████████████████████████████████████████▊                                                                    | 358/957 [00:03<00:05, 100.84it/s]
 39%|██████████████████████████████████████████                                                                   | 369/957 [00:03<00:05, 100.33it/s]
 40%|███████████████████████████████████████████▎                                                                 | 380/957 [00:03<00:05, 100.90it/s]
 41%|████████████████████████████████████████████▌                                                                | 391/957 [00:04<00:05, 100.56it/s]
 42%|█████████████████████████████████████████████▊                                                               | 402/957 [00:04<00:05, 100.79it/s]
 43%|███████████████████████████████████████████████▍                                                              | 413/957 [00:04<00:05, 98.63it/s]
 44%|████████████████████████████████████████████████▌                                                             | 423/957 [00:04<00:05, 98.32it/s]
 45%|█████████████████████████████████████████████████▊                                                            | 433/957 [00:04<00:05, 98.53it/s]
 46%|██████████████████████████████████████████████████▉                                                           | 443/957 [00:04<00:05, 98.94it/s]
 47%|████████████████████████████████████████████████████                                                          | 453/957 [00:04<00:05, 98.94it/s]
 48%|█████████████████████████████████████████████████████▎                                                        | 464/957 [00:04<00:04, 99.42it/s]
 50%|██████████████████████████████████████████████████████▍                                                       | 474/957 [00:04<00:04, 99.36it/s]
 51%|███████████████████████████████████████████████████████▋                                                      | 484/957 [00:04<00:04, 98.45it/s]
 52%|████████████████████████████████████████████████████████▊                                                     | 494/957 [00:05<00:04, 97.74it/s]
 53%|█████████████████████████████████████████████████████████▉                                                    | 504/957 [00:05<00:04, 97.26it/s]
 54%|███████████████████████████████████████████████████████████                                                   | 514/957 [00:05<00:04, 97.95it/s]
 55%|████████████████████████████████████████████████████████████▎                                                 | 525/957 [00:05<00:04, 98.98it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 535/957 [00:05<00:04, 98.80it/s]
 57%|██████████████████████████████████████████████████████████████▋                                               | 545/957 [00:05<00:04, 96.44it/s]
 58%|███████████████████████████████████████████████████████████████▊                                              | 555/957 [00:05<00:04, 95.58it/s]
 59%|████████████████████████████████████████████████████████████████▉                                             | 565/957 [00:05<00:04, 95.43it/s]
 60%|██████████████████████████████████████████████████████████████████                                            | 575/957 [00:05<00:04, 93.50it/s]
 61%|███████████████████████████████████████████████████████████████████▎                                          | 586/957 [00:06<00:03, 95.52it/s]
 62%|████████████████████████████████████████████████████████████████████▌                                         | 596/957 [00:06<00:03, 94.88it/s]
 63%|█████████████████████████████████████████████████████████████████████▋                                        | 606/957 [00:06<00:03, 95.83it/s]
 64%|██████████████████████████████████████████████████████████████████████▊                                       | 616/957 [00:06<00:03, 96.56it/s]
 65%|███████████████████████████████████████████████████████████████████████▉                                      | 626/957 [00:06<00:03, 94.19it/s]
 66%|█████████████████████████████████████████████████████████████████████████                                     | 636/957 [00:06<00:03, 95.85it/s]
 68%|██████████████████████████████████████████████████████████████████████████▎                                   | 647/957 [00:06<00:03, 97.62it/s]
 69%|███████████████████████████████████████████████████████████████████████████▌                                  | 657/957 [00:06<00:03, 98.01it/s]
 70%|████████████████████████████████████████████████████████████████████████████▋                                 | 667/957 [00:06<00:02, 98.12it/s]
 71%|█████████████████████████████████████████████████████████████████████████████▊                                | 677/957 [00:06<00:02, 98.04it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▉                               | 687/957 [00:07<00:02, 98.09it/s]
 73%|████████████████████████████████████████████████████████████████████████████████                              | 697/957 [00:07<00:02, 96.71it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▎                            | 707/957 [00:07<00:02, 96.72it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████▍                           | 717/957 [00:07<00:02, 96.67it/s]
 76%|███████████████████████████████████████████████████████████████████████████████████▌                          | 727/957 [00:07<00:02, 95.68it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████▋                         | 737/957 [00:07<00:02, 94.58it/s]
 78%|█████████████████████████████████████████████████████████████████████████████████████▉                        | 748/957 [00:07<00:02, 96.40it/s]
 79%|███████████████████████████████████████████████████████████████████████████████████████▏                      | 758/957 [00:07<00:02, 95.81it/s]
 80%|████████████████████████████████████████████████████████████████████████████████████████▎                     | 768/957 [00:07<00:01, 96.38it/s]
 81%|█████████████████████████████████████████████████████████████████████████████████████████▍                    | 778/957 [00:08<00:01, 96.47it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▌                   | 788/957 [00:08<00:01, 96.47it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▊                  | 799/957 [00:08<00:01, 97.70it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████                 | 810/957 [00:08<00:01, 98.55it/s]
 86%|██████████████████████████████████████████████████████████████████████████████████████████████▎               | 820/957 [00:08<00:01, 97.16it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▍              | 830/957 [00:08<00:01, 96.62it/s]
 88%|████████████████████████████████████████████████████████████████████████████████████████████████▌             | 840/957 [00:08<00:01, 95.48it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▋            | 850/957 [00:08<00:01, 95.57it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▊           | 860/957 [00:08<00:01, 95.80it/s]
 91%|████████████████████████████████████████████████████████████████████████████████████████████████████          | 870/957 [00:08<00:00, 95.89it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 880/957 [00:09<00:00, 96.40it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▎       | 890/957 [00:09<00:00, 95.98it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▍      | 900/957 [00:09<00:00, 96.78it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▌     | 910/957 [00:09<00:00, 97.43it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋    | 920/957 [00:09<00:00, 96.98it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▉   | 930/957 [00:09<00:00, 97.28it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████  | 940/957 [00:09<00:00, 97.85it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 951/957 [00:09<00:00, 98.84it/s]
Models:  90%|██████████████████████████████████████████████████████████████████████████████████████████████▌          | 9/10 [01:32<00:10, 10.22s/it]
  0%|                                                                                                                        | 0/957 [00:00<?, ?it/s]
  1%|█▏                                                                                                             | 10/957 [00:00<00:09, 96.98it/s]
  2%|██▎                                                                                                            | 20/957 [00:00<00:09, 98.25it/s]
  3%|███▍                                                                                                           | 30/957 [00:00<00:09, 98.27it/s]
  4%|████▋                                                                                                          | 40/957 [00:00<00:09, 97.43it/s]
  5%|█████▊                                                                                                         | 50/957 [00:00<00:09, 93.94it/s]
  6%|██████▉                                                                                                        | 60/957 [00:00<00:09, 95.64it/s]
  7%|████████                                                                                                       | 70/957 [00:00<00:09, 96.73it/s]
  8%|█████████▍                                                                                                     | 81/957 [00:00<00:09, 97.15it/s]
 10%|██████████▋                                                                                                    | 92/957 [00:00<00:08, 98.53it/s]
 11%|███████████▋                                                                                                  | 102/957 [00:01<00:08, 98.33it/s]
 12%|████████████▊                                                                                                 | 112/957 [00:01<00:08, 98.76it/s]
 13%|██████████████                                                                                                | 122/957 [00:01<00:08, 98.76it/s]
 14%|███████████████▎                                                                                              | 133/957 [00:01<00:08, 99.69it/s]
 15%|████████████████▍                                                                                             | 143/957 [00:01<00:08, 97.87it/s]
 16%|█████████████████▌                                                                                            | 153/957 [00:01<00:08, 96.95it/s]
 17%|██████████████████▊                                                                                           | 164/957 [00:01<00:08, 98.06it/s]
 18%|████████████████████                                                                                          | 174/957 [00:01<00:08, 97.84it/s]
 19%|█████████████████████▏                                                                                        | 184/957 [00:01<00:08, 96.61it/s]
 20%|██████████████████████▎                                                                                       | 194/957 [00:01<00:07, 96.26it/s]
 21%|███████████████████████▍                                                                                      | 204/957 [00:02<00:07, 96.38it/s]
 22%|████████████████████████▋                                                                                     | 215/957 [00:02<00:07, 97.53it/s]
 24%|█████████████████████████▉                                                                                    | 226/957 [00:02<00:07, 98.83it/s]
 25%|███████████████████████████▏                                                                                  | 236/957 [00:02<00:07, 98.51it/s]
 26%|████████████████████████████▎                                                                                 | 246/957 [00:02<00:07, 98.91it/s]
 27%|█████████████████████████████▍                                                                                | 256/957 [00:02<00:07, 98.04it/s]
 28%|██████████████████████████████▌                                                                               | 266/957 [00:02<00:07, 97.61it/s]
 29%|███████████████████████████████▊                                                                              | 277/957 [00:02<00:06, 98.37it/s]
 30%|████████████████████████████████▉                                                                             | 287/957 [00:02<00:06, 98.46it/s]
 31%|██████████████████████████████████▎                                                                           | 298/957 [00:03<00:06, 99.29it/s]
 32%|███████████████████████████████████▏                                                                         | 309/957 [00:03<00:06, 100.19it/s]
 33%|████████████████████████████████████▍                                                                        | 320/957 [00:03<00:06, 100.96it/s]
 35%|█████████████████████████████████████▋                                                                       | 331/957 [00:03<00:06, 100.59it/s]
 36%|██████████████████████████████████████▉                                                                      | 342/957 [00:03<00:06, 100.97it/s]
 37%|████████████████████████████████████████▏                                                                    | 353/957 [00:03<00:05, 101.71it/s]
 38%|█████████████████████████████████████████▍                                                                   | 364/957 [00:03<00:05, 101.46it/s]
 39%|██████████████████████████████████████████▋                                                                  | 375/957 [00:03<00:05, 101.17it/s]
 40%|███████████████████████████████████████████▉                                                                 | 386/957 [00:03<00:05, 101.54it/s]
 41%|█████████████████████████████████████████████▏                                                               | 397/957 [00:04<00:05, 102.17it/s]
 43%|██████████████████████████████████████████████▍                                                              | 408/957 [00:04<00:05, 101.71it/s]
 44%|███████████████████████████████████████████████▋                                                             | 419/957 [00:04<00:05, 101.33it/s]
 45%|████████████████████████████████████████████████▉                                                            | 430/957 [00:04<00:05, 101.53it/s]
 46%|██████████████████████████████████████████████████▏                                                          | 441/957 [00:04<00:05, 100.74it/s]
 47%|███████████████████████████████████████████████████▍                                                         | 452/957 [00:04<00:05, 100.01it/s]
 48%|████████████████████████████████████████████████████▋                                                        | 463/957 [00:04<00:04, 100.02it/s]
 50%|██████████████████████████████████████████████████████▍                                                       | 474/957 [00:04<00:04, 99.66it/s]
 51%|███████████████████████████████████████████████████████▋                                                      | 484/957 [00:04<00:04, 98.68it/s]
 52%|████████████████████████████████████████████████████████▉                                                     | 495/957 [00:05<00:04, 99.06it/s]
 53%|██████████████████████████████████████████████████████████                                                    | 505/957 [00:05<00:04, 98.45it/s]
 54%|███████████████████████████████████████████████████████████▏                                                  | 515/957 [00:05<00:04, 96.70it/s]
 55%|████████████████████████████████████████████████████████████▎                                                 | 525/957 [00:05<00:04, 95.90it/s]
 56%|█████████████████████████████████████████████████████████████▍                                                | 535/957 [00:05<00:04, 96.54it/s]
 57%|██████████████████████████████████████████████████████████████▊                                               | 546/957 [00:05<00:04, 97.34it/s]
 58%|████████████████████████████████████████████████████████████████                                              | 557/957 [00:05<00:04, 99.01it/s]
 59%|█████████████████████████████████████████████████████████████████▎                                            | 568/957 [00:05<00:03, 99.63it/s]
 60%|██████████████████████████████████████████████████████████████████▍                                           | 578/957 [00:05<00:03, 99.03it/s]
 62%|███████████████████████████████████████████████████████████████████▋                                          | 589/957 [00:05<00:03, 99.36it/s]
 63%|████████████████████████████████████████████████████████████████████▎                                        | 600/957 [00:06<00:03, 100.42it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 611/957 [00:06<00:03, 101.39it/s]
 65%|██████████████████████████████████████████████████████████████████████▊                                      | 622/957 [00:06<00:03, 101.41it/s]
 66%|████████████████████████████████████████████████████████████████████████                                     | 633/957 [00:06<00:03, 101.95it/s]
 67%|█████████████████████████████████████████████████████████████████████████▎                                   | 644/957 [00:06<00:03, 102.59it/s]
 68%|██████████████████████████████████████████████████████████████████████████▌                                  | 655/957 [00:06<00:02, 101.76it/s]
 70%|███████████████████████████████████████████████████████████████████████████▊                                 | 666/957 [00:06<00:02, 100.86it/s]
 71%|█████████████████████████████████████████████████████████████████████████████                                | 677/957 [00:06<00:02, 101.14it/s]
 72%|███████████████████████████████████████████████████████████████████████████████                               | 688/957 [00:06<00:02, 99.69it/s]
 73%|████████████████████████████████████████████████████████████████████████████████▎                             | 699/957 [00:07<00:02, 99.99it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████▌                            | 710/957 [00:07<00:02, 99.76it/s]
 75%|██████████████████████████████████████████████████████████████████████████████████                           | 721/957 [00:07<00:02, 100.36it/s]
 76%|████████████████████████████████████████████████████████████████████████████████████▏                         | 732/957 [00:07<00:02, 99.08it/s]
 78%|████████████████████████████████████████████████████████████████████████████████████▋                        | 743/957 [00:07<00:02, 100.55it/s]
 79%|█████████████████████████████████████████████████████████████████████████████████████▉                       | 754/957 [00:07<00:02, 100.15it/s]
 80%|███████████████████████████████████████████████████████████████████████████████████████▉                      | 765/957 [00:07<00:01, 99.31it/s]
 81%|████████████████████████████████████████████████████████████████████████████████████████▍                    | 776/957 [00:07<00:01, 100.03it/s]
 82%|██████████████████████████████████████████████████████████████████████████████████████████▍                   | 787/957 [00:07<00:01, 98.75it/s]
 83%|███████████████████████████████████████████████████████████████████████████████████████████▌                  | 797/957 [00:08<00:01, 98.83it/s]
 84%|████████████████████████████████████████████████████████████████████████████████████████████▊                 | 807/957 [00:08<00:01, 97.42it/s]
 85%|█████████████████████████████████████████████████████████████████████████████████████████████▉                | 817/957 [00:08<00:01, 96.98it/s]
 86%|███████████████████████████████████████████████████████████████████████████████████████████████               | 827/957 [00:08<00:01, 96.91it/s]
 87%|████████████████████████████████████████████████████████████████████████████████████████████████▏             | 837/957 [00:08<00:01, 97.11it/s]
 89%|█████████████████████████████████████████████████████████████████████████████████████████████████▍            | 848/957 [00:08<00:01, 97.99it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▌           | 858/957 [00:08<00:01, 97.43it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▊          | 868/957 [00:08<00:00, 98.14it/s]
 92%|█████████████████████████████████████████████████████████████████████████████████████████████████████         | 879/957 [00:08<00:00, 98.71it/s]
 93%|██████████████████████████████████████████████████████████████████████████████████████████████████████▏       | 889/957 [00:08<00:00, 97.63it/s]
 94%|███████████████████████████████████████████████████████████████████████████████████████████████████████▎      | 899/957 [00:09<00:00, 96.40it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████▍     | 909/957 [00:09<00:00, 95.80it/s]
 96%|█████████████████████████████████████████████████████████████████████████████████████████████████████████▋    | 919/957 [00:09<00:00, 95.63it/s]
 97%|██████████████████████████████████████████████████████████████████████████████████████████████████████████▊   | 929/957 [00:09<00:00, 96.28it/s]
 98%|████████████████████████████████████████████████████████████████████████████████████████████████████████████  | 940/957 [00:09<00:00, 97.95it/s]
 99%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████▎| 951/957 [00:09<00:00, 98.97it/s]
Models: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [01:41<00:00, 10.17s/it]
INFO:root:Finished fitting 10 models to 957 genes
--- 311.035 seconds ---
iter 0, ELBO: -6.57e+04
iter 1, ELBO: -8.38e+06, delta_ELBO: 8.31e+06
iter 2, ELBO: -9.09e+06, delta_ELBO: 7.14e+05
iter 3, ELBO: -9.32e+06, delta_ELBO: 2.32e+05
iter 4, ELBO: -9.34e+06, delta_ELBO: 1.86e+04
iter 5, ELBO: -9.34e+06, delta_ELBO: 1.26e+03
iter 6, ELBO: -9.34e+06, delta_ELBO: 1.90e+03
iter 7, ELBO: -9.34e+06, delta_ELBO: 6.97e+02
iter 8, ELBO: -9.34e+06, delta_ELBO: 2.90e+02
iter 9, ELBO: -9.34e+06, delta_ELBO: 1.07e+03
iter 10, ELBO: -9.35e+06, delta_ELBO: 4.90e+02
iter 11, ELBO: -9.34e+06, delta_ELBO: 6.08e+02
iter 12, ELBO: -9.34e+06, delta_ELBO: 3.38e+03
iter 13, ELBO: -9.34e+06, delta_ELBO: 2.84e+03
iter 14, ELBO: -9.34e+06, delta_ELBO: 4.76e+03
iter 15, ELBO: -9.35e+06, delta_ELBO: 6.09e+03
iter 16, ELBO: -9.35e+06, delta_ELBO: 1.93e+03
iter 17, ELBO: -9.35e+06, delta_ELBO: 9.04e+02
iter 18, ELBO: -9.35e+06, delta_ELBO: 4.44e+02
iter 19, ELBO: -9.35e+06, delta_ELBO: 1.79e+02
iter 20, ELBO: -9.35e+06, delta_ELBO: 1.12e+03
iter 21, ELBO: -9.35e+06, delta_ELBO: 7.24e+01
iter 22, ELBO: -9.35e+06, delta_ELBO: 8.90e+01
iter 23, ELBO: -9.35e+06, delta_ELBO: 3.76e+01
iter 24, ELBO: -9.35e+06, delta_ELBO: 4.13e+01
iter 25, ELBO: -9.35e+06, delta_ELBO: 8.31e+00
iter 26, ELBO: -9.35e+06, delta_ELBO: 8.02e+00
iter 27, ELBO: -9.35e+06, delta_ELBO: 2.97e+01
iter 28, ELBO: -9.35e+06, delta_ELBO: 4.37e+01
iter 29, ELBO: -9.35e+06, delta_ELBO: 4.57e+00
iter 30, ELBO: -9.35e+06, delta_ELBO: 1.76e+01
iter 31, ELBO: -9.35e+06, delta_ELBO: 1.23e+01
iter 32, ELBO: -9.35e+06, delta_ELBO: 2.42e+01
iter 33, ELBO: -9.35e+06, delta_ELBO: 1.03e-01
iter 34, ELBO: -9.35e+06, delta_ELBO: 1.03e-01
iter 35, ELBO: -9.35e+06, delta_ELBO: 3.03e-02
iter 36, ELBO: -9.35e+06, delta_ELBO: 3.02e-02
iter 37, ELBO: -9.35e+06, delta_ELBO: 1.02e-01
iter 38, ELBO: -9.35e+06, delta_ELBO: 6.85e-02
iter 39, ELBO: -9.35e+06, delta_ELBO: 3.40e-02
iter 40, ELBO: -9.35e+06, delta_ELBO: 2.46e-05
Converged on iter 40
--- 21654.154 seconds ---
Note The spot-level adata patient1_adata_all.h5ad (4x resolution) can be clustered using spatialDM, but it will cost too much time (about 40 mins).
- patient1_adata_all.h5ad with 5039 samples and 596 features.
- SpatialDE.run, cost 148.496 seconds.
- SpatialDE.aeh.spatial_patterns, cost 2134.364 seconds, the details like the next cell.

— 304.122 seconds — iter 0, ELBO: -6.52e+04 iter 1, ELBO: -8.27e+06, delta_ELBO: 8.20e+06 iter 2, ELBO: -9.04e+06, delta_ELBO: 7.68e+05 iter 3, ELBO: -9.11e+06, delta_ELBO: 7.21e+04 iter 4, ELBO: -9.11e+06, delta_ELBO: 4.91e+03 iter 5, ELBO: -9.11e+06, delta_ELBO: 3.12e+03 iter 6, ELBO: -9.11e+06, delta_ELBO: 3.39e+03 iter 7, ELBO: -9.11e+06, delta_ELBO: 2.59e+03 iter 8, ELBO: -9.12e+06, delta_ELBO: 7.13e+03 iter 9, ELBO: -9.12e+06, delta_ELBO: 3.17e+03 iter 10, ELBO: -9.12e+06, delta_ELBO: 1.76e+03 iter 11, ELBO: -9.12e+06, delta_ELBO: 2.38e+02 iter 12, ELBO: -9.12e+06, delta_ELBO: 5.46e+01 iter 13, ELBO: -9.12e+06, delta_ELBO: 9.61e+00 iter 14, ELBO: -9.12e+06, delta_ELBO: 1.33e+02 iter 15, ELBO: -9.12e+06, delta_ELBO: 7.04e+01 iter 16, ELBO: -9.12e+06, delta_ELBO: 3.69e+00 iter 17, ELBO: -9.12e+06, delta_ELBO: 6.34e+01 iter 18, ELBO: -9.12e+06, delta_ELBO: 6.50e+02 iter 19, ELBO: -9.12e+06, delta_ELBO: 4.53e+02 iter 20, ELBO: -9.12e+06, delta_ELBO: 4.40e+02 iter 21, ELBO: -9.12e+06, delta_ELBO: 7.09e+01 iter 22, ELBO: -9.12e+06, delta_ELBO: 1.18e+01 iter 23, ELBO: -9.12e+06, delta_ELBO: 1.30e-01 iter 24, ELBO: -9.12e+06, delta_ELBO: 2.87e-01 iter 25, ELBO: -9.12e+06, delta_ELBO: 4.52e+00 iter 26, ELBO: -9.12e+06, delta_ELBO: 2.18e+00 iter 27, ELBO: -9.12e+06, delta_ELBO: 6.22e-01 iter 28, ELBO: -9.12e+06, delta_ELBO: 1.15e+01 iter 29, ELBO: -9.12e+06, delta_ELBO: 2.03e+01 iter 30, ELBO: -9.12e+06, delta_ELBO: 1.04e+01 iter 31, ELBO: -9.12e+06, delta_ELBO: 1.16e+01 iter 32, ELBO: -9.12e+06, delta_ELBO: 1.23e+01 iter 33, ELBO: -9.12e+06, delta_ELBO: 6.53e+00 iter 34, ELBO: -9.12e+06, delta_ELBO: 8.84e+00 iter 35, ELBO: -9.12e+06, delta_ELBO: 7.63e+00 iter 36, ELBO: -9.12e+06, delta_ELBO: 3.96e+00 iter 37, ELBO: -9.12e+06, delta_ELBO: 1.26e+01 iter 38, ELBO: -9.12e+06, delta_ELBO: 1.75e-02 iter 39, ELBO: -9.12e+06, delta_ELBO: 2.39e-02 iter 40, ELBO: -9.12e+06, delta_ELBO: 8.23e-03 Converged on iter 40 — 22174.292 seconds —4.364 seconds —

scale

[62]:
fst.spatialDE_clusters(histology_results_allspot, patterns_allspot, adata_impt_all_spot.obsm['spatial'], marker='o',
                       w=3, s=3, save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_allspot_SpatialDE_scale.pdf")
_images/NPC_LRI_CCC_count_95_0.png
[41]:
print(adata_impt_all_spot)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[46]:
# ## save adata
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/')
# histology_results_allspot.to_csv('NPC1_histology_results_allspot.csv', index=False)
# patterns_allspot.to_csv('NPC1_patterns_allspot.csv', index=False)
# adata_impt_all_spot_save = fst.clean_save_adata(adata_impt_all_spot, str(patientxy)+'_adata_pattern_all_spot.h5ad')
[63]:
# ## save adata
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/spatialDE_scale/')
# histology_results_allspot.to_csv('NPC1_histology_results_allspot_scale.csv', index=False)
# patterns_allspot.to_csv('NPC1_patterns_allspot_scale.csv', index=False)
# adata_impt_all_spot_save = fst.clean_save_adata(adata_impt_all_spot, str(patientxy)+'_adata_pattern_all_spot_scale.h5ad')
[37]:
## add histology information to adata
histology_results_allspot = pd.DataFrame({'g': bin_allspots.index, 'pattern': gaussian_allspot.labels})
histology_results_allspot_binary = pd.DataFrame({'g': bin_allspots_binary.index, 'pattern': gaussian_allspot_binary.labels})
adata_impt_all_spot.uns['histology_results_continu'] = histology_results_allspot
adata_impt_all_spot.uns['histology_results_binary'] = histology_results_allspot_binary

## save adata
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/sparseAEH_scale/')
adata_impt_all_spot_save = fst.clean_save_adata(adata_impt_all_spot, str(patientxy)+'_adata_pattern_all_spot.h5ad')
[40]:
print(adata_impt_all_spot_save)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'spatial', 'ligand', 'receptor', 'geneInter', 'local_stat', 'local_z_p', 'selected_spots', 'histology_results_continu', 'histology_results_binary'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'

2.7 save the adata after SpatialDE

Considering the long run time, we save results histology_results and patterns for further pathway enrichment analysis.

[37]:
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/')
# histology_results_allspot.to_csv('NPC1_histology_results_allspot.csv', index=False)
# patterns_allspot.to_csv('NPC1_patterns_allspot.csv', index=False)
[39]:
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/')
# adata_impt_all_spot_save = fst.clean_save_adata(adata_impt_all_spot, str(patientxy)+'_adata_pattern_all_spot.h5ad')
# print(adata_impt_all_spot_save)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'ligand', 'receptor', 'geneInter', 'local_stat', 'local_z_p'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[40]:
print(adata_impt_all_spot_save)
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'

Note When saving the results after global and local Moran’s R significant analysis, some items in .uns[""] can not be saved. Here, FineST gives the fst.clean_save_adata function save, with 5 items, ligand, receptor, geneInter, local_stat and local_z_p, in .pickle form. Thus the .adata and .pickle files are saved in the same file. When Load the .adata file, it needs to add the .pickle items, using the fst.Load_clean_save_adata function. - save .adata file: fst.clean_save_adata(adata, 'adata_test.h5ad') - load .adata file: firstadata_test=sc.read_h5ad('adata_test.h5ad') and then adata=fst.Load_clean_save_adata(adata_test)

3. Load spot-level adata (paper Fig. 2G)

[ ]:
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/')

adata = sc.read_h5ad(filename=str(patientxy)+'_adata_count.h5ad')
print(adata)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial'
    obsm: 'spatial'
[7]:
adata.to_df().head()
[7]:
TGFB1 TGFBR1 TGFBR2 TGFB2 TGFB3 ACVR1B ACVR1C ACVR1 BMP2 BMPR1A ... KDR TREM2 SEMA6A SEMA6B SEMA7A PLXNC1 SIGLEC1 THY1 VCAM1 VSIR
GTCGTTATTCGCTTAT-1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0
ACAAGGGCAGGCTCTG-1 5.0 2.0 2.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 ... 0.0 0.0 0.0 1.0 1.0 0.0 0.0 2.0 5.0 1.0
TGCGTTTGTTGACACT-1 0.0 0.0 1.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
TTGAATATGGACTTTC-1 1.0 1.0 2.0 0.0 1.0 0.0 0.0 1.0 0.0 1.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 2.0 3.0 0.0
CCGGGCGGTCTCGTCA-1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 ... 0.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 1.0 0.0

5 rows × 596 columns

[ ]:
## logtrans normalization
adata_count = adata.copy()
adata = fst.adata_preprocess(adata_count, keep_raw=True, normalize=True)
print(adata)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p'
    obsm: 'spatial'
[9]:
adata.to_df().head()
[9]:
TGFB1 TGFBR1 TGFBR2 TGFB2 TGFB3 ACVR1B ACVR1C ACVR1 BMP2 BMPR1A ... KDR TREM2 SEMA6A SEMA6B SEMA7A PLXNC1 SIGLEC1 THY1 VCAM1 VSIR
GTCGTTATTCGCTTAT-1 0.000000 0.000000 0.000000 0.0 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 ... 0.0 0.0 0.0 0.000000 1.463911 0.0 0.0 1.463911 0.000000 0.000000
ACAAGGGCAGGCTCTG-1 1.543805 0.905412 0.905412 0.0 0.000000 0.000000 0.0 0.000000 0.551857 0.000000 ... 0.0 0.0 0.0 0.551857 0.551857 0.0 0.0 0.905412 1.543805 0.551857
TGCGTTTGTTGACACT-1 0.000000 0.000000 1.092333 0.0 0.000000 1.092333 0.0 0.000000 0.000000 0.000000 ... 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.000000 0.000000 0.000000
TTGAATATGGACTTTC-1 0.418937 0.418937 0.713288 0.0 0.418937 0.000000 0.0 0.418937 0.000000 0.418937 ... 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.713288 0.940412 0.000000
CCGGGCGGTCTCGTCA-1 0.000000 0.000000 0.000000 0.0 0.000000 0.000000 0.0 0.000000 0.000000 0.000000 ... 0.0 0.0 0.0 0.000000 0.000000 0.0 0.0 0.848202 0.848202 0.000000

5 rows × 596 columns

2.1 Get weight_matrix by rbf kernel

Note The sub-spot-level adata patient1_adata_all.h5ad (4x16x resolution) can not be clustered using spatialDM, here we use the integrated adata patient1_adata_all_spot.h5ad (4x resolution).

[10]:
patientxy = 'patient1'
scale_factors = fst.json_load(f"{path}/FineST/FineST_local/Dataset/NPC/{patientxy}/")
print(scale_factors)
{'tissue_hires_scalef': 0.115267135, 'tissue_lowres_scalef': 0.03458014, 'fiducial_diameter_fullres': 225.25885592749816, 'spot_diameter_fullres': 139.44595843130838}

centre-to-centre distance

  • 200 µm:l = 1.2, co = 0.2

  • 100 µm:l = 75, co = 0.2

  • sc: l = 130, co = 0.001

[11]:
spot_diameter_fullres = 75
# spot_diameter_fullres = scale_factors['spot_diameter_fullres']

fst.weight_matrix(adata, l = spot_diameter_fullres,
                  cutoff = 0.01, single_cell = False, n_nearest_neighbors=6)
[11]:
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'single_cell'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[12]:
## Visualize the range of interaction
plt.figure(figsize=(5, 5))
plt.scatter(adata.obsm['spatial'][:,0], adata.obsm['spatial'][:,1],
            c=adata.obsp['weight'].A[500], s=15)
plt.gca().invert_yaxis()
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/weight_matrix_neibor_spot_logtransfer.pdf", format='pdf', dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_117_0.png

2.2 extract valid LR pairs from the database

[13]:
## find overlapping LRs from CellChatDB
start = time.time()
sdm.extract_lr(adata, 'human', min_cell=3)
print("%.3f seconds" %(time.time()-start))
print(adata)
26.693 seconds
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[14]:
## see the condidiate LR pairs for this NPC datset
adata.uns['geneInter']
[14]:
interaction_name pathway_name agonist antagonist co_A_receptor co_I_receptor evidence annotation interaction_name_2
EFNA5_EPHB2 EFNA5_EPHB2 EPHA NaN NaN NaN NaN PMID:15107857; PMID: 15114347 Cell-Cell Contact EFNA5 - EPHB2
EFNB1_EPHA4 EFNB1_EPHA4 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHA4
EFNB1_EPHB1 EFNB1_EPHB1 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB1
EFNB1_EPHB2 EFNB1_EPHB2 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB2
EFNB1_EPHB3 EFNB1_EPHB3 EPHB NaN NaN NaN NaN PMID: 15114347 Cell-Cell Contact EFNB1 - EPHB3
... ... ... ... ... ... ... ... ... ...
CCL3_CCR5 CCL3_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL3 - CCR5
CCL5_CCR5 CCL5_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL5 - CCR5
CCL4_CCR5 CCL4_CCR5 CCL NaN NaN NaN NaN KEGG: hsa04060 Secreted Signaling CCL4 - CCR5
CXCL1_ACKR1 CXCL1_ACKR1 CXCL NaN NaN NaN NaN PMID: 26740381 Secreted Signaling CXCL1 - ACKR1
CORT_SSTR2 CORT_SSTR2 SEMATOSTATIN NaN NaN NaN NaN KEGG: hsa04080 Secreted Signaling CORT - SSTR2

1129 rows × 9 columns

2.3 Global selection (z-score approach)

[15]:
## Identify dataset-specific interacting LR pairs (global selection)
start = time.time()
# global Moran selection
sdm.spatialdm_global(adata, n_perm=1000, specified_ind=None, method='z-score', nproc=1)
# select significant pairs
sdm.sig_pairs(adata, method='z-score', fdr=True, threshold=0.05)  # threshold=0.1
print("%.3f seconds" %(time.time()-start))
4.907 seconds
[16]:
print(adata)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[17]:
spa_coexp_pair_spot = fst.anno_LRpair(adata)
spa_coexp_pair_spot
[17]:
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected evidence annotation
CCL14_ACKR1 CCL14 None ACKR1 None None 2.075994e-209 30.859696 2.343798e-206 True PMID: 26740381 Secreted Signaling
MDK_NCL MDK None NCL None None 5.403900e-195 29.765871 3.050501e-192 True PMID: 28356350 Secreted Signaling
MDK_SDC4 MDK None SDC4 None None 6.453178e-146 25.696150 2.428546e-143 True PMID: 28356350 Secreted Signaling
MDK_ITGA6_ITGB1 MDK None ITGA6 ITGB1 None 2.099227e-124 23.693588 5.925068e-122 True PMID: 28356350 Secreted Signaling
CCL21_CCR7 CCL21 None CCR7 None None 4.846634e-122 23.463202 1.094370e-119 True KEGG: hsa04060 Secreted Signaling
... ... ... ... ... ... ... ... ... ... ... ...
LAMA2_SV2B LAMA2 None SV2B None None 8.635967e-01 -1.096622 1.000000e+00 False KEGG: hsa04512 ECM-Receptor
WNT6_FZD5_LRP5 WNT6 None FZD5 LRP5 None 8.551853e-01 -1.058935 1.000000e+00 False KEGG: hsa04310; PMID: 23209147 Secreted Signaling
LAMA4_SV2B LAMA4 None SV2B None None 9.533714e-01 -1.678461 1.000000e+00 False KEGG: hsa04512 ECM-Receptor
TIGIT_NECTIN2 TIGIT None NECTIN2 None None 9.369775e-01 -1.529886 1.000000e+00 False PMID: 1313846; PMID:24987108 Cell-Cell Contact
CORT_SSTR2 CORT None SSTR2 None None 9.495225e-01 -1.640242 1.000000e+00 False KEGG: hsa04080 Secreted Signaling

1129 rows × 11 columns

[18]:
## save 798 significant LR pairs
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/')
spa_coexp_pair_spot.to_csv("NPC_spa_coexp_pair_spot_logtransfer.csv", index=True, header=True)
[19]:
## see the unique gene of sig LR pairs
spa_coexp_pairTgene_spot = fst.LRpair_gene(spa_coexp_pair_spot)
print("spa_coexp_pairTgene_spot shape:", len(spa_coexp_pairTgene_spot))
spa_coexp_pairTgene_spot shape: 255
[20]:
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/')
spa_coexp_pairTgene_spot.to_csv("NPC_spa_coexpr_LRgene_spot_logtransfer.csv", index=True, header=True)
[21]:
## use fdr corrected global p-values and a threshold FDR < 0.1 (default)
print(adata.uns['global_res'].selected.sum())
334
[22]:
adata.uns['global_res'].sort_values(by='fdr')
[22]:
Ligand0 Ligand1 Receptor0 Receptor1 Receptor2 z_pval z fdr selected
CCL14_ACKR1 CCL14 None ACKR1 None None 2.075994e-209 30.859696 2.343798e-206 True
MDK_NCL MDK None NCL None None 5.403900e-195 29.765871 3.050501e-192 True
MDK_SDC4 MDK None SDC4 None None 6.453178e-146 25.696150 2.428546e-143 True
MDK_ITGA6_ITGB1 MDK None ITGA6 ITGB1 None 2.099227e-124 23.693588 5.925068e-122 True
CCL21_CCR7 CCL21 None CCR7 None None 4.846634e-122 23.463202 1.094370e-119 True
... ... ... ... ... ... ... ... ... ...
LAMA2_SV2B LAMA2 None SV2B None None 8.635967e-01 -1.096622 1.000000e+00 False
WNT6_FZD5_LRP5 WNT6 None FZD5 LRP5 None 8.551853e-01 -1.058935 1.000000e+00 False
LAMA4_SV2B LAMA4 None SV2B None None 9.533714e-01 -1.678461 1.000000e+00 False
TIGIT_NECTIN2 TIGIT None NECTIN2 None None 9.369775e-01 -1.529886 1.000000e+00 False
CORT_SSTR2 CORT None SSTR2 None None 9.495225e-01 -1.640242 1.000000e+00 False

1129 rows × 9 columns

2.4 Local selection (z-score approach)

[23]:
## Local selection is then run for the selected 787 pairs to identify where the LRI takes place
adata.raw = adata.copy()
start = time.time()
# local spot selection
sdm.spatialdm_local(adata, n_perm=1000, method='z-score', specified_ind=None, nproc=1)
# significant local spots
sdm.sig_spots(adata, method='z-score', fdr=False, threshold=0.05)  # threshold=0.1
print("%.3f seconds" %(time.time()-start))
1.298 seconds
[24]:
print(adata)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[25]:
adata.uns["local_z_p"]
[25]:
GTCGTTATTCGCTTAT-1 ACAAGGGCAGGCTCTG-1 TGCGTTTGTTGACACT-1 TTGAATATGGACTTTC-1 CCGGGCGGTCTCGTCA-1 TTGGGCGGCGGTTGCC-1 AACGATATGTCAACTG-1 TCCGATGACTGAGCTC-1 TGCCACCTGGCGAAAC-1 TTAATCAGTACGTCAG-1 ... TCCCGTCAGTCCCGCA-1 CGCGCCCGACTTAATA-1 TTCATGGCGCAACAGG-1 CCACGAGAAGAGAATC-1 TTCAAGCCGAGCTGAG-1 CCTCTGGCCTAGACGG-1 CAAACTATTGAGCTTC-1 ACATCGTTAACCTAGT-1 GTTAGAGTGTGCCGCT-1 TCAGTTACGGAATGAT-1
EFNB1_EPHA4 1.000000 0.425337 0.806686 0.517235 0.267905 0.368877 0.630065 0.759143 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.263684 1.000000 1.00000
EFNB1_EPHB2 1.000000 0.415851 1.000000 0.500326 0.475689 0.642024 1.000000 1.000000 1.000000 1.000000 ... 0.594056 1.000000 0.648601 0.602701 1.000000 1.000000 1.000000 0.472148 1.000000 1.00000
EFNB1_EPHB4 1.000000 0.573980 1.000000 0.533543 0.917060 0.497528 0.514055 1.000000 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 0.555429 0.423475 0.427240 0.567411 1.000000 0.24444
EFNB2_EPHA4 0.910409 1.000000 0.078641 1.000000 1.000000 1.000000 0.601663 0.634348 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 0.041838 0.736096 1.00000
EFNA4_EPHA4 1.000000 1.000000 0.783149 1.000000 1.000000 1.000000 0.383192 0.737607 1.000000 1.000000 ... 1.000000 1.000000 1.000000 1.000000 0.117738 1.000000 0.187554 1.000000 1.000000 1.00000
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL5_ACKR1 1.000000 0.303495 1.000000 0.394734 1.000000 1.000000 0.521634 0.525302 0.647851 0.557692 ... 0.565528 0.548777 0.543589 0.500708 1.000000 0.476424 0.648891 0.588029 1.000000 1.00000
CCL21_CCR7 0.034597 0.116299 0.641940 0.333973 0.559923 1.000000 1.000000 0.711718 0.681123 1.000000 ... 0.776397 0.810236 0.799545 1.000000 1.000000 0.518467 0.709473 1.000000 1.000000 1.00000
CCL19_CCR7 0.469310 0.227709 0.534683 0.258438 0.562296 1.000000 0.443505 0.284031 0.299687 0.440844 ... 0.602153 0.339372 0.459884 1.000000 1.000000 0.560802 0.665324 1.000000 1.000000 1.00000
CCL5_CCR5 1.000000 0.557390 1.000000 1.000000 0.479765 0.521937 0.509682 0.595568 0.127809 0.518843 ... 0.556093 0.540792 0.120650 0.436896 1.000000 0.652903 0.700569 0.601339 1.000000 1.00000
CCL4_CCR5 1.000000 1.000000 1.000000 1.000000 0.628630 0.538758 1.000000 0.568057 0.076134 0.537400 ... 0.599052 1.000000 0.044525 1.000000 0.623551 0.228310 0.817943 0.304097 1.000000 1.00000

334 rows × 1331 columns

2.5 Visualize pairs

[27]:
fst.topLRpairs(adata, spa_coexp_pair_spot, num=10)
[27]:
['F11R_F11R',
 'LAMB3_ITGAV_ITGB8',
 'LAMB3_ITGA3_ITGB1',
 'CCL19_CCR7',
 'CD99_CD99',
 'CCL21_CCR7',
 'MDK_ITGA6_ITGB1',
 'MDK_SDC4',
 'MDK_NCL',
 'CCL14_ACKR1']
[29]:
fstplt.global_plot(adata, pairs = fst.topLRpairs(adata, spa_coexp_pair_spot, num=10),
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2)
plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_spot_top10_logtransfer.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_136_0.png
[31]:
# fstplt.global_plot(adata, pairs=['CXCL16_CXCR6', "MIF_ACKR3", 'PVR_TIGIT'],
fstplt.global_plot(adata, pairs=['CD70_CD27', 'CXCL16_CXCR6', "MIF_ACKR3", 'PVR_TIGIT'],
               figsize=(4,4), loc=4, cmap='RdGy_r', vmin=-1.5, vmax=2)

plt.savefig(f"{path}/FineST/FineST_local/Dataset/NPC/Figures/NPC_pair_spot_logtransfer.pdf", dpi=300, bbox_inches='tight')
_images/NPC_LRI_CCC_count_137_0.png
[34]:
# fstplt.plot_pairs_dot(adata, ['CD70_CD27'], marker_size = 40, pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/spot_pair_CD70_CD27_logtransfer")
fstplt.plot_pairs_dot(adata, ['MIF_ACKR3'], marker_size = 40, pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/spot_pair_MIF_ACKR3_logtransfer")
_images/NPC_LRI_CCC_count_138_0.png

2.6 Local cell-cell communication pattern detection using SpatialDE

SpatialDE allows clustering of spatially auto-correlated genes. For sample number (n<=5000), SpatialDE can identify spatially auto-correlated interactions using about 40-50 mins.

Here, we used the P-value from local Moran’s R using Z-score method to Quantify the ligand-receptor interaction strength, users can use binary or continuous local selection status as input.
- binary: bin_spots = adata.uns['selected_spots'].astype(int)[adata.uns['local_stat']['n_spots']>2]
- continuous: bin_spots = (1-adata.uns["local_z_p"])[adata.uns['local_stat']['n_spots']>2]
[35]:
bin_spots = (1-adata.uns["local_z_p"])[adata.uns['local_stat']['n_spots']>2]
print(bin_spots.shape[0], " pairs used for spatial clustering")
bin_spots
332  pairs used for spatial clustering
[35]:
GTCGTTATTCGCTTAT-1 ACAAGGGCAGGCTCTG-1 TGCGTTTGTTGACACT-1 TTGAATATGGACTTTC-1 CCGGGCGGTCTCGTCA-1 TTGGGCGGCGGTTGCC-1 AACGATATGTCAACTG-1 TCCGATGACTGAGCTC-1 TGCCACCTGGCGAAAC-1 TTAATCAGTACGTCAG-1 ... TCCCGTCAGTCCCGCA-1 CGCGCCCGACTTAATA-1 TTCATGGCGCAACAGG-1 CCACGAGAAGAGAATC-1 TTCAAGCCGAGCTGAG-1 CCTCTGGCCTAGACGG-1 CAAACTATTGAGCTTC-1 ACATCGTTAACCTAGT-1 GTTAGAGTGTGCCGCT-1 TCAGTTACGGAATGAT-1
EFNB1_EPHA4 0.000000 0.574663 0.193314 0.482765 0.732095 0.631123 0.369935 0.240857 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.736316 0.000000 0.00000
EFNB1_EPHB2 0.000000 0.584149 0.000000 0.499674 0.524311 0.357976 0.000000 0.000000 0.000000 0.000000 ... 0.405944 0.000000 0.351399 0.397299 0.000000 0.000000 0.000000 0.527852 0.000000 0.00000
EFNB1_EPHB4 0.000000 0.426020 0.000000 0.466457 0.082940 0.502472 0.485945 0.000000 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.444571 0.576525 0.572760 0.432589 0.000000 0.75556
EFNB2_EPHA4 0.089591 0.000000 0.921359 0.000000 0.000000 0.000000 0.398337 0.365652 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.958162 0.263904 0.00000
EFNA4_EPHA4 0.000000 0.000000 0.216851 0.000000 0.000000 0.000000 0.616808 0.262393 0.000000 0.000000 ... 0.000000 0.000000 0.000000 0.000000 0.882262 0.000000 0.812446 0.000000 0.000000 0.00000
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL5_ACKR1 0.000000 0.696505 0.000000 0.605266 0.000000 0.000000 0.478366 0.474698 0.352149 0.442308 ... 0.434472 0.451223 0.456411 0.499292 0.000000 0.523576 0.351109 0.411971 0.000000 0.00000
CCL21_CCR7 0.965403 0.883701 0.358060 0.666027 0.440077 0.000000 0.000000 0.288282 0.318877 0.000000 ... 0.223603 0.189764 0.200455 0.000000 0.000000 0.481533 0.290527 0.000000 0.000000 0.00000
CCL19_CCR7 0.530690 0.772291 0.465317 0.741562 0.437704 0.000000 0.556495 0.715969 0.700313 0.559156 ... 0.397847 0.660628 0.540116 0.000000 0.000000 0.439198 0.334676 0.000000 0.000000 0.00000
CCL5_CCR5 0.000000 0.442610 0.000000 0.000000 0.520235 0.478063 0.490318 0.404432 0.872191 0.481157 ... 0.443907 0.459208 0.879350 0.563104 0.000000 0.347097 0.299431 0.398661 0.000000 0.00000
CCL4_CCR5 0.000000 0.000000 0.000000 0.000000 0.371370 0.461242 0.000000 0.431943 0.923866 0.462600 ... 0.400948 0.000000 0.955475 0.000000 0.376449 0.771690 0.182057 0.695903 0.000000 0.00000

332 rows × 1331 columns

[36]:
bin_spots_binary = adata.uns['selected_spots'].astype(int)[adata.uns['local_stat']['n_spots']>2]
print(bin_spots_binary.shape[0], " pairs used for spatial clustering")
bin_spots_binary
332  pairs used for spatial clustering
[36]:
GTCGTTATTCGCTTAT-1 ACAAGGGCAGGCTCTG-1 TGCGTTTGTTGACACT-1 TTGAATATGGACTTTC-1 CCGGGCGGTCTCGTCA-1 TTGGGCGGCGGTTGCC-1 AACGATATGTCAACTG-1 TCCGATGACTGAGCTC-1 TGCCACCTGGCGAAAC-1 TTAATCAGTACGTCAG-1 ... TCCCGTCAGTCCCGCA-1 CGCGCCCGACTTAATA-1 TTCATGGCGCAACAGG-1 CCACGAGAAGAGAATC-1 TTCAAGCCGAGCTGAG-1 CCTCTGGCCTAGACGG-1 CAAACTATTGAGCTTC-1 ACATCGTTAACCTAGT-1 GTTAGAGTGTGCCGCT-1 TCAGTTACGGAATGAT-1
EFNB1_EPHA4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB2 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB1_EPHB4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
EFNB2_EPHA4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 1 0 0
EFNA4_EPHA4 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
CCL5_ACKR1 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CCL21_CCR7 1 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CCL19_CCR7 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CCL5_CCR5 0 0 0 0 0 0 0 0 0 0 ... 0 0 0 0 0 0 0 0 0 0
CCL4_CCR5 0 0 0 0 0 0 0 0 0 0 ... 0 0 1 0 0 0 0 0 0 0

332 rows × 1331 columns

[37]:
start = time.time()
gaussian_spot = fst.MixedGaussian(spatial = adata.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))
--- 0.939 seconds ---
[38]:
start = time.time()
gaussian_spot.run_cluster(np.array(bin_spots.transpose()), 3, iter=50)
print("--- %.3f seconds ---" %(time.time()-start))
Iteration 0
updating variance
Iteration 1
--- 1.208 seconds ---
[40]:
fstplt.sparseAEH_clusters(gaussian_spot, w=3, marker='o', s=18,
                          save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_spot_SparseAEH_continu_logtransfer.pdf")
_images/NPC_LRI_CCC_count_145_0.png
[41]:
start = time.time()
gaussian_spot_binary = fst.MixedGaussian(spatial = adata.obsm['spatial'],
                                     cov=None, group_size=16, d=5, kernel='laplacian', l=0.01)
print("--- %.3f seconds ---" %(time.time()-start))
--- 0.730 seconds ---
[42]:
start = time.time()
gaussian_spot_binary.run_cluster(np.array(bin_spots_binary.transpose()), 3, iter=50)
print("--- %.3f seconds ---" %(time.time()-start))
Iteration 0
updating variance
Iteration 1
--- 1.229 seconds ---
[44]:
fstplt.sparseAEH_clusters(gaussian_spot_binary, w=3, marker='o', s=18,
                         save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_spot_SparseAEH_binary_logtransfer.pdf")
_images/NPC_LRI_CCC_count_148_0.png
[45]:
from threadpoolctl import threadpool_limits
import NaiveDE
import SpatialDE

with threadpool_limits(limits=1, user_api='blas'):
    start = time.time()
    results = SpatialDE.run(adata.obsm['spatial'], bin_spots_binary.transpose())
    print("--- %.3f seconds ---" %(time.time()-start))

    start = time.time()
    histology_results, patterns = SpatialDE.aeh.spatial_patterns(
        adata.obsm['spatial'], bin_spots_binary.transpose(), results, C=3, l=3, verbosity=1)
    print("--- %.3f seconds ---" %(time.time()-start))
INFO:root:Performing DE test
INFO:root:Pre-calculating USU^T = K's ...
INFO:root:Done: 3.9s
INFO:root:Fitting gene models
Models:   0%|                                                                                                                 | 0/10 [00:00<?, ?it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 13%|██████████████▏                                                                                               | 43/332 [00:00<00:00, 428.77it/s]
 26%|████████████████████████████▍                                                                                 | 86/332 [00:00<00:00, 417.81it/s]
 39%|██████████████████████████████████████████▎                                                                  | 129/332 [00:00<00:00, 420.21it/s]
 52%|████████████████████████████████████████████████████████▍                                                    | 172/332 [00:00<00:00, 418.38it/s]
 64%|██████████████████████████████████████████████████████████████████████▎                                      | 214/332 [00:00<00:00, 415.53it/s]
 77%|████████████████████████████████████████████████████████████████████████████████████                         | 256/332 [00:00<00:00, 414.16it/s]
 90%|██████████████████████████████████████████████████████████████████████████████████████████████████▏          | 299/332 [00:00<00:00, 417.79it/s]
Models:  10%|██████████▌                                                                                              | 1/10 [00:00<00:07,  1.25it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 13%|██████████████▏                                                                                               | 43/332 [00:00<00:00, 427.45it/s]
 26%|████████████████████████████▍                                                                                 | 86/332 [00:00<00:00, 422.64it/s]
 39%|██████████████████████████████████████████▎                                                                  | 129/332 [00:00<00:00, 415.09it/s]
 52%|████████████████████████████████████████████████████████▊                                                    | 173/332 [00:00<00:00, 421.21it/s]
 66%|███████████████████████████████████████████████████████████████████████▌                                     | 218/332 [00:00<00:00, 431.35it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████                       | 262/332 [00:00<00:00, 407.27it/s]
 91%|███████████████████████████████████████████████████████████████████████████████████████████████████▍         | 303/332 [00:00<00:00, 405.24it/s]
Models:  20%|█████████████████████                                                                                    | 2/10 [00:01<00:06,  1.23it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 14%|███████████████▌                                                                                              | 47/332 [00:00<00:00, 464.12it/s]
 29%|███████████████████████████████▍                                                                              | 95/332 [00:00<00:00, 470.54it/s]
 43%|██████████████████████████████████████████████▉                                                              | 143/332 [00:00<00:00, 474.17it/s]
 58%|██████████████████████████████████████████████████████████████▋                                              | 191/332 [00:00<00:00, 474.81it/s]
 73%|███████████████████████████████████████████████████████████████████████████████                              | 241/332 [00:00<00:00, 483.68it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▏             | 290/332 [00:00<00:00, 483.92it/s]
Models:  30%|███████████████████████████████▌                                                                         | 3/10 [00:02<00:05,  1.32it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 14%|███████████████▌                                                                                              | 47/332 [00:00<00:00, 465.79it/s]
 30%|████████████████████████████████▊                                                                             | 99/332 [00:00<00:00, 496.25it/s]
 45%|████████████████████████████████████████████████▉                                                            | 149/332 [00:00<00:00, 491.35it/s]
 60%|█████████████████████████████████████████████████████████████████▎                                           | 199/332 [00:00<00:00, 479.53it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████▋                          | 252/332 [00:00<00:00, 494.58it/s]
 92%|████████████████████████████████████████████████████████████████████████████████████████████████████▏        | 305/332 [00:00<00:00, 503.11it/s]
Models:  40%|██████████████████████████████████████████                                                               | 4/10 [00:02<00:04,  1.38it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
  9%|█████████▉                                                                                                    | 30/332 [00:00<00:01, 296.67it/s]
 18%|███████████████████▉                                                                                          | 60/332 [00:00<00:00, 273.43it/s]
 27%|█████████████████████████████▏                                                                                | 88/332 [00:00<00:00, 244.41it/s]
 36%|███████████████████████████████████████                                                                      | 119/332 [00:00<00:00, 263.73it/s]
 44%|███████████████████████████████████████████████▉                                                             | 146/332 [00:00<00:00, 250.61it/s]
 53%|█████████████████████████████████████████████████████████▊                                                   | 176/332 [00:00<00:00, 265.07it/s]
 61%|██████████████████████████████████████████████████████████████████▉                                          | 204/332 [00:00<00:00, 268.28it/s]
 70%|████████████████████████████████████████████████████████████████████████████▏                                | 232/332 [00:00<00:00, 249.71it/s]
 79%|██████████████████████████████████████████████████████████████████████████████████████▎                      | 263/332 [00:01<00:00, 264.20it/s]
 87%|███████████████████████████████████████████████████████████████████████████████████████████████▏             | 290/332 [00:01<00:00, 250.16it/s]
 95%|████████████████████████████████████████████████████████████████████████████████████████████████████████     | 317/332 [00:01<00:00, 255.07it/s]
Models:  50%|████████████████████████████████████████████████████▌                                                    | 5/10 [00:04<00:04,  1.08it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 11%|███████████▉                                                                                                  | 36/332 [00:00<00:00, 358.61it/s]
 22%|███████████████████████▊                                                                                      | 72/332 [00:00<00:00, 334.12it/s]
 32%|██████████████████████████████████▊                                                                          | 106/332 [00:00<00:00, 336.53it/s]
 42%|██████████████████████████████████████████████▎                                                              | 141/332 [00:00<00:00, 339.49it/s]
 53%|█████████████████████████████████████████████████████████▍                                                   | 175/332 [00:00<00:00, 337.29it/s]
 64%|█████████████████████████████████████████████████████████████████████▌                                       | 212/332 [00:00<00:00, 347.62it/s]
 74%|█████████████████████████████████████████████████████████████████████████████████                            | 247/332 [00:00<00:00, 347.40it/s]
 85%|████████████████████████████████████████████████████████████████████████████████████████████▉                | 283/332 [00:00<00:00, 348.97it/s]
 96%|████████████████████████████████████████████████████████████████████████████████████████████████████████▍    | 318/332 [00:00<00:00, 347.88it/s]
Models:  60%|███████████████████████████████████████████████████████████████                                          | 6/10 [00:05<00:03,  1.06it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 14%|██████████████▉                                                                                               | 45/332 [00:00<00:00, 448.92it/s]
 27%|██████████████████████████████▏                                                                               | 91/332 [00:00<00:00, 449.85it/s]
 42%|██████████████████████████████████████████████▎                                                              | 141/332 [00:00<00:00, 469.22it/s]
 57%|██████████████████████████████████████████████████████████████▍                                              | 190/332 [00:00<00:00, 474.34it/s]
 72%|██████████████████████████████████████████████████████████████████████████████▏                              | 238/332 [00:00<00:00, 465.81it/s]
 86%|█████████████████████████████████████████████████████████████████████████████████████████████▉               | 286/332 [00:00<00:00, 467.24it/s]
Models:  70%|█████████████████████████████████████████████████████████████████████████▌                               | 7/10 [00:05<00:02,  1.15it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 14%|██████████████▉                                                                                               | 45/332 [00:00<00:00, 440.45it/s]
 27%|█████████████████████████████▊                                                                                | 90/332 [00:00<00:00, 443.41it/s]
 41%|████████████████████████████████████████████▎                                                                | 135/332 [00:00<00:00, 438.27it/s]
 54%|██████████████████████████████████████████████████████████▊                                                  | 179/332 [00:00<00:00, 436.96it/s]
 67%|█████████████████████████████████████████████████████████████████████████▏                                   | 223/332 [00:00<00:00, 427.41it/s]
 81%|███████████████████████████████████████████████████████████████████████████████████████▉                     | 268/332 [00:00<00:00, 432.79it/s]
 94%|██████████████████████████████████████████████████████████████████████████████████████████████████████▍      | 312/332 [00:00<00:00, 430.10it/s]
Models:  80%|████████████████████████████████████████████████████████████████████████████████████                     | 8/10 [00:06<00:01,  1.19it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 13%|█████████████▉                                                                                                | 42/332 [00:00<00:00, 406.53it/s]
 26%|████████████████████████████▍                                                                                 | 86/332 [00:00<00:00, 421.75it/s]
 39%|██████████████████████████████████████████▋                                                                  | 130/332 [00:00<00:00, 428.91it/s]
 52%|█████████████████████████████████████████████████████████▏                                                   | 174/332 [00:00<00:00, 430.84it/s]
 66%|███████████████████████████████████████████████████████████████████████▌                                     | 218/332 [00:00<00:00, 433.46it/s]
 80%|██████████████████████████████████████████████████████████████████████████████████████▋                      | 264/332 [00:00<00:00, 441.84it/s]
 93%|█████████████████████████████████████████████████████████████████████████████████████████████████████▍       | 309/332 [00:00<00:00, 428.40it/s]
Models:  90%|██████████████████████████████████████████████████████████████████████████████████████████████▌          | 9/10 [00:07<00:00,  1.22it/s]
  0%|                                                                                                                        | 0/332 [00:00<?, ?it/s]
 12%|█████████████▎                                                                                                | 40/332 [00:00<00:00, 395.49it/s]
 25%|███████████████████████████▏                                                                                  | 82/332 [00:00<00:00, 404.57it/s]
 38%|█████████████████████████████████████████                                                                    | 125/332 [00:00<00:00, 416.03it/s]
 50%|██████████████████████████████████████████████████████▊                                                      | 167/332 [00:00<00:00, 413.96it/s]
 63%|████████████████████████████████████████████████████████████████████▌                                        | 209/332 [00:00<00:00, 410.12it/s]
 76%|██████████████████████████████████████████████████████████████████████████████████▍                          | 251/332 [00:00<00:00, 408.83it/s]
 89%|████████████████████████████████████████████████████████████████████████████████████████████████▊            | 295/332 [00:00<00:00, 416.78it/s]
Models: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:08<00:00,  1.20it/s]
INFO:root:Finished fitting 10 models to 332 genes
--- 12.521 seconds ---
iter 0, ELBO: -1.36e+04
iter 1, ELBO: -7.80e+05, delta_ELBO: 7.66e+05
iter 2, ELBO: -8.49e+05, delta_ELBO: 6.92e+04
iter 3, ELBO: -8.50e+05, delta_ELBO: 7.74e+02
iter 4, ELBO: -8.50e+05, delta_ELBO: 8.50e+02
iter 5, ELBO: -8.50e+05, delta_ELBO: 4.97e+01
iter 6, ELBO: -8.51e+05, delta_ELBO: 2.62e+02
iter 7, ELBO: -8.51e+05, delta_ELBO: 1.58e+02
iter 8, ELBO: -8.51e+05, delta_ELBO: 1.39e+02
iter 9, ELBO: -8.51e+05, delta_ELBO: 4.69e+01
iter 10, ELBO: -8.51e+05, delta_ELBO: 4.37e+01
iter 11, ELBO: -8.51e+05, delta_ELBO: 1.47e+01
iter 12, ELBO: -8.51e+05, delta_ELBO: 7.27e+00
iter 13, ELBO: -8.51e+05, delta_ELBO: 4.39e+00
iter 14, ELBO: -8.51e+05, delta_ELBO: 4.32e+00
iter 15, ELBO: -8.51e+05, delta_ELBO: 3.55e+00
iter 16, ELBO: -8.51e+05, delta_ELBO: 1.04e+01
iter 17, ELBO: -8.51e+05, delta_ELBO: 1.18e-01
iter 18, ELBO: -8.51e+05, delta_ELBO: 7.08e+00
iter 19, ELBO: -8.51e+05, delta_ELBO: 7.58e+00
iter 20, ELBO: -8.51e+05, delta_ELBO: 2.03e-01
iter 21, ELBO: -8.51e+05, delta_ELBO: 1.80e+00
iter 22, ELBO: -8.51e+05, delta_ELBO: 4.79e+00
iter 23, ELBO: -8.51e+05, delta_ELBO: 7.04e+00
iter 24, ELBO: -8.51e+05, delta_ELBO: 9.10e-03
Converged on iter 24
--- 310.002 seconds ---
[47]:
fstplt.spatialDE_clusters(histology_results, patterns, adata.obsm['spatial'],
                           w=3, marker='o', s=18, save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/pattern_spot_SpatialDE_logtransfer.pdf")
_images/NPC_LRI_CCC_count_150_0.png
[48]:
print(adata)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'single_cell', 'mean', 'ligand', 'receptor', 'num_pairs', 'geneInter', 'global_I', 'global_stat', 'global_res', 'local_stat', 'local_z', 'local_z_p', 'selected_spots'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'
[49]:
## save adata
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/spot_logtransfer/')
histology_results.to_csv('NPC1_histology_results_spot.csv', index=False)
patterns.to_csv('NPC1_patterns_spot.csv', index=False)
adata_save = fst.clean_save_adata(adata, str(patientxy)+'_adata_pattern_spot.h5ad')
[50]:
print(adata_save)
AnnData object with n_obs × n_vars = 1331 × 596
    obs: 'in_tissue', 'array_row', 'array_col'
    var: 'gene_ids', 'feature_types', 'genome', 'mt', 'n_cells'
    uns: 'spatial', 'log1p', 'ligand', 'receptor', 'geneInter', 'local_stat', 'local_z_p'
    obsm: 'spatial'
    obsp: 'weight', 'nearest_neighbors'

4. Pathway enrichment analysis

3.1 Load saved data

If you doesn’t saved the above .adata file, you can skip this section 3.1, directly run section 3.2.

[47]:
# Load saved adata
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_sc/')
adata_impt_all_sc0 = sc.read_h5ad(filename=str(patientxy)+'_adata_pattern_all_sc.h5ad')
# adata_impt_all_sc0 = fst.Load_clean_save_adata(adata_impt_all_sc0)

# keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor"]
keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor", "selected_spots",
        'histology_results_binary', 'histology_results_continu']

for key in keys:
    with open(adata_impt_all_sc0.uns[key], "rb") as f:
        adata_impt_all_sc0.uns[key] = pickle.load(f)

print(adata_impt_all_sc0)
adata_impt_all_sc0.to_df().head()
AnnData object with n_obs × n_vars = 40068 × 596
    obs: 'x', 'y'
    uns: 'geneInter', 'histology_results_binary', 'histology_results_continu', 'ligand', 'local_stat', 'local_z_p', 'receptor', 'selected_spots', 'spatial'
    obsm: 'spatial'
    obsp: 'nearest_neighbors', 'weight'
[47]:
TGFB1 TGFBR1 TGFBR2 TGFB2 TGFB3 ACVR1B ACVR1C ACVR1 BMP2 BMPR1A ... KDR TREM2 SEMA6A SEMA6B SEMA7A PLXNC1 SIGLEC1 THY1 VCAM1 VSIR
0 0.262914 0.186327 0.464312 0.068035 0.055982 0.532792 0.003026 0.125616 0.015445 0.113145 ... 0.004381 0.004725 0.039676 0.015800 0.183981 0.003781 0.004408 0.158374 0.334349 0.235620
1 1.797625 0.846512 0.725175 0.026779 0.119732 0.066159 0.004082 0.178944 0.299725 0.046523 ... 0.066852 0.003381 0.057715 0.320275 0.538943 0.004133 0.003983 0.920966 1.834921 0.585638
2 0.380308 0.244998 0.033317 0.004972 0.066450 0.275714 0.004106 0.098649 0.004587 0.194033 ... 0.013605 0.183658 0.004656 0.004766 0.222726 0.023602 0.033465 0.163557 0.453851 0.732290
3 0.210108 1.501863 0.482271 0.059778 0.034524 0.179217 0.002923 0.083871 0.014544 0.145562 ... 0.004060 0.004754 0.469650 0.004223 0.624454 0.485028 0.004397 0.501598 2.923608 1.224518
4 0.352550 0.173602 0.121180 0.090928 0.088416 0.231018 0.002821 0.078262 0.003924 0.170986 ... 0.004153 0.004814 0.424619 0.004336 0.194609 0.003708 0.004515 0.244271 2.110376 0.845303

5 rows × 596 columns

[41]:
# Load saved adata


##########################
# sc
##########################
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_sc/')
# adata_impt_all_sc = sc.read_h5ad(filename=str(patientxy)+'_adata_pattern_all_sc.h5ad')
# # adata_impt_all_sc = fst.Load_clean_save_adata(adata_impt_all_sc)
# print(adata_impt_all_sc)

# keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor", "selected_spots",
#         'histology_results_binary', 'histology_results_continu']

# for key in keys:
#     with open(adata_impt_all_sc.uns[key], "rb") as f:
#         adata_impt_all_sc.uns[key] = pickle.load(f)

# print(adata_impt_all_sc)
# adata_impt_all_sc.to_df().head()


##########################
# all spot
##########################
# patientxy = 'patient1'
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/sparseAEH_scale/')
# adata_impt_all_sc = sc.read_h5ad(filename=str(patientxy)+'_adata_pattern_all_spot.h5ad')
# # adata_impt_all_sc = fst.Load_clean_save_adata(adata_impt_all_sc)
# print(adata_impt_all_sc)

# # keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor"]
# keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor", "selected_spots",
#         'histology_results_binary', 'histology_results_continu']

# for key in keys:
#     with open(adata_impt_all_sc.uns[key], "rb") as f:
#         adata_impt_all_sc.uns[key] = pickle.load(f)

# print(adata_impt_all_sc)
# adata_impt_all_sc.to_df().head()
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'geneInter', 'histology_results_binary', 'histology_results_continu', 'ligand', 'local_stat', 'local_z_p', 'receptor', 'selected_spots', 'spatial'
    obsm: 'spatial'
    obsp: 'nearest_neighbors', 'weight'
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'geneInter', 'histology_results_binary', 'histology_results_continu', 'ligand', 'local_stat', 'local_z_p', 'receptor', 'selected_spots', 'spatial'
    obsm: 'spatial'
    obsp: 'nearest_neighbors', 'weight'
[41]:
TGFB1 TGFBR1 TGFBR2 TGFB2 TGFB3 ACVR1B ACVR1C ACVR1 BMP2 BMPR1A ... KDR TREM2 SEMA6A SEMA6B SEMA7A PLXNC1 SIGLEC1 THY1 VCAM1 VSIR
0 0.001822 0.001698 0.000382 0.000188 0.000483 0.000300 0.000237 0.000179 0.000269 0.000303 ... 0.000301 0.000194 0.000308 0.000268 0.003061 0.000150 0.000163 0.003330 0.004805 0.002793
1 0.008334 0.004330 0.003083 0.000167 0.000290 0.000259 0.000337 0.000287 0.001616 0.000214 ... 0.000306 0.000164 0.000411 0.001612 0.002783 0.000142 0.000152 0.004806 0.011519 0.003559
2 0.000617 0.000660 0.001656 0.000321 0.000283 0.001811 0.000081 0.000288 0.000237 0.000188 ... 0.000172 0.000150 0.000382 0.000221 0.000319 0.000088 0.000120 0.000819 0.001762 0.000782
3 0.003181 0.002924 0.003175 0.000145 0.001596 0.000291 0.000415 0.001562 0.000228 0.001581 ... 0.000280 0.000164 0.000371 0.000252 0.001737 0.000533 0.000155 0.005228 0.009239 0.002393
4 0.001212 0.000870 0.000533 0.000355 0.000369 0.000715 0.000167 0.000183 0.000458 0.000241 ... 0.000259 0.000178 0.000906 0.000231 0.000974 0.000341 0.000143 0.002873 0.005851 0.001704

5 rows × 596 columns

[ ]:
# Example usage
pair = 'MIF_ACKR3'
# pair = 'CD70_CD27'
# pair='CXCL16_CXCR6'
# pair='PVR_TIGIT'
fstplt.LR_local_moranR(adata_LRpair, pair, fig_size=(4, 2.5),
            save_path=None)
            # save_path=f'{path}/FineST/FineST_local/Dataset/ImputData/patient1/all_spot/sparseAEH_scale/{pair}_interaction.svg')
[48]:
##########################
# sc
##########################
# dic=dict()
# histology_results = adata_impt_all_sc.uns['histology_results_binary']
# for i in histology_results.sort_values('pattern').pattern.unique():
#     # dic['Pattern_{}'.format(i)]=histology_results.query('pattern == @i').sort_values('membership')['g'].values
#     dic['Pattern_{}'.format(i)]=histology_results.query('pattern == @i')['g'].values


##########################
# all spot - SparseAEH
##########################
dic=dict()
histology_results = adata_impt_all_sc0.uns['histology_results_binary']
for i in histology_results.sort_values('pattern').pattern.unique():
    # dic['Pattern_{}'.format(i)]=histology_results.query('pattern == @i').sort_values('membership')['g'].values
    dic['Pattern_{}'.format(i)]=histology_results.query('pattern == @i')['g'].values

##########################
# all spot - SpatialDE
##########################
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/')
# patterns_test = pd.read_csv('NPC1_patterns_allspot.csv')
# histology_results = pd.read_csv('NPC1_histology_results_allspot.csv')
# dic=dict()
# for i in histology_results.sort_values('pattern').pattern.unique():
#     dic['Pattern_{}'.format(i)]=histology_results.query('pattern == @i').sort_values('membership')['g'].values
[7]:
# fst.spatialDE_clusters(histology_results, patterns, adata_impt_all_spot.obsm['spatial'],
#                        w=3, s=5, save_path=None)

3.2 For 4x resolution data

[49]:
## run code
(result,
 pathway_res,
 result_select,
 result_pattern_all) = fst.pathway_analysis(sample=adata_impt_all_sc,
                                            all_interactions=None,
                                            interaction_ls=None,
                                            name=None,
                                            groups=["Pattern_0"],
                                            cut_off=1,
                                            dic=dic)
[50]:
print(result.shape)
# result
(438, 5)
[51]:
print(result_select.shape)
result_select.head()
(40, 5)
[51]:
fisher_p pathway_size selected selected_inters name
1
COLLAGEN 1.425494e-20 120 61 {COL6A3_ITGA2_ITGB1, COL4A1_ITGA9_ITGB1, COL1A... Pattern_0
LAMININ 2.114197e-02 143 33 {LAMC1_ITGA7_ITGB1, LAMA5_ITGA7_ITGB1, LAMA5_I... Pattern_0
MHC-I 4.595977e-05 19 11 {HLA-B_CD8B, HLA-E_CD8A, HLA-F_CD8A, HLA-E_KLR... Pattern_0
FN1 1.155852e-05 12 9 {FN1_SDC4, FN1_ITGAV_ITGB1, FN1_ITGA4_ITGB7, F... Pattern_0
TGFb 1.395090e-04 12 8 {TGFB1_ACVR1_TGFBR1, TGFB3_ACVR1B_TGFBR2, TGFB... Pattern_0

6.1 sc

Confusion matrix heatmap of WNT in Pattern0, using save_path='WNT_Pattern0.pdf' to save it to PDF file.

[18]:
fstplt.plot_conf_mat(result_pattern_all, pattern_name='Pattern_0', pathway_name='MHC-I', save_path=None)
_images/NPC_LRI_CCC_count_168_0.png
[21]:
# fstplt.plot_conf_mat(result_pattern_all, pattern_name='Pattern_0', pathway_name='MHC-I',
#               save_path=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/confu_all_sc_MHC_I_Pattern0.pdf")

Dot_path of all pathways in selected Pattern, using pdf='mel_DE_enrichment_p0_spot' to save it to PDF file.

[19]:
# fst.dot_path(adata_impt_all_sc, dic=dic, figsize=(7,30))
[20]:
# figsize=(7,20) for num_cutoff=1, p_cutoff=None,
fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=2, p_cutoff=0.5, groups=["Pattern_0"], figsize=(6,8))
_images/NPC_LRI_CCC_count_172_0.png
[25]:
# fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=2, p_cutoff=0.5, groups=["Pattern_0"], figsize=(6,8),
#              pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/mel_DE_enrichment_p0_all_sc")
[36]:
fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=3, p_cutoff=0.5, groups=["Pattern_1"], figsize=(6,13))
_images/NPC_LRI_CCC_count_174_0.png
[38]:
# fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=3, p_cutoff=0.5, groups=["Pattern_1"], figsize=(6,13),
#                 pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/mel_DE_enrichment_p1_all_sc")
[44]:
fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=1, p_cutoff=0.5, groups=["Pattern_2"], step=6, figsize=(6,13))
_images/NPC_LRI_CCC_count_176_0.png
[55]:
# fstplt.dot_path(adata_impt_all_sc, dic=dic, num_cutoff=1, p_cutoff=0.5, groups=["Pattern_2"], step=6, figsize=(6,13),
#                 pdf=f"{path}/FineST/FineST_local/Dataset/NPC/Figures/mel_DE_enrichment_p2_all_sc")

5. Ligand-Receptor-TF-TG analysis

[12]:
path = '/mnt/lingyu/nfs_share2/Python/'
os.chdir(str(path) + 'FineST/FineST/')
[13]:
Receptor2TF = extract_tf(species='human')
Receptor2TF
[13]:
receptor pathway tf tf_PPR category
0 PKM Glycolysis / Gluconeogenesis ENO1 0.042934 Metabolism
1 ALDOA Glycolysis / Gluconeogenesis ENO1 0.009696 Metabolism
2 GPI Glycolysis / Gluconeogenesis ENO1 0.000961 Metabolism
3 MINPP1 Glycolysis / Gluconeogenesis ENO1 0.066090 Metabolism
4 NPR2 Purine metabolism NME2 0.022436 Metabolism
... ... ... ... ... ...
93601 PLXNA1,TREM2,TYROBP Nervous system development PSMD9 0.000153 Developmental Biology
93602 PLXNA1,TREM2,TYROBP Nervous system development SOS1 0.002213 Developmental Biology
93603 PLXNA1,TREM2,TYROBP Nervous system development SOS2 0.000206 Developmental Biology
93604 PLXNA1,TREM2,TYROBP Nervous system development SRC 0.009406 Developmental Biology
93605 PLXNA1,TREM2,TYROBP Nervous system development UPF2 0.000044 Developmental Biology

93606 rows × 5 columns

[14]:
RegNetwork = pd.read_csv(str(path)+'FineST/FineST/FineST/datasets/RegNetwork/Regnetwork_hum.csv')
RegNetwork.columns = ['tf', 'target']
RegNetwork
[14]:
tf target
0 ZBTB33 WASH8P
1 ZBTB33 CHAF1A
2 ZBTB33 MTRNR2L1
3 ZBTB33 MTRNR2L2
4 ZBTB33 MTRNR2L8
... ... ...
192067 ZNF76 CDKN1A
192068 ZNF76 PCYT1A
192069 ZNF76 TALDO1
192070 ZNRD1 ABCB1
192071 ZNRD1 BCL2

192072 rows × 2 columns

[17]:
# patientxy = 'patient1'
# import os
# import pandas as pd
# os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/')

# histology_results = pd.read_csv('histology_results_subspot.csv')
# histology_results


##########################
# all spot
##########################
patientxy = 'patient1'
os.chdir(str(path)+'FineST/FineST_local/Dataset/ImputData/'+str(patientxy)+'/all_spot/')
adata_impt_all_sc = sc.read_h5ad(filename=str(patientxy)+'_adata_pattern_all_spot.h5ad')
# adata_impt_all_sc = fst.Load_clean_save_adata(adata_impt_all_sc)
# print(adata_impt_all_sc)

# keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor"]
keys = ["local_z_p", "local_stat", "geneInter", "ligand", "receptor", "selected_spots",
        'histology_results_binary', 'histology_results_continu']

for key in keys:
    with open(adata_impt_all_sc.uns[key], "rb") as f:
        adata_impt_all_sc.uns[key] = pickle.load(f)

print(adata_impt_all_sc)

dic=dict()
histology_results = adata_impt_all_sc.uns['histology_results_binary']
histology_results
AnnData object with n_obs × n_vars = 5039 × 596
    obs: 'x', 'y'
    uns: 'geneInter', 'histology_results_binary', 'histology_results_continu', 'ligand', 'local_stat', 'local_z_p', 'receptor', 'selected_spots', 'spatial'
    obsm: 'spatial'
    obsp: 'nearest_neighbors', 'weight'
[17]:
g pattern
0 EFNA5_EPHB2 2
1 EFNB1_EPHA4 1
2 EFNB1_EPHB1 1
3 EFNB1_EPHB2 1
4 EFNB1_EPHB3 1
... ... ...
943 CCL3_CCR5 0
944 CCL5_CCR5 0
945 CCL4_CCR5 1
946 CXCL1_ACKR1 2
947 CORT_SSTR2 2

948 rows × 2 columns

L-R-TF-TG

[41]:
tmp = fst.pattern_LR2TF2TG(histology_results, pattern_num=0, R_TFdatabase=Receptor2TF, TF_TGdatabase=RegNetwork)
tmp
This pattern contain %s unique ligand 110
This pattern contain %s unique receptor 116
This pattern contain %s unique tf 288
[41]:
Ligand Receptor tf Target value
0 SPP1 TNFRSF1B CEBPB LOC100270746 0.011396
1 C3 TLR4 CEBPB LOC100270746 0.007620
2 SPP1 TNFRSF1B CEBPB MIR3187 0.011396
3 C3 TLR4 CEBPB MIR3187 0.007620
4 SPP1 TNFRSF1B CEBPB MTRNR2L4 0.011396
... ... ... ... ... ...
5754814 POMC IL18RAP ZEB1 SPRR1B 0.000856
5754815 ANGPT1 IL15RA ZEB1 SPRR1B 0.000132
5754816 ANGPTL2 IL2RB ZEB1 SPRR1B 0.000132
5754817 PDGFB IL7R ZEB1 SPRR1B 0.005976
5754818 FGF7 IL2RG ZEB1 SPRR1B 0.000132

5002946 rows × 5 columns

[64]:
## order according to 'value'
tmp = tmp.sort_values(by="value", ascending=False)
## statistic value classes
num_classes = tmp['value'].nunique()
print('Number of unique classes: ', num_classes)

selected_rows = []
num_sele = 1
for value, group in tmp.groupby('value'):
    selected_rows.append(group.head(num_sele))

tmp_sele = pd.concat(selected_rows)
tmp_sele = tmp_sele.sort_values(by="value", ascending=False)
print('Length of tmp_sele:\n', len(tmp_sele))
print(tmp_sele)
Number of unique classes:  1624
Length of tmp_sele:
 1624
         Ligand Receptor      tf   Target     value
4541632   TGFB1   TGFBR1   SMAD3     ZNF8  0.459459
4533893   TGFB3   TGFBR1   SMAD3   SPTBN1  0.459459
4469441    BMP4   TGFBR1   SMAD4  EIF2AK4  0.390541
4467044    WNT6   TGFBR2   SMAD4    COPS5  0.390541
5382441  PECAM1   PECAM1  CTNNB1     ACP1  0.333658
...         ...      ...     ...      ...       ...
5437342   LAMA4    ITGA9    ABL1     JAK1  0.000002
5438294  SEMA7A    ITGB1    ABL1     RAC2  0.000002
5488766   CCL14   PDGFRB    NAB1     EGR1  0.000002
5754335  COL6A1    ITGA9    UPF2     UPF1  0.000001
5754336  COL6A1    ITGB1    UPF2     UPF1  0.000001

[1624 rows x 5 columns]
[65]:
num_top = 10
tmp_sele_top = tmp_sele[:num_top]
tmp_sele_top
[65]:
Ligand Receptor tf Target value
4541632 TGFB1 TGFBR1 SMAD3 ZNF8 0.459459
4533893 TGFB3 TGFBR1 SMAD3 SPTBN1 0.459459
4469441 BMP4 TGFBR1 SMAD4 EIF2AK4 0.390541
4467044 WNT6 TGFBR2 SMAD4 COPS5 0.390541
5382441 PECAM1 PECAM1 CTNNB1 ACP1 0.333658
5416600 CCL17 IGF1R CTNNB1 SALL1 0.285677
5066765 DLL4 NOTCH2 RBPJ KAT2A 0.283606
5391611 CDH5 CDH5 CTNNB1 CHD8 0.261180
3998699 C3 TLR4 RELA SGPP2 0.247764
5012376 ANGPT1 IL15RA SOS2 BCL2L1 0.231589
[66]:
ligand_list = set(tmp_sele_top['Ligand'])
receptor_list = set(tmp_sele_top['Receptor'])
[69]:
## select some inmortant ligands and receptors
# ligand_list = {'SPP1', 'C3', 'TGFB1',  'WNT6', 'ICAM2', 'JAM3', 'EFNA5', 'L1CAM', 'JAM2', 'LCK', 'GP1BA'}
# receptor_list = {'TNFRSF1B', 'TLR4        ', 'TGFBR1',  'TGFBR2', 'EPHA3', 'ITGAL', 'ITGB2', 'JAM2', 'EPHA3', 'ITGA4', 'CD8A', 'ITGAM'}
subdf = fst.top_pattern_LR2TF(tmp, ligand_list, receptor_list, top_num=16)
# subdf = fst.top_pattern_LR2TF(tmp, ligand_list, receptor_list, top_num=10)
subdf
Ligand and Receptor in R2TFdatabase: 883183
[69]:
Ligand_symbol Receptor_symbol TF Target value
4541632 TGFB1 TGFBR1 SMAD3 ZNF8 0.459459
5033941 WNT6 TGFBR1 SMAD2 CSH1 0.459459
4529412 TGFB3 TGFBR2 SMAD3 RUNX2 0.459459
4529504 WNT6 TGFBR2 SMAD3 RUNX3 0.459459
5052998 TGFB1 TGFBR1 SMAD2 RHEBL1 0.459459
4514316 BMP4 TGFBR1 SMAD3 HSPA4 0.459459
5064362 TGFB3 TGFBR2 SMAD2 ZEB1 0.459459
4492146 TGFB1 TGFBR1 SMAD3 SMAD6 0.459459
4540400 WNT6 TGFBR2 SMAD3 ZEB1 0.459459
5718743 TGFB1 TGFBR2 SMAD3 BAMBI 0.459459
5040547 WNT6 TGFBR2 SMAD2 HNF4A 0.459459
4500469 BMP4 TGFBR1 SMAD3 AKR1B1 0.459459
4510987 TGFB1 TGFBR1 SMAD3 FOXG1 0.459459
4537072 TGFB3 TGFBR1 SMAD3 TGIF2 0.459459
5718762 TGFB3 TGFBR2 SMAD3 BAMBI 0.459459
4494681 TGFB3 TGFBR2 SMAD3 JUN 0.459459
[70]:
fstplt.sankey_LR2TF2TG(subdf, width=600, height=600, title='Pattern 0')