Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/compile-paper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ on:
push:
paths:
- 'paper/deepcatch_final.tex'
- 'paper/deepcatch_references.bib'
- 'paper/supplementary.tex'
- 'paper/references_final.bib'
- 'paper/figures/**'
workflow_dispatch:

Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ build/
*.ipynb

# ── Machine Learning ────────────────────────────────────────────────────────
*.pt
# Only ignore generated/trained checkpoints, not bundled ones
model/*.pt
!model/motif_model_checkpoint.pt
*.pth
*.h5
*.ckpt
Expand Down
10 changes: 5 additions & 5 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ message: "If you use DeepCatch in your research, please cite it as follows."
title: "DeepCatch: Performance-Weighted Multi-Modal Fusion for Ultra-Early Cancer Detection from cfDNA"
authors:
- given-names: "Royce"
family-names: "[Last Name]"
affiliation: "DeepCatch Consortium"
orcid: ""
family-names: "Lam"
affiliation: "DeepCatch Project"
orcid: "https://orcid.org/0009-0009-1904-6999"
- name: "DeepCatch Contributors"
year: 2026
doi: "to be assigned (preprint)"
url: "https://github.com/deepcatch/deepcatch"
repository-code: "https://github.com/deepcatch/deepcatch"
url: "https://github.com/rollroyces/deepcatch"
repository-code: "https://github.com/rollroyces/deepcatch"
license: MIT
version: "1.0.0-preprint"
date-released: 2026-04-28
Expand Down
10 changes: 4 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,16 @@ RUN pip install --no-cache-dir \
pyyaml==6.0.1

# ── Copy source code ─────────────────────────────────────────────────────
COPY validation_framework.py /app/
COPY validation/ /app/validation/
COPY reproducibility/ /app/reproducibility/
COPY run_bioinfo_validation.py /app/
COPY run_full_validation.py /app/

# ── Create output directory ──────────────────────────────────────────────
RUN mkdir -p /app/results

# ── Verify imports ───────────────────────────────────────────────────────
RUN python -c "import validation_framework; print('validation_framework OK')" && \
python -c "from validation import *; print('validation modules OK')"
RUN python -c "from validation import *; print('validation modules OK')"

# ── Entry point ──────────────────────────────────────────────────────────
# Default: run ALL validation modules
CMD ["python", "run_bioinfo_validation.py"]
# Default: run full validation suite
CMD ["python", "run_full_validation.py"]
72 changes: 36 additions & 36 deletions RUN_ALL.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ echo ""
# Step 1: Install dependencies (if needed)
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[1/6] Installing dependencies...${NC}"
echo -e "${BLUE}${BOLD}[1/5] Installing dependencies...${NC}"

if [ -f "requirements.txt" ]; then
$PYTHON -m pip install -r requirements.txt --quiet 2>/dev/null || {
Expand All @@ -150,7 +150,7 @@ echo ""
# Step 2: Full cross-validation
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[2/6] Running full cross-validation...${NC}"
echo -e "${BLUE}${BOLD}[2/5] Running full cross-validation...${NC}"
echo ""

$PYTHON run_full_validation.py \
Expand All @@ -170,65 +170,65 @@ echo -e "${GREEN}[OK] Full validation complete${NC}"
echo ""

# ------------------------------------------------------------------
# Step 3: TCGA validation
# Step 3: Real data validation (TCGA) β€” optional
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[3/6] Running TCGA real data validation...${NC}"
echo -e "${BLUE}${BOLD}[3/5] Running real data validation...${NC}"
echo ""

$PYTHON run_tcga_validation.py \
$QUICK_FLAG \
--output results/ \
--seeds 5

TCGA_EXIT=$?
if [ $TCGA_EXIT -ne 0 ]; then
echo -e "${YELLOW}[WARN] TCGA validation exited with code $TCGA_EXIT (non-fatal)${NC}"
TCGA_SCRIPT="$(dirname $0)/real_tcga_validation.py"
if [ -f "$TCGA_SCRIPT" ]; then
$PYTHON real_tcga_validation.py \
$QUICK_FLAG \
--output results/ \
--seeds 5 || echo -e "${YELLOW}[WARN] TCGA validation non-fatal error${NC}"
else
echo -e "${YELLOW}[WARN] real_tcga_validation.py not found β€” skipping${NC}"
fi

echo ""
echo -e "${GREEN}[OK] TCGA validation complete${NC}"
echo -e "${GREEN}[OK] TCGA validation step complete${NC}"
echo ""

# ------------------------------------------------------------------
# Step 4: Benchmark comparison
# Step 4: Jiang 4-mer analysis β€” optional
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[4/6] Generating benchmark comparison...${NC}"
echo -e "${BLUE}${BOLD}[4/5] Running Jiang 4-mer analysis...${NC}"
echo ""

$PYTHON run_benchmark_comparison.py \
--results results/final_cross_validated_results.json \
--tcga results/tcga_validation_results.json \
--output results/

BENCH_EXIT=$?
if [ $BENCH_EXIT -ne 0 ]; then
echo -e "${YELLOW}[WARN] Benchmark comparison exited with code $BENCH_EXIT (non-fatal)${NC}"
JIANG_SCRIPT="$(dirname $0)/run_jiang_analysis.py"
if [ -f "$JIANG_SCRIPT" ]; then
$PYTHON run_jiang_analysis.py \
$QUICK_FLAG \
--output results/ || echo -e "${YELLOW}[WARN] Jiang analysis non-fatal error${NC}"
else
echo -e "${YELLOW}[WARN] run_jiang_analysis.py not found β€” skipping${NC}"
fi

echo ""
echo -e "${GREEN}[OK] Benchmark comparison complete${NC}"
echo -e "${GREEN}[OK] Jiang analysis step complete${NC}"
echo ""

# ------------------------------------------------------------------
# Step 5: Verify fixes
# Step 5: Supplementary checks
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[5/6] Running fix verification...${NC}"
echo -e "${BLUE}${BOLD}[5/5] Running supplementary checks...${NC}"
echo ""

if [ -f "validation_framework_tests.py" ]; then
$PYTHON validation_framework_tests.py 2>&1 | head -30 || true
echo ""
fi

if [ -f "verify_fixes.py" ]; then
$PYTHON verify_fixes.py 2>&1 || {
echo -e "${YELLOW}[WARN] verify_fixes.py issue (non-fatal)${NC}"
# Verify Python syntax across all .py files
BROKEN=0
for f in $(find . -name '*.py' -not -path './.git/*' | sort); do
$PYTHON -c "import ast; ast.parse(open('$f').read())" 2>/dev/null || {
echo -e " ${RED}⚠ Syntax error in $f${NC}"
BROKEN=$((BROKEN+1))
}
done
if [ $BROKEN -eq 0 ]; then
echo -e " ${GREEN}βœ“ All Python files pass syntax check${NC}"
else
echo -e "${YELLOW}[WARN] verify_fixes.py not found β€” skipping${NC}"
echo -e " ${YELLOW}⚠ $BROKEN file(s) have syntax errors${NC}"
fi

echo ""
Expand All @@ -237,7 +237,7 @@ echo ""
# Step 6: Summary
# ------------------------------------------------------------------

echo -e "${BLUE}${BOLD}[6/6] Generating summary...${NC}"
echo -e "${BLUE}${BOLD}[Summary]${NC}"
echo ""

echo -e "${BLUE}${BOLD}========================================${NC}"
Expand Down
24 changes: 13 additions & 11 deletions paper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,37 @@ This directory contains the LaTeX source for the DeepCatch manuscript.

| File | Description |
|------|-------------|
| `main.tex` | Primary manuscript (Nature Medicine / Lancet Oncology / Cancer Discovery target) |
| `references.bib` | Bibliography in BibTeX format |
| `deepcatch_final.tex` | Primary manuscript (Bioinformatics target) |
| `references_final.bib` | Bibliography in BibTeX format |
| `supplementary.tex` | Supplementary materials (extended methods, additional figures) |
| `abstract.txt` | Plain-text abstract for submission systems |
| `cover_letter.txt` | Template cover letter for journal submission |
| `figures/` | Figure files (PNG, PDF, or TikZ sources) |
| `figures/` | Figure files (PNG, PDF, or TikZ sources)

## How to Compile

### Option 1: pdflatex + bibtex (traditional)

```bash
cd paper/
pdflatex main.tex
bibtex main
pdflatex main.tex
pdflatex main.tex
pdflatex deepcatch_final.tex
bibtex deepcatch_final
pdflatex deepcatch_final.tex
pdflatex deepcatch_final.tex
```

### Option 2: latexmk (recommended)

```bash
cd paper/
latexmk -pdf main.tex
latexmk -pdf deepcatch_final.tex
```

### Option 3: Overleaf

Upload the entire `paper/` directory to Overleaf. Set the main document to `main.tex`.
Upload the entire `paper/` directory to Overleaf. Set the main document to `deepcatch_final.tex`.

### Option 4: GitHub CI

Push changes to `paper/deepcatch_final.tex` or `paper/supplementary.tex` β€” the CI workflow will automatically compile and upload the PDF as an artifact.

## Dependencies

Expand Down
Loading
Loading