Filter interactions by extra attribute values
Arguments
- data
An interaction data frame with extra_attrs column.
- ...
Extra attribute names and values. The contents of the extra attribute name for each record will be checked against the values provided. The check by default is a set intersection: if any element is common between the user provided values and the values of the extra attribute for the record, the record will be matched. Alternatively, any value can be a custom function which accepts the value of the extra attribute and returns a single logical value. Finally, if the extra attribute name starts with a dot, the result of the check will be negated.
- na_ok
Logical: keep the records which do not have the extra attribute. Typically these are the records which are not from the resource providing the extra attribute.
Examples
cl <- post_translational(
resources = "Cellinker",
fields = "extra_attrs"
)
# Only cell adhesion interactions from Cellinker
filter_extra_attrs(cl, Cellinker_type = "Cell adhesion")
op <- omnipath(fields = "extra_attrs")
# Any mechanism except phosphorylation
filter_extra_attrs(op, .SIGNOR_mechanism = "phosphorylation")