View source: R/find_all_subs.R
find_all_subs | R Documentation |
For a given ID, find all sub IDs and their sub IDs etc. The type of relationship can be selected too. This is a helper function for other functions.
find_all_subs(
data,
ids,
main_id = id,
type = type,
accepted_types = "is_a",
exclude_parent_id = FALSE
)
data |
a data frame that contains relational information on IDs (main_id) their sub
IDs (sub_id) and their relationship (type). For ChEBI this data frame can be obtained by calling
|
ids |
a character vector of IDs for which sub IDs should be searched. |
main_id |
a character or integer column containing IDs. Default is |
type |
a character column that contains the type of interactions. Default is |
accepted_types |
a character vector containing the accepted_types of relationships that should be considered for the search. It is possible to use "all" relationships. The default type is "is_a". A list of possible relationships for e.g. ChEBI IDs can be found here. |
exclude_parent_id |
a logical value that specifies if the parent ID should be included in the returned list. |
A list of character vectors containing the provided ID and all of its sub IDs. It contains one element per input ID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.