If you have a question about a specific question, it can be helpful to check the source code. In the case of search_kegg_organism, it's not only a few lines:
search_kegg_organism <- function(str, by="scientific_name", ignore.case=FALSE) {
by <- match.arg(by, c("kegg_code", "scientific_name", "common_name"))
kegg_species <- kegg_species_data()
idx <- grep(str, kegg_species[, by], ignore.case = ignore.case)
kegg_species[idx,]
}
To summarize, it's looking up species in the kegg_species data frame, which is included with the package. You can get that data frame manually with:
kegg_species <- clusterProfiler:::kegg_species_data()
Indeed, "nfu" is not present in that data frame. You can also try to search for any species that have "fish" in the common name:
dplyr::filter(kegg_species, grepl("fish", common_name))
Not many come up.
However, you don't have to use the species or pathways that are included with clusterProfiler. You can use any. This topic is covered in the clusterProfiler book (Chapter 3).
I'm not sure, as it definitely seems like pathway info is available. The documentation for that function is pretty useless, so you may want to ask on the Bioconductor support forum, as I know the author of the package hangs around there.
Is an error returned?
Thank you, I'll ask there.
Cross-posted: https://support.bioconductor.org/p/128030/
Yes, is it against the rules?
I am merely alerting the Biostars and Bioconductor communities about the duplicated post so that nobody ends up duplicating responses.