Learn R Programming

⚠️There's a newer version (0.5.0) of this package.Take me there.

The pepr package: Portable Encapsulated Projects in R

pepr is an R package for reading Portable Encapsulated Projects, or PEPs, in R. If you describe your project (configuration and samples) according to this format, you can load all project metadata into R using the pepr package. To test pepr, you can try loading one of the example PEPs.

Complete documentation and API for the pepr R package is at code.databio.org/pepr.

Quick start:

Install from CRAN:

install.packages("pepr")

Load a project and explore metadata like this:

library("pepr")
cfgPath = system.file(
    "extdata",
    "example_peps-master",
    "example_basic",
    "project_config.yaml",
    package = "pepr"
  )
p = Project(file = cfgPath)

sampleTable(p)
config(p)

Copy Link

Version

Install

install.packages('pepr')

Monthly Downloads

263

Version

0.4.0

License

BSD_2_clause + file LICENSE

Maintainer

Michal Stolarczyk

Last Published

October 16th, 2020

Functions in pepr (0.4.0)

.getSubscript

Get list subscript
.expandList

Recursively try to expand list of strings
.strformat

Format a string like python's format method
Project-class

Portable Encapsulated Project object
.removeAttrs

Remove attributes across all the samples
.expandPath

Expand system path
.matchesAndRegexes

Create a list of matched files in the system and unmatched regular expessions
.makeAbsPath

Create an absolute path from a primary target and a parent candidate.
pepr

pepr
makeSectionsAbsolute

Make selected sections absolute using config path
.deriveAttrs

Derive attributes
.listifyDF

Listify data frame columns
.inferProjectName

Infer project name
.duplicateAttrs

Duplicate a selected attribute across all the samples
getSample

Extract samples
fetchSamples

Collect samples fulfilling the specified requirements
.printNestedList

Print a nested list
.reformat

Check config spec version and reformat if needed
sampleTable

select-config

Access "'>Config" object elements
.implyAttrs

Imply attributes
.mergeAttrs

Merge samples defined in sample table with ones in subsample table(s)
.isAbsolute

Determine whether a path is absolute.
.modifySamples

Perform all the sample addribute modifications
getSubsample

Extract samples
listAmendments

List amendments
.loadSubsampleAnnotation

Load single subsample annotation
.loadConfig

Load the config of a PEP
.loadSampleAnnotation

Read sample annotation from disk
activateAmendments

.checkSection

Check for a section existence in a nested list
Config-class

Config objects and specialized list obejcts and expand string attributes
Project

The constructor of a class representing a Portable Encapsulated Project
config

Extract "'>Project"
.applyImports

Function for recursive config data imports
.appendAttrs

Append constant attributes across all the samples
.applyAmendments

Apply amendments
checkSection

Check for existence of a section in the Project config