From 217c0187d5e649324f2bcdba88b3d49c67bbf20d Mon Sep 17 00:00:00 2001 From: Yuuki Galaxy Date: Wed, 21 Feb 2024 10:37:53 +0800 Subject: [PATCH] new file: h5ad.py --- python/salus/cmplatform/h5ad.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 python/salus/cmplatform/h5ad.py diff --git a/python/salus/cmplatform/h5ad.py b/python/salus/cmplatform/h5ad.py new file mode 100755 index 000000000..b113dcaae --- /dev/null +++ b/python/salus/cmplatform/h5ad.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import squidpy as sq +import os + +prefix='/share/result/spatial/data/BoAo_sp/sub2/' +outpath='/share/result/spatial/data/BoAo_sp/sub2/h5ad/' +items=['srp_Illumina_mbrain', 'srp_Illumina_mkidney', 'srp_Salus_mbrain', 'srp_Salus_mkidney'] + +for ids in items: + visiumPath = os.path.join( prefix,ids,'outs' ) + outfile = os.path.join( outpath,ids+'.rsp.h5ad' ) + print(f"{visiumPath}, {outfile}") + adata=sq.read.visium(visiumPath, library_id=ids) + adata.var_names_make_unique() + adata.write_h5ad(outfile,compression='lzf') -- 2.11.4.GIT