secrierlab / SpottedPy

GNU General Public License v3.0
9 stars 0 forks source link

how to create cell type score in data #4

Open solivehong opened 2 months ago

solivehong commented 2 months ago

hello i used stereo seq to analysis sp, want to ask how to create score for focus cell type ,i look for u example nk_cells is

AAACAGTGTTCCTGGG-1-0 0.061412 AAACCGGGTAGGTACC-1-0 0.308839 AAACCGTTCGTCCAGG-1-0 0.349758 AAACCTAAGCAGCCGG-1-0 2.586584 AAACGAAGAACATACC-1_-0 0.472401

but in my data obs: 'nCount_Spatial', 'nFeature_Spatial', 'percent.mito', 'orig.ident', 'x', 'y', 'ClusterNames'

  | nCount_Spatial | nFeature_Spatial | percent.mito | orig.ident | x | y | ClusterNames | sample | n_genes_by_counts | log1p_n_genes_by_counts | ... | pct_counts_in_top_50_genes | pct_counts_in_top_100_genes | pct_counts_in_top_200_genes | pct_counts_in_top_500_genes | mt_frac | Control_total_count | Mild Stenosis_total_count | Hot Moderate-Severe Stenosis_total_count | Cold Moderate-Severe Stenosis_total_count | Moderate-Severe Stenosis_total_count -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 122 | 100 | 5.737705 | sample | 9600 | 11400 | Unknown | ST_C_1 | 100 | 4.615121 | ... | 51.344868 | 99.999993 | 99.999993 | 99.999993 | 0.0 | 454.057556 | 454.057556 | 454.057556 | 454.057556 | 454.057556 483 | 357 | 3.726708 | sample | 9600 | 11500 | Fibroblast | ST_C_1 | 357 | 5.880533 | ... | 17.458218 | 32.293583 | 58.638488 | 99.999995 | 0.0 | 1168.154907 | 1168.154907 | 1168.154907 | 1168.154907 | 1168.154907 220 | 182 | 2.272727 | sample | 9600 | 11600 | Immune cell | ST_C_1 | 182 | 5.209486 | ... | 29.784961 | 56.381568 | 100.000004 | 100.000004 | 0.0 | 721.609741 | 721.609741 | 721.609741 | 721.609741 | 721.609741 168 | 134 | 5.952381 | sample | 9600 | 11700 | Fibroblast | ST_C_1 | 134

hope u help hong

elliewith commented 1 week ago

Hi, each cell type needs its own column and if the cell is present in that column it should have its proportion if it is not single cell resolved, or "1" for present or "0" for absent if it is single cell resolution. Hope this helps