theislab / theislab/CellFlow

Implementation of `cfp.pp.get_gene_embedding_from_esm`

Open
#87 1 comment 1 reaction 1 assignee View on GitHub

@guillaumehu is already working on this.

Since Aug 23, 2024.

enhancement
Dominant language
Python
Stars
159
Forks
27
PR merge metrics
No merged PRs in 30d

Description

Description of feature

We would like to have a function which fetches the gene embeddings, i.e.

def get_gene_embedding_from_esm(genes: List[str], ems_model: Literal["esm2", "esm3"], ..., **kwargs) -> dict[str, ArrayLike]:
    """Get the gene embedding from ESM2 or ESM3"""
  • The first thing is to check whether we have gene ids or gene names. If we have gene names, we will have to convert them to gene ids first.
  • Probably, we'll have some argument like representation_mode which allows to get different kinds of embeddings of the model, e.g. whether we would like to have a certain layer representation / mean repr. of different layers / etc.
  • We would like the ems packages to be optional dependencies, hence only imported within the function.
  • We should add tests.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.