Implementation of `cfp.pp.get_gene_embedding_from_esm`
Open
@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_modewhich 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.