dot-insertPEP: Insert a PEP metadata in a metadata slot of Annotated

.insertPEPR Documentation

Insert a PEP metadata in a metadata slot of Annotated

Description

This function inserts the PEP (Project-class) into the metadata slot of objects that extend the Annotated-class

Usage

.insertPEP(object, pep)

Arguments

object

an object of Annotated-class

pep

an object of class Project-class

Details

Additionally, if the object extends the Annotated-class (or is a list that will be automatically converted to a List) the show method for its class is redefined to display the Project-class as the metadata.

Value

an object of the same class as the object argument but enriched with the metadata from the pep argument

Examples

# If the object is of class Annotated
object = S4Vectors::List(result='test')
result = .insertPEP(object, pepr::Project())
metadata(result)

# If the object is not of class Annotated
object1 = 'test'
result1 = .insertPEP(object1, pepr::Project())
metadata(result1)

pepkit/BiocProject documentation built on July 28, 2023, 2:49 p.m.