A report generating system for PyPPL
Project description
pyppl-report
A report generating system for PyPPL
Installation
pip install pyppl-report
Usage
Specifiation of template
pPyClone.report = """
## {{proc.desc}}
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.report = "file:/path/to/template.md"
Generating report
PyPPL().start(pPyClone).run().report('/path/to/report', title = 'Clonality analysis using PyClone')
Extra data for rendering
You can generate a YAML
file named job.report.data.yaml
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.yaml
:
title: 'A awesome report for job 1'
Then in your template, you can use it:
## {{jobs[0].title}}
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.
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
pyppl-report-0.0.1.tar.gz
(82.2 kB
view hashes)
Built Distribution
Close
Hashes for pyppl_report-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2be6fd93e95139d83ae61f1dc703fdbdce4ac2f690ebcc2fe86701bb9dff45 |
|
MD5 | 0a2a9a7c78fa3ab6d3b4376bea33dd77 |
|
BLAKE2b-256 | 06fd228118f878cffbc0427167ef8ce190c814e4c417ccee24e81fb5e5613cb9 |