Skip to contents

This container is the required storage format for a collection of sets. Typically, the elements of a set will either be a set of proteins (i.e. character vector) which perform a particular biological process or a set of binary interactions (i.e. Two-column matrix of feature identifiers).

Constructor

FeatureSetCollection(sets)
sets

A named list. The names of the list describe the sets and the elements of the list specify the features which comprise the sets.

Summary

featureSets is a FeatureSetCollection object.

show(featureSets): Prints a short summary of what featureSets contains.
length(featureSets): Prints how many sets of features there are.

Subsetting

The FeatureSetCollection may be subsetted to a smaller set of elements or a single set may be extracted as a vector.

featureSets is a FeatureSetCollection object.

featureSets[i:j]: Reduces the object to a subset of the feature sets between elements i and j of the collection.
featureSets[[i]]: Extract the feature set identified by i. i may be a numeric index or the character name of a feature set.

Author

Dario Strbenac

Examples


    ontology <- list(c("SESN1", "PRDX1", "PRDX2", "PRDX3", "PRDX4", "PRDX5", "PRDX6",
                       "LRRK2", "PARK7"),
                     c("ATP7A", "CCS", "NQO1", "PARK7", "SOD1", "SOD2", "SOD3",
                       "SZT2", "TNF"),
                     c("AARS", "AIMP2", "CARS", "GARS", "KARS", "NARS", "NARS2",
                       "LARS2", "NARS", "NARS2", "RGN", "UBA7"),
                     c("CRY1", "CRY2", "ONP1SW", "OPN4", "RGR"),
                     c("ESRRG", "RARA", "RARB", "RARG", "RXRA", "RXRB", "RXRG"),
                     c("CD36", "CD47", "F2", "SDC4"),
                     c("BUD31", "PARK7", "RWDD1", "TAF1")
                     )
    names(ontology) <- c("Peroxiredoxin Activity", "Superoxide Dismutase Activity",
                         "Ligase Activity", "Photoreceptor Activity",
                         "Retinoic Acid Receptor Activity",
                         "Thrombospondin Receptor Activity",
                         "Regulation of Androgen Receptor Activity")
                         
    featureSets <- FeatureSetCollection(ontology)
    featureSets
#> An object of class 'FeatureSetCollection' consisting of 7 feature sets.
#> Smallest set: 4 features. Largest set: 12 features. 
#> Peroxiredoxin Activity: SESN1, PRDX1, PRDX2, PRDX3, PRDX4, ...
#> Superoxide Dismutase Activity: ATP7A, CCS, NQO1, PARK7, SOD1, ...
#> Ligase Activity: AARS, AIMP2, CARS, GARS, KARS, ...
#>  ...                ...
#> Retinoic Acid Receptor Activity: ESRRG, RARA, RARB, RARG, RXRA, ...
#> Thrombospondin Receptor Activity: CD36, CD47, F2, SDC4
#> Regulation of Androgen Receptor Activity: BUD31, PARK7, RWDD1, TAF1
    featureSets[3:5]
#> An object of class 'FeatureSetCollection' consisting of 3 feature sets.
#> Smallest set: 5 features. Largest set: 12 features. 
#> Ligase Activity: AARS, AIMP2, CARS, GARS, KARS, ...
#> Photoreceptor Activity: CRY1, CRY2, ONP1SW, OPN4, RGR
#> Retinoic Acid Receptor Activity: ESRRG, RARA, RARB, RARG, RXRA, ...
    featureSets[["Photoreceptor Activity"]]
#> [1] "CRY1"   "CRY2"   "ONP1SW" "OPN4"   "RGR"   
    
    subNetworks <- list(MAPK = matrix(c("NRAS", "NRAS", "NRAS", "BRAF", "MEK",
                                        "ARAF", "BRAF", "CRAF", "MEK", "ERK"), ncol = 2),
                        P53 = matrix(c("ATM", "ATR", "ATR", "P53",
                                       "CHK2", "CHK1", "P53", "MDM2"), ncol = 2)
                        )
    networkSets <- FeatureSetCollection(subNetworks)                        
    networkSets
#> An object of class 'FeatureSetCollection' consisting of 2 sets of binary interactions.
#> Smallest set: 4 binary interactions. Largest set: 5 binary interactions. 
#> MAPK: NRAS-ARAF, NRAS-BRAF, NRAS-CRAF, BRAF-MEK, MEK-ERK
#> P53: ATM-CHK2, ATR-CHK1, ATR-P53, P53-MDM2