For a given ChEBI ID, find all ChEBI sub IDs (incoming IDs) and their sub IDs. The type of relationship can be selected too. This is a helper function for other functions.

find_all_subs(data, ids, types = "is_a")



a data frame that contains relational information on ChEBI IDs (id), their sub IDs (incoming) and their relationship (type). This data frame can be obtained by calling fetch_chebi(relation = TRUE).


a character vector of ChEBI IDs for which sub IDs should be searched.


a character vector containing the 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 can be found here.


A list of double vectors containing the provided ID and all of its sub IDs. It contains one element per input ID.