# pyppl-report
A report generating system for [PyPPL][1]
## Installation
```shell
pip install pyppl-report
```
## Usage
### Specifiation of template
````python
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
```python
PyPPL().start(pPyClone).run().report('/path/to/report', title = 'Clonality analysis using PyClone')
```
![Snapshort](./snapshot.png)
### 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`:
```yaml
title: 'A awesome report for job 1'
```
Then in your template, you can use it:
```markdown
## {{jobs[0].title}}
```
### Showing tables with csv/tsv file
````markdown
```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:
```yaml
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.
[1]: https://github.com/pwwang/PyPPL
Python库 | pyppl-report-0.0.1.tar.gz
版权申诉
19 浏览量
2022-04-13
19:17:36
上传
评论
收藏 80KB GZ 举报
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
最新资源
- html css网页制作成品案例.zip
- 神经网络介绍及教程&案例.docx
- 重庆市首席信息官(CIO)协会 《软件及信息化工程造价规范V5.0》T/CQCIO 001-2019
- 联想Y471老A卡笔记本开机黑屏 需等待黑屏结束才能进入桌面,解决方法
- elasticsearch-7.14.0和ik分词器
- 利用MPI计算任意范围内的质数
- EnviroSkyandWeather v2.1.1(u2017.1.2)真实动态天气系统包
- React框架介绍及相关教程、案例.docx
- 基于Springboot和Vue教务评教系统(PC端+server端源码+数据库MySQL脚本+环境部署步骤讲解+运行步骤讲解)
- react-photo-view图片预览组件
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈