This repository provides a script ar.py
to generate analysis reports to accompany released data.
Clone this repository into a folder on the cluster.
git clone [email protected]:oicr-gsi/Analysis_Reports.git
Separately, confirm that you have access to the QC-ETL caches under the folder /scratch2/groups/gsi/production/qcetl_v1
, or else the report will not be able to pull data.
The file requirements.txt
has the dependenices required for the script to work. It is recomended that you install these in a new python virtual environment. One option is to use Anaconda, a popular package management software that was used in the development of this repository.
After installing Anaconda and setting up a new virtual environment, run the following command in the root directory of this repo
conda create -c conda-forge --prefix /path/to/conda/env --file requirements.txt
If you opt to use a different package manager like Pyenv
, you will most likely run
pip install -r requirements.txt
Two examples of using the script are as follows:
Example 1
python3 ar.py -i infile.json -o outfile.pdf
This will pull data from infile.json
and, using data from QC-ETL files located under /scratch2/groups/gsi/production/qcetl_v1
, will create an Analysis Report in the current directory named outfile.pdf
Example 2
python3 ar.py -i infile.json -o /reports/outfile.pdf --stage
This will pull data from infile.json
and, using data from QC-ETL files located under /scratch2/groups/gsi/staging/qcetl_v1
, will create an Analysis Report in the reports
directory named outfile.pdf
.
argument | abbreviation | purpose | required/optional | default |
---|---|---|---|---|
--infile | -i | The input file to be read | required | ar_input.json |
--outfile | -o | Name of the report generated | required | "Analysis_Report.pdf" |
--staging, --stage | If used, data will be pulled from stage. optional | Leaving out the flag will pull data from production |
Still being developed. (JSON below is a placeholder.)
{"cases":
{workflow_1:
{"workflow_id": "19168526", "workflow_version":"2.0.2"},
workflow_2:
{"workflow_id":"16962244", "workflow_version":"2.0.2"}
}
}