cellink.tl.external.run_seismic_torch#
- cellink.tl.external.run_seismic_torch(adata, magma_file, cell_type_col, species='human', layer=None, min_genes=250, min_cells=50, magma_gene_col='GENE', magma_z_col='ZSTAT', device='cpu', prefix=None, save_results=True)#
Run the sparse-torch Seismic backend end to end.
Drop-in alternative to
run_seismic()(the R/seismicGWAS subprocess backend) that never densifies the genes x cells matrix, so it scales to atlases with millions of cells. Returns a DataFrame with the samecell_type/pvalue/FDRcolumns asrun_seismic(), so downstream code (e.g. plotting, Cauchy combination) is backend-agnostic.- Parameters:
adata (AnnData) – Single-cell data.
species="mouse"is not auto-translated (unlike the R backend) — pass an adata already indexed by the target species’ gene symbols if you need cross-species gene mapping.magma_file (str or Path) – MAGMA
.genes.outfile with columnsmagma_gene_col/magma_z_col.cell_type_col (str) – Column in
adata.obswith cell-type labels.layer (str, optional) –
adata.layerskey to use as expression. Defaults toadata.X.device (str, default "cpu") – torch device. Sparse ops here are CPU-friendly; only use “cuda” for very large atlases where a GPU is free.
prefix (str, optional) – If given and
save_results, associations are written to{prefix}_associations.tsv.
- Return type:
DataFrame- Returns:
pd.DataFrame Columns:
cell_type,pvalue,beta,se,FDR.