bputzeys commited on
Commit
de3fa86
1 Parent(s): 4b29966

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. 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("int32")),"rows": datasets.features.Sequence(datasets.features.Value("int32")),"size":datasets.Value("int32")}
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('int32')
75
  elif RAW_COUNTS == "raw.X":
76
- chunk = adata.raw.X[batch:batch+batch_size].tolil().astype('int32')
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