Molmed / checkQC

CheckQC inspects the content of an Illumina runfolder and determines if it passes a set of quality criteria
http://checkqc.readthedocs.io/
GNU General Public License v3.0
25 stars 16 forks source link

Adding json mode #28

Closed johandahlberg closed 7 years ago

johandahlberg commented 7 years ago

This adds a new mode json mode to CheckQC. When this flag is used it will print the reports as json to stdout. This is useful to pass the results to other programs, and will make it easier to add webservice capabilities to CheckQC in the future.

Here is an example of that this will look like:

$ checkqc --json tests/resources/170726_D00118_0303_BCB1TVANXX/ 2> /dev/null | python -m json.tool
{
    "ClusterPFHandler": [
        {
            "type": "warning",
            "message": "Cluster PF was to low on lane 1, it was: 117.93 M",
            "data": {
                "lane": 1,
                "lane_pf": 117929896,
                "threshold": "unknown"
            }
        },
        {
            "type": "warning",
            "message": "Cluster PF was to low on lane 7, it was: 122.26 M",
            "data": {
                "lane": 7,
                "lane_pf": 122263375,
                "threshold": "unknown"
            }
        },
        {
            "type": "warning",
            "message": "Cluster PF was to low on lane 8, it was: 177.02 M",
            "data": {
                "lane": 8,
                "lane_pf": 177018999,
                "threshold": "unknown"
            }
        }
    ],
    "ReadsPerSampleHandler": [
        {
            "type": "warning",
            "message": "Number of reads for sample Sample_pq-27 was too low on lane 7, it was: 6.893 M",
            "data": {
                "lane": 7,
                "number_of_samples": 12,
                "sample_id": "Sample_pq-27",
                "sample_reads": 6.893002,
                "threshold": 90
            }
        },
        {
            "type": "warning",
            "message": "Number of reads for sample Sample_pq-28 was too low on lane 7, it was: 7.104 M",
            "data": {
                "lane": 7,
                "number_of_samples": 12,
                "sample_id": "Sample_pq-28",
                "sample_reads": 7.10447,
                "threshold": 90
            }
        }
    ]
}
codecov[bot] commented 7 years ago

Codecov Report

Merging #28 into master will increase coverage by 0.03%. The diff coverage is 93.54%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #28      +/-   ##
==========================================
+ Coverage   93.34%   93.38%   +0.03%     
==========================================
  Files          16       16              
  Lines         526      544      +18     
==========================================
+ Hits          491      508      +17     
- Misses         35       36       +1
Impacted Files Coverage Δ
checkQC/handlers/yield_handler.py 90.9% <100%> (ø) :arrow_up:
checkQC/qc_engine.py 100% <100%> (ø) :arrow_up:
checkQC/handlers/reads_per_sample_handler.py 96.15% <100%> (ø) :arrow_up:
checkQC/handlers/error_rate_handler.py 87.87% <100%> (ø) :arrow_up:
checkQC/handlers/cluster_pf_handler.py 95.45% <100%> (ø) :arrow_up:
checkQC/handlers/q30_handler.py 95.45% <100%> (ø) :arrow_up:
...heckQC/handlers/undetermined_percentage_handler.py 95.83% <100%> (ø) :arrow_up:
checkQC/app.py 88.37% <87.5%> (+1.52%) :arrow_up:
checkQC/handlers/qc_handler.py 90.78% <90%> (-0.39%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update fa58c18...4608022. Read the comment docs.