Skip to content

isoseq module: refine JSON table renders empty - expects flat keys, actual pbreports format nests them in 'attributes' #3673

Done

Description

@mahesh-panchal

Description

The isoseq module's _add_refine_table (multiqc/modules/isoseq/isoseq.py) expects isoseq refine's *.filter_summary.report.json to have the read-count metrics as flat top-level keys:

headers = {
    "num_reads_fl": {...},
    "num_reads_flnc": {...},
    "num_reads_flnc_polya": {...},
}

and the module simply does json.load(f["f"]) and hands the whole dict straight to table.plot(), keyed by those names.

But the actual JSON isoseq refine produces is PacBio's pbreports report format, where those same three metrics are nested inside an attributes list of {id, name, value} objects, not top-level keys, e.g.:

{
  "_comment": "Created by pbcopper v26.2.0",
  "attributes": [
    {"id": "sample_name", "name": "Sample Name", "value": "pr_290_001"},
    {"id": "num_reads_fl", "name": "Full-Length Reads", "value": 2525656},
    {"id": "num_reads_flnc", "name": "Full-Length Non-Chimeric Reads", "value": 2524329},
    {"id": "num_reads_flnc_polya", "name": "Full-Length Non-Chimeric Reads with Poly-A Tail", "value": 2343591}
  ],
  "dataset_uuids": [],
  "id": "isoseq_refine",
  "plotGroups": [],
  "tables": [],
  "title": "Iso-Seq Refine Report",
  "uuid": "32da46bc-d122-4452-9025-e9126b4daa61",
  "version": "1.0.1"
}

MultiQC finds and content-matches the file correctly (its search pattern for isoseq/refine-json looks for the literal substring "num_reads_fl", which is present as an attributes[].id value), but since that key never exists at the top level of the loaded dict, the resulting "CCS statistics" table renders with headers and no data for any sample:

[DEBUG] multiqc.plots.table_object: Table key 'num_reads_fl' not found in data for 'isoseq_refine_bargraph'. Skipping. Check for possible typos between data keys and header keys
[DEBUG] multiqc.plots.table_object: Table key 'num_reads_flnc' not found in data for 'isoseq_refine_bargraph'. Skipping. Check for possible typos between data keys and header keys
[DEBUG] multiqc.plots.table_object: Table key 'num_reads_flnc_polya' not found in data for 'isoseq_refine_bargraph'. Skipping. Check for possible typos between data keys and header keys

Steps to reproduce

  1. Run isoseq refine (tested with isoseq 26.2.0) on any input - it produces a <prefix>.filter_summary.report.json in the nested attributes-list format shown above.
  2. Run multiqc . (tested with MultiQC 1.35, community.wave.seqera.io/library/multiqc:1.35--c17fb751507e9dfc) over a directory containing that file.
  3. Open the report - the "Iso-Seq" > "CCS statistics" table shows the three expected columns (Full-length, Non-chimeric full-length, Poly(A)-free non-chimeric full-length) but with no values for any sample.

Expected behavior

The module should read the metrics out of the attributes list (matching each entry's id field) rather than assuming they're top-level keys, so the CCS statistics table is actually populated.

MultiQC version

1.35 (community.wave.seqera.io/library/multiqc:1.35--c17fb751507e9dfc)

Command used and terminal output

multiqc --force <args> .

(No error - the module runs cleanly and reports "Found 1 refine reports"; the table is just empty. See DEBUG log snippet above, from multiqc.log with -v.)

Any other relevant information

Found while wiring isoseq refine output into a Nextflow pipeline's MultiQC report (real PacBio Iso-Seq data, not synthetic). Happy to attach a real (anonymized) *.filter_summary.report.json if useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions