A report generating system for PyPPL
Project description
pyppl_report
A report generating system for PyPPL
Installation
Requires pandoc 2.7+ (and wkhtmltopdf 0.12.4+ when creating PDF reports)
pyppl_report
requires pandoc/wkhtmltopdf
to be installed in $PATH
pip install pyppl_report
Usage
Specifiation of template
pPyClone.config.report_template = """
## {{title}}
PyClone[1] is a tool using Probabilistic model for inferring clonal population structure from deep NGS sequencing.
![Similarity matrix]({{path.join(job.o.outdir, "plots/loci/similarity_matrix.svg")}})
```table
caption: Clusters
file: "{{path.join(job.o.outdir, "tables/cluster.tsv")}}"
rows: 10
```
[1]: Roth, Andrew, et al. "PyClone: statistical inference of clonal population structure in cancer." Nature methods 11.4 (2014): 396.
"""
# or use a template file
pPyClone.config.report_template = "file:/path/to/template.md"
Generating report
PyPPL().start(pPyClone).run().report('/path/to/report', title = 'Clonality analysis using PyClone')
# or save report in a directory
PyPPL(name = 'Awesome-pipeline').start(pPyClone).run().report('/path/to/')
# report generated at ./Awesome-pipeline.report.html
Extra data for rendering
You can generate a toml
file named job.report.data.toml
under <job.outdir>
with extra data to render the report template. Beyond that, proc
attributes and args
can also be used.
For example:
job.report.data.toml
:
description = 'A awesome report for job 1'
Then in your template, you can use it:
## {{jobs[0].description}}
Showing tables with csv/tsv file
```table
caption : An awesome table
file : /path/to/csv/tsv/file
header : true
width : 1 # width of each column
total_width: .8 # total width of the table
align : default # alignment of each column
rows : 10 # max rows to show
cols : 0 # max cols to show, default: 0 (show all)
csvargs : # csvargs for `csv.read`
dialect: unix
delimiter: "\t"
You may also specify width
and align
for individual columns:
width = [.1, .2, .1]
References
We use [1]
, [2]
... to link to the references, so HTML links have to be in-place (in the format of [text](link)
instead of [text][link-index]
). All references from different processes will be re-ordered and combined.
Advanced usage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyppl_report-0.5.0rc1.tar.gz
.
File metadata
- Download URL: pyppl_report-0.5.0rc1.tar.gz
- Upload date:
- Size: 170.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.4 Linux/4.4.0-19041-Microsoft
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | adaee6c3c84d0f7a8fb5d86ced89f67bffeff1a1350494bcfc2b0a048f76ac9c |
|
MD5 | 84cf15692ae6a0c635e07a16462d254b |
|
BLAKE2b-256 | de277e5276992b278e3be2288d658c20c25b2a5be802788bc48d69a4a823d5a1 |
File details
Details for the file pyppl_report-0.5.0rc1-py3-none-any.whl
.
File metadata
- Download URL: pyppl_report-0.5.0rc1-py3-none-any.whl
- Upload date:
- Size: 174.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.0 CPython/3.7.4 Linux/4.4.0-19041-Microsoft
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce2a10e2abe7a91494f2dc3971cd579a665471243d253e03ceb953bd59265fe |
|
MD5 | 0c9ae622bef8aa073f46bf4175957018 |
|
BLAKE2b-256 | 20d0e128417be05cbf1c662865e4075d498649e5e83ec951b724b77f8e7fdfd8 |