ctheodoris davidjwen commited on
Commit
044d737
1 Parent(s): 1987df4

Fix bug with metadata when processing multiple .loom files (#3)

Browse files

- Fix bug with metadata when processing multiple .loom files (36a4b0619fa47023cfdd4f842c0850c5a4b7305b)


Co-authored-by: David Wen <davidjwen@users.noreply.huggingface.co>

Files changed (1) hide show
  1. geneformer/tokenizer.py +2 -1
geneformer/tokenizer.py CHANGED
@@ -108,7 +108,8 @@ class TranscriptomeTokenizer:
108
  loom_file_path
109
  )
110
  tokenized_cells += file_tokenized_cells
111
- cell_metadata.update(file_cell_metadata)
 
112
 
113
  return tokenized_cells, cell_metadata
114
 
 
108
  loom_file_path
109
  )
110
  tokenized_cells += file_tokenized_cells
111
+ for k in cell_metadata.keys():
112
+ cell_metadata[k] += file_cell_metadata[k]
113
 
114
  return tokenized_cells, cell_metadata
115