{
  "generatedAt": "2026-05-24T02:17:35.564Z",
  "generator": {
    "name": "documentation.js",
    "version": "^14.0.3"
  },
  "package": {
    "name": "msig",
    "version": "0.3.0",
    "description": "Browser-first JavaScript SDK for mutational signature analysis with mSigPortal data, plotting, and researcher workflow helpers.",
    "homepage": "https://episphere.github.io/msig/"
  },
  "importSnippet": "const { mSigSDK } = await import(\n  \"https://episphere.github.io/msig/main.js\"\n);",
  "sourceFiles": [
    "main.js",
    "mSigSDKScripts/mSigPortalAPIs.js",
    "mSigSDKScripts/tcga.js",
    "mSigSDKScripts/utils.js",
    "mSigSDKScripts/machineLearning.js",
    "mSigSDKScripts/mutationalSpectrum.js",
    "mSigSDKScripts/userData.js",
    "mSigSDKScripts/validation.js",
    "mSigSDKScripts/qc.js",
    "mSigSDKScripts/signatureExtraction.js",
    "mSigSDKScripts/io.js",
    "mSigSDKScripts/reports.js",
    "mSigSDKScripts/workflows.js",
    "mSigSDKScripts/guidance.js",
    "mSigSDKScripts/presentation.js",
    "mSigSDKScripts/runners.js",
    "mSigSDKScripts/adapters.js"
  ],
  "stats": {
    "namespaces": 21,
    "functions": 144,
    "asyncFunctions": 61,
    "functionsWithExamples": 22
  },
  "namespaces": [
    {
      "name": "mSigPortal",
      "label": "mSigPortal",
      "summary": "mSigPortal project, sample, signature, exposure, matrix, and plot helpers.",
      "functions": [
        {
          "name": "extractMutationalSpectra",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalData",
          "description": "Extracts the mutational spectra out of the mSigPortal API call.",
          "params": [
            {
              "name": "data",
              "type": "Array<Object>",
              "default": null,
              "description": "An array of objects containing the data from the mSigPortal API call.",
              "properties": []
            },
            {
              "name": "groupName",
              "type": "string",
              "default": "\"sample\"",
              "description": "The name of the group to extract the mutational spectra from.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "An object containing the mutational spectra data grouped by the specified group name."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3011
          }
        },
        {
          "name": "formatMutationalSpectraData",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalData",
          "description": "Converts the mutational spectra data to a format that can be used to create a Plotly chart.",
          "params": [
            {
              "name": "mutationalSpectrum",
              "type": "Object",
              "default": null,
              "description": "An object containing the mutational spectra data.",
              "properties": []
            },
            {
              "name": "sample",
              "type": "string",
              "default": null,
              "description": "The name of the sample.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "The data in a format that can be used to create a Plotly chart. The data is an array of objects. Each object has a name, x, y, and type property. The name property is the name of the mutation type. The x property is an array of the mutation names. The y property is an array of the mutation frequencies. The type property is the type of substitution that takes place."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 2938
          }
        },
        {
          "name": "getMutationalSignatureActivityData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves mutational signature landscape data from the mutational-signatures API.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study. Default value is \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data. Default value is \"WGS\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"\"",
              "description": "The name of the cancer type. Default value is an empty string.",
              "properties": []
            },
            {
              "name": "signatureSetName",
              "type": "string",
              "default": "\"COSMIC_v3_Signatures_GRCh37_SBS96\"",
              "description": "The name of the signature set. Default value is \"COSMIC_v3_Signatures_GRCh37_SBS96\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The maximum number of results to be returned. Default value is 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A Promise that resolves to the JSON data of the mutational signature landscape."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 312
          }
        },
        {
          "name": "getMutationalSignatureActivityOptions",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves a list of mutational signature activity options from the mutational signatures API.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study to retrieve mutational signature activity options for. Defaults to \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The genome data type to retrieve mutational signature activity options for. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to retrieve. Defaults to 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Array>",
              "description": "A promise that resolves with an array of mutational signature activity options."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 289
          }
        },
        {
          "name": "getMutationalSignatureAssociationData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves mutational signature association data from a specified cancer study using the provided parameters.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the cancer study. Default is \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data used. Default is \"WGS\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Biliary-AdenoCA\"",
              "description": "The type of cancer. Default is \"Biliary-AdenoCA\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The maximum number of results to return. Default is 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<object>",
              "description": "A Promise that resolves to the JSON response containing the mutational signature association data."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 263
          }
        },
        {
          "name": "getMutationalSignatureAssociationOptions",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Fetches the mutational signature association options from the API endpoint",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study. Defaults to \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to return. Defaults to 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Array>",
              "description": "A Promise that resolves to an array of mutational signature association options."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 240
          }
        },
        {
          "name": "getMutationalSignatureEtiologyData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves mutational signature etiology data from the Cancer Genomics Research Laboratory (CGR) website.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The study name. Default is \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The genome data type. Default is \"WGS\".",
              "properties": []
            },
            {
              "name": "signatureName",
              "type": "string",
              "default": "\"SBS3\"",
              "description": "The signature name. Default is \"SBS3\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"\"",
              "description": "The cancer type. Default is an empty string.",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to return. Default is 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise",
              "description": "A promise that resolves to the mutational signature etiology data in JSON format."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 427
          }
        },
        {
          "name": "getMutationalSignatureEtiologyOptions",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves the etiology options for a given mutational signature from the Cancer.gov Mutational Signatures API.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study to retrieve etiology options for. Defaults to \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data to retrieve etiology options for. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "signatureName",
              "type": "string",
              "default": "\"SBS3\"",
              "description": "The name of the mutational signature to retrieve etiology options for. Defaults to \"SBS3\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"\"",
              "description": "The cancer type to retrieve etiology options for. Defaults to an empty string.",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The maximum number of results to return. Defaults to 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A promise that resolves to an object representing the etiology options for the specified mutational signature. The object will have the following properties: etiology: An array of strings representing the possible etiologies for the mutational signature. etiology_display: An array of strings representing the display names for the possible etiologies. signatureName: The name of the mutational signature. study: The name of the study. genome_data_type: The type of genome data. cancer_type: The cancer type."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 384
          }
        },
        {
          "name": "getMutationalSignatureLandscapeData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves mutational signature landscape data from an API endpoint.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The study to retrieve data from.",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genomic data used in the study.",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"\"",
              "description": "The type of cancer to retrieve data for.",
              "properties": []
            },
            {
              "name": "signatureSetName",
              "type": "string",
              "default": "\"COSMIC_v3_Signatures_GRCh37_SBS96\"",
              "description": "The name of the mutational signature set to retrieve.",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to retrieve.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<object>",
              "description": "A promise that resolves to an object containing the mutational signature landscape data."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 343
          }
        },
        {
          "name": "getMutationalSignaturesData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "",
          "params": [
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data to use. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "signatureSetName",
              "type": "string",
              "default": "\"COSMIC_v3_Signatures_GRCh37_SBS96\"",
              "description": "The name of the signature set to use. Defaults to \"COSMIC_v3_Signatures_GRCh37_SBS96\".",
              "properties": []
            },
            {
              "name": "mutationType",
              "type": "string",
              "default": "\"SBS\"",
              "description": "The type of mutation to analyze. Defaults to \"SBS\".",
              "properties": []
            },
            {
              "name": "matrix",
              "type": "number",
              "default": "96",
              "description": "The size of the mutational signature matrix. Defaults to 96.",
              "properties": []
            },
            {
              "name": "numberofResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to retrieve. Defaults to 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A Promise that resolves to the unformatted mutational signatures data as JSON."
            }
          ],
          "examples": [
            "const mutationalSignatures = await getMutationalSignaturesData(\"WGS\", \"COSMIC_v3_Signatures_GRCh37_SBS96\", \"SBS\", 96, 10);\r\nconsole.log(mutationalSignatures);"
          ],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 47
          }
        },
        {
          "name": "getMutationalSignaturesOptions",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves the mutational signature options from the specified API endpoint.",
          "params": [
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The genome data type to use. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "mutationType",
              "type": "string",
              "default": "\"SBS\"",
              "description": "The mutation type to use. Defaults to \"SBS\".",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise",
              "description": "A Promise that resolves to the mutational signature options in JSON format."
            }
          ],
          "examples": [
            "const mutationalSignatures = await getMutationalSignaturesOptions(\"WGS\", \"SBS\");\r\nconsole.log(mutationalSignatures);"
          ],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 19
          }
        },
        {
          "name": "getMutationalSignaturesSummary",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Returns a summary of mutational signatures based on the provided signature set name and number of results.",
          "params": [
            {
              "name": "numberofResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to retrieve. Defaults to 10 if not provided.",
              "properties": []
            },
            {
              "name": "signatureSetName",
              "type": "string",
              "default": "\"COSMIC_v3.3_Signatures\"",
              "description": "The name of the signature set to retrieve. Defaults to \"COSMIC_v3.3_Signatures\" if not provided.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A Promise that resolves to an object representing the mutational signature summary."
            }
          ],
          "examples": [
            "const summary = await getMutationalSignaturesSummary(20, \"COSMIC_v3.3_Signatures\");\r\nconsole.log(summary);"
          ],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 80
          }
        },
        {
          "name": "getMutationalSpectrumData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Fetches mutational spectrum data from the Cancer Genomics Data Server API and returns it in a formatted way.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The study identifier.",
              "properties": []
            },
            {
              "name": "samples",
              "type": "Array<string> | null",
              "default": "null",
              "description": "The sample identifier(s) to query data for.",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The genome data type identifier.",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The cancer type identifier.",
              "properties": []
            },
            {
              "name": "mutationType",
              "type": "string",
              "default": "\"SBS\"",
              "description": "The mutation type identifier.",
              "properties": []
            },
            {
              "name": "matrixSize",
              "type": "number",
              "default": "96",
              "description": "The size of the mutational spectrum matrix.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise",
              "description": "A promise that resolves to the formatted mutational spectrum data."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 130
          }
        },
        {
          "name": "getMutationalSpectrumOptions",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Retrieves mutational spectrum options from the mutational signatures API.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study to retrieve options for. Defaults to \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The genome data type to retrieve options for. Defaults to \"WGS\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The cancer type to retrieve options for. Defaults to \"Lung-AdenoCA\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to retrieve. Defaults to 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A Promise that resolves to the JSON response from the mutational signatures API."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 105
          }
        },
        {
          "name": "getMutationalSpectrumSummary",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalData",
          "description": "Fetches the mutational spectrum summary from the mutational signatures API based on the given parameters.",
          "params": [
            {
              "name": "study",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the cancer genome study. Default is \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genomic data used. Default is \"WGS\".",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The type of cancer. Default is \"Lung-AdenoCA\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "10",
              "description": "The number of results to be returned. Default is 10.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise",
              "description": "A Promise that resolves to a JSON object representing the mutational spectrum summary."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mSigPortalAPIs.js",
            "line": 212
          }
        },
        {
          "name": "MsAssociation",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Calculates the association between two mutational signatures across a set of samples. It computes the linear regression, Pearson correlation, and Spearman correlation between the log-transformed exposures of the two signatures. The results are used to generate a scatter plot with marginal histograms, visualizing the relationship between the signatures.",
          "params": [
            {
              "name": "data",
              "type": "Array<object>",
              "default": null,
              "description": "An array of objects representing the exposure data for a set of samples. Each object in the array should have the following properties:sample: A string representing the sample ID.signatureName: A string representing the name of the mutational signature.exposure: A numeric value representing the exposure of the signature in the sample. This value can theoretically range from 0 to infinity, although in practice, values are often normalized.",
              "properties": []
            },
            {
              "name": "signatureName1",
              "type": "string",
              "default": null,
              "description": "The name of the first mutational signature. This should match the signatureName values in the data array.",
              "properties": []
            },
            {
              "name": "signatureName2",
              "type": "string",
              "default": null,
              "description": "The name of the second mutational signature. This should also match the signatureName values in the data array. It can be the same as signatureName1.",
              "properties": []
            },
            {
              "name": "both",
              "type": "boolean",
              "default": "false",
              "description": "A boolean flag indicating whether to filter the data to include only samples where both signatures have non-zero exposure.true: Only samples with non-zero exposure to both signatures are included in the analysis. If signatureName1 and signatureName2 are the same, then no filtering occurs.false: All samples are included in the analysis, regardless of whether they have non-zero exposure to both signatures.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns an object containing the traces and layout for a Plotly plot.traces: An array of trace objects to be used in a Plotly plot. This includes the main scatter plot trace, the linear regression line trace, and two marginal histogram traces.layout: An object containing the layout configuration for a Plotly plot, including title, axis labels, annotations, and other visual properties."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3994
          }
        },
        {
          "name": "MSPrevalence",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Calculates and visualizes the prevalence of mutational signatures across a set of samples, grouped by cancer type. The function generates two plots: a pie chart showing the overall prevalence of each signature based on total mutations (exposure) and a bar chart displaying the frequency of each signature across samples, considering a minimum exposure threshold.",
          "params": [
            {
              "name": "data",
              "type": "object",
              "default": null,
              "description": "An object representing the mutational signature prevalence data. The data object is expected to be an array of objects with the following structure: [{ signatureName: \"SBS1\", sample: \"sample1\", exposure: 10, burden: 5 }, { signatureName: \"SBS5\", sample: \"sample1\", exposure: 20, burden: 5 }, ... ] Where signatureName is the name of a mutational signature (string), sample is a sample identifier (string), exposure is a non-negative number representing the exposure of that signature in the sample (can be 0), and burden is a numeric value representing the mutational burden for the sample (must be a number).",
              "properties": []
            },
            {
              "name": "minimum",
              "type": "number | null | undefined",
              "default": null,
              "description": "The minimum exposure value for a signature in a sample to be considered prevalent in that sample. Samples with exposure below this threshold are not counted in the frequency calculation for the bar chart. If minimum is null or undefined, it defaults to 100.null or undefined: Sets the minimum exposure to 100.Any positive number: Sets the minimum exposure to that number.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Returns an object containing the traces and layout for a Plotly plot.traces: An array of trace objects. If the maximum frequency of signatures (considering the minimum threshold) is less than 1%, the array contains only a single pie chart trace. Otherwise, it contains a pie chart trace followed by multiple bar chart traces (one for each signature).layout: An object defining the layout of the plot, including title annotations, axis settings, and overall appearance. It includes conditional logic to handle cases where no signature has a frequency greater than 1%."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 4034
          }
        },
        {
          "name": "plotCosineSimilarityHeatMap",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a cosine similarity heatmap based on mutational spectra data. This function processes grouped mutational data to compute cosine similarities, optionally performs double clustering to reorder the data, and then visualizes the similarities using a Plotly heatmap. It also supports displaying a table representation of the cosine similarity matrix alongside the heatmap.",
          "params": [
            {
              "name": "groupedData",
              "type": "Object",
              "default": null,
              "description": "The input data object where keys represent sample names and values are objects representing mutational spectra. The mutational spectra should be represented as key-value pairs where keys are mutation types and values are counts or frequencies. Example:{ 'Sample1': {'C>A': 10, 'C>G': 15, 'C>T': 20, ...}, 'Sample2': {'C>A': 5, 'C>G': 8, 'C>T': 12, ...}, ... }The range of keys (mutation types) should be consistent across all samples. The values (counts or frequencies) can be integers or floats, and their range can vary based on the underlying data, but typically they are non-negative.",
              "properties": []
            },
            {
              "name": "studyName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study. This is used in the title of the heatmap. Common values include study identifiers like \"PCAWG\", \"TCGA\", or specific project names. The parameter should be a string and can technically accept any string value, but it is intended to represent the name of a study or dataset.",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genomic data. This is also used in the title of the heatmap. Expected values typically include abbreviations for common genomic data types such as \"WGS\" (Whole Genome Sequencing), \"WES\" (Whole Exome Sequencing), \"RNA-Seq\", etc. Similar to studyName, any string is technically accepted, but the intended use is to describe the data type.",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The type of cancer. This is included in the title of the heatmap. Common values are standard cancer type abbreviations or names, like \"Lung-AdenoCA\" (Lung Adenocarcinoma), \"BRCA\" (Breast Invasive Carcinoma), etc. Any string value is accepted, but it should represent a specific cancer type.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string | HTMLElement",
              "default": "\"cosineSimilarityHeatMap\"",
              "description": "The target element or target element ID where the heatmap will be rendered. If an element with this ID does not exist, a detached element will be created and returned. Observable notebooks can render that returned element in the current cell.",
              "properties": []
            },
            {
              "name": "conductDoubleClustering",
              "type": "boolean",
              "default": "true",
              "description": "A flag indicating whether to perform double clustering (hierarchical clustering on both rows and columns) on the cosine similarity matrix. If true, the rows and columns of the heatmap will be reordered based on the clustering. If false, the order of samples in groupedData will be maintained. Boolean values true or false are expected.",
              "properties": []
            },
            {
              "name": "colorscale",
              "type": "string",
              "default": "\"RdBu\"",
              "description": "The Plotly colorscale to use for the heatmap. This can be any valid Plotly colorscale name (e.g., \"Viridis\", \"Greys\", \"YlGnBu\", \"RdBu\"). Plotly provides a wide range of predefined colorscales. The chosen colorscale will affect the visual representation of the similarity values. Any string is accepted but it should correspond to a valid Plotly colorscale for optimal results.",
              "properties": []
            },
            {
              "name": "showTable",
              "type": "boolean",
              "default": "false",
              "description": "A flag indicating whether to display a table representation of the cosine similarity matrix alongside the heatmap. If true, a table will be rendered next to the heatmap. If false, only the heatmap will be displayed. Boolean values true or false are expected.",
              "properties": []
            }
          ],
          "returns": [],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3133
          }
        },
        {
          "name": "plotDatasetMutationalSignaturesExposure",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a heatmap visualizing the exposure of multiple samples to a set of mutational signatures within a dataset. The function provides options for displaying relative or absolute exposure values and for performing double hierarchical clustering to reorder the rows and columns of the heatmap. It also allows customization of the color scale used to represent exposure values.",
          "params": [
            {
              "name": "exposureData",
              "type": "object",
              "default": null,
              "description": "An object containing the exposure data for a set of samples. The structure of exposureData is expected to be: { sampleId1: { signatureName1: exposureValue1, signatureName2: exposureValue2, ..., rnorm: number }, sampleId2: { signatureName1: exposureValue3, signatureName2: exposureValue4, ..., rnorm: number }, ... } The outer keys (e.g., sampleId1, sampleId2) are sample identifiers (strings). The inner objects (e.g., { signatureName1: exposureValue1, ... }) represent the exposure values for a given sample. signatureName keys are strings representing the names of mutational signatures (e.g., \"SBS1\", \"SBS5\"), and exposureValue are non-negative numbers representing the contribution of that signature to the sample. rnorm is a number that will be removed from the data before plotting.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the heatmap will be rendered.",
              "properties": []
            },
            {
              "name": "relative",
              "type": "boolean",
              "default": "true",
              "description": "A boolean indicating whether to display relative or absolute exposure values.true: The exposure values for each sample are normalized to sum to 1, representing the relative contribution of each signature.false: The raw exposure values are displayed.",
              "properties": []
            },
            {
              "name": "datasetName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the dataset being visualized. This is used as part of the plot title. Examples include:\"PCAWG\"\"TCGA\"Any other string that appropriately identifies the dataset.",
              "properties": []
            },
            {
              "name": "doubleCluster",
              "type": "boolean",
              "default": "true",
              "description": "A boolean indicating whether to perform double hierarchical clustering on the exposure data.true: The rows and columns of the heatmap are reordered based on the results of double clustering, which groups similar samples and signatures together.false: The rows and columns are displayed in the order they appear in the input exposureData.",
              "properties": []
            },
            {
              "name": "colorscale",
              "type": "string | Array",
              "default": "\"Custom\"",
              "description": "The color scale to use for the heatmap. Possible values are:\"Custom\": A predefined custom color scale designed for visualizing exposure data.Any valid Plotly color scale name (e.g., \"Viridis\", \"Blues\", \"Hot\", etc.).An array of arrays defining a custom color scale, where each inner array specifies a color stop with a value between 0 and 1 and a corresponding RGB color string (e.g., [[\"0.0\", \"rgb(49,54,149)\"], [\"1.0\", \"rgb(165,0,38)\"]]).",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the data object used by Plotly to generate the heatmap. This object contains the z values (exposure values), x values (signature names), y values (sample names), and other settings for the heatmap, including the color scale. The structure is: { z: [[exposureValue1, exposureValue2, ...], [exposureValue3, exposureValue4, ...], ...], x: [signatureName1, signatureName2, ...], y: [sampleId1, sampleId2, ...], type: \"heatmap\", colorscale: colorscale }"
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3868
          }
        },
        {
          "name": "plotForceDirectedTree",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "This function generates and displays a force-directed tree representing the relationships between patients in a study based on their mutational spectra. It calculates the cosine similarity between the mutational spectra of patients, performs hierarchical clustering based on these similarities, and then visualizes the resulting clusters as a force-directed tree.",
          "params": [
            {
              "name": "groupedData",
              "type": "object",
              "default": null,
              "description": "An object where keys represent sample IDs and values are objects containing mutational spectra data. The structure of groupedData is expected to be: { sampleId1: { mutationType1: count1, mutationType2: count2, ... }, sampleId2: { mutationType1: count3, mutationType2: count4, ... }, ... } The inner objects (e.g., { mutationType1: count1, ... }) represent the mutational spectrum for a given sample. mutationType keys can be any string representing a type of mutation (e.g., \"C>A\", \"T>G\"), and count values are non-negative integers representing the number of times that mutation type is observed in the sample.",
              "properties": []
            },
            {
              "name": "studyName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the study. This is used for labeling purposes in the visualization. Common values include, but are not limited to:\"PCAWG\"\"TCGA\"Any other string representing a specific study.",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genome data used. This is also used for labeling purposes. Possible values include:\"WGS\": Whole Genome Sequencing\"WES\": Whole Exome Sequencing\"RNA-Seq\": RNA Sequencing",
              "properties": []
            },
            {
              "name": "cancerType",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The type of cancer being studied. This is used for labeling in the visualization. Examples include:\"Lung-AdenoCA\": Lung Adenocarcinoma\"Breast-AdenoCA\": Breast AdenocarcinomaAny valid cancer type identifier.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": "\"forceDirectedTree\"",
              "description": "The ID of the HTML div element where the force-directed tree will be rendered.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the formatted hierarchical clusters used to generate the force-directed tree. The structure of this object is compatible with the AM5 charting library and represents the hierarchical relationships between samples based on their mutational spectra. The format is a nested object where each level represents a node in the tree. Each node can have properties such as name, value, children (an array of child nodes), and potentially others added during formatting."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3375
          }
        },
        {
          "name": "plotMSPrevalenceData",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "This function is a wrapper around the plotMSPrevalence function. It takes the output of plotMSPrevalence and uses it to generate a Plotly plot, which is then displayed in a specified div. The plot visualizes the prevalence of mutational signatures.",
          "params": [
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the div element where the plot will be rendered.",
              "properties": []
            },
            {
              "name": "data",
              "type": "object",
              "default": null,
              "description": "An object representing the mutational signature prevalence data. The data object is expected to be an array of objects with the following structure: [{ signatureName: \"SBS1\", sample: \"sample1\", exposure: 10, burden: 5 }, { signatureName: \"SBS5\", sample: \"sample1\", exposure: 20, burden: 5 }, ... ] Where signatureName is the name of a mutational signature (string), sample is a sample identifier (string), exposure is a non-negative number representing the exposure of that signature in the sample, and burden is a numeric value representing the mutational burden for the sample.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "void",
              "description": "This function does not return a value. It directly renders the plot in the specified divID."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 4034
          }
        },
        {
          "name": "plotPatientMutationalSignaturesExposure",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a pie chart visualizing the exposure of a single sample to a set of mutational signatures. The function takes exposure data, which includes the relative contribution of each signature to the sample's mutational profile, and displays it in a pie chart format.",
          "params": [
            {
              "name": "exposureData",
              "type": "object",
              "default": null,
              "description": "An object containing exposure data for either a set of samples or a single sample. The structure of exposureData can be: { sampleId1: { signatureName1: exposureValue1, signatureName2: exposureValue2, ... }, sampleId2: { signatureName1: exposureValue3, signatureName2: exposureValue4, ... }, ... } or a single sample object: { signatureName1: exposureValue1, signatureName2: exposureValue2, ... }. The outer keys (e.g., sampleId1, sampleId2) are sample identifiers (strings). The inner objects (e.g., { signatureName1: exposureValue1, ... }) represent the exposure values for a given sample. signatureName keys are strings representing the names of mutational signatures (e.g., \"SBS1\", \"SBS5\"), and exposureValue are non-negative numbers representing the contribution of that signature to the sample. These values typically sum to 1 for each sample. The exposureData object can contain multiple samples, but only the data for the specified sample will be used for plotting. Each sample may also have an optional rnorm property which is a number.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the pie chart will be rendered.",
              "properties": []
            },
            {
              "name": "sample",
              "type": "string",
              "default": null,
              "description": "The ID of the sample for which to plot the mutational signature exposure. This should be one of the keys in the exposureData object (e.g., \"sampleId1\", \"sampleId2\").",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the data object used by Plotly to generate the pie chart. This object contains the labels (signature names), values (exposure values), and other settings for the pie chart. The format is: { labels: [signatureName1, signatureName2, ...], values: [exposureValue1, exposureValue2, ...], name: \"sample exposure values\", textposition: \"inside\", hole: 0.4, hoverinfo: \"name + value\", type: \"pie\" }"
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3742
          }
        },
        {
          "name": "plotPatientMutationalSpectrum",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Renders a plot of mutational profiles in a given div element ID.",
          "params": [
            {
              "name": "mutationalSpectra",
              "type": "Object",
              "default": null,
              "description": "An object containing the mutational spectra data for one or more patients.",
              "properties": []
            },
            {
              "name": "matrixSize",
              "type": "number",
              "default": "96",
              "description": "The size of the plot matrix. Defaults to 96.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": "'mutationalSpectrumMatrix'",
              "description": "The ID of the div element to render the plot in. Defaults to 'mutationalSpectrumMatrix'.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<void>",
              "description": "A promise that resolves when the plot has been rendered."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 2837
          }
        },
        {
          "name": "plotPatientMutationalSpectrumuserData",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Plots the mutational spectrum for the given parameters.",
          "params": [
            {
              "name": "mutationalSpectra",
              "type": "Object",
              "default": null,
              "description": "An object containing the mutational spectra data.",
              "properties": []
            },
            {
              "name": "matrixSize",
              "type": "number",
              "default": "96",
              "description": "The size of the matrix to be plotted.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": "\"mutationalSpectrumMatrix\"",
              "description": "The ID of the div element where the plot will be displayed.",
              "properties": []
            }
          ],
          "returns": [],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 2753
          }
        },
        {
          "name": "plotProfilerSummary",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a mutational spectrum summary plot and displays it in a given HTML div element.",
          "params": [
            {
              "name": "studyName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the cancer genomics study to use. Default is \"PCAWG\".",
              "properties": []
            },
            {
              "name": "genomeDataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The type of genomic data to use. Default is \"WGS\".",
              "properties": []
            },
            {
              "name": "cancerTypeOrGroup",
              "type": "string",
              "default": "\"Lung-AdenoCA\"",
              "description": "The cancer type or group to display. Default is \"Lung-AdenoCA\".",
              "properties": []
            },
            {
              "name": "numberOfResults",
              "type": "number",
              "default": "50",
              "description": "The maximum number of results to display. Default is 50.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": "\"mutationalSpectrumSummary\"",
              "description": "The ID of the HTML div element where the plot will be displayed. Default is \"mutationalSpectrumSummary\".",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<void>",
              "description": "A Promise that resolves when the plot is displayed or rejects if there is an error."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 2091
          }
        },
        {
          "name": "plotProjectMutationalBurdenByCancerType",
          "kind": "function",
          "async": true,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Plots the mutational burden by cancer type for a given project.",
          "params": [
            {
              "name": "project",
              "type": "Object",
              "default": null,
              "description": "An object containing mutational data for different cancer types.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the div where the plot should be displayed.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise",
              "description": "A Promise that resolves when the plot is displayed."
            }
          ],
          "examples": [
            "// Example usage:\r\nplotProjectMutationalBurdenByCancerType(projectData, \"plotDiv\");"
          ],
          "source": {
            "file": "main.js",
            "line": 2185
          }
        },
        {
          "name": "plotSignatureActivityDataBy",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a box plot of signature activity data, grouped by a specified attribute. The function takes a dataset and groups it by the provided attribute (e.g., \"signatureName\", \"study\", \"cancerType\"). For each group, it creates a box trace where the y-values represent the log10 of the exposure values and the x-values are set to the group name. The box plot displays the distribution of exposure values for each group, with the option to show all individual data points (jittered for better visibility). Hovering over the data points reveals the sample name and the log10 of the exposure value. The plot also indicates the fraction of samples within each group that have non-zero exposure.",
          "params": [
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the div element where the plot will be rendered.",
              "properties": []
            },
            {
              "name": "data",
              "type": "Array<object>",
              "default": null,
              "description": "An array of objects representing the signature activity data. Each object must have at least the following properties:exposure: A numeric value representing the exposure of a signature. It can be any positive number or zero.sample: A string representing the sample ID.The data array must also contain a property matching the name specified by the group parameter (e.g., \"signatureName\", \"study\", \"cancerType\").",
              "properties": []
            },
            {
              "name": "group",
              "type": "string",
              "default": "\"signatureName\"",
              "description": "The attribute to group the data by. Possible values are any property name present in the data objects, including, but not limited to:\"signatureName\": Groups the data by signature names.\"study\": Groups the data by study IDs.\"cancerType\": Groups the data by cancer types.\"sample\": Groups the data by sample IDs (Note: this might not result in a meaningful box plot).Any other custom property that exists in the data objects. The default value is \"signatureName\".",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "void",
              "description": "This function does not return a value. It directly renders the plot in the specified divID."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3302
          }
        },
        {
          "name": "plotSignatureAssociations",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "This function generates and plots a scatter plot with marginal histograms, along with statistical analysis, to visualize the association between two mutational signatures. It calculates and displays the linear regression line, Pearson correlation, and Spearman correlation, providing insights into the relationship between the exposures of two signatures in a set of samples.",
          "params": [
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the plot will be rendered.",
              "properties": []
            },
            {
              "name": "data",
              "type": "object",
              "default": null,
              "description": "An array of objects representing the exposure data for a set of samples. Each object in the array should have the following properties:sample: A string representing the sample ID.signatureName: A string representing the name of the mutational signature.exposure: A numeric value representing the exposure of the signature in the sample.",
              "properties": []
            },
            {
              "name": "signature1",
              "type": "string",
              "default": null,
              "description": "The name of the first mutational signature. This should match the signatureName values in the data array. The values can be any valid signature name present in the dataset, for example, \"SBS1\", \"SBS5\", \"DBS1\", \"ID4\".",
              "properties": []
            },
            {
              "name": "signature2",
              "type": "string",
              "default": null,
              "description": "The name of the second mutational signature. This should also match the signatureName values in the data array. Similar to signature1, the values can be any signature name present in the dataset and can also be the same as signature1 to assess the distribution of a single signature.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "void",
              "description": "This function does not return a value. It directly renders the plot in the specified divID."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3994
          }
        },
        {
          "name": "plotUMAPVisualization",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a UMAP (Uniform Manifold Approximation and Projection) visualization of mutational spectra data. UMAP is a dimensionality reduction technique used to project high-dimensional data into a lower-dimensional space (typically 2D or 3D) while preserving the global structure of the data. This function takes mutational spectra data, applies UMAP to reduce its dimensionality, and then creates either a 2D or 3D scatter plot to visualize the results. If nComponents is set to 3, it additionally generates a mesh3d trace to highlight the density of points in the 3D space.",
          "params": [
            {
              "name": "data",
              "type": "object",
              "default": null,
              "description": "An object representing the mutational spectra data. The structure of data is expected to be: { sampleId1: { mutationType1: count1, mutationType2: count2, ... }, sampleId2: { mutationType1: count3, mutationType2: count4, ... }, ... } The outer keys (e.g., sampleId1, sampleId2) are sample identifiers (strings). The inner objects (e.g., { mutationType1: count1, ... }) represent the mutational spectrum for a given sample. mutationType keys can be any string representing a type of mutation (e.g., \"C>A\", \"T>G\"), and count values are non-negative integers representing the number of times that mutation type is observed in the sample.",
              "properties": []
            },
            {
              "name": "datasetName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the dataset being visualized. This is used as part of the plot title. Examples include:\"PCAWG\"\"TCGA\"Any other string that appropriately identifies the dataset.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the plot will be rendered.",
              "properties": []
            },
            {
              "name": "nComponents",
              "type": "number",
              "default": "3",
              "description": "The number of dimensions to reduce the data to using UMAP. This determines whether a 2D or 3D plot is generated. Possible values are:2: Generates a 2D scatter plot.3: Generates a 3D scatter plot with an additional mesh3d trace. Any other positive integer is technically permissible but may not yield meaningful visualizations.",
              "properties": []
            },
            {
              "name": "minDist",
              "type": "number",
              "default": "0.1",
              "description": "The effective minimum distance between embedded points in the UMAP projection. Smaller values result in a more clustered embedding, while larger values preserve more of the global structure. The valid range is between 0.0 and 1.0.",
              "properties": []
            },
            {
              "name": "nNeighbors",
              "type": "number",
              "default": "15",
              "description": "The number of neighboring points to consider when constructing the UMAP. Larger values capture more global structure in the data, while smaller values preserve more local structure. Values should be positive integers, typically in the range of 2 to 100.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the trace object used by Plotly to generate the visualization. This object contains the data points, plot type, marker settings, and, in the case of a 3D plot, the mesh3d settings. The structure depends on the value of nComponents."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3513
          }
        }
      ]
    },
    {
      "name": "userData",
      "label": "User data",
      "summary": "MAF, panel, and user-supplied spectrum conversion utilities.",
      "functions": [
        {
          "name": "convertMafToProfileSpectra",
          "kind": "function",
          "async": true,
          "sourceNamespace": "userData",
          "description": "Converts MAF-like rows into one or more COSMIC-style profile matrices.",
          "params": [
            {
              "name": "data",
              "type": "Array<Object> | Array<Array<Object>>",
              "default": null,
              "description": "Flat or nested MAF-like rows.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Conversion options.",
              "properties": [
                {
                  "name": "options.profiles",
                  "type": "Array<string | Object>",
                  "default": "[\"SBS96\"]",
                  "description": "Profile keys or profile/matrix objects.",
                  "properties": []
                },
                {
                  "name": "options.groupBy",
                  "type": "string",
                  "default": "\"project_code\"",
                  "description": "Field used to group spectra.",
                  "properties": []
                },
                {
                  "name": "options.genome",
                  "type": "string",
                  "default": "\"hg19\"",
                  "description": "Reference genome build for context lookup.",
                  "properties": []
                },
                {
                  "name": "options.tcga",
                  "type": "boolean",
                  "default": "false",
                  "description": "Whether to read TCGA-specific MAF fields.",
                  "properties": []
                },
                {
                  "name": "options.offline",
                  "type": "boolean",
                  "default": "false",
                  "description": "Use row-supplied or lookup-table context.",
                  "properties": []
                },
                {
                  "name": "options.contextLookupTable",
                  "type": "Object",
                  "default": "null",
                  "description": "Position-indexed context lookup table.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Profile-keyed spectra, trace, audit, warnings, and registry metadata."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/mutationalSpectrum.js",
            "line": 930
          }
        },
        {
          "name": "convertMatrix",
          "kind": "function",
          "async": true,
          "sourceNamespace": "userData",
          "description": "Converts MAF-like input into a backward-compatible SBS96 mutational spectrum.This wrapper delegates to convertMafToProfileSpectra with the SBS96 target and returns the legacy sample-by-context matrix shape. Use convertMafToProfileSpectra for SBS1536, DBS78, ID83, trace, audit, and multi-profile conversion output.",
          "params": [
            {
              "name": "data",
              "type": "Array<Object> | Array<Array<Object>>",
              "default": null,
              "description": "Flat MAF-like rows or nested patient-level mutational data. Each row contains mutational details (e.g., chromosome, position, mutation type).",
              "properties": []
            },
            {
              "name": "group_by",
              "type": "string",
              "default": "\"Center\"",
              "description": "Field to group data by (e.g., \"Center\" or \"sample_id\"). This field should exist in the input data.",
              "properties": []
            },
            {
              "name": "batch_size",
              "type": "number",
              "default": "100",
              "description": "Number of mutations to process in parallel batches. Adjust this for memory management.",
              "properties": []
            },
            {
              "name": "genome",
              "type": "string",
              "default": "\"hg19\"",
              "description": "Reference genome build. Defaults to \"hg19\" unless specified in the data.",
              "properties": []
            },
            {
              "name": "tcga",
              "type": "boolean",
              "default": "false",
              "description": "Flag indicating whether the input data is in TCGA format. If true, expects TCGA-specific fields.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object",
              "default": "{}",
              "description": "Context lookup options.",
              "properties": [
                {
                  "name": "options.offline",
                  "type": "boolean",
                  "default": "false",
                  "description": "Use row-supplied or lookup-table contexts instead of the UCSC sequence API.",
                  "properties": []
                },
                {
                  "name": "options.contextLookupTable",
                  "type": "Object",
                  "default": "null",
                  "description": "Position-indexed trinucleotide lookup table.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "A promise resolving to a sample-keyed SBS96 matrix."
            }
          ],
          "examples": [
            "// Example input data\r\nconst data = [\r\n  [\r\n    { chromosome: \"1\", start_position: \"12345\", reference_allele: \"C\", tumor_seq_allele2: \"T\", variant_type: \"SNP\", build: \"hg19\", Center: \"CNIC\" },\r\n    { chromosome: \"2\", start_position: \"67890\", reference_allele: \"G\", tumor_seq_allele2: \"A\", variant_type: \"SNP\", build: \"hg19\", Center: \"CNIC\" }\r\n  ],\r\n  [\r\n    { chromosome: \"3\", start_position: \"101112\", reference_allele: \"T\", tumor_seq_allele2: \"C\", variant_type: \"SNP\", build: \"hg19\", Center: \"OtherCenter\" }\r\n  ]\r\n];\r\n\r\n// Convert data to mutational spectra grouped by Center\r\nconst mutationalSpectra = await convertMatrix(data, \"Center\", 50, \"hg19\", false);\r\nconsole.log(mutationalSpectra);\r\n// Output:\r\n// {\r\n//   \"CNIC\": {\r\n//     \"A[C>A]A\": 9,\r\n//     \"A[C>A]C\": 7,\r\n//     \"A[C>A]G\": 6,\r\n//     ...\r\n//   },\r\n//   \"OtherCenter\": {\r\n//     \"T[T>C]A\": 15,\r\n//     \"T[T>C]T\": 8,\r\n//     ...\r\n//   }\r\n// }"
          ],
          "source": {
            "file": "mSigSDKScripts/mutationalSpectrum.js",
            "line": 1065
          }
        },
        {
          "name": "convertMutationalSpectraIntoJSON",
          "kind": "function",
          "async": false,
          "sourceNamespace": "userData",
          "description": "Converts mutational spectra into JSON objects for downstream processing or storage.This function takes mutation annotation format (MAF) files, mutational spectra data, and sample names, and outputs JSON objects representing the spectra in a structured format.",
          "params": [
            {
              "name": "MAFfiles",
              "type": "Array",
              "default": null,
              "description": "An array of arrays containing mutation annotation data for each sample. Each inner array represents a sample's mutation data, where each entry is an object with key-value pairs.",
              "properties": []
            },
            {
              "name": "mutSpec",
              "type": "Object",
              "default": null,
              "description": "An object representing the mutational spectra. Keys are patient identifiers, and values are objects with mutation types as keys and counts as values.",
              "properties": []
            },
            {
              "name": "sample_name",
              "type": "string",
              "default": null,
              "description": "The key in MAFfiles to be used as the sample identifier.",
              "properties": []
            },
            {
              "name": "dataType",
              "type": "string",
              "default": "\"WGS\"",
              "description": "The sequencing strategy, e.g., \"WGS\" (Whole Genome Sequencing) or \"WES\" (Whole Exome Sequencing).",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array",
              "description": "An array of arrays, where each inner array represents the JSON objects for a patient's mutational spectra."
            }
          ],
          "examples": [
            "// Example input:\r\nconst MAFfiles = [\r\n  [{ sample_id: \"Sample1\", ch   mosome: \"1\", start_position: \"12345\", ... }],\r\n  [{ sample_id: \"Sample2\", ch   mosome: \"2\", start_position: \"67890\", ... }]\r\n];\r\nconst mutSpec = {\r\n  Patient1: { \"A[C>A]A\": 10,    [C>A]C\": 5, \"A[C>A]G\": 8, ... },\r\n  Patient2: { \"A[C>A]A\": 7, \"   C>A]C\": 4, \"A[C>A]G\": 6, ... }\r\n};\r\nconst sample_name = \"sample_id\";\r\nconst result = convertMutationalSpectraIntoJSON(MAFfiles, mutSpec, sample_name, \"WES\");\r\nconsole.log(result);",
            "// Example output:\r\n[\r\n  [\r\n    { sample: \"Sample1\", strategy: \"WES\", profile: \"SBS\", matrix: 96, mutationType: \"C>A\", mutations: 10 },\r\n    { sample: \"Sample1\", strategy: \"WES\", profile: \"SBS\", matrix: 96, mutationType: \"C>G\", mutations: 5 },\r\n    ...\r\n  ],\r\n  [\r\n    { sample: \"Sample2\", strategy: \"WES\", profile: \"SBS\", matrix: 96, mutationType: \"C>A\", mutations: 7 },\r\n    { sample: \"Sample2\", strategy: \"WES\", profile: \"SBS\", matrix: 96, mutationType: \"C>G\", mutations: 4 },\r\n    ...\r\n  ]\r\n];"
          ],
          "source": {
            "file": "mSigSDKScripts/userData.js",
            "line": 338
          }
        },
        {
          "name": "convertWGStoPanel",
          "kind": "function",
          "async": true,
          "sourceNamespace": "userData",
          "description": "Converts Whole Genome Sequencing (WGS) mutation data into panel data by downsampling based on a BED file.This function takes WGS mutation annotation files (MAFs) and a BED file defining panel regions, then filters the WGS data to include only mutations within the specified panel regions.",
          "params": [
            {
              "name": "WgMAFs",
              "type": "Array",
              "default": null,
              "description": "An array of WGS mutation data, where each element is an array representing mutations for a single sample. Each mutation record should be an object with fields such as chromosome, start_position, etc.",
              "properties": []
            },
            {
              "name": "panelDf",
              "type": "string | Array",
              "default": null,
              "description": "A BED file defining the regions of the panel or an array of arrays representing the panel regions. If a string is provided, it is treated as a file path to a BED file and read into memory.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array",
              "description": "An array of downsampled MAFs, where each element corresponds to a sample from the input WGS data, filtered to include only mutations within the panel regions."
            }
          ],
          "examples": [
            "// Example input:\r\nconst WgMAFs = [\r\n  [\r\n    { chromosome: \"1\", start_position: 12345, Hugo_Symbol: \"TP53\", ... },\r\n    { chromosome: \"2\", start_position: 67890, Hugo_Symbol: \"BRCA1\", ... },\r\n    ...\r\n  ],\r\n  [\r\n    { chromosome: \"1\", start_position: 54321, Hugo_Symbol: \"KRAS\", ... },\r\n    { chromosome: \"2\", start_position: 98765, Hugo_Symbol: \"EGFR\", ... },\r\n    ...\r\n  ],\r\n];\r\nconst panelDf = \"panel_regions.bed\"; // Path to a BED file.\r\n\r\n// Convert WGS data to panel data\r\nconst panelMAFs = await convertWGStoPanel(WgMAFs, panelDf);\r\n\r\n// Example output:\r\n// panelMAFs = [\r\n//   [\r\n//     { chromosome: \"1\", start_position: 12345, Hugo_Symbol: \"TP53\", ... },\r\n//     ...\r\n//   ],\r\n//   [\r\n//     { chromosome: \"2\", start_position: 98765, Hugo_Symbol: \"EGFR\", ... },\r\n//     ...\r\n//   ]\r\n// ];"
          ],
          "source": {
            "file": "mSigSDKScripts/userData.js",
            "line": 107
          }
        },
        {
          "name": "createWGStoPanelValidationPairs",
          "kind": "function",
          "async": false,
          "sourceNamespace": "userData",
          "description": "Creates matched WGS and panel spectra pairs from a WGS spectra matrix and callable-opportunity mask.",
          "params": [
            {
              "name": "wgsSpectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample-by-context WGS spectra.",
              "properties": []
            },
            {
              "name": "panelCallableOpportunityMask",
              "type": "Object<string, number> | Object<string, Object<string, number>>",
              "default": null,
              "description": "Shared or sample-specific callable opportunities by context.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Downsampling options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.referenceOpportunities",
                  "type": "Object<string, number>",
                  "default": "null",
                  "description": "Optional WGS/reference opportunities by context.",
                  "properties": []
                },
                {
                  "name": "options.binaryMask",
                  "type": "boolean",
                  "default": "false",
                  "description": "Treat positive callable opportunity as fully included.",
                  "properties": []
                },
                {
                  "name": "options.roundCounts",
                  "type": "boolean",
                  "default": "false",
                  "description": "Round expected panel counts to integers.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Matched WGS and panel spectra pairs for controlled validation."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/userData.js",
            "line": 200
          }
        }
      ]
    },
    {
      "name": "tools",
      "label": "Utility tools",
      "summary": "Small utility helpers shared by the public SDK.",
      "functions": [
        {
          "name": "groupBy",
          "kind": "function",
          "async": false,
          "sourceNamespace": null,
          "description": "Groups array records by a selected key.",
          "params": [],
          "returns": [],
          "examples": [],
          "source": {
            "file": null,
            "line": null
          }
        }
      ]
    },
    {
      "name": "machineLearning",
      "label": "Machine learning",
      "summary": "Preprocessing and cross-validation helpers used by browser workflows.",
      "functions": [
        {
          "name": "kFoldCV",
          "kind": "function",
          "async": false,
          "sourceNamespace": "machineLearning",
          "description": "Performs k-fold stratified cross-validation for multivariate linear or MLP regression models.",
          "params": [
            {
              "name": "Xs",
              "type": "Array",
              "default": null,
              "description": "Array of input data.",
              "properties": []
            },
            {
              "name": "Ys",
              "type": "Array",
              "default": null,
              "description": "Array of output data.",
              "properties": []
            },
            {
              "name": "k",
              "type": "number",
              "default": "10",
              "description": "Number of folds for cross-validation.",
              "properties": []
            },
            {
              "name": "modelType",
              "type": "string",
              "default": "\"MLR\"",
              "description": "Regression model type (\"MLR\" for multivariate linear regression or \"MLP\" for multilayer perceptron).",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing an array of trained regression models, an array of mean squared errors for each fold, and the average mean squared error across all folds."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/machineLearning.js",
            "line": 83
          }
        },
        {
          "name": "preprocessData",
          "kind": "function",
          "async": false,
          "sourceNamespace": "machineLearning",
          "description": "Preprocesses mutational and exposure data for a given data source. Currently only supports data from MSigDB portal.",
          "params": [
            {
              "name": "mutationalData",
              "type": "Array",
              "default": null,
              "description": "Array of mutational data.",
              "properties": []
            },
            {
              "name": "exposureData",
              "type": "Array",
              "default": null,
              "description": "Array of exposure data.",
              "properties": []
            },
            {
              "name": "dataSource",
              "type": "string",
              "default": null,
              "description": "Data source identifier.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing input (Xs) and output (Ys) arrays for regression."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/machineLearning.js",
            "line": 18
          }
        }
      ]
    },
    {
      "name": "signatureFitting",
      "label": "Signature fitting",
      "summary": "Known-signature exposure fitting and exposure plots.",
      "functions": [
        {
          "name": "fitMutationalSpectraToSignatures",
          "kind": "function",
          "async": true,
          "sourceNamespace": "machineLearning",
          "description": "Fits mutational spectra to known mutational signatures using non-negative least squares (NNLS).This function calculates the exposure of mutational signatures for each sample by fitting the observed mutational spectra to the reference mutational signatures. It then filters out signatures whose contribution is below a fraction of the total exposure, by setting their exposures to zero.You can choose to return exposures as absolute values (raw counts from NNLS) or relative values (sum to 1 for each sample). The filtering threshold is a fraction between 0 and 1.",
          "params": [
            {
              "name": "mutationalSignatures",
              "type": "Object",
              "default": null,
              "description": "Reference mutational signatures. Each key is a signature name, and each value is an object of mutation types (e.g., {\"C>A\": weight, \"C>G\": weight}).",
              "properties": []
            },
            {
              "name": "mutationalSpectra",
              "type": "Object",
              "default": null,
              "description": "Mutational spectra for each sample. Each key is a sample ID, and each value is an object of mutation types with their counts (e.g., {\"C>A\": count, \"C>G\": count}).",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Configuration options for filtering and output.",
              "properties": [
                {
                  "name": "options.exposureThreshold",
                  "type": "number",
                  "default": "0",
                  "description": "Exclude signatures below this fraction of the total, by setting their exposures to zero. Must be between 0 and 1.",
                  "properties": []
                },
                {
                  "name": "options.exposureType",
                  "type": "StringLiteralType | StringLiteralType",
                  "default": "\"relative\"",
                  "description": "Return exposures as absolute or relative.",
                  "properties": []
                },
                {
                  "name": "options.renormalize",
                  "type": "boolean",
                  "default": "true",
                  "description": "Whether to normalize exposures so that they sum to 1 after filtering.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "An object with sample IDs as keys. Each value is an object of signature exposures."
            }
          ],
          "examples": [
            "// Example usage:\r\n// 1. Get mutational signatures (e.g., from the mSigPortal API)\r\nconst mutationalSignatures = await mSigPortal.mSigPortalData.getMutationalSignaturesData(\r\n  \"WGS\", \"COSMIC_v3_Signatures_GRCh37_SBS96\", \"SBS\", 96, 1000\r\n);\r\n\r\n// 2. Extract mutational spectra for each sample\r\nconst extractedSpectra = await mSigPortal.mSigPortalData.extractMutationalSpectra(\r\n  mutationalSignatures, \"signatureName\"\r\n);\r\n\r\n// 3. Fit spectra to signatures with post-fit filtering\r\nconst nnlsExposures = await mSigPortal.signatureFitting.fitMutationalSpectraToSignatures(\r\n  mutationalSignatures,\r\n  extractedSpectra,\r\n  {\r\n    exposureThreshold: 0.1,\r\n    exposureType: \"relative\",\r\n    renormalize: true\r\n  }\r\n);\r\n\r\nconsole.log(nnlsExposures);\r\n// {\r\n//   Sample1: { SBS1: 0.75, SBS2: 0.25, SBS3: 0 },\r\n//   Sample2: { SBS1: 0.9, SBS2: 0.1, SBS3: 0 },\r\n//   ...\r\n// }"
          ],
          "source": {
            "file": "main.js",
            "line": 3641
          }
        },
        {
          "name": "plotDatasetMutationalSignaturesExposure",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a heatmap visualizing the exposure of multiple samples to a set of mutational signatures within a dataset. The function provides options for displaying relative or absolute exposure values and for performing double hierarchical clustering to reorder the rows and columns of the heatmap. It also allows customization of the color scale used to represent exposure values.",
          "params": [
            {
              "name": "exposureData",
              "type": "object",
              "default": null,
              "description": "An object containing the exposure data for a set of samples. The structure of exposureData is expected to be: { sampleId1: { signatureName1: exposureValue1, signatureName2: exposureValue2, ..., rnorm: number }, sampleId2: { signatureName1: exposureValue3, signatureName2: exposureValue4, ..., rnorm: number }, ... } The outer keys (e.g., sampleId1, sampleId2) are sample identifiers (strings). The inner objects (e.g., { signatureName1: exposureValue1, ... }) represent the exposure values for a given sample. signatureName keys are strings representing the names of mutational signatures (e.g., \"SBS1\", \"SBS5\"), and exposureValue are non-negative numbers representing the contribution of that signature to the sample. rnorm is a number that will be removed from the data before plotting.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the heatmap will be rendered.",
              "properties": []
            },
            {
              "name": "relative",
              "type": "boolean",
              "default": "true",
              "description": "A boolean indicating whether to display relative or absolute exposure values.true: The exposure values for each sample are normalized to sum to 1, representing the relative contribution of each signature.false: The raw exposure values are displayed.",
              "properties": []
            },
            {
              "name": "datasetName",
              "type": "string",
              "default": "\"PCAWG\"",
              "description": "The name of the dataset being visualized. This is used as part of the plot title. Examples include:\"PCAWG\"\"TCGA\"Any other string that appropriately identifies the dataset.",
              "properties": []
            },
            {
              "name": "doubleCluster",
              "type": "boolean",
              "default": "true",
              "description": "A boolean indicating whether to perform double hierarchical clustering on the exposure data.true: The rows and columns of the heatmap are reordered based on the results of double clustering, which groups similar samples and signatures together.false: The rows and columns are displayed in the order they appear in the input exposureData.",
              "properties": []
            },
            {
              "name": "colorscale",
              "type": "string | Array",
              "default": "\"Custom\"",
              "description": "The color scale to use for the heatmap. Possible values are:\"Custom\": A predefined custom color scale designed for visualizing exposure data.Any valid Plotly color scale name (e.g., \"Viridis\", \"Blues\", \"Hot\", etc.).An array of arrays defining a custom color scale, where each inner array specifies a color stop with a value between 0 and 1 and a corresponding RGB color string (e.g., [[\"0.0\", \"rgb(49,54,149)\"], [\"1.0\", \"rgb(165,0,38)\"]]).",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the data object used by Plotly to generate the heatmap. This object contains the z values (exposure values), x values (signature names), y values (sample names), and other settings for the heatmap, including the color scale. The structure is: { z: [[exposureValue1, exposureValue2, ...], [exposureValue3, exposureValue4, ...], ...], x: [signatureName1, signatureName2, ...], y: [sampleId1, sampleId2, ...], type: \"heatmap\", colorscale: colorscale }"
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3868
          }
        },
        {
          "name": "plotPatientMutationalSignaturesExposure",
          "kind": "function",
          "async": false,
          "sourceNamespace": "mSigPortalPlots",
          "description": "Generates a pie chart visualizing the exposure of a single sample to a set of mutational signatures. The function takes exposure data, which includes the relative contribution of each signature to the sample's mutational profile, and displays it in a pie chart format.",
          "params": [
            {
              "name": "exposureData",
              "type": "object",
              "default": null,
              "description": "An object containing exposure data for either a set of samples or a single sample. The structure of exposureData can be: { sampleId1: { signatureName1: exposureValue1, signatureName2: exposureValue2, ... }, sampleId2: { signatureName1: exposureValue3, signatureName2: exposureValue4, ... }, ... } or a single sample object: { signatureName1: exposureValue1, signatureName2: exposureValue2, ... }. The outer keys (e.g., sampleId1, sampleId2) are sample identifiers (strings). The inner objects (e.g., { signatureName1: exposureValue1, ... }) represent the exposure values for a given sample. signatureName keys are strings representing the names of mutational signatures (e.g., \"SBS1\", \"SBS5\"), and exposureValue are non-negative numbers representing the contribution of that signature to the sample. These values typically sum to 1 for each sample. The exposureData object can contain multiple samples, but only the data for the specified sample will be used for plotting. Each sample may also have an optional rnorm property which is a number.",
              "properties": []
            },
            {
              "name": "divID",
              "type": "string",
              "default": null,
              "description": "The ID of the HTML div element where the pie chart will be rendered.",
              "properties": []
            },
            {
              "name": "sample",
              "type": "string",
              "default": null,
              "description": "The ID of the sample for which to plot the mutational signature exposure. This should be one of the keys in the exposureData object (e.g., \"sampleId1\", \"sampleId2\").",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "object",
              "description": "Returns the data object used by Plotly to generate the pie chart. This object contains the labels (signature names), values (exposure values), and other settings for the pie chart. The format is: { labels: [signatureName1, signatureName2, ...], values: [exposureValue1, exposureValue2, ...], name: \"sample exposure values\", textposition: \"inside\", hole: 0.4, hoverinfo: \"name + value\", type: \"pie\" }"
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 3742
          }
        }
      ]
    },
    {
      "name": "TCGA",
      "label": "TCGA helpers",
      "summary": "TCGA and GDC query helpers for projects, expression, MAF, and variant records.",
      "functions": [
        {
          "name": "getMafInformationFromProjects",
          "kind": "function",
          "async": true,
          "sourceNamespace": "tcga",
          "description": "Obtain MAF file ids and demograpic info of a list of projects",
          "params": [
            {
              "name": "projects",
              "type": "array",
              "default": null,
              "description": "List with the projects of interest",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing the list of maf files and samples demographic information"
            }
          ],
          "examples": [
            "let tcga = await import('https://raw.githubusercontent.com/YasCoMa/msig/main/mSigSDKScripts/tcga.js')\r\nlet projects = ['TCGA-LUSC', 'TCGA-OV']\r\nvar result = await tcga.getMafInformationFromProjects(projects)"
          ],
          "source": {
            "file": "mSigSDKScripts/tcga.js",
            "line": 455
          }
        },
        {
          "name": "getProjectsByGene",
          "kind": "function",
          "async": true,
          "sourceNamespace": "tcga",
          "description": "Obtain projects by gene",
          "params": [
            {
              "name": "genes",
              "type": "array",
              "default": null,
              "description": "List with the genes of interest (ensemble id)",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing the list of projects in which the genes are over/under expressed and the list of projects organized by genes"
            }
          ],
          "examples": [
            "let tcga = await import('https://raw.githubusercontent.com/YasCoMa/msig/main/mSigSDKScripts/tcga.js')\r\nlet genes = ['ENSG00000155657']\r\nvar result = await tcga.getProjectsByGene(genes)"
          ],
          "source": {
            "file": "mSigSDKScripts/tcga.js",
            "line": 193
          }
        },
        {
          "name": "getTpmCountsByGenesFromFiles",
          "kind": "function",
          "async": true,
          "sourceNamespace": "tcga",
          "description": "Obtain tpm count of a list of genes given sample file identifiers",
          "params": [
            {
              "name": "genes",
              "type": "array",
              "default": null,
              "description": "List with the genes of interest (ensemble id)",
              "properties": []
            },
            {
              "name": "files",
              "type": "array",
              "default": null,
              "description": "List with the file ids",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing the list of count ftpm and fpkm from each file organized by genes"
            }
          ],
          "examples": [
            "let tcga = await import('https://raw.githubusercontent.com/YasCoMa/msig/main/mSigSDKScripts/tcga.js')\r\nlet genes = ['ENSG00000155657']\r\nlet files = ['9e5f8edc-5074-43b7-a870-594aeb36e2aa', '8d5a94c8-b3d9-4991-8ce9-f7aa9189938c', 'dedf9f52-7ded-4cc5-bba2-da89a48b5176', '3aa53aa2-97cd-43a8-b7b1-09f0bf6381dd']\r\nvar result = await tcga.getTpmCountsByGenesFromFiles(genes, files)"
          ],
          "source": {
            "file": "mSigSDKScripts/tcga.js",
            "line": 371
          }
        },
        {
          "name": "getTpmCountsByGenesOnProjects",
          "kind": "function",
          "async": true,
          "sourceNamespace": "tcga",
          "description": "Obtain tpm count of a list of genes in the sample files of the selected projects",
          "params": [
            {
              "name": "genes",
              "type": "array",
              "default": null,
              "description": "List with the genes of interest (ensemble id)",
              "properties": []
            },
            {
              "name": "projects",
              "type": "array",
              "default": null,
              "description": "List with the projects of interest",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing the list of count file ids and file descriptions organized by projects"
            }
          ],
          "examples": [
            "let genes = ['ENSG00000155657']\r\nlet projects = ['TCGA-LUSC', 'TCGA-OV']\r\nvar result = await tcga.getTpmCountsByGenesOnProjects(genes, projects)"
          ],
          "source": {
            "file": "mSigSDKScripts/tcga.js",
            "line": 253
          }
        },
        {
          "name": "getVariantInformationFromMafFiles",
          "kind": "function",
          "async": true,
          "sourceNamespace": "tcga",
          "description": "Obtain mutations and variant information given MAF file identifiers",
          "params": [
            {
              "name": "res",
              "type": "Object",
              "default": null,
              "description": "Object containing the list of maf files and samples demographic information.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object",
              "default": "{}",
              "description": "Conversion options.",
              "properties": [
                {
                  "name": "options.fileConcurrency",
                  "type": "number",
                  "default": "4",
                  "description": "Maximum GDC MAF files to download and parse at once.",
                  "properties": []
                },
                {
                  "name": "options.includeVariantInformation",
                  "type": "boolean",
                  "default": "true",
                  "description": "Whether to include flat variant rows in the result.",
                  "properties": []
                },
                {
                  "name": "options.onProgress",
                  "type": "Function",
                  "default": "null",
                  "description": "Optional callback receiving progress events.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Object containing the list of patient mutation information"
            }
          ],
          "examples": [
            "let tcga = await import('https://raw.githubusercontent.com/YasCoMa/msig/main/mSigSDKScripts/tcga.js')\r\nlet res = { 'TCGA-LUSC': { 'maf_files': ['0b3d2db3-8ae3-4d39-bd9b-9d1e7a133b65', '9fed5902-6e95-4526-a119-ec4eade5576b' ] } }\r\nvar result = await tcga.getVariantInformationFromMafFiles(res)"
          ],
          "source": {
            "file": "mSigSDKScripts/tcga.js",
            "line": 595
          }
        }
      ]
    },
    {
      "name": "validation",
      "label": "Validation",
      "summary": "Profile context registries, matrix normalization, input validation, and assertion helpers.",
      "functions": [
        {
          "name": "assertValid",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Throws when a validation result is invalid.",
          "params": [
            {
              "name": "validationResult",
              "type": "Object",
              "default": null,
              "description": "Result from a validation helper.",
              "properties": []
            },
            {
              "name": "label",
              "type": "string",
              "default": "\"Validation\"",
              "description": "Label used in the thrown error.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "The original validation result when valid."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 561
          }
        },
        {
          "name": "getExpectedContexts",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Returns the canonical mutation-context order for supported profile matrices.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Context selection options.",
              "properties": [
                {
                  "name": "options.profile",
                  "type": "string",
                  "default": "\"SBS\"",
                  "description": "Mutation profile family.",
                  "properties": []
                },
                {
                  "name": "options.matrix",
                  "type": "number",
                  "default": "96",
                  "description": "Matrix size.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Array<string> | null",
              "description": "Ordered context labels, or null for unsupported matrices."
            }
          ],
          "examples": [
            "const contexts = mSigSDK.validation.getExpectedContexts({\r\n  profile: \"SBS\",\r\n  matrix: 96,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 51
          }
        },
        {
          "name": "getMatrixContexts",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Returns all unique context or signature columns seen across matrix objects.",
          "params": [
            {
              "name": "matrices",
              "type": "...Object<string, Object<string, number>>",
              "default": null,
              "description": "Matrices to inspect.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array<string>",
              "description": "Context or column names in first-seen order."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 221
          }
        },
        {
          "name": "getSBS96Contexts",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Returns the canonical SBS96 trinucleotide context labels.",
          "params": [],
          "returns": [
            {
              "type": "Array<string>",
              "description": "Ordered SBS96 context labels."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 32
          }
        },
        {
          "name": "listMafConvertibleProfiles",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Lists registered profile targets that can be derived directly from MAF-like rows.",
          "params": [],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Registered native MAF-derived targets, including SBS96, SBS1536, DBS78, and ID83."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 73
          }
        },
        {
          "name": "listProfileDefinitions",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Lists all registered COSMIC-style profile targets known to the SDK.",
          "params": [],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Profile definitions with canonical key, profile family, matrix size, contexts, input requirements, conversion support, and renderer mapping."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 62
          }
        },
        {
          "name": "normalizeMatrixObject",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Normalizes a nested matrix object to finite numeric values.",
          "params": [
            {
              "name": "matrix",
              "type": "Object<string, Object<string, *>>",
              "default": null,
              "description": "Matrix keyed by row and context.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Normalization options.",
              "properties": [
                {
                  "name": "options.ignoredKeys",
                  "type": "Array<string>",
                  "default": "[\"rnorm\"]",
                  "description": "Row keys to omit.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Numeric matrix with invalid values set to zero."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 187
          }
        },
        {
          "name": "rowsToMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Converts long-form rows into a matrix object keyed by sample or signature.",
          "params": [
            {
              "name": "rows",
              "type": "Array<Object>",
              "default": null,
              "description": "Rows containing row id, mutation context, and value columns.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Column mapping options.",
              "properties": [
                {
                  "name": "options.rowKey",
                  "type": "string",
                  "default": "\"sample\"",
                  "description": "Row identifier field.",
                  "properties": []
                },
                {
                  "name": "options.contextKey",
                  "type": "string",
                  "default": "\"mutationType\"",
                  "description": "Mutation-context field.",
                  "properties": []
                },
                {
                  "name": "options.valueKey",
                  "type": "string",
                  "default": "\"mutations\"",
                  "description": "Numeric value field.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Matrix object."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 105
          }
        },
        {
          "name": "rowsToSampleSpectra",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Converts mSigPortal-style spectrum rows into a sample-by-context matrix.",
          "params": [
            {
              "name": "rows",
              "type": "Array<Object>",
              "default": null,
              "description": "Long-form spectrum rows.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Optional field mappings.",
              "properties": [
                {
                  "name": "options.sampleKey",
                  "type": "string",
                  "default": "\"sample\"",
                  "description": "Sample identifier field.",
                  "properties": []
                },
                {
                  "name": "options.contextKey",
                  "type": "string",
                  "default": "\"mutationType\"",
                  "description": "Mutation-context field.",
                  "properties": []
                },
                {
                  "name": "options.valueKey",
                  "type": "string",
                  "default": "\"mutations\"",
                  "description": "Mutation count field.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Sample spectra matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 149
          }
        },
        {
          "name": "rowsToSignatureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Converts mSigPortal-style signature rows into a signature-by-context matrix.",
          "params": [
            {
              "name": "rows",
              "type": "Array<Object>",
              "default": null,
              "description": "Long-form signature rows.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Optional field mappings.",
              "properties": [
                {
                  "name": "options.signatureKey",
                  "type": "string",
                  "default": "\"signatureName\"",
                  "description": "Signature identifier field.",
                  "properties": []
                },
                {
                  "name": "options.contextKey",
                  "type": "string",
                  "default": "\"mutationType\"",
                  "description": "Mutation-context field.",
                  "properties": []
                },
                {
                  "name": "options.valueKey",
                  "type": "string",
                  "default": "\"contribution\"",
                  "description": "Signature contribution field.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Signature matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 169
          }
        },
        {
          "name": "validateExposureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Validates a sample-by-signature exposure matrix.",
          "params": [
            {
              "name": "exposures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Exposure matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Validation options.",
              "properties": [
                {
                  "name": "options.strict",
                  "type": "boolean",
                  "default": "false",
                  "description": "Treat warnings as invalid when true.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation result with validity, issues, warnings, samples, and signatures."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 456
          }
        },
        {
          "name": "validateMafRows",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Validates MAF-like rows before converting them into mutational spectra.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Validation options.",
              "properties": [
                {
                  "name": "options.requiredFields",
                  "type": "Array<string>=",
                  "default": null,
                  "description": "Required MAF fields, compared case-insensitively.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation result with row count, required fields, and issues."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 496
          }
        },
        {
          "name": "validateSignatureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Validates a reference or extracted signature matrix.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Validation options.",
              "properties": [
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected context set and order.",
                  "properties": []
                },
                {
                  "name": "options.strict",
                  "type": "boolean",
                  "default": "false",
                  "description": "Treat warnings as invalid when true.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation result with validity, issues, warnings, signatures, and contexts."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 421
          }
        },
        {
          "name": "validateSpectra",
          "kind": "function",
          "async": false,
          "sourceNamespace": "validation",
          "description": "Validates sample spectra before fitting, QC, or extraction.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Validation options.",
              "properties": [
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected context set and order.",
                  "properties": []
                },
                {
                  "name": "options.minTotalMutations",
                  "type": "number",
                  "default": "0",
                  "description": "Low-burden warning threshold.",
                  "properties": []
                },
                {
                  "name": "options.strict",
                  "type": "boolean",
                  "default": "false",
                  "description": "Treat warnings as invalid when true.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation result with validity, issues, warnings, sample metrics, and contexts."
            }
          ],
          "examples": [
            "const validation = mSigSDK.validation.validateSpectra(groupedSpectra, {\r\n  expectedContexts: mSigSDK.validation.getExpectedContexts({ profile: \"SBS\", matrix: 96 }),\r\n  minTotalMutations: 100,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/validation.js",
            "line": 362
          }
        }
      ]
    },
    {
      "name": "qc",
      "label": "QC and uncertainty",
      "summary": "Mutation burden, reconstruction error, bootstrap, threshold, ambiguity, and fit evidence.",
      "functions": [
        {
          "name": "bootstrapSignatureFit",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qc",
          "description": "Bootstraps one spectrum to estimate exposure uncertainty and selection frequency.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature-by-context matrix.",
              "properties": []
            },
            {
              "name": "spectrum",
              "type": "Object<string, number>",
              "default": null,
              "description": "Single sample spectrum.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Bootstrap options.",
              "properties": [
                {
                  "name": "options.iterations",
                  "type": "number",
                  "default": "200",
                  "description": "Bootstrap replicate count.",
                  "properties": []
                },
                {
                  "name": "options.confidenceLevel",
                  "type": "number",
                  "default": "0.95",
                  "description": "Confidence interval level.",
                  "properties": []
                },
                {
                  "name": "options.exposureThreshold",
                  "type": "number",
                  "default": "0",
                  "description": "Relative exposure cutoff.",
                  "properties": []
                },
                {
                  "name": "options.exposureType",
                  "type": "string",
                  "default": "\"relative\"",
                  "description": "Exposure scaling mode.",
                  "properties": []
                },
                {
                  "name": "options.renormalize",
                  "type": "boolean",
                  "default": "true",
                  "description": "Renormalize after thresholding.",
                  "properties": []
                },
                {
                  "name": "options.seed",
                  "type": "number",
                  "default": "123",
                  "description": "Seed for reproducible resampling.",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Bootstrap interval, selection-frequency, exposure, and reconstruction results."
            }
          ],
          "examples": [
            "const bootstrap = await mSigSDK.qc.bootstrapSignatureFit(\r\n  referenceSignatures,\r\n  groupedSpectra[sampleName],\r\n  { iterations: 100, confidenceLevel: 0.95 }\r\n);"
          ],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 1536
          }
        },
        {
          "name": "calculateFitResiduals",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Calculates observed, reconstructed, and residual spectra for fitted exposures.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature-by-context matrix.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "exposures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample-by-signature exposure matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Residual options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.normalizeMode",
                  "type": "string",
                  "default": "\"auto\"",
                  "description": "\"auto\", \"relative\", or \"absolute\" normalization.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Residual object with contexts and per-sample metrics."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 736
          }
        },
        {
          "name": "calculateReconstructionError",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Summarizes reconstruction error metrics for fitted spectra.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature-by-context matrix.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "exposures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample-by-signature exposure matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Options passed to calculateFitResiduals.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Per-sample cosine similarity, RMSE, and related residual metrics."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 922
          }
        },
        {
          "name": "fitSpectraWithNNLS",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qc",
          "description": "Fits each sample spectrum to reference signatures using non-negative least squares.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature-by-context matrix.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Fitting options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.exposureThreshold",
                  "type": "number",
                  "default": "0",
                  "description": "Relative exposure cutoff.",
                  "properties": []
                },
                {
                  "name": "options.exposureType",
                  "type": "string",
                  "default": "\"relative\"",
                  "description": "Exposure scaling mode.",
                  "properties": []
                },
                {
                  "name": "options.renormalize",
                  "type": "boolean",
                  "default": "true",
                  "description": "Renormalize after thresholding.",
                  "properties": []
                },
                {
                  "name": "options.returnDetails",
                  "type": "boolean",
                  "default": "false",
                  "description": "Return exposures with solver metadata instead of the exposure matrix alone.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object<string, Object<string, number>> | Object>",
              "description": "Sample-by-signature exposure matrix, or a detailed result when returnDetails is true."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 1135
          }
        },
        {
          "name": "normalizeExposures",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Normalizes an exposure matrix for downstream QC and reporting.",
          "params": [
            {
              "name": "exposures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample-by-signature exposure matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Normalization options.",
              "properties": [
                {
                  "name": "options.zeroPolicy",
                  "type": "string",
                  "default": "\"keep\"",
                  "description": "Zero handling: \"keep\", \"pseudocount\", or \"drop\".",
                  "properties": []
                },
                {
                  "name": "options.pseudocount",
                  "type": "number",
                  "default": "1e-6",
                  "description": "Value added when zeroPolicy is \"pseudocount\".",
                  "properties": []
                },
                {
                  "name": "options.relative",
                  "type": "boolean",
                  "default": "true",
                  "description": "Normalize each sample to sum to one.",
                  "properties": []
                },
                {
                  "name": "options.dropBelow",
                  "type": "number",
                  "default": "0",
                  "description": "Drop exposures at or below this value when zeroPolicy is \"drop\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Normalized exposure matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 613
          }
        },
        {
          "name": "runThresholdSensitivity",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qc",
          "description": "Sweeps exposure thresholds and records reconstruction and activity stability.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature-by-context matrix.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Threshold sweep options.",
              "properties": [
                {
                  "name": "options.thresholds",
                  "type": "Array<number>=",
                  "default": null,
                  "description": "Exposure thresholds to test.",
                  "properties": []
                },
                {
                  "name": "options.exposureType",
                  "type": "string",
                  "default": "\"relative\"",
                  "description": "Exposure scaling mode.",
                  "properties": []
                },
                {
                  "name": "options.renormalize",
                  "type": "boolean",
                  "default": "true",
                  "description": "Renormalize after thresholding.",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Threshold grid and per-threshold fit metrics."
            }
          ],
          "examples": [
            "const sensitivity = await mSigSDK.qc.runThresholdSensitivity(\r\n  referenceSignatures,\r\n  groupedSpectra,\r\n  { thresholds: [0, 0.01, 0.03, 0.05, 0.1] }\r\n);"
          ],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 1265
          }
        },
        {
          "name": "selectSamplesByMutationBurden",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Selects sample-level burden records for teaching, reporting, or analysis.",
          "params": [
            {
              "name": "burdenSummary",
              "type": "Object",
              "default": null,
              "description": "Result from summarizeMutationBurden.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Selection options.",
              "properties": [
                {
                  "name": "options.limit",
                  "type": "number",
                  "default": "10",
                  "description": "Maximum number of samples to return.",
                  "properties": []
                },
                {
                  "name": "options.minTotalMutations",
                  "type": "number",
                  "default": "0",
                  "description": "Inclusive lower burden bound.",
                  "properties": []
                },
                {
                  "name": "options.maxTotalMutations",
                  "type": "number",
                  "default": "Infinity",
                  "description": "Inclusive upper burden bound.",
                  "properties": []
                },
                {
                  "name": "options.sampleNames",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Optional allow-list of sample names.",
                  "properties": []
                },
                {
                  "name": "options.order",
                  "type": "string",
                  "default": "\"desc\"",
                  "description": "Sort order: \"desc\" or \"asc\".",
                  "properties": []
                },
                {
                  "name": "options.includeEmpty",
                  "type": "boolean",
                  "default": "false",
                  "description": "Include zero-burden spectra.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Selected sample records from the burden summary."
            }
          ],
          "examples": [
            "const selected = mSigSDK.qc.selectSamplesByMutationBurden(burden, {\r\n  minTotalMutations: 1000,\r\n  limit: 8,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 453
          }
        },
        {
          "name": "summarizeMissingContexts",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Reports missing and extra mutation contexts for each sample spectrum.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Context coverage options.",
              "properties": [
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected context list.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Context coverage result with sample-level missing and extra contexts."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 522
          }
        },
        {
          "name": "summarizeMutationBurden",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qc",
          "description": "Summarizes per-sample mutation burden and raises review cues for low-burden spectra.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Burden summary options.",
              "properties": [
                {
                  "name": "options.lowBurdenThreshold",
                  "type": "number",
                  "default": "50",
                  "description": "Fixed low-burden cutoff.",
                  "properties": []
                },
                {
                  "name": "options.lowBurdenThresholdMode",
                  "type": "string",
                  "default": "\"fixed\"",
                  "description": "Threshold mode: \"fixed\", \"quantile\", or \"none\".",
                  "properties": []
                },
                {
                  "name": "options.thresholdMode",
                  "type": "string=",
                  "default": null,
                  "description": "Alias for lowBurdenThresholdMode.",
                  "properties": []
                },
                {
                  "name": "options.quantile",
                  "type": "number",
                  "default": "0.25",
                  "description": "Quantile used when threshold mode is \"quantile\".",
                  "properties": []
                },
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected context order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Sample-level burden metrics and overall summary counts."
            }
          ],
          "examples": [
            "const burden = mSigSDK.qc.summarizeMutationBurden(groupedSpectra, {\r\n  lowBurdenThresholdMode: \"fixed\",\r\n  lowBurdenThreshold: 100,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/qc.js",
            "line": 277
          }
        }
      ]
    },
    {
      "name": "qcPlots",
      "label": "QC plots",
      "summary": "Report-ready QC and uncertainty plots.",
      "functions": [
        {
          "name": "plotBootstrapConfidenceIntervals",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders bootstrap exposure intervals and selection frequencies.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "bootstrapResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.bootstrapSignatureFit.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 7812
          }
        },
        {
          "name": "plotBootstrapExposureSummary",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders a compact bootstrap uncertainty figure for reporting workflows.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "bootstrapResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.bootstrapSignatureFit.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Rendering options.",
              "properties": [
                {
                  "name": "options.topN",
                  "type": "number",
                  "default": "8",
                  "description": "Number of fitted signatures to show.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 7408
          }
        },
        {
          "name": "plotCohortGroupComparison",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders metadata-stratified fitted exposure differences.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "comparisonResult",
              "type": "Object",
              "default": null,
              "description": "Group-comparison block returned by a cohort workflow.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 5995
          }
        },
        {
          "name": "plotCohortSignatureSummary",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qcPlots",
          "description": "Renders a cohort-level signature-exposure landscape using full-catalog exposures while reducing the display to the top cohort signatures plus an explicit Other remainder.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "cohort",
              "type": "Object",
              "default": null,
              "description": "Cohort input with spectra, exposures, fitQuality, and metadata.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object | Element",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 6187
          }
        },
        {
          "name": "plotCosmicProfile",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qcPlots",
          "description": "Renders a COSMIC-style mutational profile using the renderer that matches the selected matrix.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object",
              "default": null,
              "description": "One context-keyed spectrum or a sample-keyed spectra object.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": [
                {
                  "name": "options.profileKey",
                  "type": "string",
                  "default": "\"SBS96\"",
                  "description": "Canonical profile key such as SBS96, SBS1536, DBS78, ID83, or RS32.",
                  "properties": []
                },
                {
                  "name": "options.profile",
                  "type": "string=",
                  "default": null,
                  "description": "Profile family when profileKey is not supplied.",
                  "properties": []
                },
                {
                  "name": "options.matrix",
                  "type": "number=",
                  "default": null,
                  "description": "Matrix size when profileKey is not supplied.",
                  "properties": []
                },
                {
                  "name": "options.sample",
                  "type": "string",
                  "default": "null",
                  "description": "Sample or group to render.",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Optional canonical context order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object | Element",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 2514
          }
        },
        {
          "name": "plotCosmicSbs96Profile",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qcPlots",
          "description": "Renders a COSMIC-style SBS96 bar profile grouped by the six base-substitution classes.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "spectra",
              "type": "Object",
              "default": null,
              "description": "Either one SBS96 record or a sample-keyed spectra object.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": [
                {
                  "name": "options.sample",
                  "type": "string",
                  "default": "null",
                  "description": "Sample or group to render.",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Optional context order.",
                  "properties": []
                },
                {
                  "name": "options.normalize",
                  "type": "boolean | string",
                  "default": "false",
                  "description": "Use true for relative fractions or \"auto\" for probability-like input.",
                  "properties": []
                },
                {
                  "name": "options.title",
                  "type": "string",
                  "default": "\"COSMIC-style SBS96 profile\"",
                  "description": "Figure title.",
                  "properties": []
                },
                {
                  "name": "options.subtitle",
                  "type": "string",
                  "default": "null",
                  "description": "Figure subtitle.",
                  "properties": []
                },
                {
                  "name": "options.showContextLabels",
                  "type": "boolean",
                  "default": "false",
                  "description": "Render all trinucleotide context labels on the x-axis.",
                  "properties": []
                },
                {
                  "name": "options.contextLabelMode",
                  "type": "string",
                  "default": "\"none\"",
                  "description": "Use \"compact\" for manuscript-scale all-context labels without horizontal scrolling.",
                  "properties": []
                },
                {
                  "name": "options.highlightContexts",
                  "type": "string | Array<string>",
                  "default": "[]",
                  "description": "Context labels to outline in the plot.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object | Element",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 6938
          }
        },
        {
          "name": "plotFitQualityEvidenceDashboard",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders fit-quality evidence returned by mSigSDK.advisor.computeFitQualityEvidence.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "fitQualityEvidenceResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.advisor.computeFitQualityEvidence.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 4594
          }
        },
        {
          "name": "plotFitResiduals",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders observed-versus-reconstructed residual spectra for one fitted sample.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "residualResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.calculateFitResiduals.",
              "properties": []
            },
            {
              "name": "sampleName",
              "type": "string",
              "default": "null",
              "description": "Sample to render; defaults to the first sample.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<*>",
              "description": "Plot renderer result or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 7291
          }
        },
        {
          "name": "plotMutationBurdenSummary",
          "kind": "function",
          "async": false,
          "sourceNamespace": "qcPlots",
          "description": "Renders a D3 mutation-burden QC summary for sample spectra.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "burdenSummary",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.summarizeMutationBurden.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object | Element",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 4056
          }
        },
        {
          "name": "plotPanelEvidenceMatrix",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders panel/WES evidence calls as a sample-by-signature matrix.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "panelResultOrEvidenceCalls",
              "type": "Object",
              "default": null,
              "description": "runPanelWorkflow result or evidenceCalls object.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 6659
          }
        },
        {
          "name": "plotReconstructionError",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders reconstruction quality diagnostics for fitted spectra.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "reconstructionError",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.calculateReconstructionError.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": [
                {
                  "name": "options.cosineReferenceLines",
                  "type": "Array<Object>",
                  "default": "[]",
                  "description": "Optional cosine reference markers.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 4338
          }
        },
        {
          "name": "plotThresholdSensitivity",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders a cutoff sensitivity summary for fitted exposures.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "thresholdResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.runThresholdSensitivity.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8194
          }
        },
        {
          "name": "plotThresholdSensitivitySummary",
          "kind": "function",
          "async": true,
          "sourceNamespace": "qcPlots",
          "description": "Renders a compact cutoff sensitivity figure.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "thresholdResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.qc.runThresholdSensitivity.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 7582
          }
        }
      ]
    },
    {
      "name": "signatureExtraction",
      "label": "Signature extraction",
      "summary": "Browser-sized NMF extraction, rank selection, worker execution, and matching.",
      "functions": [
        {
          "name": "compareExtractedToReference",
          "kind": "function",
          "async": false,
          "sourceNamespace": "signatureExtraction",
          "description": "Compares extracted signatures to a reference signature catalog by cosine similarity.",
          "params": [
            {
              "name": "extractedSignatures",
              "type": "Object<string, Object<string, number>> | Object",
              "default": null,
              "description": "Extracted signature matrix or NMF result.",
              "properties": []
            },
            {
              "name": "referenceSignatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Reference signature matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Matching options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.topN",
                  "type": "number",
                  "default": "5",
                  "description": "Number of matches to retain per extracted signature.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Match summaries sorted by similarity for each extracted signature."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/signatureExtraction.js",
            "line": 907
          }
        },
        {
          "name": "extractSignaturesNMF",
          "kind": "function",
          "async": false,
          "sourceNamespace": "signatureExtraction",
          "description": "Extracts de novo mutational signatures with non-negative matrix factorization.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "NMF options.",
              "properties": [
                {
                  "name": "options.rank",
                  "type": "number",
                  "default": "5",
                  "description": "Number of signatures to extract.",
                  "properties": []
                },
                {
                  "name": "options.maxIterations",
                  "type": "number",
                  "default": "1000",
                  "description": "Maximum multiplicative-update iterations.",
                  "properties": []
                },
                {
                  "name": "options.tolerance",
                  "type": "number",
                  "default": "1e-5",
                  "description": "Relative improvement threshold for convergence.",
                  "properties": []
                },
                {
                  "name": "options.nRuns",
                  "type": "number",
                  "default": "20",
                  "description": "Number of random starts.",
                  "properties": []
                },
                {
                  "name": "options.seed",
                  "type": "number",
                  "default": "123",
                  "description": "Base seed for random starts.",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.sampleNames",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Sample order to use.",
                  "properties": []
                },
                {
                  "name": "options.signaturePrefix",
                  "type": "string",
                  "default": "\"NMF\"",
                  "description": "Prefix for extracted signature names.",
                  "properties": []
                },
                {
                  "name": "options.onProgress",
                  "type": "Function",
                  "default": "null",
                  "description": "Optional callback receiving run and iteration progress.",
                  "properties": []
                },
                {
                  "name": "options.progressInterval",
                  "type": "number=",
                  "default": null,
                  "description": "Iteration interval between progress callbacks.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Best-run NMF result with signatures, exposures, reconstruction, and run metrics."
            }
          ],
          "examples": [
            "const nmf = mSigSDK.signatureExtraction.extractSignaturesNMF(groupedSpectra, {\r\n  rank: 3,\r\n  nRuns: 10,\r\n  seed: 123,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/signatureExtraction.js",
            "line": 622
          }
        },
        {
          "name": "extractSignaturesNMFInWorker",
          "kind": "function",
          "async": false,
          "sourceNamespace": "signatureExtraction",
          "description": "Runs NMF extraction in a browser Web Worker when available.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Options passed to extractSignaturesNMF.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "NMF result from the worker or synchronous fallback."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/signatureExtraction.js",
            "line": 949
          }
        },
        {
          "name": "selectNMFRank",
          "kind": "function",
          "async": false,
          "sourceNamespace": "signatureExtraction",
          "description": "Runs NMF across a rank grid and recommends a rank using the requested criterion.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Rank selection options.",
              "properties": [
                {
                  "name": "options.ranks",
                  "type": "Array<number>=",
                  "default": null,
                  "description": "Candidate ranks to evaluate.",
                  "properties": []
                },
                {
                  "name": "options.maxIterations",
                  "type": "number",
                  "default": "1000",
                  "description": "Maximum iterations per run.",
                  "properties": []
                },
                {
                  "name": "options.tolerance",
                  "type": "number",
                  "default": "1e-5",
                  "description": "Convergence tolerance.",
                  "properties": []
                },
                {
                  "name": "options.nRuns",
                  "type": "number",
                  "default": "10",
                  "description": "Random starts per rank.",
                  "properties": []
                },
                {
                  "name": "options.seed",
                  "type": "number",
                  "default": "123",
                  "description": "Base seed.",
                  "properties": []
                },
                {
                  "name": "options.rankSelectionCriterion",
                  "type": "string",
                  "default": "\"reconstruction_error\"",
                  "description": "Criterion used to select rank: \"reconstruction_error\", \"cophenetic\", or \"silhouette\".",
                  "properties": []
                },
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context order to use.",
                  "properties": []
                },
                {
                  "name": "options.sampleNames",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Sample order to use.",
                  "properties": []
                },
                {
                  "name": "options.onProgress",
                  "type": "Function",
                  "default": "null",
                  "description": "Optional callback receiving rank, run, and iteration progress.",
                  "properties": []
                },
                {
                  "name": "options.progressInterval",
                  "type": "number=",
                  "default": null,
                  "description": "Iteration interval between progress callbacks.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Candidate runs, embedded NMF results, and recommended rank."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/signatureExtraction.js",
            "line": 720
          }
        },
        {
          "name": "spectraToMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "signatureExtraction",
          "description": "Converts sample spectra into the numeric matrix used by NMF extraction.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Matrix conversion options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Context row order.",
                  "properties": []
                },
                {
                  "name": "options.sampleNames",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Sample column order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/signatureExtraction.js",
            "line": 48
          }
        }
      ]
    },
    {
      "name": "signatureExtractionPlots",
      "label": "Extraction plots",
      "summary": "NMF profile, exposure, and rank-selection plots.",
      "functions": [
        {
          "name": "plotNMFExposureHeatmap",
          "kind": "function",
          "async": true,
          "sourceNamespace": "signatureExtractionPlots",
          "description": "Renders a heatmap of sample exposures from an NMF result.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "nmfResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.signatureExtraction.extractSignaturesNMF.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": [
                {
                  "name": "options.relative",
                  "type": "boolean",
                  "default": "true",
                  "description": "Plot relative exposures per sample.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8305
          }
        },
        {
          "name": "plotNMFRankSelection",
          "kind": "function",
          "async": true,
          "sourceNamespace": "signatureExtractionPlots",
          "description": "Renders rank-selection diagnostics from a rank-grid NMF run.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "rankSelection",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.signatureExtraction.selectNMFRank.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object | Element>",
              "description": "Render metadata or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8488
          }
        },
        {
          "name": "plotNMFSignatureProfiles",
          "kind": "function",
          "async": true,
          "sourceNamespace": "signatureExtractionPlots",
          "description": "Renders extracted NMF signature profiles with the SBS96 profile renderer.",
          "params": [
            {
              "name": "divID",
              "type": "string | Element",
              "default": null,
              "description": "Container element or element id.",
              "properties": []
            },
            {
              "name": "nmfResult",
              "type": "Object",
              "default": null,
              "description": "Result from mSigSDK.signatureExtraction.extractSignaturesNMF.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Plot options.",
              "properties": [
                {
                  "name": "options.maxSignatures",
                  "type": "number",
                  "default": "Infinity",
                  "description": "Maximum signatures to render.",
                  "properties": []
                },
                {
                  "name": "options.columns",
                  "type": "number | null",
                  "default": "null",
                  "description": "Optional number of columns for the rendered component profiles.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Array | Element>",
              "description": "Rendered profile results or an error element."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8211
          }
        }
      ]
    },
    {
      "name": "io",
      "label": "Import and export",
      "summary": "JSON, CSV, TSV, HTML, report, and archive helpers.",
      "functions": [
        {
          "name": "exportCOSMICSignatureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Exports signatures in COSMIC-style MutationType-by-signature format.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Mutation-context row order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "string",
              "description": "Tab-separated COSMIC-style signature matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 285
          }
        },
        {
          "name": "exportMatrixTSV",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Serializes a row-oriented matrix object as tab-separated text.",
          "params": [
            {
              "name": "matrix",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Matrix keyed by row name.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": [
                {
                  "name": "options.rowHeader",
                  "type": "string",
                  "default": "\"id\"",
                  "description": "Header label for the row-name column.",
                  "properties": []
                },
                {
                  "name": "options.columns",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Column order to export.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "string",
              "description": "Tab-separated matrix text."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 48
          }
        },
        {
          "name": "exportMuSiCalInput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Exports spectra and optional signatures in MuSiCal-compatible tabular form.MuSiCal accepts mutation-type rows with sample or signature columns for count matrices and signature catalogs. This helper emits the same orientation used by SigProfiler/COSMIC TSV files, which is the safest interchange format for comparing SDK spectra, fitted exposures, and external MuSiCal results.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Matrices to export.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra matrix.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": "null",
                  "description": "Optional signature matrix.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Mutation-context row order.",
                  "properties": []
                },
                {
                  "name": "options.delimiter",
                  "type": "string",
                  "default": "\"\\t\"",
                  "description": "Column delimiter.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "MuSiCal-compatible matrix text and manifest metadata."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 352
          }
        },
        {
          "name": "exportSigProfilerMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Exports spectra in SigProfiler-style MutationType-by-sample format.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Mutation-context row order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "string",
              "description": "Tab-separated SigProfiler-style matrix."
            }
          ],
          "examples": [
            "const tsv = mSigSDK.io.exportSigProfilerMatrix(groupedSpectra, {\r\n  contexts: mSigSDK.validation.getExpectedContexts({ profile: \"SBS\", matrix: 96 }),\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 230
          }
        },
        {
          "name": "exposureMatrixToRows",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Converts an exposure matrix into long-form rows.",
          "params": [
            {
              "name": "exposures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample-by-signature exposure matrix.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Rows with sample, signatureName, and exposure fields."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 159
          }
        },
        {
          "name": "importCOSMICSignatureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Imports a COSMIC-style MutationType-by-signature matrix.",
          "params": [
            {
              "name": "text",
              "type": "string",
              "default": null,
              "description": "COSMIC-style delimited matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Import options.",
              "properties": [
                {
                  "name": "options.delimiter",
                  "type": "string",
                  "default": "\"\\t\"",
                  "description": "Column delimiter.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Signature matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 313
          }
        },
        {
          "name": "importMatrixTSV",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Parses a tabular matrix into a row-oriented matrix object.",
          "params": [
            {
              "name": "text",
              "type": "string",
              "default": null,
              "description": "Delimited matrix text.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Import options.",
              "properties": [
                {
                  "name": "options.idColumn",
                  "type": "number",
                  "default": "0",
                  "description": "Index of the row-name column.",
                  "properties": []
                },
                {
                  "name": "options.delimiter",
                  "type": "string",
                  "default": "\"\\t\"",
                  "description": "Column delimiter.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Parsed matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 74
          }
        },
        {
          "name": "importMuSiCalOutput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Imports MuSiCal exposure output into a sample-by-signature matrix.The parser accepts both common orientations: sample rows with signature columns, or signature rows with sample columns. Auto-detection is based on the leading header and first-column labels, with an explicit orientation override available for scripted workflows.",
          "params": [
            {
              "name": "text",
              "type": "string",
              "default": null,
              "description": "Delimited MuSiCal exposure table.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Import options.",
              "properties": [
                {
                  "name": "options.delimiter",
                  "type": "string",
                  "default": "\"\\t\"",
                  "description": "Column delimiter.",
                  "properties": []
                },
                {
                  "name": "options.orientation",
                  "type": "StringLiteralType | StringLiteralType | StringLiteralType",
                  "default": "\"auto\"",
                  "description": "Exposure table orientation.",
                  "properties": []
                },
                {
                  "name": "options.normalize",
                  "type": "boolean",
                  "default": "false",
                  "description": "Normalize exposures within each sample.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Sample-by-signature exposure matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 427
          }
        },
        {
          "name": "importSigProfilerMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Imports a SigProfiler-style MutationType-by-sample matrix.",
          "params": [
            {
              "name": "text",
              "type": "string",
              "default": null,
              "description": "SigProfiler-style delimited matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Import options.",
              "properties": [
                {
                  "name": "options.delimiter",
                  "type": "string",
                  "default": "\"\\t\"",
                  "description": "Column delimiter.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Sample spectra matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 256
          }
        },
        {
          "name": "rowsToExposureMatrix",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Converts long-form exposure rows into a sample-by-signature matrix.",
          "params": [
            {
              "name": "rows",
              "type": "Array<Object>",
              "default": null,
              "description": "Exposure rows.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Field mapping options.",
              "properties": [
                {
                  "name": "options.sampleKey",
                  "type": "string",
                  "default": "\"sample\"",
                  "description": "Sample identifier field.",
                  "properties": []
                },
                {
                  "name": "options.signatureKey",
                  "type": "string",
                  "default": "\"signatureName\"",
                  "description": "Signature identifier field.",
                  "properties": []
                },
                {
                  "name": "options.exposureKey",
                  "type": "string",
                  "default": "\"exposure\"",
                  "description": "Exposure value field.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object<string, Object<string, number>>",
              "description": "Exposure matrix."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 188
          }
        },
        {
          "name": "signatureMatrixToRows",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Converts a signature matrix into long-form rows.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Signature matrix.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Rows with signatureName, mutationType, and contribution fields."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 134
          }
        },
        {
          "name": "spectraToRows",
          "kind": "function",
          "async": false,
          "sourceNamespace": "io",
          "description": "Converts a sample spectra matrix into long-form rows.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Array<Object>",
              "description": "Rows with sample, mutationType, and mutations fields."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/io.js",
            "line": 109
          }
        }
      ]
    },
    {
      "name": "reports",
      "label": "Reports",
      "summary": "Structured analysis reports, HTML rendering, and schema-ready report rows.",
      "functions": [
        {
          "name": "createAnalysisReport",
          "kind": "function",
          "async": false,
          "sourceNamespace": "reports",
          "description": "Builds a structured analysis report from validation, QC, extraction, and provenance objects.",
          "params": [
            {
              "name": "reportInput",
              "type": "Object=",
              "default": null,
              "description": "Report fields.",
              "properties": [
                {
                  "name": "reportInput.title",
                  "type": "string",
                  "default": "\"mSigSDK Analysis Report\"",
                  "description": "Report title.",
                  "properties": []
                },
                {
                  "name": "reportInput.summary",
                  "type": "string",
                  "default": "\"\"",
                  "description": "Short report summary.",
                  "properties": []
                },
                {
                  "name": "reportInput.parameters",
                  "type": "Object",
                  "default": "{}",
                  "description": "Analysis parameters.",
                  "properties": []
                },
                {
                  "name": "reportInput.validation",
                  "type": "Object",
                  "default": "null",
                  "description": "Validation result object.",
                  "properties": []
                },
                {
                  "name": "reportInput.qc",
                  "type": "Object",
                  "default": "null",
                  "description": "QC result object.",
                  "properties": []
                },
                {
                  "name": "reportInput.signatures",
                  "type": "Object",
                  "default": "null",
                  "description": "Signature matrix or summary.",
                  "properties": []
                },
                {
                  "name": "reportInput.exposures",
                  "type": "Object",
                  "default": "null",
                  "description": "Exposure matrix or summary.",
                  "properties": []
                },
                {
                  "name": "reportInput.extraction",
                  "type": "Object",
                  "default": "null",
                  "description": "Signature extraction summary.",
                  "properties": []
                },
                {
                  "name": "reportInput.provenance",
                  "type": "Object",
                  "default": "null",
                  "description": "Provenance record.",
                  "properties": []
                },
                {
                  "name": "reportInput.citations",
                  "type": "Array<string>",
                  "default": "[]",
                  "description": "Citations to include.",
                  "properties": []
                },
                {
                  "name": "reportInput.notes",
                  "type": "string | Array<string>",
                  "default": "[]",
                  "description": "Free-text report notes.",
                  "properties": []
                },
                {
                  "name": "reportInput.workflowRole",
                  "type": "string",
                  "default": "null",
                  "description": "Optional workflow role label.",
                  "properties": []
                },
                {
                  "name": "reportInput.scopeStatement",
                  "type": "string",
                  "default": "null",
                  "description": "Optional interpretation scope statement.",
                  "properties": []
                },
                {
                  "name": "reportInput.methodBasis",
                  "type": "Object",
                  "default": "null",
                  "description": "Optional method-basis metadata.",
                  "properties": []
                },
                {
                  "name": "reportInput.primaryInterpretationFields",
                  "type": "Array<string>",
                  "default": "[]",
                  "description": "Primary fields for downstream interpretation.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Output options.",
              "properties": [
                {
                  "name": "options.format",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object | string",
              "description": "Structured report object, JSON string, or HTML string."
            }
          ],
          "examples": [
            "const report = mSigSDK.reports.createAnalysisReport({\r\n  title: \"Signature fitting QC report\",\r\n  validation,\r\n  qc,\r\n  provenance,\r\n});"
          ],
          "source": {
            "file": "mSigSDKScripts/reports.js",
            "line": 97
          }
        },
        {
          "name": "createAnalysisReportHTML",
          "kind": "function",
          "async": false,
          "sourceNamespace": "reports",
          "description": "Renders a structured analysis report as standalone HTML.",
          "params": [
            {
              "name": "report",
              "type": "Object",
              "default": null,
              "description": "Report object returned by createAnalysisReport.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "string",
              "description": "HTML document string."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/reports.js",
            "line": 166
          }
        },
        {
          "name": "downloadAnalysisReport",
          "kind": "function",
          "async": false,
          "sourceNamespace": "reports",
          "description": "Downloads an analysis report as an HTML file in the browser.",
          "params": [
            {
              "name": "report",
              "type": "Object | string",
              "default": null,
              "description": "Report object or pre-rendered HTML.",
              "properties": []
            },
            {
              "name": "filename",
              "type": "string",
              "default": "\"msig-analysis-report.html\"",
              "description": "Download filename.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "void",
              "description": ""
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/reports.js",
            "line": 228
          }
        }
      ]
    },
    {
      "name": "advisor",
      "label": "Decision guidance",
      "summary": "Decision guidance for reporting mode, warnings, and recommended next actions.",
      "functions": [
        {
          "name": "computeFitQualityEvidence",
          "kind": "function",
          "async": false,
          "sourceNamespace": "advisor",
          "description": "Builds a literature-aligned QC evidence report for known-signature fitting.Reports burden, reconstruction, residual, bootstrap, threshold, ambiguity, and catalog-sufficiency diagnostics so callers can apply study-specific reporting rules.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Fitted spectra, signatures, exposures, and optional QC objects.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "QC evidence options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Per-sample QC evidence, caveats, and next actions."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 2264
          }
        },
        {
          "name": "computeSignatureAmbiguity",
          "kind": "function",
          "async": false,
          "sourceNamespace": "advisor",
          "description": "Computes catalog-level signature ambiguity and flat-signature risk.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Ambiguity options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Per-signature ambiguity, pairwise confusability, and warnings."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 1646
          }
        },
        {
          "name": "computeSignatureIdentifiability",
          "kind": "function",
          "async": false,
          "sourceNamespace": "advisor",
          "description": "Computes selected-catalog signature identifiability evidence.Alias of computeSignatureAmbiguity with clearer terminology for new code.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Identifiability options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Per-signature confusability scores, evidence tags, neighbors, and warnings."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 2013
          }
        },
        {
          "name": "detectOutOfReferenceSignal",
          "kind": "function",
          "async": false,
          "sourceNamespace": "advisor",
          "description": "Looks for residual evidence that fitted spectra contain out-of-reference signal.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Fitted spectra, signatures, exposures, and optional residuals.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Catalog sufficiency options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Per-sample catalog sufficiency checks and recommendations."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 2027
          }
        },
        {
          "name": "recommendAnalysisStrategy",
          "kind": "function",
          "async": false,
          "sourceNamespace": "advisor",
          "description": "Recommends a burden-aware analysis strategy for one sample or a cohort.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>> | Object<string, number>",
              "default": null,
              "description": "Sample spectra matrix or one spectrum.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Advisor options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Strategy recommendation, caveats, warnings, and next actions."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 1447
          }
        }
      ]
    },
    {
      "name": "pipelines",
      "label": "Pipeline APIs",
      "summary": "Full-control workflow APIs with validation, QC, reporting, and provenance blocks.",
      "functions": [
        {
          "name": "runCohortFit",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs an opinionated cohort refitting workflow with subgroup guidance.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Cohort spectra and reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Fitting and reporting options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Cohort fit, subgroup structure, fit-quality evidence, residuals, and report artifacts."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 3433
          }
        },
        {
          "name": "runCohortFitLite",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs the beginner-facing cohort refit path with stable cohort-review defaults.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Cohort spectra, signatures, and optional metadata.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Minimal options: contexts, exposureThreshold, lowBurdenThreshold, metadata, groupKey, reportFormat.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Standard pipeline result frame."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 4891
          }
        },
        {
          "name": "runDiscoveryWorkflow",
          "kind": "function",
          "async": false,
          "sourceNamespace": "pipelines",
          "description": "Runs cohort discovery with burden-aware gating, NMF rank selection, and reference matching.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Cohort spectra and optional reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Discovery options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Advisor, optional extraction, reference matches, and publication artifacts."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 3879
          }
        },
        {
          "name": "runDiscoveryWorkflowLite",
          "kind": "function",
          "async": false,
          "sourceNamespace": "pipelines",
          "description": "Runs the beginner-facing discovery path with a fixed rank unless rank selection is requested.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Cohort spectra and optional reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Minimal options: contexts, rank, ranks, runRankSelection, reportFormat.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Standard discovery workflow result frame."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 4953
          }
        },
        {
          "name": "runPanelWorkflow",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs a panel/WES-oriented workflow with opportunity normalization and review evidence tiers.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Panel or WES spectra, signatures, and optional callable opportunities.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Panel workflow options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Fit result plus panel evidence calls and limitations."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 4480
          }
        },
        {
          "name": "runPanelWorkflowLite",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs the beginner-facing panel/WES review path with stable defaults.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Restricted-assay spectra, signatures, and optional callable opportunities.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Minimal options: contexts, genomeBuild, callableOpportunities, referenceOpportunities, reportFormat.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Standard panel workflow result frame."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 4922
          }
        },
        {
          "name": "runSingleSampleFit",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs an opinionated single-sample signature refitting workflow.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Input spectrum and reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Fitting, bootstrap, threshold, and reporting options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Fitted spectrum, fit-quality evidence, ambiguity, residuals, catalog check, and report artifacts."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 2668
          }
        },
        {
          "name": "runSingleSampleFitLite",
          "kind": "function",
          "async": true,
          "sourceNamespace": "pipelines",
          "description": "Runs the beginner-facing single-sample refit path with a small option set.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectrum and reference signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Minimal options: contexts, sampleName, exposureThreshold, bootstrapIterations, genomeBuild, reportFormat.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Standard pipeline result frame."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/guidance.js",
            "line": 4861
          }
        }
      ]
    },
    {
      "name": "workflows",
      "label": "Workflow wrappers",
      "summary": "High-level analysis wrappers for signature fitting and NMF workflows.",
      "functions": [
        {
          "name": "analyzeMafFiles",
          "kind": "function",
          "async": true,
          "sourceNamespace": "workflows",
          "description": "Converts MAF rows to spectra, then optionally fits known signatures and assembles QC/report outputs.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": "null",
              "description": "Optional reference signatures for fitting.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Workflow options.",
              "properties": [
                {
                  "name": "options.groupBy",
                  "type": "string",
                  "default": "\"project_code\"",
                  "description": "MAF field used to group spectra.",
                  "properties": []
                },
                {
                  "name": "options.batchSize",
                  "type": "number",
                  "default": "100",
                  "description": "Conversion batch size.",
                  "properties": []
                },
                {
                  "name": "options.genome",
                  "type": "string",
                  "default": "\"hg19\"",
                  "description": "Reference genome.",
                  "properties": []
                },
                {
                  "name": "options.tcga",
                  "type": "boolean",
                  "default": "false",
                  "description": "Whether to apply TCGA-specific conversion behavior.",
                  "properties": []
                },
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected mutation contexts.",
                  "properties": []
                },
                {
                  "name": "options.reportFormat",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                },
                {
                  "name": "options.fitting",
                  "type": "Object",
                  "default": "{}",
                  "description": "Options passed to analyzeSpectraWithSignatures when signatures are supplied.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Spectra-only QC/report output or full signature-fitting workflow output."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8806
          }
        },
        {
          "name": "analyzeSpectraWithSignatures",
          "kind": "function",
          "async": true,
          "sourceNamespace": "workflows",
          "description": "Fits sample spectra to known signatures and returns exposures, QC, provenance, and a report.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Reference signature matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Workflow options.",
              "properties": [
                {
                  "name": "options.exposureThreshold",
                  "type": "number",
                  "default": "0",
                  "description": "Relative exposure cutoff.",
                  "properties": []
                },
                {
                  "name": "options.exposureType",
                  "type": "string",
                  "default": "\"relative\"",
                  "description": "Exposure scaling mode.",
                  "properties": []
                },
                {
                  "name": "options.renormalize",
                  "type": "boolean",
                  "default": "true",
                  "description": "Renormalize after thresholding.",
                  "properties": []
                },
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected mutation contexts.",
                  "properties": []
                },
                {
                  "name": "options.mutationBurdenOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Mutation-burden QC options.",
                  "properties": []
                },
                {
                  "name": "options.parameters",
                  "type": "Object",
                  "default": "{}",
                  "description": "Additional report/provenance parameters.",
                  "properties": []
                },
                {
                  "name": "options.reportFormat",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Exposures, provenance, validation, QC, and report objects."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8671
          }
        },
        {
          "name": "createNMFAnalysis",
          "kind": "function",
          "async": false,
          "sourceNamespace": "workflows",
          "description": "Runs NMF extraction and assembles validation, QC, optional reference comparison, and a report.",
          "params": [
            {
              "name": "input",
              "type": "Object=",
              "default": null,
              "description": "Workflow inputs.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra matrix.",
                  "properties": []
                },
                {
                  "name": "input.referenceSignatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": "null",
                  "description": "Optional reference signatures for post hoc matching.",
                  "properties": []
                },
                {
                  "name": "input.nmfOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Options for extractSignaturesNMF.",
                  "properties": []
                },
                {
                  "name": "input.parameters",
                  "type": "Object",
                  "default": "{}",
                  "description": "Analysis parameters to include in the report.",
                  "properties": []
                },
                {
                  "name": "input.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected mutation contexts.",
                  "properties": []
                },
                {
                  "name": "input.mutationBurdenOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Options for summarizeMutationBurden.",
                  "properties": []
                },
                {
                  "name": "input.provenance",
                  "type": "Object",
                  "default": "null",
                  "description": "Provenance record to include.",
                  "properties": []
                },
                {
                  "name": "input.reportFormat",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation, extraction, comparison, QC, and report objects."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/workflows.js",
            "line": 213
          }
        },
        {
          "name": "createSignatureFitAnalysis",
          "kind": "function",
          "async": false,
          "sourceNamespace": "workflows",
          "description": "Assembles validation, QC, residuals, reconstruction metrics, and a report for fitted signatures.",
          "params": [
            {
              "name": "input",
              "type": "Object=",
              "default": null,
              "description": "Workflow inputs.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra matrix.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature matrix.",
                  "properties": []
                },
                {
                  "name": "input.exposures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Exposure matrix.",
                  "properties": []
                },
                {
                  "name": "input.parameters",
                  "type": "Object",
                  "default": "{}",
                  "description": "Analysis parameters to include in the report.",
                  "properties": []
                },
                {
                  "name": "input.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected mutation contexts.",
                  "properties": []
                },
                {
                  "name": "input.mutationBurdenOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Options for summarizeMutationBurden.",
                  "properties": []
                },
                {
                  "name": "input.provenance",
                  "type": "Object",
                  "default": "null",
                  "description": "Provenance record to include.",
                  "properties": []
                },
                {
                  "name": "input.reportFormat",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Validation, QC, and report objects."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/workflows.js",
            "line": 68
          }
        },
        {
          "name": "extractSignaturesFromSpectra",
          "kind": "function",
          "async": false,
          "sourceNamespace": "workflows",
          "description": "Runs de novo NMF extraction and returns extraction, comparison, QC, provenance, and a report.",
          "params": [
            {
              "name": "spectra",
              "type": "Object<string, Object<string, number>>",
              "default": null,
              "description": "Sample spectra matrix.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Workflow options.",
              "properties": [
                {
                  "name": "options.referenceSignatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": "null",
                  "description": "Optional reference catalog for matching.",
                  "properties": []
                },
                {
                  "name": "options.nmfOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Options passed to extractSignaturesNMF.",
                  "properties": []
                },
                {
                  "name": "options.expectedContexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Expected mutation contexts.",
                  "properties": []
                },
                {
                  "name": "options.mutationBurdenOptions",
                  "type": "Object",
                  "default": "{}",
                  "description": "Mutation-burden QC options.",
                  "properties": []
                },
                {
                  "name": "options.parameters",
                  "type": "Object",
                  "default": "{}",
                  "description": "Additional report/provenance parameters.",
                  "properties": []
                },
                {
                  "name": "options.reportFormat",
                  "type": "string",
                  "default": "\"object\"",
                  "description": "\"object\", \"json\", or \"html\".",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Provenance, extraction, optional comparison, validation, QC, and report objects."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 8753
          }
        }
      ]
    },
    {
      "name": "quickstart",
      "label": "Quickstart wrappers",
      "summary": "Small-option entry points for MAF, cohort, panel, and report workflows.",
      "functions": [
        {
          "name": "analyzeMafFilesLite",
          "kind": "function",
          "async": true,
          "sourceNamespace": "quickstart",
          "description": "Beginner-facing MAF analysis wrapper with a small option set.",
          "params": [
            {
              "name": "signatures",
              "type": "Object<string, Object<string, number>>",
              "default": "null",
              "description": "Optional reference signatures for fitting.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Minimal options: groupBy, genome, offline, contextLookupTable, expectedContexts, reportFormat.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "MAF-to-spectra or signature-fitting workflow result."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 9138
          }
        }
      ]
    },
    {
      "name": "provenance",
      "label": "Provenance",
      "summary": "Reproducibility metadata for SDK version, source data, genome context, and runtime.",
      "functions": [
        {
          "name": "createProvenance",
          "kind": "function",
          "async": false,
          "sourceNamespace": "provenance",
          "description": "Creates a reproducibility record for an analysis result.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Provenance fields to include.",
              "properties": [
                {
                  "name": "options.analysis",
                  "type": "string=",
                  "default": null,
                  "description": "Short name for the analysis.",
                  "properties": []
                },
                {
                  "name": "options.parameters",
                  "type": "Object=",
                  "default": null,
                  "description": "Parameters used to generate the result.",
                  "properties": []
                },
                {
                  "name": "options.sourceUrls",
                  "type": "string | Array<string>=",
                  "default": null,
                  "description": "Source URLs used by the analysis.",
                  "properties": []
                },
                {
                  "name": "options.dataSources",
                  "type": "Object | Array<Object>=",
                  "default": null,
                  "description": "Optional structured source metadata.",
                  "properties": []
                },
                {
                  "name": "options.notes",
                  "type": "string | Array<string>=",
                  "default": null,
                  "description": "Optional free-text notes.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Versioned SDK, runtime, source, and parameter metadata."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 573
          }
        },
        {
          "name": "withProvenance",
          "kind": "function",
          "async": false,
          "sourceNamespace": "provenance",
          "description": "Wraps a result with a reproducibility record.",
          "params": [
            {
              "name": "data",
              "type": "*",
              "default": null,
              "description": "Analysis output to preserve.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Options passed to createProvenance.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Data plus provenance metadata."
            }
          ],
          "examples": [],
          "source": {
            "file": "main.js",
            "line": 742
          }
        }
      ]
    },
    {
      "name": "presentation",
      "label": "Presentation helpers",
      "summary": "Publication-context summaries and tooltip text for generated figures.",
      "functions": []
    },
    {
      "name": "runners",
      "label": "Browser runtimes",
      "summary": "Optional Pyodide and WebR execution helpers for compatible packages.",
      "functions": [
        {
          "name": "checkWebRPackageAvailability",
          "kind": "function",
          "async": true,
          "sourceNamespace": "runners",
          "description": "Checks package availability in public or caller-supplied webR repositories.",
          "params": [
            {
              "name": "packages",
              "type": "string | Array<string>",
              "default": null,
              "description": "R packages to check.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Repository and package-index options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Package availability by name."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 609
          }
        },
        {
          "name": "createPyodideWorkerRunner",
          "kind": "function",
          "async": false,
          "sourceNamespace": "runners",
          "description": "Creates a reusable Pyodide Web Worker runner.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runner options.",
              "properties": [
                {
                  "name": "options.workerUrl",
                  "type": "string",
                  "default": "null",
                  "description": "Custom worker script URL.",
                  "properties": []
                },
                {
                  "name": "options.pyodideIndexURL",
                  "type": "string=",
                  "default": null,
                  "description": "Pyodide distribution base URL.",
                  "properties": []
                },
                {
                  "name": "options.pyodideScriptURL",
                  "type": "string=",
                  "default": null,
                  "description": "Explicit pyodide.js URL.",
                  "properties": []
                },
                {
                  "name": "options.timeoutMs",
                  "type": "number",
                  "default": "120000",
                  "description": "Per-run timeout in milliseconds.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Runner with run and terminate methods."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 336
          }
        },
        {
          "name": "createWebRRunner",
          "kind": "function",
          "async": false,
          "sourceNamespace": "runners",
          "description": "Creates a reusable webR runner.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runner options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Runner with run and terminate methods."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 774
          }
        },
        {
          "name": "detectPyodideRuntime",
          "kind": "function",
          "async": false,
          "sourceNamespace": "runners",
          "description": "Reports whether the current JavaScript runtime can create a Pyodide worker.",
          "params": [],
          "returns": [
            {
              "type": "Object",
              "description": "Runtime availability and missing browser capabilities."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 304
          }
        },
        {
          "name": "detectWebRRuntime",
          "kind": "function",
          "async": false,
          "sourceNamespace": "runners",
          "description": "Reports whether the current JavaScript runtime can create and communicate with a webR runtime.",
          "params": [],
          "returns": [
            {
              "type": "Object",
              "description": "Runtime availability and missing browser capabilities."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 531
          }
        },
        {
          "name": "runPyodide",
          "kind": "function",
          "async": true,
          "sourceNamespace": "runners",
          "description": "Runs one Pyodide job in a temporary Web Worker.",
          "params": [
            {
              "name": "payload",
              "type": "Object",
              "default": null,
              "description": "Python code, packages, files, and output collection options.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runner construction options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Result, collected files, package metadata, and elapsed time."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 456
          }
        },
        {
          "name": "runPython",
          "kind": "function",
          "async": true,
          "sourceNamespace": "runners",
          "description": "Runs Python code in Pyodide with a small JavaScript-first API.The optional inputs object is serialized to MSIG_INPUT_JSON in the Python runtime, and string results are parsed as JSON by default so structured Python outputs are returned as ordinary JavaScript objects.",
          "params": [
            {
              "name": "code",
              "type": "string",
              "default": null,
              "description": "Python code to execute.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Python inputs, packages, files, output collection, and runner options.",
              "properties": [
                {
                  "name": "options.inputs",
                  "type": "Object",
                  "default": "null",
                  "description": "JSON-serializable input object exposed as MSIG_INPUT_JSON.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Result, collected files, package metadata, and elapsed time."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 480
          }
        },
        {
          "name": "runWebR",
          "kind": "function",
          "async": true,
          "sourceNamespace": "runners",
          "description": "Runs one webR job in a temporary runtime.",
          "params": [
            {
              "name": "payload",
              "type": "Object",
              "default": null,
              "description": "R code, packages, files, and output collection options.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runner construction options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Result, collected files, package metadata, and elapsed time."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/runners.js",
            "line": 938
          }
        }
      ]
    },
    {
      "name": "adapters",
      "label": "External adapters",
      "summary": "Exact package adapters for SigProfilerAssignment, MuSiCal, deconstructSigs, and sigminer.",
      "functions": [
        {
          "name": "checkDeconstructSigsWebRAvailability",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Checks whether exact deconstructSigs execution can run through webR.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "webR package repository options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Availability status with runtime and package details."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1495
          }
        },
        {
          "name": "checkSigminerWebRAvailability",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Checks whether exact sigminer execution can run through webR.",
          "params": [
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "webR package repository and sigminer method options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Availability status with runtime and package details."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1509
          }
        },
        {
          "name": "createInteroperabilityBundle",
          "kind": "function",
          "async": false,
          "sourceNamespace": "adapters",
          "description": "Creates a multi-tool interoperability bundle from the same spectra and catalog.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and optional signatures.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": "null",
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Context and tool-specific export options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Prepared handoff bundles for supported external tools."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1955
          }
        },
        {
          "name": "prepareDeconstructSigsInput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "adapters",
          "description": "Prepares input files and an R snippet for deconstructSigs handoff.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signature catalog.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export and R script options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Virtual files, manifest metadata, and an R command snippet."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1174
          }
        },
        {
          "name": "prepareMuSiCalRefitInput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "adapters",
          "description": "Prepares MuSiCal-compatible spectra and signature files for refitting.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signatures.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Virtual files and manifest metadata for refit workflows."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1911
          }
        },
        {
          "name": "prepareSigminerInput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "adapters",
          "description": "Prepares input files and an R snippet for sigminer known-signature fitting.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signature catalog.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export and sigminer fitting options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Virtual files, manifest metadata, and an R command snippet."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1330
          }
        },
        {
          "name": "prepareSigProfilerAssignmentInput",
          "kind": "function",
          "async": false,
          "sourceNamespace": "adapters",
          "description": "Prepares matrix-mode input files for SigProfilerAssignment.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Input matrices.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": "null",
                  "description": "Optional custom signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Export options.",
              "properties": [
                {
                  "name": "options.contexts",
                  "type": "Array<string>",
                  "default": "null",
                  "description": "Mutation-context row order.",
                  "properties": []
                }
              ]
            }
          ],
          "returns": [
            {
              "type": "Object",
              "description": "Virtual files and manifest metadata for a Pyodide run."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 368
          }
        },
        {
          "name": "runDeconstructSigsWebR",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Runs the deconstructSigs R package through webR when compatible package builds are available.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signature catalog.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Handoff, webR, and package options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Exact package result with parsed exposures."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1535
          }
        },
        {
          "name": "runMuSiCalRefit",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Runs MuSiCal refitting through Pyodide using the actual MuSiCal package.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signature catalog.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runtime and refit options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Refit result with exposures and provenance."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 2062
          }
        },
        {
          "name": "runSigminerWebR",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Runs the sigminer R package through webR when compatible package builds are available.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and signature catalog.",
              "properties": [
                {
                  "name": "input.spectra",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Sample spectra.",
                  "properties": []
                },
                {
                  "name": "input.signatures",
                  "type": "Object<string, Object<string, number>>",
                  "default": null,
                  "description": "Signature catalog.",
                  "properties": []
                }
              ]
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Handoff, webR, package, and sigminer options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Exact package result with parsed exposures."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1631
          }
        },
        {
          "name": "runSigProfilerAssignment",
          "kind": "function",
          "async": true,
          "sourceNamespace": "adapters",
          "description": "Runs SigProfilerAssignment in matrix mode through the Pyodide worker runner.",
          "params": [
            {
              "name": "input",
              "type": "Object",
              "default": null,
              "description": "Spectra and optional custom signatures.",
              "properties": []
            },
            {
              "name": "options",
              "type": "Object=",
              "default": null,
              "description": "Runtime and SigProfilerAssignment options.",
              "properties": []
            }
          ],
          "returns": [
            {
              "type": "Promise<Object>",
              "description": "Adapter result with collected files and parsed exposure table when detected."
            }
          ],
          "examples": [],
          "source": {
            "file": "mSigSDKScripts/adapters.js",
            "line": 1733
          }
        }
      ]
    }
  ]
}
