[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CTS5V3A78H9SEFFJTJAQPM":3,"skill-same:01M7CTS5V3A78H9SEFFJTJAQPM":118},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7CTS5V3A78H9SEFFJTJAQPM","external-model-validation",null,"Use when validating an existing prognostic risk signature on an external bulk expression cohort with survival outcomes, producing risk scores, Kaplan-Meier curves, risk distribution plots, heatmap, and time-dependent ROC curves. NOT for: model training, feature selection, nomogram construction, calibration analysis, or single-cell data.","mrsonord2240\u002Fopenscience-specialists","mrsonord2240","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F76487430?v=4","01M7CTEM40S43GSJZ9A3YCCXZK","Samuel Nord","01M7CTEM4K69JD1GBYNHVJ9ZP4",2,"MIT","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: external-model-validation\ndescription: \"Use when validating an existing prognostic risk signature on an external bulk expression cohort with survival outcomes, producing risk scores, Kaplan-Meier curves, risk distribution plots, heatmap, and time-dependent ROC curves. NOT for: model training, feature selection, nomogram construction, calibration analysis, or single-cell data.\"\nlicense: MIT\nskill-author: AIPOCH\n---\n\n# External Model Validation\n\n## Input Validation\n\nThis skill accepts: an existing prognostic gene signature (model coefficient file with `Gene` and `Coef` columns), a bulk expression matrix in CSV format (genes as rows, samples as columns), and a clinical file with `OS` and `OS.time` survival columns.\n\nIf the user's request does not involve validating a pre-existing prognostic model on an external cohort — for example, asking to train a new model, perform feature selection, build a nomogram, run calibration curves, analyze single-cell data, or process data without survival endpoints — do not proceed with the workflow. Instead respond:\n\n> \"external-model-validation is designed to validate an existing prognostic risk signature on an external bulk expression cohort with survival outcomes. Your request appears to be outside this scope. Please provide a fixed model coefficient file plus expression and clinical data with OS\u002FOS.time columns, or use a more appropriate tool for model training, nomogram construction, or single-cell analysis.\"\n\n## When to Read External Files\n\n| Situation                                                        | File to Read                     | Purpose                                                                              |\n| ---------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |\n| **Need to run the analysis**                                     | `scripts\u002Fmain.R`                 | Execute: `Rscript scripts\u002Fmain.R --exp_file ... --cli_file ... --model_file ...`     |\n| **Need workflow order or output generation steps**               | `scripts\u002Frun_analysis.R`         | Review the 4-step orchestration of loading, scoring, plotting, and metadata export   |\n| **Need risk score or sample matching logic**                     | `scripts\u002Ffunctions.R`            | Inspect core data preparation and validation logic                                   |\n| **Need output writing or metadata export details**               | `scripts\u002Fio.R`                   | Inspect output directory creation and file-writing helpers                           |\n| **Need plotting implementation details**                         | `scripts\u002Fplotting.R`             | Inspect Kaplan-Meier, risk, heatmap, and ROC plot generation                         |\n| **Need input validation, logging, timeout, or dependency logic** | `scripts\u002Futils.R`                | Review validation helpers, `SKILL_*` error handling, logging, and runtime safeguards |\n| **Need statistical assumptions or method details**               | `references\u002Falgorithm.md`        | Risk score formula, group cutoff, survival analysis, ROC, and heatmap assumptions    |\n| **Need troubleshooting help**                                    | `references\u002Ftroubleshooting.md`  | Common failures, warnings, and concrete fixes                                        |\n| **Need CLI usage examples**                                      | `references\u002Fcli-guide.md`        | Parameter explanations, examples, and command patterns                               |\n| **Need expected outputs or benchmark run**                       | `references\u002Fbaseline-run.md`     | Real-data baseline command, runtime, memory checkpoints, and output inventory        |\n| **Need test inputs**                                             | `tests\u002Fdata\u002F`                    | Example expression, clinical, and model files for validation                         |\n| **Need to refresh the retained example output**                  | `tests\u002Frefresh_example_output.R` | Rebuild `tests\u002Foutput\u002F` with `--overwrite` using the bundled test data               |\n\n---\n\n## Usage\n\n```bash\nRscript scripts\u002Fmain.R \\\n  --exp_file .\u002Fexpression.csv \\\n  --cli_file .\u002Fclinical.csv \\\n  --model_file .\u002Fmodel.csv \\\n  --output_dir .\u002Foutput\u002F \\\n  --time_unit month \\\n  --seed 42\n```\n\n---\n\n## Arguments\n\n| Short | Long                | Type      | Default                   | Description                                                                                                                                                                                        |\n| ----- | ------------------- | --------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `-e`  | `--exp_file`        | character | **required**              | Expression matrix CSV with genes as rows and samples as columns                                                                                                                                    |\n| `-c`  | `--cli_file`        | character | **required**              | Clinical CSV with sample IDs as row names and `OS`, `OS.time` columns                                                                                                                              |\n| `-m`  | `--model_file`      | character | **required**              | Model coefficient CSV with `Gene` and `Coef` columns                                                                                                                                               |\n| `-o`  | `--output_dir`      | character | `.\u002Foutput\u002F`               | Output directory                                                                                                                                                                                   |\n|       | `--overwrite`       | flag      | `FALSE`                   | Allow writing into a non-empty output directory                                                                                                                                                    |\n| `-u`  | `--time_unit`       | character | `month`                   | Survival time unit in input clinical file: `day`, `month`, `year`                                                                                                                                  |\n|       | `--col_high`        | character | `#E64B35`                 | Color for high-risk samples                                                                                                                                                                        |\n|       | `--col_low`         | character | `#4DBBD5`                 | Color for low-risk samples                                                                                                                                                                         |\n|       | `--roc_cols`        | character | `#E64B35,#00A087,#3C5488` | Comma-separated colors for ROC curves                                                                                                                                                              |\n|       | `--roc_times`       | character | `1,3,5`                   | Comma-separated ROC time points **always in years**, regardless of `--time_unit`. When follow-up is in days or months, still provide `--roc_times` in years (e.g., `1,3,5` for 1, 3, and 5 years). |\n|       | `--roc_pos`         | character | `bottomright`             | ROC legend position                                                                                                                                                                                |\n|       | `--km_breaks`       | integer   | `0`                       | Kaplan-Meier x-axis break in years; `0` selects automatically                                                                                                                                      |\n| `-s`  | `--seed`            | integer   | `42`                      | Random seed for reproducibility                                                                                                                                                                    |\n|       | `--timeout_seconds` | integer   | `3600`                    | Elapsed timeout limit in seconds                                                                                                                                                                   |\n\n---\n\n## When to Use\n\n- You already have a fixed prognostic gene signature and coefficients.\n- You need to test that model on an independent cohort with bulk expression and survival data.\n- You want standard outputs for external validation: risk table, Kaplan-Meier curve, risk score plot, survival status plot, expression heatmap, and time-dependent ROC.\n\n## When Not to Use\n\n- Do not use this skill to train or re-fit a prognostic model.\n- Do not use it for nomogram construction, calibration curves, DCA, or diagnostic classification.\n- Do not use it for single-cell expression matrices or cohorts without survival endpoints.\n- Do not use identifiable patient data without de-identification and local compliance approval.\n- Do not use for cohorts with very few events (fewer than 5 events may produce unreliable Kaplan-Meier and ROC results).\n\n## Research Use Notice\n\n- This skill is for research and validation workflows only.\n- It does not provide diagnosis, treatment recommendations, or clinical decision support.\n- Use de-identified data and follow IRB, ethics, and data-use requirements before running on human cohorts.\n\n---\n\n## Input Format\n\n### Expression Matrix (`exp_file`)\n\nCSV with genes as rows and samples as columns. The first column must contain gene identifiers.\n\n```csv\n\"\",\"Sample_1\",\"Sample_2\",\"Sample_3\"\n\"TSPAN6\",3.87,4.54,8.12\n\"TNMD\",9.98,5.86,5.38\n\"DPM1\",7.95,6.11,5.41\n```\n\n### Clinical File (`cli_file`)\n\nCSV with sample IDs as row names and at least `OS` and `OS.time` columns.\n\n```csv\n,Age,OS,OS.time\nSample_1,59,0,133.5\nSample_2,60,0,49.13\nSample_3,59,1,22.40\n```\n\n- `OS` must use `0\u002F1` encoding.\n- `OS.time` must be positive and interpretable under `--time_unit`.\n\n### Model Coefficient File (`model_file`)\n\nCSV with two required columns: `Gene` and `Coef`.\n\n```csv\nGene,Coef\nTSPAN6,-0.25\nTNMD,0.15\nDPM1,0.32\n```\n\n---\n\n## Output Files\n\n| File                            | Description                                                                                               |\n| ------------------------------- | --------------------------------------------------------------------------------------------------------- |\n| `data\u002Frisk_data.rds`            | Serialized analysis dataset containing survival data, model gene expression, risk scores, and risk groups |\n| `table\u002Fout_varifyRisk.txt`      | Tab-delimited risk table for all matched samples                                                          |\n| `plot\u002Fout_varifySurv.pdf`       | Kaplan-Meier survival curve with risk table                                                               |\n| `plot\u002Fout_varify.riskScore.pdf` | Ordered risk score plot                                                                                   |\n| `plot\u002Fout_varify.survStat.pdf`  | Survival status plot                                                                                      |\n| `plot\u002Fout_varify.heatmap.pdf`   | Heatmap of model genes across ordered samples                                                             |\n| `plot\u002Fout_varify.ROC.pdf`       | Time-dependent ROC curve PDF                                                                              |\n| `analysis.log`                  | Runtime log including memory checkpoints and processing steps                                             |\n| `run_parameters.tsv`            | Exact parameter values used for the run                                                                   |\n| `session_info.txt`              | R version, platform, and package session information                                                      |\n\n---\n\n## Workflow\n\n### Step 1: Validate Inputs\n\n- Check required files and CSV extensions.\n- Validate color strings, timeout, seed, KM break setting, and time unit choice.\n- Parse `--roc_times` and `--roc_cols`.\n\n### Step 2: Build Matched Validation Dataset\n\n- Read expression, clinical, and model files.\n- Match samples shared by expression columns and clinical row names.\n- Check all model genes exist in the expression matrix.\n- Remove incomplete cases before downstream analysis.\n\n### Step 3: Calculate Risk Scores and Groups\n\n- Compute risk scores with the supplied linear predictor.\n- Convert follow-up time into years.\n- Split patients into `low` and `high` groups using the median risk score.\n\n### Step 4: Generate Validation Outputs\n\n- Save the full risk table and RDS object.\n- Produce Kaplan-Meier, risk score, survival status, heatmap, and time-dependent ROC plots.\n- Save session metadata and exact run parameters.\n\n---\n\n## Methods\n\n### Risk Score Formula\n\nFor sample `i`, the skill computes:\n\n```text\nriskScore_i = sum(expression_ig * coefficient_g)\n```\n\nusing all genes listed in `model_file`.\n\n### Risk Stratification\n\n- Samples are ordered by `riskScore`.\n- The median risk score is used as the cutoff.\n- Samples with scores above the median are labeled `high`; the others are labeled `low`.\n\n### Survival Analysis\n\n- Kaplan-Meier curves are fit with `survival::survfit`.\n- Group difference is shown with the default log-rank p-value in `survminer::ggsurvplot`.\n\n### Time-Dependent ROC\n\n- ROC analysis is performed with `timeROC::timeROC` using follow-up time in years.\n- All `--roc_times` values must be smaller than the maximum observed follow-up time.\n- `--roc_times` is always interpreted in years, regardless of `--time_unit`.\n\n---\n\n## Examples\n\n### Basic Usage\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e tests\u002Fdata\u002FBRCA_data.csv \\\n  -c tests\u002Fdata\u002FBRCA_clinic.csv \\\n  -m tests\u002Fdata\u002FBRCA_coef.csv \\\n  -o .\u002Foutput\u002F\n```\n\n### Input Follow-up Recorded in Days\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e expression.csv \\\n  -c clinical.csv \\\n  -m model.csv \\\n  -o .\u002Foutput \\\n  -u day \\\n  --roc_times 1,2,3\n```\n\nNote: `--roc_times 1,2,3` means 1, 2, and 3 years — even though `--time_unit day` was supplied. The skill converts `OS.time` from days to years internally before ROC computation.\n\n### Custom Plot Colors and ROC Settings\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e expression.csv \\\n  -c clinical.csv \\\n  -m model.csv \\\n  -o .\u002Foutput \\\n  --col_high '#B2182B' \\\n  --col_low '#2166AC' \\\n  --roc_cols '#B2182B,#4D9221,#2166AC' \\\n  --roc_pos topleft \\\n  --km_breaks 2\n```\n\n---\n\n## Error Handling\n\n### Common Errors\n\n| Error                      | Cause                                                                                                                                                                                                                                                                   | Solution                                                               |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |\n| `SKILL_FILE_NOT_FOUND`     | Input path is missing or wrong                                                                                                                                                                                                                                          | Check file path and permissions                                        |\n| `SKILL_MISSING_COLUMNS`    | Clinical or model file lacks required columns                                                                                                                                                                                                                           | Ensure `OS`, `OS.time`, `Gene`, and `Coef` exist                       |\n| `SKILL_SAMPLE_MISMATCH`    | No overlapping samples between expression and clinical data                                                                                                                                                                                                             | Align sample IDs exactly                                               |\n| `SKILL_EMPTY_DATA`         | An input file is empty after loading                                                                                                                                                                                                                                    | Verify the CSV contains at least one row and one column of usable data |\n| `SKILL_INVALID_DATA`       | Duplicate genes, empty data, non-numeric coefficients, or invalid survival values. For duplicate genes: deduplicate with `dplyr::distinct()` or keep the row with highest mean expression (e.g., `mat[order(-rowMeans(mat[,-1])),] %>% distinct(Gene, .keep_all=TRUE)`) | Clean input tables and verify formats                                  |\n| `SKILL_ANALYSIS_ERROR`     | Risk groups collapse or event count is too low                                                                                                                                                                                                                          | Use a valid signature and cohort with enough events (minimum ~5)       |\n| `SKILL_INVALID_PARAMETER`  | Bad `--time_unit`, invalid color, or impossible ROC time point                                                                                                                                                                                                          | Correct the parameter value                                            |\n| `SKILL_DEPENDENCY_MISSING` | Required R package is not installed                                                                                                                                                                                                                                     | Install the missing package                                            |\n| `SKILL_PKG_VERSION`        | Installed package version is below the required minimum                                                                                                                                                                                                                 | Upgrade the package to the required version                            |\n\n**IF error persists**, READ: `references\u002Ftroubleshooting.md`\n\n---\n\n## Testing\n\n### Test with Included Data\n\n```bash\n# Check CLI\nRscript scripts\u002Fmain.R --help\n\n# Run with bundled test data in a fresh output directory\nRscript scripts\u002Fmain.R \\\n  -e tests\u002Fdata\u002FBRCA_data.csv \\\n  -c tests\u002Fdata\u002FBRCA_clinic.csv \\\n  -m tests\u002Fdata\u002FBRCA_coef.csv \\\n  -o .\u002Foutput\u002F\n```\n\n### Validation Commands\n\n```bash\n# Run R tests\nRscript tests\u002Ftestthat.R\n\n# Refresh the retained example output bundle\nRscript tests\u002Frefresh_example_output.R\n\n# Inspect the generated risk table\nwc -l tests\u002Foutput\u002Ftable\u002Fout_varifyRisk.txt\n\n# Review the retained example outputs\nls -la tests\u002Foutput\u002F\n```\n\n### Real-data Baseline\n\nThe repository stores a documented real-data baseline summary in `references\u002Fbaseline-run.md`.\n\n**IF you need exact benchmark outputs or runtime expectations**, READ: `references\u002Fbaseline-run.md`\n\n→ Directory structure and implementation details: [references\u002Fproject-structure.md](references\u002Fproject-structure.md)\n","# External Model Validation\n\n## Input Validation\n\nThis skill accepts: an existing prognostic gene signature (model coefficient file with `Gene` and `Coef` columns), a bulk expression matrix in CSV format (genes as rows, samples as columns), and a clinical file with `OS` and `OS.time` survival columns.\n\nIf the user's request does not involve validating a pre-existing prognostic model on an external cohort — for example, asking to train a new model, perform feature selection, build a nomogram, run calibration curves, analyze single-cell data, or process data without survival endpoints — do not proceed with the workflow. Instead respond:\n\n> \"external-model-validation is designed to validate an existing prognostic risk signature on an external bulk expression cohort with survival outcomes. Your request appears to be outside this scope. Please provide a fixed model coefficient file plus expression and clinical data with OS\u002FOS.time columns, or use a more appropriate tool for model training, nomogram construction, or single-cell analysis.\"\n\n## When to Read External Files\n\n| Situation                                                        | File to Read                     | Purpose                                                                              |\n| ---------------------------------------------------------------- | -------------------------------- | ------------------------------------------------------------------------------------ |\n| **Need to run the analysis**                                     | `scripts\u002Fmain.R`                 | Execute: `Rscript scripts\u002Fmain.R --exp_file ... --cli_file ... --model_file ...`     |\n| **Need workflow order or output generation steps**               | `scripts\u002Frun_analysis.R`         | Review the 4-step orchestration of loading, scoring, plotting, and metadata export   |\n| **Need risk score or sample matching logic**                     | `scripts\u002Ffunctions.R`            | Inspect core data preparation and validation logic                                   |\n| **Need output writing or metadata export details**               | `scripts\u002Fio.R`                   | Inspect output directory creation and file-writing helpers                           |\n| **Need plotting implementation details**                         | `scripts\u002Fplotting.R`             | Inspect Kaplan-Meier, risk, heatmap, and ROC plot generation                         |\n| **Need input validation, logging, timeout, or dependency logic** | `scripts\u002Futils.R`                | Review validation helpers, `SKILL_*` error handling, logging, and runtime safeguards |\n| **Need statistical assumptions or method details**               | `references\u002Falgorithm.md`        | Risk score formula, group cutoff, survival analysis, ROC, and heatmap assumptions    |\n| **Need troubleshooting help**                                    | `references\u002Ftroubleshooting.md`  | Common failures, warnings, and concrete fixes                                        |\n| **Need CLI usage examples**                                      | `references\u002Fcli-guide.md`        | Parameter explanations, examples, and command patterns                               |\n| **Need expected outputs or benchmark run**                       | `references\u002Fbaseline-run.md`     | Real-data baseline command, runtime, memory checkpoints, and output inventory        |\n| **Need test inputs**                                             | `tests\u002Fdata\u002F`                    | Example expression, clinical, and model files for validation                         |\n| **Need to refresh the retained example output**                  | `tests\u002Frefresh_example_output.R` | Rebuild `tests\u002Foutput\u002F` with `--overwrite` using the bundled test data               |\n\n---\n\n## Usage\n\n```bash\nRscript scripts\u002Fmain.R \\\n  --exp_file .\u002Fexpression.csv \\\n  --cli_file .\u002Fclinical.csv \\\n  --model_file .\u002Fmodel.csv \\\n  --output_dir .\u002Foutput\u002F \\\n  --time_unit month \\\n  --seed 42\n```\n\n---\n\n## Arguments\n\n| Short | Long                | Type      | Default                   | Description                                                                                                                                                                                        |\n| ----- | ------------------- | --------- | ------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `-e`  | `--exp_file`        | character | **required**              | Expression matrix CSV with genes as rows and samples as columns                                                                                                                                    |\n| `-c`  | `--cli_file`        | character | **required**              | Clinical CSV with sample IDs as row names and `OS`, `OS.time` columns                                                                                                                              |\n| `-m`  | `--model_file`      | character | **required**              | Model coefficient CSV with `Gene` and `Coef` columns                                                                                                                                               |\n| `-o`  | `--output_dir`      | character | `.\u002Foutput\u002F`               | Output directory                                                                                                                                                                                   |\n|       | `--overwrite`       | flag      | `FALSE`                   | Allow writing into a non-empty output directory                                                                                                                                                    |\n| `-u`  | `--time_unit`       | character | `month`                   | Survival time unit in input clinical file: `day`, `month`, `year`                                                                                                                                  |\n|       | `--col_high`        | character | `#E64B35`                 | Color for high-risk samples                                                                                                                                                                        |\n|       | `--col_low`         | character | `#4DBBD5`                 | Color for low-risk samples                                                                                                                                                                         |\n|       | `--roc_cols`        | character | `#E64B35,#00A087,#3C5488` | Comma-separated colors for ROC curves                                                                                                                                                              |\n|       | `--roc_times`       | character | `1,3,5`                   | Comma-separated ROC time points **always in years**, regardless of `--time_unit`. When follow-up is in days or months, still provide `--roc_times` in years (e.g., `1,3,5` for 1, 3, and 5 years). |\n|       | `--roc_pos`         | character | `bottomright`             | ROC legend position                                                                                                                                                                                |\n|       | `--km_breaks`       | integer   | `0`                       | Kaplan-Meier x-axis break in years; `0` selects automatically                                                                                                                                      |\n| `-s`  | `--seed`            | integer   | `42`                      | Random seed for reproducibility                                                                                                                                                                    |\n|       | `--timeout_seconds` | integer   | `3600`                    | Elapsed timeout limit in seconds                                                                                                                                                                   |\n\n---\n\n## When to Use\n\n- You already have a fixed prognostic gene signature and coefficients.\n- You need to test that model on an independent cohort with bulk expression and survival data.\n- You want standard outputs for external validation: risk table, Kaplan-Meier curve, risk score plot, survival status plot, expression heatmap, and time-dependent ROC.\n\n## When Not to Use\n\n- Do not use this skill to train or re-fit a prognostic model.\n- Do not use it for nomogram construction, calibration curves, DCA, or diagnostic classification.\n- Do not use it for single-cell expression matrices or cohorts without survival endpoints.\n- Do not use identifiable patient data without de-identification and local compliance approval.\n- Do not use for cohorts with very few events (fewer than 5 events may produce unreliable Kaplan-Meier and ROC results).\n\n## Research Use Notice\n\n- This skill is for research and validation workflows only.\n- It does not provide diagnosis, treatment recommendations, or clinical decision support.\n- Use de-identified data and follow IRB, ethics, and data-use requirements before running on human cohorts.\n\n---\n\n## Input Format\n\n### Expression Matrix (`exp_file`)\n\nCSV with genes as rows and samples as columns. The first column must contain gene identifiers.\n\n```csv\n\"\",\"Sample_1\",\"Sample_2\",\"Sample_3\"\n\"TSPAN6\",3.87,4.54,8.12\n\"TNMD\",9.98,5.86,5.38\n\"DPM1\",7.95,6.11,5.41\n```\n\n### Clinical File (`cli_file`)\n\nCSV with sample IDs as row names and at least `OS` and `OS.time` columns.\n\n```csv\n,Age,OS,OS.time\nSample_1,59,0,133.5\nSample_2,60,0,49.13\nSample_3,59,1,22.40\n```\n\n- `OS` must use `0\u002F1` encoding.\n- `OS.time` must be positive and interpretable under `--time_unit`.\n\n### Model Coefficient File (`model_file`)\n\nCSV with two required columns: `Gene` and `Coef`.\n\n```csv\nGene,Coef\nTSPAN6,-0.25\nTNMD,0.15\nDPM1,0.32\n```\n\n---\n\n## Output Files\n\n| File                            | Description                                                                                               |\n| ------------------------------- | --------------------------------------------------------------------------------------------------------- |\n| `data\u002Frisk_data.rds`            | Serialized analysis dataset containing survival data, model gene expression, risk scores, and risk groups |\n| `table\u002Fout_varifyRisk.txt`      | Tab-delimited risk table for all matched samples                                                          |\n| `plot\u002Fout_varifySurv.pdf`       | Kaplan-Meier survival curve with risk table                                                               |\n| `plot\u002Fout_varify.riskScore.pdf` | Ordered risk score plot                                                                                   |\n| `plot\u002Fout_varify.survStat.pdf`  | Survival status plot                                                                                      |\n| `plot\u002Fout_varify.heatmap.pdf`   | Heatmap of model genes across ordered samples                                                             |\n| `plot\u002Fout_varify.ROC.pdf`       | Time-dependent ROC curve PDF                                                                              |\n| `analysis.log`                  | Runtime log including memory checkpoints and processing steps                                             |\n| `run_parameters.tsv`            | Exact parameter values used for the run                                                                   |\n| `session_info.txt`              | R version, platform, and package session information                                                      |\n\n---\n\n## Workflow\n\n### Step 1: Validate Inputs\n\n- Check required files and CSV extensions.\n- Validate color strings, timeout, seed, KM break setting, and time unit choice.\n- Parse `--roc_times` and `--roc_cols`.\n\n### Step 2: Build Matched Validation Dataset\n\n- Read expression, clinical, and model files.\n- Match samples shared by expression columns and clinical row names.\n- Check all model genes exist in the expression matrix.\n- Remove incomplete cases before downstream analysis.\n\n### Step 3: Calculate Risk Scores and Groups\n\n- Compute risk scores with the supplied linear predictor.\n- Convert follow-up time into years.\n- Split patients into `low` and `high` groups using the median risk score.\n\n### Step 4: Generate Validation Outputs\n\n- Save the full risk table and RDS object.\n- Produce Kaplan-Meier, risk score, survival status, heatmap, and time-dependent ROC plots.\n- Save session metadata and exact run parameters.\n\n---\n\n## Methods\n\n### Risk Score Formula\n\nFor sample `i`, the skill computes:\n\n```text\nriskScore_i = sum(expression_ig * coefficient_g)\n```\n\nusing all genes listed in `model_file`.\n\n### Risk Stratification\n\n- Samples are ordered by `riskScore`.\n- The median risk score is used as the cutoff.\n- Samples with scores above the median are labeled `high`; the others are labeled `low`.\n\n### Survival Analysis\n\n- Kaplan-Meier curves are fit with `survival::survfit`.\n- Group difference is shown with the default log-rank p-value in `survminer::ggsurvplot`.\n\n### Time-Dependent ROC\n\n- ROC analysis is performed with `timeROC::timeROC` using follow-up time in years.\n- All `--roc_times` values must be smaller than the maximum observed follow-up time.\n- `--roc_times` is always interpreted in years, regardless of `--time_unit`.\n\n---\n\n## Examples\n\n### Basic Usage\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e tests\u002Fdata\u002FBRCA_data.csv \\\n  -c tests\u002Fdata\u002FBRCA_clinic.csv \\\n  -m tests\u002Fdata\u002FBRCA_coef.csv \\\n  -o .\u002Foutput\u002F\n```\n\n### Input Follow-up Recorded in Days\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e expression.csv \\\n  -c clinical.csv \\\n  -m model.csv \\\n  -o .\u002Foutput \\\n  -u day \\\n  --roc_times 1,2,3\n```\n\nNote: `--roc_times 1,2,3` means 1, 2, and 3 years — even though `--time_unit day` was supplied. The skill converts `OS.time` from days to years internally before ROC computation.\n\n### Custom Plot Colors and ROC Settings\n\n```bash\nRscript scripts\u002Fmain.R \\\n  -e expression.csv \\\n  -c clinical.csv \\\n  -m model.csv \\\n  -o .\u002Foutput \\\n  --col_high '#B2182B' \\\n  --col_low '#2166AC' \\\n  --roc_cols '#B2182B,#4D9221,#2166AC' \\\n  --roc_pos topleft \\\n  --km_breaks 2\n```\n\n---\n\n## Error Handling\n\n### Common Errors\n\n| Error                      | Cause                                                                                                                                                                                                                                                                   | Solution                                                               |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |\n| `SKILL_FILE_NOT_FOUND`     | Input path is missing or wrong                                                                                                                                                                                                                                          | Check file path and permissions                                        |\n| `SKILL_MISSING_COLUMNS`    | Clinical or model file lacks required columns                                                                                                                                                                                                                           | Ensure `OS`, `OS.time`, `Gene`, and `Coef` exist                       |\n| `SKILL_SAMPLE_MISMATCH`    | No overlapping samples between expression and clinical data                                                                                                                                                                                                             | Align sample IDs exactly                                               |\n| `SKILL_EMPTY_DATA`         | An input file is empty after loading                                                                                                                                                                                                                                    | Verify the CSV contains at least one row and one column of usable data |\n| `SKILL_INVALID_DATA`       | Duplicate genes, empty data, non-numeric coefficients, or invalid survival values. For duplicate genes: deduplicate with `dplyr::distinct()` or keep the row with highest mean expression (e.g., `mat[order(-rowMeans(mat[,-1])),] %>% distinct(Gene, .keep_all=TRUE)`) | Clean input tables and verify formats                                  |\n| `SKILL_ANALYSIS_ERROR`     | Risk groups collapse or event count is too low                                                                                                                                                                                                                          | Use a valid signature and cohort with enough events (minimum ~5)       |\n| `SKILL_INVALID_PARAMETER`  | Bad `--time_unit`, invalid color, or impossible ROC time point                                                                                                                                                                                                          | Correct the parameter value                                            |\n| `SKILL_DEPENDENCY_MISSING` | Required R package is not installed                                                                                                                                                                                                                                     | Install the missing package                                            |\n| `SKILL_PKG_VERSION`        | Installed package version is below the required minimum                                                                                                                                                                                                                 | Upgrade the package to the required version                            |\n\n**IF error persists**, READ: `references\u002Ftroubleshooting.md`\n\n---\n\n## Testing\n\n### Test with Included Data\n\n```bash\n# Check CLI\nRscript scripts\u002Fmain.R --help\n\n# Run with bundled test data in a fresh output directory\nRscript scripts\u002Fmain.R \\\n  -e tests\u002Fdata\u002FBRCA_data.csv \\\n  -c tests\u002Fdata\u002FBRCA_clinic.csv \\\n  -m tests\u002Fdata\u002FBRCA_coef.csv \\\n  -o .\u002Foutput\u002F\n```\n\n### Validation Commands\n\n```bash\n# Run R tests\nRscript tests\u002Ftestthat.R\n\n# Refresh the retained example output bundle\nRscript tests\u002Frefresh_example_output.R\n\n# Inspect the generated risk table\nwc -l tests\u002Foutput\u002Ftable\u002Fout_varifyRisk.txt\n\n# Review the retained example outputs\nls -la tests\u002Foutput\u002F\n```\n\n### Real-data Baseline\n\nThe repository stores a documented real-data baseline summary in `references\u002Fbaseline-run.md`.\n\n**IF you need exact benchmark outputs or runtime expectations**, READ: `references\u002Fbaseline-run.md`\n\n→ Directory structure and implementation details: [references\u002Fproject-structure.md](references\u002Fproject-structure.md)\n",{"name":5,"license":15,"description":7,"skill-author":24},"AIPOCH","main","e0956dc9606356ab78468936b502e55a365282e2","specialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation",0,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists","https:\u002F\u002Fgithub.com\u002Fmrsonord2240","2026-10-12 03:19:04",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add mrsonord2240\u002Fopenscience-specialists --skill external-model-validation",{"tool":38,"command":39},"bunx","bunx skills add mrsonord2240\u002Fopenscience-specialists --skill external-model-validation",{"tool":41,"command":42},"pnpm","pnpm dlx skills add mrsonord2240\u002Fopenscience-specialists --skill external-model-validation","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002FSKILL.md",true,[46,52,56,60,64,68,74,78,82,86,90,94,100,104,108,114],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"references\u002Falgorithm.md","REFERENCE","参考文档",3757,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Freferences\u002Falgorithm.md",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"references\u002Fbaseline-run.md",2597,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Freferences\u002Fbaseline-run.md",{"path":57,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":58,"sourceHtmlUrl":59},"references\u002Fcli-guide.md",3764,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Freferences\u002Fcli-guide.md",{"path":61,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fproject-structure.md",1637,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Freferences\u002Fproject-structure.md",{"path":65,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Ftroubleshooting.md",5357,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Freferences\u002Ftroubleshooting.md",{"path":69,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Ffunctions.R","SCRIPT","脚本",4895,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Ffunctions.R",{"path":75,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Fio.R",2648,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Fio.R",{"path":79,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Fmain.R",7037,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Fmain.R",{"path":83,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fplotting.R",5004,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Fplotting.R",{"path":87,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Frun_analysis.R",1980,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Frun_analysis.R",{"path":91,"resourceType":70,"resourceTypeDesc":71,"sizeBytes":92,"sourceHtmlUrl":93},"scripts\u002Futils.R",4091,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Fscripts\u002Futils.R",{"path":95,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":98,"sourceHtmlUrl":99},"tests\u002Fdata\u002FBRCA_clinic.csv","ASSET","资产文件",106602,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Ftests\u002Fdata\u002FBRCA_clinic.csv",{"path":101,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":102,"sourceHtmlUrl":103},"tests\u002Fdata\u002FBRCA_coef.csv",43,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Ftests\u002Fdata\u002FBRCA_coef.csv",{"path":105,"resourceType":96,"resourceTypeDesc":97,"sizeBytes":106,"sourceHtmlUrl":107},"tests\u002Fdata\u002FBRCA_data.csv",61054,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Ftests\u002Fdata\u002FBRCA_data.csv",{"path":109,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":112,"sourceHtmlUrl":113},"tests\u002Frefresh_example_output.R","OTHER","其他",980,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Ftests\u002Frefresh_example_output.R",{"path":115,"resourceType":110,"resourceTypeDesc":111,"sizeBytes":116,"sourceHtmlUrl":117},"tests\u002Ftestthat.R",729,"https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Fclinical-prediction-model-specialist\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fexternal-model-validation\u002Ftests\u002Ftestthat.R",[119,127,134,141,148,155],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7CW36A6QAGWFE2C008M1XPG","bio-workflows-metabolomics-pipeline","Orchestrates the untargeted LC-MS metabolomics pipeline end-to-end (xcms 4.x feature extraction, QC\u002Fdrift\u002Fnormalization, confidence-stratified annotation, permutation-validated statistics, background-aware pathway mapping), naming what each stage decides and where it silently fails. Use when running a full LC-MS metabolomics study from raw mzML to enriched pathways and needing the honest handoffs between stages. Each stage defers to its component skill for parameters and traps; for stable-isotope flux (a separate branch, not this untargeted flow) see metabolomics\u002Fisotope-tracing.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-workflows-metabolomics-pipeline\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M7CW2Y18623NA2S1Y30FRQW1","bio-metabolomics-xcms-preprocessing","Programmatic untargeted LC-MS feature extraction in R with the modern xcms 4.x MsExperiment\u002FXcmsExperiment API, taking raw mzML to a feature table via CentWave peak detection, retention-time alignment, peak-density correspondence, gap-filling, CAMERA redundancy collapse, and built-in QC feature filtering. Use when converting centroided LC-MS runs into a features-by-samples matrix and deciding centWave\u002Fgrouping\u002Falignment parameters. For drift correction and QC\u002FCV filtering execution see metabolomics\u002Fnormalization-qc; for metabolite identification see metabolomics\u002Fmetabolite-annotation; for the MS-DIAL GUI alternative with MS2Dec deconvolution see metabolomics\u002Fmsdial-preprocessing; for downstream statistics see metabolomics\u002Fstatistical-analysis.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-xcms-preprocessing\u002FSKILL.md",[],[],{"skillNo":135,"name":136,"nameZh":6,"description":137,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":138,"categories":139,"keywords":140,"publishedAt":19},"01M7CW2M364HVWPNQEKE2WP4PP","bio-metabolomics-statistical-analysis","Decision-grade statistical analysis for metabolomics intensity tables. Covers transformation and scaling (Pareto vs unit-variance as a hidden hypothesis), unsupervised structure (PCA\u002FHCA for QC), permutation-validated PLS-DA\u002FOPLS-DA (R2 vs Q2, double CV, VIP as heuristic), univariate testing (Welch\u002FMann-Whitney\u002FANOVA\u002FLMM with covariate adjustment), and dependence-aware multiple testing. Use when testing which metabolites differ, building or validating a discriminant model, choosing a scaling, or correcting many correlated tests. For sample-wise normalization\u002Fdrift correction see metabolomics\u002Fnormalization-qc; for ML classifiers and selection-inside-CV leakage see machine-learning\u002Fbiomarker-discovery and machine-learning\u002Fmodel-validation; for pathway interpretation see metabolomics\u002Fpathway-mapping; for design\u002Fpower\u002Fmultiplicity regime see experimental-design\u002Fmultiple-testing.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-statistical-analysis\u002FSKILL.md",[],[],{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":19},"01M7CW2BCBF851WYE03Z8XPEDQ","bio-metabolomics-pathway-mapping","Maps metabolomics results to biological pathways via over-representation (ORA), metabolite-set enrichment (MSEA\u002FQEA), mummichog\u002FPSEA on raw m\u002Fz peaks, and network-diffusion enrichment (FELLA), with correct background-set construction and honest interpretive ceilings. Use when interpreting differential metabolites or an untargeted LC-MS feature table in pathway context, choosing ORA vs MSEA vs mummichog vs topology, or setting the reference\u002Fbackground set. For annotation confidence levels feeding ORA see metabolomics\u002Fmetabolite-annotation; for gene-set concepts see pathway-analysis\u002Fgo-enrichment and pathway-analysis\u002Fgsea; for joint gene+metabolite pathways see multi-omics-integration\u002Fmofa-integration.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-pathway-mapping\u002FSKILL.md",[],[],{"skillNo":149,"name":150,"nameZh":6,"description":151,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":152,"categories":153,"keywords":154,"publishedAt":19},"01M7CW21NSZMCPMF7D9CHJM718","bio-metabolomics-normalization-qc","Designs QC, corrects signal drift, removes batch effects, filters features, normalizes samples, and imputes missing values for untargeted LC-MS\u002FGC-MS metabolomics, framing each step as a measurement model that can create or erase biological signal. Use when processing a peak\u002Ffeature table before statistical analysis, choosing a drift-correction or sample-normalization method, deciding QC RSD vs D-ratio filtering, or handling left-censored missing values. The feature table is produced by metabolomics\u002Fxcms-preprocessing or metabolomics\u002Fmsdial-preprocessing; transformation\u002Fscaling for modeling defers to metabolomics\u002Fstatistical-analysis; cross-study design issues link to experimental-design\u002Fbatch-design.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-normalization-qc\u002FSKILL.md",[],[],{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":123,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":161,"publishedAt":19},"01M7CW1SWVM0NYHVE6Q7MA3G7R","bio-metabolomics-msdial-preprocessing","Runs the MS-DIAL preprocessing workflow (peak picking, MS2Dec spectral deconvolution, alignment, gap-filling) and imports the alignment-result table into R or Python with honest filtering. Use when preprocessing LC-MS DDA\u002FDIA (SWATH) or GC-MS raw data with MS-DIAL, deciding MS-DIAL vs XCMS, configuring the MSDIALCUI console run, or parsing an MS-DIAL export into a clean feature matrix. For programmatic R peak detection and the feature-table-as-artifact framing see metabolomics\u002Fxcms-preprocessing; for lipid annotation mode see metabolomics\u002Flipidomics; for MSI-level confidence honesty see metabolomics\u002Fmetabolite-annotation; for drift correction and QC see metabolomics\u002Fnormalization-qc.","https:\u002F\u002Fgithub.com\u002Fmrsonord2240\u002Fopenscience-specialists\u002Fblob\u002Fmain\u002Fspecialists\u002Funtargeted-metabolomics-analyst\u002Fversions\u002F1.0.0\u002Fpackage\u002Fskills\u002Fbio-metabolomics-msdial-preprocessing\u002FSKILL.md",[],[]]