gao-lab / Cell_BLAST

A BLAST-like toolkit for large-scale scRNA-seq data querying and annotation.
http://cblast.gao-lab.org
MIT License
86 stars 13 forks source link

how to get h5 files ? #2

Closed BinDuan closed 4 years ago

BinDuan commented 5 years ago

The author gave examples, and the input is "data.h5", I wonder how can you get h5 file like you said with the original expression profile?

Jeff1995 commented 5 years ago

Sorry for the delayed response. The h5 files can be found at https://cblast.gao-lab.org/download. You can click the dataset names (first column) there to download the h5 files.

BinDuan commented 5 years ago

Thanks for your response and it is helpful. However, what I want to know is that how should I creat "h5" files that satisfy the input of Cell_BLAST with my own data which your datasets didn't contain.

Jeff1995 commented 5 years ago

In that case, it might be unnecessary to convert to the h5 files and load them from disk. What's the current data format you have? If it's in AnnData or Loom format, you can use the from_anndata or from_loom methods to convert them into cb.data.ExprDataSet class, which can then be used as input of Cell BLAST. Otherwise, you may first manually read your dataset into memory, and then create a cb.data.ExprDataSet object (via the class constructor) with the expression matrix, cell meta table and gene meta table. To save the cb.data.ExprDataSet object to h5 files, use the write_dataset method.

Hope that helps!