squidpy icon indicating copy to clipboard operation
squidpy copied to clipboard

How to read seqfish file from raw folders

Open HelloWorldLTY opened this issue 2 years ago • 2 comments

Hi, I find that squidpy has the ability to analyze seqFish data. However, I only find datasets being processed. If I have raw seqfish files, how to read them based on squidpy and change them into .h5ad file? Thanks.

HelloWorldLTY avatar Feb 06 '23 03:02 HelloWorldLTY

@HelloWorldLTY

As I am not a squidpy developer, you can still process raw seqFish data using squidpy and convert it into an .h5ad file using these steps:

Load the raw seqFish data into a Seqfish object in squidpy:

from squidpy import Seqfish seqfish_data = Seqfish(raw_data_path)

Pre-process the data by filtering and normalizing the gene expression values:

`seqfish_data = seqfish_data.normalize()
seqfish_data = seqfish_data.filter_genes(min_counts=5, min_cells=3)

Convert the processed data into an AnnData object:

import anndata
adata = seqfish_data.to_anndata()

Save the AnnData object as an .h5ad file:

adata.write(output_file_path)

This should give you a .h5ad file that contains the pre-processed and normalized seqFish data, which can be loaded and used for downstream analysis.

DRSEI avatar Feb 08 '23 05:02 DRSEI

Thanks a lot, I will try it later!

HelloWorldLTY avatar Feb 08 '23 18:02 HelloWorldLTY

closing due to inactivity

giovp avatar Jul 07 '24 08:07 giovp