Skip to content

Filters are an experimental feature and may change in future versions of eido.

Using eido filters

Eido provides a CLI to convert a PEP into different output formats. These include some built-in formats, like csv (which produces a processed csv file, with project/sample already modified), yaml, and a few others. It also provides a plugin system so that you can write your own Python functions to provide custom output formats. You access filters through the eido convert command.

View available filters

To list available filters:

eido convert --list

You'll see some output like this. There are a few built-in filters available:

Available filters:
 - basic
 - csv
 - yaml
 - yaml-samples

You can add to this list by writing a custom filter, which will write your PEP into whatever format you need.

Convert a PEP into an alternative format with a filter

To convert a PEP into an output format, do this:

eido convert config.yaml -f basic
running plugin pep
Project 'pepconvert' (/home/nsheff/code/pepconvert/config.yaml)
Sections: pep_version, sample_table, subsample_table

This basic format just lists the config file, the number of samples and their names, and identifies the sections in the project config file. Another format is -f yaml,

eido convert config.yaml -f yaml

This will output your samples in yaml format.

Parametrizing filters

Filter functions are parameterizable. Some filters may request or require parameters. To learn more about a filter's parameters, use -d or --describe: eido convert -f <filter_name> -d, which displays the plugin documentation. For example:

eido convert -f yaml-samples -d

    YAML samples PEP filter, that returns only Sample object representations.

    This filter can save the YAML to file, if kwargs include `path`.

    :param peppy.Project p: a Project to run filter on

In this case, the argument path can be provided as an output file. Like this:

eido convert config.yaml -f yaml-samples -a path=output.yaml

More generally, the form to provide parameters is like this

eido convert config.yaml -f <filter_name> -a argument1=value1 argument2=value2