Skip to content

Commit

Permalink
added custom db example of ENTROGEN assay
Browse files Browse the repository at this point in the history
  • Loading branch information
nilesh-tawari committed Sep 22, 2017
1 parent 5a324de commit 1bd8666
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Examples
ChronQC plots can be generated from,

1. A custom SQLite database.
* For example see, `examples/custom_db_example <https://github.com/nilesh-tawari/ChronQC/tree/master/examples/custom_db_example>`_.
* For examples see, `examples/custom_db_example <https://github.com/nilesh-tawari/ChronQC/tree/master/examples/custom_db_example>`_.

2. The output of `MultiQC <https://github.com/ewels/MultiQC>`__.
* For example on creating the ChronQC database and plots see, `examples/multiqc_example_1 <https://github.com/nilesh-tawari/ChronQC/tree/master/examples/multiqc_example_1>`_.
Expand Down
27 changes: 27 additions & 0 deletions docs/run_chronqc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,33 @@ The types of created plots and their properties are specified in "config.json" f
Interactive html report is created under ``chronqc_output`` directory


Using **Non-NGS** custom SQLite database
----------------------------------------

This example demonstrates application of ChronQC time-series monitoring in non-NGS assay. This example generates plots for ENTROGEN PCR-based assay data. The example below utilizes 2 types of plots:

* A `stacked plot <http://chronqc.readthedocs.io/en/latest/plots/time_series_with_stacked_bar_plot.html>`_ that shows the total number of mutations present in samples ran with the PCR-based assay very month. Each bar indicates the total occurences of variants of mutants (KRAS, BRAF, WT) per month.

* Ct values of positive control are monitored using the `absolute threshold plot <http://chronqc.readthedocs.io/en/latest/plots/timeseries_absolute_threshold.html>`_ which visualizes FAM / VIC Ct values with validated upper and lower thresholds. Stable Ct values in positive controls indicates that each run is valid and the reagents and protocol are stable.

.. code-block:: shell
cd examples/custom_db_example
..

Run following command to generate interactive plots in HTML,

.. code-block:: shell
chronqc plot chronqc_custom_PCR_db.sqlite ENTROGEN PCR_config_demo.json
..
The types of created plots and their properties are specified in "PCR_config_demo.json" file. For details on creating the `config . <http://chronqc.readthedocs.io/en/latest/run_chronqc.html#chronqc-config-files>`__ file visit `documentation. <http://chronqc.readthedocs.io/en/latest/plots/plot_options.html>`__
Interactive html report is created under ``chronqc_output`` directory.

Using the output of MultiQC
---------------------------

Expand Down
39 changes: 39 additions & 0 deletions examples/custom_db_example/PCR_config_demo.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[
{
"table_name": "PCR__smp_mutant_stats",
"include_samples": "all",
"chart_type": "time_series_with_stacked_bar_plot",
"chart_properties": {
"chart_title": "EntroGen: Mutation Stacked plot (KRAS, BRAF, WT)",
"y_value": "Variant",
"categories": "KRAS, BRAF, WT",
"y_label": "Number of samples(s)"
}
},
{
"table_name": "PCR__pc_ct_stats",
"include_samples": "all",
"chart_type": "time_series_with_absolute_threshold",
"chart_properties": {
"chart_title": "EntroGen: Positive Control FAM Ct Value (per sample)",
"y_value": "FAM",
"lower_threshold": "29.11",
"upper_threshold": "34.49",
"y_label": "PC FAM Ct",
"per_sample": "True"
}
},
{
"table_name": "PCR__pc_ct_stats",
"include_samples": "all",
"chart_type": "time_series_with_absolute_threshold",
"chart_properties": {
"chart_title": "EntroGen: Positive Control VIC Ct Value (per sample)",
"y_value": "VIC",
"lower_threshold": "28.62",
"upper_threshold": "35.11",
"y_label": "PC VIC Ct",
"per_sample": "True"
}
}
]
Binary file not shown.
25 changes: 23 additions & 2 deletions examples/custom_db_example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,37 @@ This example demonstrates generating ChronQC plots from a custom database.

`cd examples/custom_db_example`

Run following command to generate interactive plots in html
Run following command to generate interactive plots in HTML

`chronqc plot chronqc_custom_db.sqlite Somatic config.json`

The types of created plots and their properties are specified in "config.json" file. For details on creating the [config](http://chronqc.readthedocs.io/en/latest/run_chronqc.html#chronqc-config-files) file visit [documentation](https://chronqc.readthedocs.io/en/latest/plots/plot_options.html).
Interactive html report is created under `chronqc_output`.

## Using the ChronQC plots
# Example of running ChronQC using **Non-NGS** custom SQLite database
---------------------------------------------------------------------

This example demonstrates application of ChronQC time-series monitoring in non-NGS assay. This example generates plots for ENTROGEN PCR-based assay data. The example below utilizes 2 types of plots:

* A [stacked plot](http://chronqc.readthedocs.io/en/latest/plots/time_series_with_stacked_bar_plot.html) that shows the total number of mutations present in samples ran with the PCR-based assay very month. Each bar indicates the total occurences of variants of mutants (KRAS, BRAF, WT) per month.

* Ct values of positive control are monitored using the [absolute threshold plot](http://chronqc.readthedocs.io/en/latest/plots/timeseries_absolute_threshold.html) which visualizes FAM / VIC Ct values with validated upper and lower thresholds. Stable Ct values in positive controls indicates that each run is valid and the reagents and protocol are stable.


`cd examples/custom_db_example`


Run following command to generate interactive plots in HTML,

`chronqc plot chronqc_custom_PCR_db.sqlite ENTROGEN PCR_config_demo.json`

The types of created plots and their properties are specified in "PCR_config_demo.json" file. For details on creating the `config . <http://chronqc.readthedocs.io/en/latest/run_chronqc.html#chronqc-config-files>`__ file visit `documentation. <http://chronqc.readthedocs.io/en/latest/plots/plot_options.html>`__
Interactive html report is created under ``chronqc_output`` directory.

# Using the ChronQC plots

ChronQC is designed to be interactive. ChronQC plots can be adjusted to a time period and are zoomable. Mousing over a point displays its associated data such as run ID, sample IDs, and corresponding values.
To use the annotation feature of ChronQC plots, start the annotation database connectivity by using `chronqc annotation` command. Default port used for annotation server is 8000, this can be customized by using --port option.
Then open the ChronQC output html in a recent browser (tested on: Google Chrome and Mozilla Firefox).
Users can record notes and corrective actions on the plots by clicking on a point or selecting a date. User notes and corrective actions are stored for long-term recordkeeping in the SQLite ChronQC annotations database. The plots are interlinked so that when an individual point or date is annotated in one graph, the same annotation appears on other graphs. By using the ChronQC report with the ChronQC annotations data-base (by starting the annotation server with "chronqc annotation" command), users can see the notes that have been recorded previously.

0 comments on commit 1bd8666

Please sign in to comment.