Adding Analyses

There is one sample analysis given in analyses/rq1.py. This relies on the sample query given in boa/queries/rq1.boa and makes use of de-duplication, which relies (indirectly) on the query given in boa/queries/hashes.boa. This analysis will generate a single result, the table in tables/kotlin/rq1.tex.

The steps to add a new analysis are as follows:

  1. Create a new Boa query (e.g., foo.boa):
    1. Store the file in boa/queries/ - note you can create sub-folders here if you want.
    2. Add any missing common snippets into boa/snippets/.
    3. Add the query into the study-config.json.
    4. Repeat Step 1 as many times as necessary.
  2. Create a new Python script to analyze the data (e.g., foo.py) in the analyses/ directory.
  3. Add a new entry to the study-config.json in the analyses object.
    1. The name of the entry is the script filename (e.g., foo.py, without the analyses/ prefix).
    2. Add an input key, that is an array of CSV filenames that the analysis depends on.

Once this is done, you should be able to run make foo (the target is the name of the script, without the file extension) to run the analysis task, or run make analysis to run all analysis tasks.

Analyses can be disabled by setting the disabled key to true. This will prevent the analysis from being run by make analysis, but will still allow make foo.