Basic PEP example

The PEP that this example is based on is available in the example_peps repsitory in the example_basic folder.

This vignette will show you a simple example PEP-formatted project, and how to read it into python using the peppy package.

Start by importing peppy, and then let’s take a look at the configuration file that defines our project:

import peppy
project_config_file = "example_basic/project_config.yaml"
with open(project_config_file) as f:
  sample_annotation: sample_annotation.csv
  output_dir: $HOME/hello_looper_results

It’s a basic yaml file with one section, metadata, with just two variables. This is about the simplest possible PEP project configuration file. The sample_annotation points at the annotation file, which is stored in the same folder as project_config.yaml. Let’s now glance at that annotation file:

project_config_file = "example_basic/sample_annotation.csv"
with open(project_config_file) as f:

This sample_annotation file is a basic csv file, with rows corresponding to samples, and columns corresponding to sample attributes. Let’s read this simple example project into python using peppy:

proj = peppy.Project("example_basic/project_config.yaml")

Now, we have access to all the project metadata in easy-to-use form using python objects. We can browse the samples in the project like this:

[ ]: