snap-stanford / SATURN

MIT License
108 stars 17 forks source link

Error when training saturn #51

Closed Xicici-Yan closed 7 months ago

Xicici-Yan commented 7 months ago

Hi, I got an error when loading centroids, I used pre-train ESM2/mouse_embedding and human embedding.

Traceback (most recent call last):
  File "../../train-saturn.py", line 1064, in <module>
    trainer(args)
  File "../../train-saturn.py", line 575, in trainer
    centroid_weights.append(torch.tensor(species_genes_scores[sgn]))
KeyError: 'human_ABAT

It seems that some genes were missed in species_genes_scores, so how could I filter genes before using saturn.

Yanay1 commented 7 months ago

Make sure that the input anndatas have all the genes listed in the centroids file.

If you are using different anndatas make sure to change the centroids file argument to something else otherwise it will use whatever file has already been creaeted.

Xicici-Yan commented 7 months ago

Make sure that the input anndatas have all the genes listed in the centroids file.

If you are using different anndatas make sure to change the centroids file argument to something else otherwise it will use whatever file has already been creaeted.

Thanks, when I create a new Centroids file, it works.