Skip to content

[BUG] Type Error loading Mutational Signatures tab #12236

Description

@obsidian0815

Describe the bug

When loading the Mutational Signatures tab in the Patient View for a locally imported study, the page crashes with a JavaScript TypeError. The data is correctly imported and accessible via the API, but the frontend fails to render it.

TypeError: can't access property "name", r.props.data[r.props.version][0].meta is undefined

To Reproduce

  1. Import a study with mutational signature data using the following meta file configuration:
cancer_study_identifier: <study_id>
genetic_alteration_type: GENERIC_ASSAY
generic_assay_type: MUTATIONAL_SIGNATURE
datatype: LIMIT-VALUE
stable_id: contributions_SBS
profile_name: SBS Mutational Signature Contributions
profile_description: SBS contribution scores from SigProfilerAssignment
data_filename: data_mutational_signature_contribution_SBS.txt
show_profile_in_analysis_tab: false
pivot_threshold_value: 0.05
value_sort_order: DESC
generic_entity_meta_properties: NAME,DESCRIPTION,URL

With a data file in this format:

ENTITY_STABLE_ID	NAME	DESCRIPTION	URL	<SAMPLE_ID>
SBS1	SBS1	COSMIC mutational signature SBS1	https://cancer.sanger.ac.uk/signatures/sbs/sbs1/	6.57
SBS30	SBS30	COSMIC mutational signature SBS30	https://cancer.sanger.ac.uk/signatures/sbs/sbs30/	0
  1. Navigate to the Patient View of a sample in that study.
  2. Click the Mutational Signatures tab.
  3. See error: TypeError: can't access property "name", r.props.data[r.props.version][0].meta is undefined

Expected behavior

The mutational signature bar chart is displayed correctly for the sample.

Screenshots

N/A

Additional context

  • cBioPortal version: v6.4.1
  • Deployment: local instance

The data is correctly stored in the database. API investigation:

GET /api/generic-assay-meta/MUTATIONAL_SIGNATURE?projection=SUMMARY → returns []

GET /api/generic-assay-meta/<studyId>_contributions_SBS?projection=SUMMARY → returns correct entities with NAME, DESCRIPTION, URL

POST /api/generic_assay_data/fetch with body:

{
  "sampleMolecularIdentifiers": [
    { "molecularProfileId": "<studyId>_contributions_SBS", "sampleId": "<sampleId>" },
    { "molecularProfileId": "<studyId>_pvalues_SBS",       "sampleId": "<sampleId>" },
    { "molecularProfileId": "<studyId>_ci_width_SBS",      "sampleId": "<sampleId>" }
  ]
}

→ returns correct data for all three profiles

The /api/generic-assay-meta/MUTATIONAL_SIGNATURE endpoint returning [] may be the root cause — the frontend may rely on this endpoint to populate .meta before rendering.

Additionally, datatype: P-VALUE, documented as valid for mutational signature p-value files, is rejected by the importer with Could not determine the file type. Only LIMIT-VALUE is accepted by the importer, which may be a related inconsistency.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtriagetickets that need to be looked at before assigning to team members

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions