Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
173 commits
Select commit Hold shift + click to select a range
cd13af1
Change qc table signature
ODiogoSilva Jun 18, 2018
f942fc5
Merge branch 'dev' into reports
ODiogoSilva Jun 18, 2018
c68775e
Refactored exiting report.json according to new spec
ODiogoSilva Jun 19, 2018
855293a
Fixed json key
ODiogoSilva Jun 20, 2018
a44d896
Updated typing report JSON
ODiogoSilva Jun 20, 2018
6935387
Updated trimmomatic report JSON
ODiogoSilva Jun 20, 2018
75d6445
Fixed abricate report JSON
ODiogoSilva Jun 21, 2018
b7173a4
Fixed abricate report to new spec
ODiogoSilva Jun 23, 2018
a95269c
Added a simple report json payload size logger
ODiogoSilva Jun 24, 2018
4597864
Report JSON size optimizations
ODiogoSilva Jun 24, 2018
8460b61
Started implementation of unique paramenters for each component #91
ODiogoSilva Jun 27, 2018
9c3e57c
Refactored groovy helper plugin for new parameter system and fixed pl…
ODiogoSilva Jun 27, 2018
26d3f0b
Added sanity check when providing default value to helper script #91
ODiogoSilva Jun 27, 2018
d5ade3b
Removed deprecated secondary_inputs attribute and methods. #91
ODiogoSilva Jun 27, 2018
c9fd400
Fixed report json typo
ODiogoSilva Jun 27, 2018
56eaaa5
Improve JSON report for series that do not start at 1bp
ODiogoSilva Jun 27, 2018
5bd4e11
Handled blank point assessment
ODiogoSilva Jun 28, 2018
afcbdd2
Fixed merge_json params
ODiogoSilva Jun 28, 2018
7e30479
refactored pATLAS processes to accommodate the changes to the engine
tiagofilipe12 Jun 28, 2018
65975c4
homogeneized chewbbaca table report json
ODiogoSilva Jun 29, 2018
58de3d4
homogeneized chewbbaca table report json
ODiogoSilva Jun 29, 2018
109938e
Started option for checkpoint clearing of temporary files
ODiogoSilva Jun 29, 2018
c597923
Merge branch 'unique_params' into checkpoints_clear
ODiogoSilva Jun 29, 2018
74e3698
Added checkpoint file clearing
ODiogoSilva Jun 29, 2018
1d84b7c
Merge branch 'bowtie' into unique_params
cimendes Jun 29, 2018
033664e
adapted metagenomic, annotation and filtering process to accomodate t…
cimendes Jun 29, 2018
1f6a066
Merge branch 'dev' into unique_params
ODiogoSilva Jun 29, 2018
9bcde81
Merge branch 'dev' into unique_params
ODiogoSilva Jun 29, 2018
0886818
Updated plasmid components imagens and params
ODiogoSilva Jun 30, 2018
4a068cb
Merged unique params and checkpoints
ODiogoSilva Jun 30, 2018
315b5b2
Fixed param string
ODiogoSilva Jul 1, 2018
3a565d6
Merge branch 'unique_params' into reports
ODiogoSilva Jul 1, 2018
a288784
Merged dev
ODiogoSilva Jul 6, 2018
17b25af
Merge branch 'dev' into reports
ODiogoSilva Jul 6, 2018
ec34e03
Greatly decreased the report.json size of sliding window analyses
ODiogoSilva Jul 7, 2018
cf7f4d0
Merge branch 'dev' into reports
ODiogoSilva Jul 7, 2018
e64cbeb
Added potential fix to the removal of temporary files at checkpoints …
ODiogoSilva Jul 9, 2018
2d20626
Added version and tracing to report JSON
ODiogoSilva Jul 9, 2018
4cf08a5
Merge branch 'fix-108' into reports
ODiogoSilva Jul 9, 2018
4bc425a
Added documentation on pipeline reporting
ODiogoSilva Jul 10, 2018
07bdc63
Fixed duplication of report files
ODiogoSilva Jul 10, 2018
7fde659
Added new table element
ODiogoSilva Jul 12, 2018
1701872
process assembly warnings are only put into the json when the array i…
ODiogoSilva Jul 12, 2018
b807f6a
Merge branch 'dev' into reports
ODiogoSilva Jul 31, 2018
9394174
Merge branch 'dev' into reports
ODiogoSilva Jul 31, 2018
3836cab
Added encoding detection warning
ODiogoSilva Jul 31, 2018
c040dfd
Merge branch 'dev' into reports
ODiogoSilva Aug 1, 2018
e136d7a
Added more options to abricate component
ODiogoSilva Aug 3, 2018
05d2b10
Merge branch 'abricate_opts' into reports
ODiogoSilva Aug 3, 2018
789badf
Added changelog entry
ODiogoSilva Aug 3, 2018
19e6ad6
Added check that logs encoding warning only when encoding detection i…
ODiogoSilva Aug 3, 2018
02440b2
change json report keys to add to database to become compatible with …
bfrgoncalves Aug 7, 2018
c92bb6c
Merge pull request #123 from assemblerflow/innuendo_posts
bfrgoncalves Aug 9, 2018
b329d11
Added potential fix on assembly mapping for contig names that have sp…
ODiogoSilva Aug 9, 2018
3216008
Merge remote-tracking branch 'origin/reports' into reports
ODiogoSilva Aug 9, 2018
4f01d1f
Merge branch 'dev' into reports
ODiogoSilva Aug 10, 2018
3b4ebb2
Merge branch 'dev' into reports
ODiogoSilva Aug 10, 2018
ff898c1
Decrease size of assembly_report report json
ODiogoSilva Aug 23, 2018
74bb855
Added information on assembly file to allow link between pilon report…
ODiogoSilva Aug 24, 2018
03f1826
Fixed typo
ODiogoSilva Aug 24, 2018
757ef8a
Fixed process abricate json formation
ODiogoSilva Aug 24, 2018
183785d
Modified assembly file location in report json
ODiogoSilva Aug 24, 2018
29bdcf3
Added option to provide sample name to accessions
ODiogoSilva Aug 28, 2018
6970406
Fixed version string
ODiogoSilva Aug 28, 2018
26890e2
Fixed default type of version object
ODiogoSilva Aug 28, 2018
4bf660a
Chewbbaca preparation of json data now uses sample id information for…
ODiogoSilva Aug 28, 2018
a4b0cf2
Fixed parameter arguments
ODiogoSilva Aug 28, 2018
e01f1b6
Fixed parameter arguments
ODiogoSilva Aug 28, 2018
3813379
Fixed sample id on table data
ODiogoSilva Aug 28, 2018
2ed6493
Fixed parameter arguments
ODiogoSilva Aug 28, 2018
4ffe958
Added fork tree information to report json
ODiogoSilva Aug 28, 2018
50aa102
Added metadata do reports
ODiogoSilva Aug 28, 2018
c019666
Added projectid and runname to process specific reports
ODiogoSilva Aug 28, 2018
412ddb3
Added version information to dotfile
ODiogoSilva Aug 29, 2018
176a620
Added report JSON specification documentation
ODiogoSilva Aug 29, 2018
6aedfdd
Pathotyping and seqtyping now write to the report JSON when there is …
ODiogoSilva Aug 29, 2018
e2dc703
Updated report information in documentation. Tweaked report messages …
ODiogoSilva Aug 29, 2018
98fc8ec
Fixed script and run name string interpolation
ODiogoSilva Aug 29, 2018
1762366
Fixed warning and report variable
ODiogoSilva Aug 29, 2018
4d83135
Ensure that forkTree is generated in pipeline dir
ODiogoSilva Aug 29, 2018
6fe2287
Fixed test
ODiogoSilva Aug 29, 2018
a185927
Fixed fail message type do list
ODiogoSilva Aug 30, 2018
23f3363
Fixed workflow variable passing
ODiogoSilva Aug 30, 2018
05fe157
fixed parameters
ODiogoSilva Aug 30, 2018
886f2e8
fixed parameters
ODiogoSilva Aug 30, 2018
e452456
fixed parameters
ODiogoSilva Aug 30, 2018
694893b
Fixed warning messages
ODiogoSilva Aug 30, 2018
38aa43d
Refactored report compile to its own script and changed the whitespac…
ODiogoSilva Aug 30, 2018
d01b1cc
Added compile reports template
ODiogoSilva Aug 30, 2018
3958328
Fixed path for afterscript directive in compile reports
ODiogoSilva Aug 30, 2018
f83597b
Fixed typo
ODiogoSilva Aug 30, 2018
a12d502
Fixed parameter
ODiogoSilva Aug 30, 2018
0b86c63
Removed html tags from treeDag.json
ODiogoSilva Aug 30, 2018
a0116f5
Fixed typo
ODiogoSilva Aug 30, 2018
68d47d0
Added fix on directives quotes
ODiogoSilva Aug 30, 2018
bccd06c
Added fix on directives quotes
ODiogoSilva Aug 30, 2018
30ca533
Fixed seqtyping for multiple samples
ODiogoSilva Aug 31, 2018
653ed05
Fixed issue where `seq_typing` and `patho_typing` processes were not …
ODiogoSilva Aug 31, 2018
34ab98f
Merge branch 'dev' into reports
ODiogoSilva Aug 31, 2018
742d599
Removed print
ODiogoSilva Aug 31, 2018
11553f6
Fixed report and version compiling for typing components
ODiogoSilva Aug 31, 2018
237b5e8
Added sampleName to root reports
ODiogoSilva Sep 3, 2018
ebc5a68
Fix bug where mafft compoment was lacking the --adjustdirection param
Sep 3, 2018
3af5ad3
Merge remote-tracking branch 'origin/dev' into dev
Sep 3, 2018
3341086
Added report run mode
ODiogoSilva Sep 4, 2018
814c915
Added NA report value to pathotyping when the report output file is e…
ODiogoSilva Sep 4, 2018
0412951
refactored patlas report.jsons
tiagofilipe12 Sep 4, 2018
45cece6
fixed plotData for mapping patlas
tiagofilipe12 Sep 4, 2018
3d46bc5
Fix bug where intermediate files in the "filter_poly" process weren't…
Sep 4, 2018
b9ef2b4
Fix bug where intermediate files in the "retrieved_mapped" process we…
Sep 4, 2018
bc0a164
Fix bug where intermediate files in the "remove_host" process weren't…
Sep 4, 2018
a274db1
Fix bug where intermediate files in the "remove_host" and "retrieve_m…
Sep 4, 2018
1be8729
Added contig name to xbars object
ODiogoSilva Sep 5, 2018
320a6fe
JSON report for mashdist is now created even in the absence of hits
ODiogoSilva Sep 5, 2018
a93e5ea
Merge branch 'reports_patlas' into reports
ODiogoSilva Sep 5, 2018
d61a703
Added main.js resource to allow offline html reports
ODiogoSilva Sep 7, 2018
72d26f2
Moved main js file to src directory
ODiogoSilva Sep 8, 2018
0b5c043
Fixed fail message type
ODiogoSilva Sep 10, 2018
c207cac
Merge branch 'dev' into reports
ODiogoSilva Sep 10, 2018
b700387
Added report to remove_host (table mapping) (yeeey!)
Sep 11, 2018
3911057
Added report to bowtie process (table mapping)
Sep 11, 2018
3f71979
Fixed missing stuff in the reports for the remove_host and bowtie pro…
Sep 11, 2018
179af2a
Change table headers (process mapping)
Sep 11, 2018
64cda59
added report to the process dengue_typing
Sep 11, 2018
66fc397
added report to the process viral_assembly (missing entry on n ORFs)
Sep 11, 2018
728c52d
Fixed encoding check
ODiogoSilva Sep 12, 2018
b0535fa
added report to the process viral_assembly - added info on the number…
Sep 12, 2018
9efa9a0
added report to the process viral_assembly - added info on the number…
Sep 12, 2018
2fa544d
Merge branch 'abricate_opts' into reports
ODiogoSilva Sep 13, 2018
6c12877
Added changelog entry for reports
ODiogoSilva Sep 13, 2018
d85fa7a
Updated basic usage documentation
ODiogoSilva Sep 13, 2018
17fd581
Merge pull request #128 from assemblerflow/reports_denim
cimendes Sep 14, 2018
de33348
Added new watch report mode for live update of pipeline reports
ODiogoSilva Sep 14, 2018
10aa40c
Fixed hash id for report watch mode
ODiogoSilva Sep 14, 2018
199289b
added report to the process raxml (treeData)
Sep 17, 2018
92e22a1
added metadata to the json report in the dengue_typing component
Sep 17, 2018
350ba7f
Added new ST column to table row data
ODiogoSilva Sep 18, 2018
b842671
Added buffer for sending report gradually in the watch mode of the re…
ODiogoSilva Sep 18, 2018
cfb387b
Added more informative logging and returned hash when the most of the…
ODiogoSilva Sep 18, 2018
baf277b
Fixed unnecessary status update
ODiogoSilva Sep 18, 2018
ea0dd5c
Added condition handling for when report json no longer exists in a d…
ODiogoSilva Sep 18, 2018
0501305
missing tags on the reports for the bowtie, remove_host and viral_ass…
Sep 18, 2018
4fe5e22
fix bug in raxml report string
Sep 18, 2018
72b889c
Updated reports user documentation
ODiogoSilva Sep 19, 2018
7f359b8
Added pipeline status information on first request
ODiogoSilva Sep 19, 2018
09d662b
Added documentation resources
ODiogoSilva Sep 19, 2018
83d9223
Added two more modes of viewer reports to documentation
ODiogoSilva Sep 19, 2018
896c6d4
fix bug in raxml report string
Sep 19, 2018
dc6ceaa
Merge remote-tracking branch 'origin/reports' into reports
Sep 19, 2018
e663a0e
added column information to the metadata
Sep 20, 2018
69d1ccc
removed _split.fasta" from the filenames
Sep 20, 2018
5548b78
remove odd '=' characters from the contig names in the split_assembly…
Sep 20, 2018
920b8eb
added process_newick to generate the report
Sep 20, 2018
740142e
fix bug in process_viral_assembly script
cimendes Sep 20, 2018
fa62bd5
Added report documentation
ODiogoSilva Sep 21, 2018
a57c7db
Fixed image paths
ODiogoSilva Sep 21, 2018
179eb07
Fixed image paths
ODiogoSilva Sep 21, 2018
475eaed
Fixed image paths
ODiogoSilva Sep 21, 2018
c876516
Fixed image paths
ODiogoSilva Sep 21, 2018
73b7020
added clean up step to the re-rotted newick tree
Sep 21, 2018
3f480d1
added report documentation for process_mapping, process_viral_assembl…
Sep 21, 2018
c01758d
Added groovy method to write metadata as json at the beginning of the…
ODiogoSilva Sep 21, 2018
98cfc9e
Updated web app main js
ODiogoSilva Sep 21, 2018
d0ee79e
Fixed metadata json object
ODiogoSilva Sep 21, 2018
a7f4253
Fixed docs main content div
ODiogoSilva Sep 21, 2018
5416d2c
Changed docs class
ODiogoSilva Sep 21, 2018
6ef0294
Merge pull request #127 from assemblerflow/reports
ODiogoSilva Sep 21, 2018
43d946b
Updated changelog
ODiogoSilva Sep 21, 2018
36bbb56
Fixed fail messages
ODiogoSilva Sep 21, 2018
4e0d8b6
Added condition for updating the run status of the pipeline when ther…
ODiogoSilva Sep 21, 2018
96e90dc
Updated version for 1.3.0 release
ODiogoSilva Sep 21, 2018
5e1d5c8
Added resources to package data
ODiogoSilva Sep 21, 2018
281225b
Fixed main js resource
ODiogoSilva Sep 21, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
# Changelog

## 1.3.0

### Features
- Added `report` run mode to Flowcraft that displays the report of any given
pipeline in the Flowcraft's web application. The `report` mode can be executed
after a pipeline ended or during the pipeline execution using the `--watch`
option.
- Added standalone report HTML at the end of the pipeline execution.
- Components with support for the new report system:
- `abricate`
- `assembly_mapping`
- `check_coverage`
- `chewbbaca`
- `dengue_typing`
- `fastqc`
- `fastqc_trimmomatic`
- `integrity_coverage`
- `mlst`
- `patho_typing`
- `pilon`
- `process_mapping`
- `process_newick`
- `process_skesa`
- `process_spades`
- `process_viral_assembly`
- `seq_typing`
- `trimmomatic`
- `true_coverage`

### Minor/Other changes

- Refactored report json for components `mash_dist`, `mash_screen` and
`mapping_patlas`

### Bug fixes
- Fixed issue where `seq_typing` and `patho_typing` processes were not feeding
report data to report compiler.
- Fixed fail messages for `process_assembly` and `process_viral_assembly`
components

## 1.2.2

### Components changes
Expand All @@ -9,6 +49,8 @@ sam and bam files and added data to .report.json. Updated databases to pATLAS
version 1.5.2.
- `mash_screen` and `mash_dist`: added data to .report.json. Updated databases
to pATLAS version 1.5.2.
- Added new options to `abricate` componente. Users can now provide custom database
directories, minimum coverage and minimum identity parameters.

### New components

Expand Down
4 changes: 4 additions & 0 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ div.wy-side-nav-search, div.wy-nav-top {

.wy-menu > .caption > .caption-text {
color: #5c6bc0;
}

.wy-nav-content {
max-width: 100%
}
2 changes: 2 additions & 0 deletions docs/dev/create_process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ must be used **only once**. Like in the input channel, this channel should
be defined with a two element tuple with the sample ID and the data. The
sample ID must match the one specified in the ``input_channel``.

.. _compiler:

{% include "compiler_channels.txt %}
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
90 changes: 90 additions & 0 deletions docs/dev/pipeline_reporting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
Pipeline reporting
==================

This section describes how the reports of a FlowCraft pipeline are generated
and collected at the end of a run. These reports can then be sent to the
`FlowCraft web application <https://github.com/assemblerflow/flowcraft-webapp>`_
where the results are visualized.

.. important::
Note that if the nextflow process reports add new types of data, one or
more React components need to be added to the web application for them
to be rendered.

Data collection
---------------

The data for the pipeline reports is collected from three dotfiles in each nextflow
process (they should be present in each work sub directory):

- **.report.json**: Contains report data (See :ref:`report-json` for more information).
- **.versions**: Contains information about the versions of the software used
(See :ref:`versions` for more information).
- **.command.trace**: Contains resource usage information.

The **.command.trace** file is generated by nextflow when the **trace** scope
is active. The **.report.json** and **.version** files are specific to
FlowCraft pipelines.

Generation of dotfiles
^^^^^^^^^^^^^^^^^^^^^^

Both **report.json** and **.versions** empty dotfiles are automatically generated
by the ``{% include "post.txt" ignore missing %}`` placeholder, specified in the
:ref:`create-process` section. Using this placeholder in your processes is all
that is needed.

Collection of dotfiles
^^^^^^^^^^^^^^^^^^^^^^

The **.report.json**, **.versions** and **.command.trace** files are automatically
collected and sent to dedicated report channels in the pipeline by the
``{%- include "compiler_channels.txt" ignore missing -%}`` placeholder, specified
in the :ref:`process creation <compiler>` section. Placing this placeholder in your
processes will generate the following line in the output channel specification::

set {{ sample_id|default("sample_id") }}, val("{{ task_name }}_{{ pid }}"), val("{{ pid }}"), file(".report.json"), file(".versions"), file(".command.trace") into REPORT_{{task_name}}_{{ pid }}

This line collects several metadata associated with the process along with the three
dotfiles.

Compilation of dotfiles
^^^^^^^^^^^^^^^^^^^^^^^

As mentioned in the previous section, the dotfiles and other relevant metadata
for are sent through special report channels to a FlowCraft component that is
responsible for compiling all the information and generate a single report
file at the end of each pipeline run.

This component is specified in ``flowcraft.generator.templates.report_compiler.nf``
and it consists of two nextflow processes:

- First, the **report** process receives the data from each executed process that
sends report data and runs the ``flowcraft/bin/prepare_reports.py`` script
on that data. This script will simply merge metadata and dotfiles information
in a single JSON file. This file contains the following keys:

- ``reportJson``: The data in **.report.json** file.
- ``versions``: The data in **.versions** file.
- ``trace``: The data in **.command.trace** file.
- ``processId``: The process ID
- ``pipelineId``: The pipeline ID that defaults to one, unless specified in
the parameters.
- ``projectid``: The project ID that defaults to one, unless specified in
the parameters.
- ``userId``: The user ID that defaults to one, unless specified in
the parameters.
- ``username``: The user name that defaults to *user*, unless specified in
the parameters
- ``processName``: The name of the flowcraft component.
- ``workdir``: The work directory where the process was executed.

- Second, all JSON files created in the process above are merged
and a single reports JSON file is created. This file will contains the
following structure::

reportJSON = {
"data": {
"results": [<array of report JSONs>]
}
}
63 changes: 46 additions & 17 deletions docs/dev/process_dotfiles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,22 @@ execution of the process. When this occurs, the ``.status`` channel must have
the ``fail`` string as well. As in the warning dotfile, there is no
particular format for the fail message.

.. _report-json:

Report JSON
-----------

.. important::
The general specification of the report JSON changed in version 1.2.2.
See the `issue tracker <https://github.com/assemblerflow/flowcraft/issues/96>`_
for details.

The ``.report.json`` file stores any information from a given process that is
deemed worthy of being reported and displayed at the end of the pipeline.
Any information can be stored in this file, as long as it is in JSON format,
but there are a couple of recommendations that are necessary to follow
for them to be processed by a reporting web app (Currently hosted at
`report-nf <https://github.com/ODiogoSilva/report-nf>`_). However, if
`flowcraft-webapp <https://github.com/assemblerflow/flowcraft-webapp>`_). However, if
data processing will be performed with custom scripts, feel free to specify
your own format.

Expand All @@ -63,33 +70,53 @@ Information meant to be displayed in tables should be in the following
format::

json_dic = {
"tableRow": [
{"header": "Raw BP",
"value": chars,
"table": "assembly",
"columnBar": True},
"tableRow": [{
"sample": "A",
"data": [{
"header": "Raw BP",
"value": 123,
"table": "qc"
}, {
"header": "Coverage",
"value": 32,
"table": "qc"
}]
}, {
"sample": "B",
"data": [{
"header": "Coverage",
"value": 35,
"table": "qc"
}]
}]
}

This means that the ``chars`` variable that is created during the execution
of the process should appear as a table entry with the specified ``header``
and ``value``. The ``table`` key specifies in which table of the reports
it will appear and the ``columnBar`` key informs the report generator to
create a bar column in that particular cell.
This provides table information for multiple samples in the same process. In
this case, data for two samples is provided. For each sample, values for
one or more headers can be provided. For instance, this report provides
information about the **Raw BP** and **Coverage** for sample **A** and this
information should go to the **qc** table. If any other information is relevant
to build the table, feel free to add more elements to the JSON.

Information for plots
^^^^^^^^^^^^^^^^^^^^^

Information meant to be displayed in plots should be in the following format::

json_dic = {
"plotData": {
"size_dist": size_dist
}
"plotData": [{
"sample": "strainA",
"data": {
"sparkline": 23123,
"otherplot": [1,2,3]
}
}],
}

This is a simple key:value pair, where the key is the ID of the plot in the
reports and the ``size_dist`` contains the plot data that was gathered
for a particular process.
As in the table JSON, *plotData* should be an array with an entry for each
sample. The data for each sample should be another JSON where the keys are
the *plot signatures*, so that we know to which plot the data belongs. The
corresponding values are whatever data object you need.

Other information
^^^^^^^^^^^^^^^^^
Expand All @@ -99,6 +126,8 @@ is not particular format for other information. They will simply store the
data of interest to report and it will be the job of a downstream report app
to process that data into an actual visual report.

.. _versions:

Versions
--------

Expand Down
Loading