Upload folder using huggingface_hub
Browse files- yolksac_human.py +3 -3
yolksac_human.py
CHANGED
@@ -32,7 +32,7 @@ class RNAExp(datasets.ArrowBasedBuilder):
|
|
32 |
self.batch = 1000
|
33 |
|
34 |
# create a dictionary of features where raw_counts are ints and the rest are strings
|
35 |
-
features = {"raw_counts": datasets.features.Sequence(datasets.features.Value("
|
36 |
for feature in FEATURES_TO_INCLUDE:
|
37 |
if not features.get(feature):
|
38 |
features[feature] = datasets.Value("string")
|
@@ -71,9 +71,9 @@ class RNAExp(datasets.ArrowBasedBuilder):
|
|
71 |
|
72 |
# raw counts
|
73 |
if RAW_COUNTS == "X":
|
74 |
-
chunk = adata.X[batch:batch+batch_size].tolil().astype('
|
75 |
elif RAW_COUNTS == "raw.X":
|
76 |
-
chunk = adata.raw.X[batch:batch+batch_size].tolil().astype('
|
77 |
else:
|
78 |
raise("Not valid raw_counts")
|
79 |
df = pd.DataFrame([chunk.data,chunk.rows]).T
|
|
|
32 |
self.batch = 1000
|
33 |
|
34 |
# create a dictionary of features where raw_counts are ints and the rest are strings
|
35 |
+
features = {"raw_counts": datasets.features.Sequence(datasets.features.Value("uint32")),"rows": datasets.features.Sequence(datasets.features.Value("uint32")),"size":datasets.Value("uint32")}
|
36 |
for feature in FEATURES_TO_INCLUDE:
|
37 |
if not features.get(feature):
|
38 |
features[feature] = datasets.Value("string")
|
|
|
71 |
|
72 |
# raw counts
|
73 |
if RAW_COUNTS == "X":
|
74 |
+
chunk = adata.X[batch:batch+batch_size].tolil().astype('uint32')
|
75 |
elif RAW_COUNTS == "raw.X":
|
76 |
+
chunk = adata.raw.X[batch:batch+batch_size].tolil().astype('uint32')
|
77 |
else:
|
78 |
raise("Not valid raw_counts")
|
79 |
df = pd.DataFrame([chunk.data,chunk.rows]).T
|