Closed tpoisot closed 7 years ago
You can select a bunch of pathogen - host interactions (or any other supported interaction), by
some_pathogen_host_interactions <- rglobi::get_interactions_by_taxa(sourcetaxon = NULL, interactiontype = 'pathogenOf')
Does that suit your needs? If not, what would you expect a more intuitive approach to look like?
Also, please note that you use the limit
and offset
options to vary length and offset using the otherkeys
param.
So, in order to only get 10 interactions of type pathogenOf after skipping 5 you can say:
some_pathogen_host_interactions <- rglobi::get_interactions_by_taxa(sourcetaxon = NULL, interactiontype = 'pathogenOf', otherkeys = list(limit = 10, offset = 5))
@tpoisot just checking in to see whether the existing behavior to get an arbitrary number of interactions of a given type is sufficient.
Added shortcut to earlier provided answer in rglobi. Should be available in the dev version and in next release.
new method get_interactions_by_type calls get_interactions_by_taxa as follows
get_interactions_by_type <- function(interactiontype = c("interactsWith"), ...) {
get_interactions_by_taxa (sourcetaxon = NULL, interactiontype = interactiontype, ...)
}
Please holler / comment if you have more questions about this. For now, am assuming that your issue has been addressed.
It would be nice to be able to get an arbitrary number of interactions of a given type.