Skip to content

Commit

Permalink
added documentation for default config (JSON) file
Browse files Browse the repository at this point in the history
  • Loading branch information
nilesh-tawari committed Sep 8, 2017
1 parent 2d9d3f7 commit 8525b1b
Show file tree
Hide file tree
Showing 9 changed files with 363 additions and 61 deletions.
2 changes: 1 addition & 1 deletion chronqc/chronqc.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def main():
'Type "chronqc annotation -h" \
for help on starting ChronQC annotation server.')
annotate_parser.add_argument('--port', required = False, action=Highlander, \
help='Four digit port number e.g. 8000. Default is 8000')
help='Four digit port number e.g. 8000. Default is 8000.')
annotate_parser.set_defaults(func=run_annotation)

args = parser.parse_args()
Expand Down
52 changes: 0 additions & 52 deletions docs/plots/plot_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,55 +66,3 @@ Following options are available for each chart type and can be set in the JSON f



Default config file
```````````````````
Name of tools along with corresponding QC metrics and chart types implemented in default config file (JSON file) generated by ChronQC (database -c) are listed in the table below.
This can be changed by modifing the chronqc.conf file in config folder under chronqc installation directory.

+------------------+-----------------------------------+-----------------------------------------------------------------------------------------------+
| Tool name | QC metrics | Chart type implemented in default JSON (config file) |
+==================+===================================+===============================================================================================+
| FastQC | FastQC_percent_gc | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_total_sequences | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_percent_duplicates | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_percent_fails | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_avg_sequence_length | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+
| QualiMap | QualiMap_30_x_pc | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_percentage_aligned | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_avg_gc | time_series_with_mean_and_stdev (if FastQC_percent_gc is present this plot is omitted |
| | | to avoid duplication) |
| +===================================+===============================================================================================+
| | QualiMap_mapped_reads | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_median_coverage | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_total_reads | time_series_with_mean_and_stdev (if FastQC_total_sequences is present this plot is omitted |
| | | to avoid duplication) |
+==================+===================================+===============================================================================================+
| Bamtools | Bamtools_mapped_reads_pct | time_series_with_mean_and_stdev (if QualiMap_mapped_reads is present this plot is |
| | | omitted to avoid duplication) |
+==================+===================================+===============================================================================================+ |
| Samtools | SamtoolsFlagstat_mapped_passed | time_series_with_mean_and_stdev (if QualiMap_percentage_aligned is present this plot is |
| | | omitted to avoid duplication) |
+==================+===================================+===============================================================================================+
| Bcftools | BcftoolsStats_number_of_MNPs | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_number_of_SNPs | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | Bcftools_Stats_number_of_indels | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_number_of_records | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_tstv | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+
| Peddy | Peddy_error | time_series_with_percentage_category (Default category: True) |
+==================+===================================+===============================================================================================+
| Any other tool | Columns with numeric data | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+
187 changes: 185 additions & 2 deletions docs/run_chronqc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Using 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.
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 linking plots with the ChronQC annotations database, users can see the notes and corrective actions recorded previously.

Expand All @@ -82,7 +82,190 @@ ChronQC config files
- Plots should be mentioned simultaneously in JSON, if are generated from same SQLite table. This ensures proper grouping in sidebar of HTML report.
- Special characters in the title or y-axis label must be specified as HTML entity.

Below is an example of ChronQC config file::

Default config file
```````````````````
- chronqc database command in create mode (-c) generates default JSON file named ``chronqc.default.json``
- Name of tools along with corresponding QC metrics and chart types implemented in default config file (JSON file) generated by ChronQC (database -c) are listed in the table below.
- This can be changed by modifing the chronqc.conf file in config folder under chronqc installation directory.

+------------------+-----------------------------------+-----------------------------------------------------------------------------------------------+
| Tool name | QC metrics | Chart type implemented in default JSON (config file) |
+==================+===================================+===============================================================================================+
| FastQC | FastQC_percent_gc | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_total_sequences | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_percent_duplicates | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_percent_fails | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | FastQC_avg_sequence_length | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+
| QualiMap | QualiMap_30_x_pc | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_percentage_aligned | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_avg_gc | time_series_with_mean_and_stdev (if FastQC_percent_gc is present this plot is omitted |
| | | to avoid duplication) |
| +===================================+===============================================================================================+
| | QualiMap_mapped_reads | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_median_coverage | time_series_with_mean_and_stdev |
| +===================================+===============================================================================================+
| | QualiMap_total_reads | time_series_with_mean_and_stdev (if FastQC_total_sequences is present this plot is omitted |
| | | to avoid duplication) |
+==================+===================================+===============================================================================================+
| Bamtools | Bamtools_mapped_reads_pct | time_series_with_mean_and_stdev (if QualiMap_mapped_reads is present this plot is |
| | | omitted to avoid duplication) |
+==================+===================================+===============================================================================================+ |
| Samtools | SamtoolsFlagstat_mapped_passed | time_series_with_mean_and_stdev (if QualiMap_percentage_aligned is present this plot is |
| | | omitted to avoid duplication) |
+==================+===================================+===============================================================================================+
| Bcftools | BcftoolsStats_number_of_MNPs | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_number_of_SNPs | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | Bcftools_Stats_number_of_indels | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_number_of_records | time_series_with_box_whisker_plot |
| +===================================+===============================================================================================+
| | BcftoolsStats_tstv | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+
| Peddy | Peddy_error | time_series_with_percentage_category (Default category: True) |
+==================+===================================+===============================================================================================+
| Any other tool | Columns with numeric data | time_series_with_mean_and_stdev |
+==================+===================================+===============================================================================================+

Below is an example of default ChronQC config file generated in examples/multiqc_example_2::

[
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_absolute_threshold",
"chart_properties": {
"y_value": "QualiMap_median_coverage",
"lower_threshold": 30
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_percentage_of_samples_above_threshold",
"chart_properties": {
"y_value": "QualiMap_median_coverage",
"threshold": 30
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "FastQC_percent_duplicates"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "FastQC_percent_gc"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "FastQC_total_sequences"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "FastQC_avg_sequence_length"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "FastQC_percent_fails"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "Bcftools_Stats_tstv"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "QualiMap_percentage_aligned"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "QualiMap_30_x_pc"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "QualiMap_mapped_reads"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_box_whisker_plot",
"chart_properties": {
"y_value": "Bcftools_Stats_number_of_MNPs"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_box_whisker_plot",
"chart_properties": {
"y_value": "Bcftools_Stats_number_of_SNPs"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_box_whisker_plot",
"chart_properties": {
"y_value": "Bcftools_Stats_number_of_indels"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_box_whisker_plot",
"chart_properties": {
"y_value": "Bcftools_Stats_number_of_records"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "QualiMap_total_reads"
}
},
{
"table_name": "chronqc_stats_data",
"chart_type": "time_series_with_mean_and_stdev",
"chart_properties": {
"y_value": "Samtools_Flagstat_mapped_passed"
}
}
]


Below is an example of customized ChronQC config file ::


[
{
Expand Down
2 changes: 1 addition & 1 deletion examples/custom_db_example/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Interactive html report is created under `chronqc_output`.
## 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.
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 linking plots with the ChronQC annotations database, users can see the notes and corrective actions recorded previously.

0 comments on commit 8525b1b

Please sign in to comment.