Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifier mapping to Ensembl identifiers #15

Open
mkutmon opened this issue May 17, 2022 · 4 comments
Open

Identifier mapping to Ensembl identifiers #15

mkutmon opened this issue May 17, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@mkutmon
Copy link

mkutmon commented May 17, 2022

I tried to figure out how I can change the output to Ensembl identifiers instead of gene symbols.
I tried adding the argument "numeric_ns="ENSG" but that didn't help.
Do you have a hint on how I can achieve that?

@bschilder
Copy link
Collaborator

Hi @mkutmon, which function are you trying to use? Could you provide a quick reproducible example?

@mkutmon
Copy link
Author

mkutmon commented May 24, 2022

I have a list of human Ensembl identifiers and would like to get the mouse Ensembl identifiers back.

mapped.data <- orthogene::convert_orthologs(gene_df = human.ids,
                                        gene_input = "GeneID", 
                                        gene_output = "columns", 
                                        input_species = "human",
                                        output_species = "mouse",
                                        non121_strategy = "kbs",
                                        method = method)

Currently, this method results in a new column "ortholog_gene" which is the mouse gene name. I would like to have the Ensembl identifier for mouse (ENSMUSG...). Is that possible?

@bschilder
Copy link
Collaborator

I can try and infer your use case from the above code snippet, but I'm afraid the above is not a reproducible example (i.e. i can copy and paste the code into R and it will reproduce the problem). You can read about how to make a reprex here. For future bug reports I've added an Issues template to guide users. I've attached the template for you to use here as well.
bugs_template.txt

@bschilder
Copy link
Collaborator

bschilder commented May 24, 2022

Here's an example of a reprex that i think approximates your use case:

human_genes  <- orthogene::all_genes(species = "human")
method <- "gprofiler2"


mapped.data <- orthogene::convert_orthologs(gene_df = human_genes$target[1:10], 
                                            standardise_genes = TRUE,
                                            gene_output = "columns", 
                                            input_species = "human",
                                            output_species = "mouse",
                                            non121_strategy = "kbs",
                                            method = method)

mouse_genes <- orthogene::map_genes(genes = mapped.data$ortholog_gene, 
                                    species = "mouse")

Screenshot 2022-05-24 at 12 51 21

Note standardise_genes = TRUE. This means that your input ensembl IDs will be translated to human gene symbols first. These can then be translated to mouse gene symbols.
From the docs:
Screenshot 2022-05-24 at 12 50 23

That said, I think a nice feature would be to do this all in one step, and return convert_orthologs as whatever gene format is requested (not just gene symbols). I'll look into adding this feature to the next release of orthogene.

@bschilder bschilder self-assigned this Aug 25, 2022
@bschilder bschilder reopened this Sep 29, 2022
@bschilder bschilder added the enhancement New feature or request label Sep 29, 2022
@bschilder bschilder modified the milestones: Publish orthogene preprint, Publish orthogene manuscript Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants