<jupyter_start><jupyter_text>Mouse OB<jupyter_code>sample_info = pd.read_csv('../MouseOB/MOB_sample_info.csv', index_col=0)
df = pd.read_csv('../MouseOB/data/Rep11_MOB_0.csv', index_col=0)
df = df.T[df.sum(0) >= 3].T  # Filter practically unobserved genes
sample_info = sample_info.query('total_counts > 10')  # Remove empty features
df = df.loc[sample_info.index]

results = pd.read_csv('../MouseOB/MOB_final_results.csv', index_col=0).query('g != "log_total_count"')
adata = sc.AnnData(df.values, sample_info, df.columns.set_names('gene_name').to_frame())

sc.pp.normalize_per_cell(adata)
sc.pp.filter_genes_dispersion(adata)

print(adata.shape)
SV_genes = results.query('qval < 0.05').g
SV_genes.shape
adata.var.index.intersection(SV_genes).shape<jupyter_output><empty_output><jupyter_text>BreastCancer<jupyter_code>results = pd.read_csv('../BreastCancer/BC_final_results.csv', index_col=0).query('g != "log_total_count"')
sample_info = pd.read_csv('../BreastCancer/BC_sample_info.csv', index_col=0)

df = pd.read_table('../BreastCancer/data/Layer2_BC_count_matrix-1.tsv', index_col=0)
df = df.loc[sample_info.index]
df = df.T[df.sum(0) >= 3].T  # Filter practically unobserved genes

df = df[results.g]  # Order like in results
adata = sc.AnnData(df.values, sample_info, df.columns.set_names('gene_name').to_frame())

sc.pp.normalize_per_cell(adata)
sc.pp.filter_genes_dispersion(adata)

print(adata.shape)
SV_genes = results.query('qval < 0.05').g
SV_genes.shape
adata.var.index.intersection(SV_genes).shape<jupyter_output><empty_output><jupyter_text>SeqFISH<jupyter_code>results = pd.read_csv('../SeqFISH/final_results_43.csv', index_col=0).query('g != "log_total_count"')
sample_info = pd.read_csv('../SeqFISH/sample_info_43.csv', index_col=0)

df = pd.read_csv('../SeqFISH/exp_mat_43.csv', index_col=0)
df.columns = df.columns.map(int)

df = df[sample_info.index].T
adata = sc.AnnData(df.values, sample_info, df.columns.set_names('gene_name').to_frame())

sc.pp.normalize_per_cell(adata)
sc.pp.filter_genes_dispersion(adata)

print(adata.shape)
SV_genes = results.query('qval < 0.05').g
SV_genes.shape
adata.var.index.intersection(SV_genes).shape<jupyter_output><empty_output><jupyter_text>MERFISH<jupyter_code>sample_info = pd.read_csv('../MERFISH/middle_sample_info.csv', index_col=0)
results = pd.read_csv('../MERFISH/middle_final_results.csv', index_col=0).query('g != "log_total_count"')

df = pd.read_csv('../MERFISH/data/rep6/middle_exp_mat.csv', index_col=0)
df = df.loc[sample_info.index]
df = df.T[df.sum(0) >= 3].T  # Filter practically unobserved genes
adata = sc.AnnData(df.values, sample_info, df.columns.set_names('gene_name').to_frame())

sc.pp.normalize_per_cell(adata)
sc.pp.filter_genes_dispersion(adata)

print(adata.shape)
SV_genes = results.query('qval < 0.05').g
SV_genes.shape
adata.var.index.intersection(SV_genes).shape<jupyter_output><empty_output><jupyter_text>Frog<jupyter_code>results = pd.read_csv('../Frog/Frog_final_results.csv').query('g not in ["log_ERCC", "log_num_genes"]')
sample_info = pd.read_csv('../Frog/Frog_sample_info.csv', index_col=0)

df = pd.read_csv('../Frog/data/GSE65785_clutchApolyA_relative_TPM.csv', index_col=0)
df = df[sample_info.index]
df = df[df.sum(1) >= 3].T  # Filter practically unobserved genes
adata = sc.AnnData(df.values, sample_info, df.columns.set_names('gene_name').to_frame())

sc.pp.normalize_per_cell(adata)
sc.pp.filter_genes_dispersion(adata)

print(adata.shape)
SV_genes = results.query('qval < 0.05').g
SV_genes.shape
adata.var.index.intersection(SV_genes).shape<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16489659027389603, 'fraction_numerical': 0.015651201788708775, 'mean_word_length': 6.831509846827133, 'pattern_counts': {'":': 0, '<': 26, '<?xml version=': 0, '>': 26, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '510735', 'license': 'MIT', 'n_tokens_mistral': 1484, 'n_tokens_neox': 1422, 'n_words': 161, 'path': 'Analysis/HVG-analysis/HVG in each dataset.ipynb', 'repo_name': 'jiangfuqing/SpatialDE', 'size': '3578'}