Changing population in do.Enrichment
Hello,
It seems that the population argument in the doEnrichment function only accepts names of public lists at the moment (giving it a private list with API token/key from MyMine [passed to im argument] gives a "Bad Request (HTTP 400)" error). Since I can't seem to be able to avoid this error, is there a way to insert gene ids, rather than a list, as the population/background for this function? There's an equivalent argument ("ids") for the list of genes to investigate, but no way to pass the background genes to the population argument without putting them in a list first.
I am using R version 3.4.3 and InterMineR Version: 1.0.0.
@taraneh-z Hello! Sorry you are having problems.
I just tried this with my lists (via HTTP NOT InterMineR) and the population worked as expected. InterMineR is using the same API end point so it should work the same.
Does the error provide any additional information? Which mine are you using?
@kostaskyritsis @rachellyne Have you two had any issues using population? 400 is a syntax error, are we passing the string correctly?
Hi @taraneh-z . The ids argument is used to pass directly a character vector with the identifiers of the genes, instead of a list, for enrichment analysis.
For the population argument there is actually a bug for both public and private lists. I tested with HumanMine and FlyMine public gene lists and I am getting an HTTP 500 error.
@julie-sullivan Let me take a closer look at the way we pass the population string value and get back to you again.
Thanks for the responses.
@julie-sullivan - I'm using YeastMine, and the error provides no additional information.
@kostaskyritsis - Thank you for looking into this. I wonder why we're getting different errors?
Also, yes, I can see that the ids argument is used to pass a character vector. I was a bit confused because there is a choice between two arguments for passing the query genes to the function ("genelist", and "ids"), but only one argument ("population") for passing the background genes. In the documentation it seems like the query genes can be either in character vector format (passed to "ids") or list format (passed to "genelist"), while the population/background can only be in list format.
After some investigation, this is not InterMineR's fault - I've replicated the same problem in the browser. See https://github.com/intermine/intermine/issues/2084 - InterMine id-based enrichment doesn't work with a background population.