Upload folder using huggingface_hub
Browse files
README.md
CHANGED
@@ -43,11 +43,11 @@ ds = load_dataset("helical-ai/yolksac_human",trust_remote_code=True, split="trai
|
|
43 |
```
|
44 |
observation_columns = [obs for obs in list(ds.features.keys()) if not obs == 'raw_counts']
|
45 |
obs_data = pd.DataFrame(ds.select_columns(observation_columns).data.to_pandas(),columns=observation_columns)
|
46 |
-
lil = lil_matrix((len(ds
|
47 |
-
lil.data = np.array(ds['
|
48 |
-
lil.rows = np.array(ds['
|
49 |
ann_data = ad.AnnData(lil.tocsr(),obs=obs_data)
|
50 |
-
ann_data.var_names = ds
|
51 |
```
|
52 |
|
53 |
### Cell type annotation
|
|
|
43 |
```
|
44 |
observation_columns = [obs for obs in list(ds.features.keys()) if not obs == 'raw_counts']
|
45 |
obs_data = pd.DataFrame(ds.select_columns(observation_columns).data.to_pandas(),columns=observation_columns)
|
46 |
+
lil = lil_matrix((len(ds),ds[0]['size']))
|
47 |
+
lil.data = np.array(ds['raw_counts'],dtype="object")
|
48 |
+
lil.rows = np.array(ds['rows'],dtype="object")
|
49 |
ann_data = ad.AnnData(lil.tocsr(),obs=obs_data)
|
50 |
+
ann_data.var_names = ds.features['raw_counts'].id.split(",")
|
51 |
```
|
52 |
|
53 |
### Cell type annotation
|