pepr is the official R package for the pepkit suite, a collection of tools that interface with portable encapsulated projects, or PEPs. PEP format defines a structure for organizing project metadata using a
pepr allows you to read any PEP-formatted project metadata (and potentially even actual sample data) into R, providing you a convenient user interface to interact with and share project metadata.
You can install
pepr in the usual way. Currently from GitHub (but we target a CRAN release at some point).
pepr and read in your project. We have provided a basic example to show you how it works. You can use this to get the file path to a built-in example project configuration
Loading your project metadata into R is a single line of code:
## Loading config file: /private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpSzdJbG/Rinst4b945a77f0f4/pepr/extdata/example_peps-master/example_basic/project_config.yaml
## Warning in readLines(con): incomplete final line found on '/private/var/folders/ ## 3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpSzdJbG/Rinst4b945a77f0f4/pepr/extdata/ ## example_peps-master/example_basic/project_config.yaml'
That’s it! You’ve now have a
Project object, p, to interact with in
pepr::Projectobject in R
Now you can interface with that project object to grab both sample-level and project-level metadata. Here’s how you can access the metadata. If you just run the
show() function on your object, you’ll get a simple report telling you a few basic stats, like where the project came from and how many samples it has:
## PEP project object. Class: Project ## file: ## /private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpSzdJbG/Rinst4b945a77f0f4/pepr/extdata/example_peps-master/example_basic/project_config.yaml ## samples: 2
To get the sample table out of the project, you use the
And you can also access the project configuration metadata with the
## Config object. Class: Config ## pep_version: 2.0.0 ## sample_table: ## /private/var/folders/3f/0wj7rs2144l9zsgxd3jn5nxc0000gn/T/RtmpSzdJbG/Rinst4b945a77f0f4/pepr/extdata/example_peps-master/example_basic/sample_table.csv ## name: example_basic
Follow the other vignettes for more advanced capabilities of