<jupyter_start><jupyter_text>Summary stats<jupyter_code>import anndata
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
import matplotlib.patches as mpatches
import scanpy as sc
from scipy.stats import ks_2samp, ttest_ind
import ast
from scipy.sparse import csr_matrix
import warnings
warnings.filterwarnings('ignore')

def nd(arr):
    return np.asarray(arr).reshape(-1)

fsize=20

plt.rcParams.update({'font.size': fsize})
%config InlineBackend.figure_format = 'retina'
ss = anndata.read_h5ad("../cell_ranger_annotation/no_filter_gene.h5ad")
tenx = anndata.read_h5ad("../cell_ranger_annotation/10xv3_gene.h5ad")
mfish = anndata.read_h5ad("../cell_ranger_annotation/merfish.h5ad")<jupyter_output>Transforming to str index.<jupyter_text>Number of cells<jupyter_code>print("SMART-Seq {:,}".format(ss.shape[0]))
print("10xv3 {:,}".format(tenx.shape[0]))
print("MERFISH {:,}".format(mfish.shape[0]))<jupyter_output>SMART-Seq 6,295
10xv3 94,162
MERFISH 243,799<jupyter_text>Number of Genes<jupyter_code>print("SMART-Seq {:,}".format(ss.shape[1]))
print("10xv3 {:,}".format(tenx.shape[1]))
print("MERFISH {:,}".format(mfish.shape[1]))<jupyter_output>SMART-Seq 31,053
10xv3 31,053
MERFISH 254<jupyter_text>Number of detected genes per cell (average)<jupyter_code>print("SMART-Seq {:,.0f}".format((ss.layers["X"]>0).sum(axis=1).mean()))
print("10xv3 {:,.0f}".format((tenx.X>0).sum(axis=1).mean()))
print("MERFISH {:,.0f}".format((mfish.layers["X"]>0).sum(axis=1).mean()))<jupyter_output>SMART-Seq 10,333
10xv3 5,891
MERFISH 74<jupyter_text>Number of clusters<jupyter_code>print("SMART-Seq {:,}".format(ss.obs.cluster_label.nunique()))
print("10xv3 {:,}".format(tenx.obs.cluster_label.nunique()))
print("MERFISH {:,}".format(mfish.obs.label.nunique()))<jupyter_output>SMART-Seq 62
10xv3 147
MERFISH 93<jupyter_text>Reads Processed<jupyter_code>"SMART-Seq {:,} reads".format(15229289828)
tenx_reads = [1048408446,
            1466307916,
            2941873323,
            1152751524,
            1708764205,
            1926459540,
            1600417861,
            1897698358,
            1919010597,
            2247342604,
            2465213703,
            2321988388]
"10x: {:,} reads".format(np.sum(tenx_reads))<jupyter_output><empty_output><jupyter_text>Reads per cell<jupyter_code>"SMART-Seq {:,.0f} reads per cell".format(15229289828/ss.shape[0])
"10x {:,.0f} reads per cell".format(np.sum(tenx_reads)/tenx.shape[0])
"SMART-Seq was sequenced {:,.0f}x deeper per cell than 10xv3.".format(15229289828/ss.shape[0]/(np.sum(tenx_reads)/tenx.shape[0]))<jupyter_output><empty_output><jupyter_text>Isoform<jupyter_code>ss_iso = anndata.read_h5ad("../cell_ranger_annotation/no_filter_isoform.h5ad")
print("SMART-Seq {:,.0f}".format((ss_iso.layers["X"]>0).sum(axis=1).mean()))<jupyter_output>SMART-Seq 20,319
{'fraction_non_alphanumeric': 0.1705263157894737, 'fraction_numerical': 0.09649122807017543, 'mean_word_length': 5.869879518072289, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '554359', 'license': 'BSD-2-Clause', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1154, 'n_words': 153, 'path': 'analysis/biorxiv_1/summary_stats.ipynb', 'repo_name': 'arshiyaakeel/BYVSTZP_2020', 'size': '2850'}