Skip to contents

Recreate interaction data frame based on certain datasets and resources

Usage

only_from(
  data,
  datasets = NULL,
  resources = NULL,
  exclude = NULL,
  .keep = FALSE
)

Arguments

data

An interaction data frame from the OmniPath web service with evidences column.

datasets

Character: a vector of dataset labels. Only evidences from these datasets will be used.

resources

Character: a vector of resource labels. Only evidences from these resources will be used.

exclude

Character vector of resource names to be excluded.

.keep

Logical: keep the "evidences" column.

Value

A copy of the interaction data frame restricted to the given datasets and resources.

Details

The OmniPath interactions database fully integrates all attributes from all resources for each interaction. This comes with the advantage that interaction data frames are ready for use in most of the applications; however, it makes it impossible to know which of the resources and references support the direction or effect sign of the interaction. This information can be recovered from the "evidences" column. The "evidences" column preserves all the details about interaction provenances. In cases when you want to use a faithful copy of a certain resource or dataset, this function will help you do so. Still, in most of the applications the best is to use the interaction data as it is returned by the web service.

Note: This function is automatically applied if the `strict_evidences` argument is passed to any function querying interactions (e.g. import_omnipath_interactions).

Examples

if (FALSE) {
ci <- collectri(evidences = TRUE)
ci <- only_from(ci, datasets = 'collectri')
}