본문으로 건너뛰기
cccskills
무료GitHub에 공개

time-dependent-roc

Use when performing time-dependent ROC curve analysis for survival data with follow-up time, event status, and a numeric marker. Supports CSV/TXT/TSV/Excel input, `risk_score` as the default marker unless `--marker_col` is provided, parameter validation, standardized output directories, AUC table export, ROC point export, and PDF figure generation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Excel

실행 점수 미검증

설치 방법 보기

포함된 파일(12)

  • SKILL.md5.9 KB
  • eval_report_time-dependent-roc_result.json15.4 KB
  • references/algorithm.md2.7 KB
  • references/cli-guide.md3.4 KB
  • references/troubleshooting.md4.3 KB
  • scripts/functions.R9.0 KB
  • scripts/main.R6.5 KB
  • scripts/run_analysis.R1.9 KB
  • scripts/utils.R4.9 KB
  • tests/data/time_roc_sample1.txt15.7 KB
  • tests/data/time_roc_sample2.txt5.5 KB
  • tests/data/time_roc_sample3.txt21.1 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Source: https://github.com/aipoch/medical-research-skills

Time-Dependent ROC Analysis

Use this skill to compute and plot time-dependent ROC curves for survival outcomes.

Use This Skill When

  • You have survival data with futime and fustat columns.
  • You need time-specific ROC curves and AUC values for a numeric risk marker.
  • You want a command-line workflow with parameter validation and standardized outputs.
  • Your file contains a numeric marker column named risk_score, or you will provide another marker explicitly with --marker_col.

Primary Command

Rscript scripts/main.R \
  --data_file <input_file> \
  --times <comma_separated_times> \
  --output_dir <output_dir>

Prerequisites

  • Rscript is available in the shell.
  • Required R packages: optparse, timeROC, survival, ggplot2.
  • Optional package for Excel input: openxlsx.
  • Install missing packages with Rscript -e 'install.packages(c("optparse", "timeROC", "survival", "ggplot2", "openxlsx"), repos="https://cloud.r-project.org")'.

Core Arguments

ArgumentRequiredDescription
--data_fileYesInput data file in CSV, TXT, TSV, TAB, XLS, or XLSX format
--timesNoPrediction time points, comma-separated. Default 1,3,5
--marker_colNoMarker column name. Default risk_score; provide this option when your file uses a different marker
--output_dirNoOutput directory, default ./TimeROC_Results
--time_unitNoTime unit label for plot/output: year, month, or day. Default year
--auto_convert_daysNoIf TRUE, convert large futime values from days to the selected unit when appropriate. Default TRUE
--weightingNoIPCW weighting method: aalen, marginal, or cox. Default aalen
--causeNoEvent code treated as the outcome of interest. Default 1

Input Requirements

  • The input file must contain futime and fustat columns.
  • The selected marker column must exist and be numeric or coercible to numeric.
  • If --marker_col is omitted, the input file must contain risk_score.
  • futime must be numeric or coercible to numeric.
  • fustat must be numeric or coercible to numeric.
  • Rows with missing futime, fustat, or marker values are excluded.
  • At least 5 complete rows and at least 1 event for the requested cause are required.

Example input:

id	fustat	futime	risk_score	risk_group	GPR161	RIBC2
TCGA-C5-A1M5	1	5.6219	-1.1070	low	2.8252	5.3532
TCGA-EA-A5O9	0	2.1589	-0.8964	low	2.6046	4.4293
TCGA-C5-A3HL	0	1.7014	-0.9044	low	4.1248	4.9166

Minimal Workflow

  1. Confirm the input file exists and includes futime, fustat, and risk_score, or plan to pass --marker_col.
  2. Run scripts/main.R with the requested time points.
  3. Check the output directory for the AUC table and PDF figure.

If you omit --data_file, the script exits with SKILL_MISSING_INPUT.

Outputs

Expected output structure:

<output_dir>/
├── data/
│   └── time_roc_points.<csv|txt>
├── session_info.txt
├── figure/
│   └── time_roc.pdf
└── table/
    └── time_roc_auc.<csv|txt>

Primary output files:

  • data/time_roc_points.csv or data/time_roc_points.txt
  • table/time_roc_auc.csv or table/time_roc_auc.txt
  • figure/time_roc.pdf
  • session_info.txt

Exported result fields include:

  • time
  • time_unit
  • auc
  • marker_col
  • n_complete
  • n_events

Exported ROC point fields include:

  • false_positive_rate
  • sensitivity
  • time
  • time_unit
  • auc
  • curve_label

Read These Files When Needed

NeedFile
Statistical details and assumptionsreferences/algorithm.md
More CLI examplesreferences/cli-guide.md
Error diagnosisreferences/troubleshooting.md
Main execution entry pointscripts/main.R
Sample test datatests/data/

Quick Examples

Basic analysis:

Rscript scripts/main.R \
  --data_file tests/data/time_roc_sample1.txt \
  --times 1,3,5 \
  --output_dir tests/output_basic

Specify marker column and plot styling:

Rscript scripts/main.R \
  --data_file tests/data/time_roc_sample2.txt \
  --marker_col GPR161 \
  --times 1,2,4 \
  --line_colors "#4DBBD5,#E64B35,#00A087" \
  --legend_position bottom \
  --output_dir tests/output_gpr161

Validation

Rscript scripts/main.R --help
Rscript scripts/main.R \
  --data_file tests/data/time_roc_sample1.txt \
  --times 1,3,5 \
  --output_dir tests/validation_output

After running analysis, verify that these files exist:

  • tests/validation_output/data/time_roc_points.csv
  • tests/validation_output/table/time_roc_auc.csv
  • tests/validation_output/figure/time_roc.pdf
  • tests/validation_output/session_info.txt

Common Errors

  • SKILL_FILE_NOT_FOUND: Input file path is wrong or inaccessible.
  • SKILL_MISSING_COLUMNS: futime or fustat is missing.
  • SKILL_INVALID_DATA: The marker column is non-numeric, no complete rows remain, event coding is unsuitable, or requested time points yield unusable AUC values.
  • SKILL_INVALID_PARAMETER: An argument value is invalid.
  • SKILL_INSUFFICIENT_DATA: Too few complete rows or no target events remain.
  • SKILL_DEPENDENCY_MISSING: A required R package such as optparse, timeROC, survival, ggplot2, or openxlsx is unavailable.

If the issue is not obvious, read references/troubleshooting.md.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Transform lengthy academic papers into concise, structured 250-word abstracts.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

Precision editing tool that reduces abstract word count through intelligent compression techniques, maintaining scientific rigor while meeting strict journal and conference requirements.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

Refines long medical academic texts into SCI-style unstructured Chinese and English abstracts; use when you need to condense drafts/reports/summaries into bilingual abstracts and generate Summary_Report.md.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

Generates submission-ready Elsevier/SCI Highlights from manuscript text or extracted PDF/DOCX/TXT content. Use when a user needs 3-5 concise, evidence-grounded highlight bullets for a research paper, review, meta-analysis, case report, or bioinformatics manuscript.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

Generates complete FAERS pharmacovigilance study designs for multi-drug or class-level safety comparison inside one predefined SOC or AE family using active comparators, disproportionality analysis, subgroup characterization, and reviewer-facing evidence control.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

Analyze data with `adme-property-predictor` using a reproducible workflow, explicit validation, and structured outputs for review-ready interpretation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

aipoch/medical-research-skills2천2026년 9월 17일 업데이트

aipoch의 스킬 모두 보기

이 스킬의 문제 신고