Post-processing & Lightweight Updates To pipeline Output
Utilities module for pluto-cwl and helix_filters_01 repos
This repository contains object classes to make it easier to run CWL files, and to run test cases against CWL files.
Repo contents include:
tools.py
CWLFile: convenience class to map a CWL file by basename back to its full object path in relation to thecwldirCWLRunner: helper class for running a CWL file from the command line viacwltoolor ToilTableReader,MafReader: class for reading data from tabular filesMafWriter: class for writing records to a tabular .maf format filePlutoTestCase: the most important class in theplutomodule, this class bundles a large variety of helper methods and functionality into a standard Pythonunittest.TestCaseobject to reduce the amount of code needed when writing CWL test cases, and to provide an easy standard interface to control CWL test case execution parameters. Uses environment variables inherited fromsettings.pyto control how tests are executed. Also includes a large number of custom test case 'assertion' methods in order to easily validate CWL workflow outputs. A noteworthy method isassertCWLDictEqualwhich performs acwltool/Toil-agnostic comparison of CWL JSON dict's to validate workflow output.
settings.py
- contains a large amount of environment variables that can be supplied on the command line to control how CWL and test cases are executed
serializer.py
OFile,ODir: special subclasses of the base Pythondictobject which are used to simulate the standard CWL JSON dict record format of workflow output item descriptions. Use these classes to create objects that expand out to a full CWL JSON, in order to use with methods such asassertDictEquals. The class signature is designed for succint expression of a large dynamically generated dictionary structure, and can cleanly reduce a standard CWL JSON representation in-code from ~8 lines down to 1-2 lines.serializer.pycan also be run as a script on the saved output.json from a CWL workflow in order to convert a workflow output JSON into its Python representation usingOFileandODir, to allow for quickly creating new fixtures from existing JSON outputs.
Makefile: contains the install recipe for theplutorepo, and testing recipe forplutoitselfrun-cwltool.sh: convenience wrapper script for running a CWL withcwltoolrun-toil.sh: convenience wrapper script for running a CWL with Toil (this is the one you probably should be using)env.juno.sh: environment initialization script for use on MSKCC's Juno HPC clusterscripts/: more handy scripts for tedious tasks