Skip to contents

This conversion is useful for creating a meta-feature table for classifier training and prediction based on sub-networks that were selected based on their differential correlation between classes.

Usage

# S4 method for matrix
interactorDifferences(measurements, ...)

# S4 method for DataFrame
interactorDifferences(
  measurements,
  featurePairs = NULL,
  absolute = FALSE,
  verbose = 3
)

# S4 method for MultiAssayExperiment
interactorDifferences(measurements, useFeatures = "all", ...)

Arguments

measurements

Either a matrix, DataFrame or MultiAssayExperiment containing the training data. For a matrix, the rows are samples, and the columns are features.

...

Variables not used by the matrix nor the MultiAssayExperiment method which are passed into and used by the DataFrame method.

featurePairs

A object of type Pairs.

absolute

If TRUE, then the absolute values of the differences are returned.

verbose

Default: 3. A number between 0 and 3 for the amount of progress messages to give. This function only prints progress messages if the value is 3.

useFeatures

If measurements is a MultiAssayExperiment, "all" or a two-column table of features to use. If a table, the first column must have assay names and the second column must have feature names found for that assay. "clinical" is also a valid assay name and refers to the clinical data table.

Value

An object of class DataFrame with one column for each interactor pair difference and one row for each sample. Additionally, mcols(resultTable) prodvides a DataFrame with a column named "original" containing the name of the sub-network each meta-feature belongs to.

Details

The pairs of features known to interact with each other are specified by networkSets.

References

Dynamic modularity in protein interaction networks predicts breast cancer outcome, Ian W Taylor, Rune Linding, David Warde-Farley, Yongmei Liu, Catia Pesquita, Daniel Faria, Shelley Bull, Tony Pawson, Quaid Morris and Jeffrey L Wrana, 2009, Nature Biotechnology, Volume 27 Issue 2, https://www.nature.com/articles/nbt.1522.

Author

Dario Strbenac

Examples


  pairs <- Pairs(rep(c('A', 'G'), each = 3), c('B', 'C', 'D', 'H', 'I', 'J'))
                           
  # Consistent differences for interactors of A.                                           
  measurements <- matrix(c(5.7, 10.1, 6.9, 7.7, 8.8, 9.1, 11.2, 6.4, 7.0, 5.5,
                           3.6, 7.6, 4.0, 4.4, 5.8, 6.2, 8.1, 3.7, 4.4, 2.1,
                           8.5, 13.0, 9.9, 10.0, 10.3, 11.9, 13.8, 9.9, 10.7, 8.5,
                           8.1, 10.6, 7.4, 10.7, 10.8, 11.1, 13.3, 9.7, 11.0, 9.1,
                           round(rnorm(60, 8, 0.3), 1)), nrow = 10)
                         
  rownames(measurements) <- paste("Patient", 1:10)
  colnames(measurements) <- LETTERS[1:10]
  
  interactorDifferences(measurements, pairs)
#> Calculating differences between the specified interactors.
#> DataFrame with 10 rows and 6 columns
#>                B - A     C - A     D - A     H - G     I - G     J - G
#>            <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
#> Patient 1       -2.1       2.8       2.4       0.5       0.8       0.2
#> Patient 2       -2.5       2.9       0.5       0.4       0.0      -0.2
#> Patient 3       -2.9       3.0       0.5      -0.2      -0.2      -0.3
#> Patient 4       -3.3       2.3       3.0      -0.3       0.8       0.5
#> Patient 5       -3.0       1.5       2.0       0.2       0.7       0.2
#> Patient 6       -2.9       2.8       2.0      -0.1      -0.1      -0.4
#> Patient 7       -3.1       2.6       2.1       0.7      -0.3       0.0
#> Patient 8       -2.7       3.5       3.3      -0.1       0.0       0.4
#> Patient 9       -2.6       3.7       4.0       0.1       0.5       0.8
#> Patient 10      -3.4       3.0       3.6       0.3       0.6       0.5