Skip to main content

A report generating system for PyPPL

Project description

pyppl-report

Pypi Github PyPPL PythonVers docs Travis building Codacy Codacy coverage

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.report = """
## {{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.report = "file:/path/to/template.md"

Generating report

PyPPL().start(pPyClone).run().report('/path/to/report', title = 'Clonality analysis using PyClone')

Snapshort

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:

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

ReadTheDocs

Project details


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.1.5.tar.gz (168.6 kB view details)

Uploaded Source

Built Distribution

pyppl_report-0.1.5-py3-none-any.whl (172.6 kB view details)

Uploaded Python 3

File details

Details for the file pyppl-report-0.1.5.tar.gz.

File metadata

  • Download URL: pyppl-report-0.1.5.tar.gz
  • Upload date:
  • Size: 168.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.1 Linux/4.15.0-1028-gcp

File hashes

Hashes for pyppl-report-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1f2fa36ed59d67875659fc678647f8837b08d17d2d396fb743995347fc1c2f87
MD5 0446990a694872ae8cf688c14619aad3
BLAKE2b-256 1ed9b9f6eb730cf3e488de1c613e65436f5a257e4762f9cd1ab2cd3bf8563a45

See more details on using hashes here.

File details

Details for the file pyppl_report-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pyppl_report-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 172.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.17 CPython/3.7.1 Linux/4.15.0-1028-gcp

File hashes

Hashes for pyppl_report-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc3fd351fb0bbbb4f88ffa7dd880e40efff1060eac4ba8245c333eb011387273
MD5 12cf0a0278d5f6ce9da7ad30f2c51551
BLAKE2b-256 1b3bf57b083ff5f81fd5b3006f941c35ed7c20fe1a4572b26c4141b1b2ab55ff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page