Skip to content

Commit fc92ea8

Browse files
htlin222claude
andcommitted
Add end-to-end-study skill for data-first research pipeline
Seven-phase workflow from dataset scan to tagged GitHub release: best data for novelty, low-hanging-fruit selection, target journal + author instructions, method under rigor checklist, reader/reviewer-oriented LaTeX writing, reviewer cycle, and private repo with CI-built releases bundling PDF + .tex. Ships with LaTeX skeleton (main.tex, Makefile, latexmkrc, references.bib), GitHub release workflow, init_project.py / new_release.sh scripts, and 15 reference files covering each phase. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent f097c00 commit fc92ea8

25 files changed

Lines changed: 2047 additions & 0 deletions
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
name: end-to-end-study
3+
description: Data-first reproducible research workflow. Given a topic (or none), find the best underutilised public dataset, identify the low-hanging-fruit claim inside it, target the highest-acceptance-probability journal, fetch that journal's author instructions, design method under standard-of-rigor checklist, analyse, write reviewer-and-reader-oriented LaTeX + BibTeX manuscript matching the target-journal style, and ship to a private GitHub repo with CI-built tagged releases bundling PDF + .tex. Use when the user says "end-to-end paper", "take topic to publication", "find a paper in this dataset", "what's publishable here", or asks for a full research pipeline from idea to a tagged release. Good fit for computational-biology, bioinformatics, and clinical-genomics studies on public datasets (TCGA, BeatAML, GEO, GDC, UCSC Xena, cBioPortal).
4+
---
5+
6+
# end-to-end-study
7+
8+
Chain: **best data for novelty** -> **low-hanging fruit** -> **most-likely paper (venue + story)** -> **author instructions** -> **method under rigor checklist** -> **reader/reviewer-oriented writing** -> **reviewer cycle** -> **private repo + tagged release**.
9+
10+
Seven phases. Each phase links to a dedicated reference file.
11+
12+
## Phase 0 - Orientation (30 s)
13+
14+
Confirm with the user: domain (oncology? immunology? neurology?), topic vagueness (is a topic given, or should the skill scan datasets first?), claim type preference (method / translational finding / benchmark). Decline phases outside scope (wet-lab validation, actual journal submission).
15+
16+
## Phase 1 - Best data for novelty (data-first scan)
17+
18+
Novelty usually lives in **under-mined assets of recently released large cohorts**, not in re-analyses of classic datasets. Scan for (1) recent large-cohort releases with a secondary modality that has not been systematically exploited, (2) paired-modality data where one modality is under-used, (3) public drug-response or perturbation screens paired with rich clinical metadata.
19+
20+
See [references/data-first-novelty.md](references/data-first-novelty.md) for the scan heuristics, a catalog of currently-underutilised public datasets, and worked example (BeatAML ex-vivo drug-sensitivity table in Tyner 2018 supplementary).
21+
22+
**Exit criterion**: a primary dataset is named, its under-mined asset is identified, and a short list of 2-3 candidate claims is drafted.
23+
24+
## Phase 2 - Low-hanging fruit selection
25+
26+
Within the chosen dataset, pick the claim with the best effort-to-impact ratio. See [references/low-hanging-fruit.md](references/low-hanging-fruit.md) for the selection matrix (combination-gap claim vs scale-gap vs rigor-gap vs orthogonal-outcome claim), with expected-IF mapping for each type.
27+
28+
Use WebSearch + bioRxiv / PubMed MCP to verify the chosen claim is actually un-done. Heuristics for keyword laddering and gap verification are in [references/novelty-search.md](references/novelty-search.md).
29+
30+
**Exit criterion**: one sentence of the form "No prior work does X in Y; this paper shows Z (effect-size guess)", validated against literature.
31+
32+
## Phase 3 - Target journal + author instructions
33+
34+
Pick the journal where this specific claim has the highest acceptance probability, not the highest IF in absolute terms. See [references/journal-targets.md](references/journal-targets.md) for the tiered catalog with acceptance-probability heuristics. Then immediately **fetch the target journal's author instructions** with WebFetch and distil them into the project-local `manuscript/JOURNAL.md`.
35+
36+
See [references/author-instructions.md](references/author-instructions.md) for the extraction checklist (word limits, figure count, reference style, reporting-guideline requirements, data-availability policy, preprint policy) and canonical author-instructions URLs for Nature Commun, Leukemia, Genome Medicine, Cell Reports Medicine, Blood Cancer Journal, Briefings in Bioinformatics.
37+
38+
Copy the LaTeX skeleton from `assets/latex/` and edit the bibliography style, section order, and figure-count cap to match the target journal.
39+
40+
**Exit criterion**: journal named, author-instructions distilled into `manuscript/JOURNAL.md`, LaTeX template adjusted, tex compiles with placeholder title.
41+
42+
## Phase 4 - Project setup + preregistration + method design
43+
44+
Scaffold with `scripts/init_project.py <project-dir>` (creates `data/raw`, `data/processed`, `data/results`, `analysis/`, `manuscript/`, `figures/`, `docs/`, `.github/workflows/`, `.gitignore`, `LICENSE`, `README.md`, `pyproject.toml`, and a `docs/prereg.md` stub). The script refuses to overwrite existing critical files without `--force` (which takes timestamped backups). Install Python dependencies with `uv add`.
45+
46+
**Commit `docs/prereg.md` before touching any outcome-related analysis.** The preregistration commit is the single most important integrity artefact; skipping it turns any later outcome pivot into HARKing. See [references/preregistration-and-integrity.md](references/preregistration-and-integrity.md) for the required contents and the rules that make the orthogonal-outcome pivot legitimate.
47+
48+
Design the method **before** looking at results. See [references/method-design.md](references/method-design.md) for the rigor checklist (leakage-free feature selection, stability / parameter sweep, permutation null, proportional-hazards tests, nested C-index, calibration + DCA / NRI if clinical, bootstrap CIs, multiple-testing correction). The target journal's author instructions drive the checklist priority - clinical journals weight calibration + DCA; methods journals weight stability + null models.
49+
50+
Common open-dataset URLs and download recipes live in [references/open-datasets.md](references/open-datasets.md); access codes (Open / Gated / Mixed) in [references/data-first-novelty.md](references/data-first-novelty.md) tell you which raw artefacts can be redistributed in the final release.
51+
52+
**Exit criterion**: `docs/prereg.md` committed, data downloaded, analysis scripts stubbed, `uv run python analysis/01_prepare_data.py` succeeds.
53+
54+
## Phase 5 - Analysis, figures, manuscript with journal-matched writing
55+
56+
Iterate analysis -> figures -> LaTeX. Structural conventions in [references/manuscript-structure.md](references/manuscript-structure.md).
57+
58+
Writing style is journal-specific. See [references/reader-reviewer-writing.md](references/reader-reviewer-writing.md) for the explicit reader and reviewer profiles of Nature Commun, Leukemia, Genome Medicine, BCJ, Cell Reports Medicine, Briefings in Bioinformatics, and the abstract-headline + discussion-caveat patterns that work at each. A Leukemia reader expects the clinical hook in the first sentence; a Briefings reader expects the methods gap; a Nature Commun reader expects the broad-interest statement followed by the quantitative headline.
59+
60+
Compile with `cd manuscript && make`.
61+
62+
**Exit criterion**: full PDF compiles; abstract-headline, discussion-caveats, and data/code availability sections match the style targeted at `manuscript/JOURNAL.md`.
63+
64+
## Phase 6 - Reviewer cycle
65+
66+
Dispatch four adversarial reviewers in parallel (methods, clinical, biostatistics, target-journal editor). Iterate until unanimous accept. Pattern and prompt templates in [references/reviewer-cycle.md](references/reviewer-cycle.md). The target-journal editor reviewer is instantiated with that journal's historical concerns - loaded from the author-instructions file produced in Phase 3.
67+
68+
## Phase 7 - Repo and tagged release
69+
70+
Create private GitHub repo, wire CI, push tag, release PDF + .tex + source bundle. Exact commands + CI workflow template in [references/release-workflow.md](references/release-workflow.md). CI template at `assets/github/release.yml`; LaTeX helpers at `assets/latex/Makefile` + `latexmkrc`. Use `scripts/new_release.sh` for a preflight-checked release (rejects dirty git tree, missing `gh` auth, stale placeholder DOIs, absent figures).
71+
72+
Release naming: `v<MAJOR>.<MINOR>.<PATCH>` where MAJOR bumps reflect scientific pivots, MINOR bumps reflect reviewer-round revisions, PATCH bumps reflect typos and terminology.
73+
74+
## Phase 8 - Submission support (optional but expected at IF 10+)
75+
76+
The skill's release workflow ends at a tagged preprint-ready PDF. Actual submission happens off-skill, but the supporting artefacts are templated here:
77+
78+
- Preprint posting (bioRxiv / medRxiv / arXiv) + Zenodo DOI minting: [references/preprint-and-dois.md](references/preprint-and-dois.md). Ship the preprint before the journal submission so the cover letter can cite it.
79+
- Cover letter + point-by-point rebuttal templates: [references/cover-letter-and-rebuttal.md](references/cover-letter-and-rebuttal.md). Rebuttals are the highest-leverage artefact in a revision cycle.
80+
- Submission-portal quirks (Editorial Manager, ScholarOne, Snapsubmit, figure-format, ORCID, supplementary material): [references/submission-portals.md](references/submission-portals.md).
81+
- CRediT authorship, ethics and competing-interests language: [references/credit-and-ethics.md](references/credit-and-ethics.md). Do the CRediT assignment with all authors during Phase 4 or 5; negotiating at the last minute causes submission delays.
82+
83+
## Scripts
84+
85+
- `scripts/init_project.py <project-dir>` - scaffold directory tree, copy LaTeX + GH Actions templates, write `.gitignore`, `LICENSE`, `README.md`, `pyproject.toml`. Run once at start of Phase 4.
86+
- `scripts/new_release.sh <project-dir> <version> "<title>" "<notes>"` - build PDF, stage artefacts into `/tmp`, create tagged `gh release` with PDF + .tex + source bundle. Run at Phase 7 and after every review round.
87+
88+
## Non-goals
89+
90+
- Wet-lab experiments, patient-level trial design, regulatory submission.
91+
- Actual journal submission (the skill ends at a release-tagged preprint-ready PDF matched to one target journal's style).
92+
- Author-name or ORCID fill-in (always prompt the user).
93+
94+
## Pitfalls the skill's references protect against
95+
96+
- Topic-first workflow that picks a fashionable method and shops for data -> Phase 1 is data-first precisely to avoid this.
97+
- Novelty hallucinated from training data -> `novelty-search.md` verifies against current literature.
98+
- Picking the highest-IF journal before checking acceptance probability -> `journal-targets.md` scores fit, not just IF.
99+
- Writing manuscript before reading author instructions -> Phase 3 fetches and distils them up front.
100+
- Gene-panel leakage across cohorts -> `method-design.md`.
101+
- Claims that collapse under a proper clinical baseline -> `reviewer-cycle.md` catches it before submission.
102+
- Release without GPG-signed tag fails on first push -> `release-workflow.md` uses `gh release create` (remote tag) to sidestep local signing.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Python
2+
.venv/
3+
__pycache__/
4+
*.pyc
5+
*.pyo
6+
.python-version
7+
8+
# LaTeX build artefacts
9+
manuscript/*.aux
10+
manuscript/*.bbl
11+
manuscript/*.blg
12+
manuscript/*.fdb_latexmk
13+
manuscript/*.fls
14+
manuscript/*.log
15+
manuscript/*.out
16+
manuscript/*.synctex.gz
17+
manuscript/*.toc
18+
19+
# Raw data (regenerable from documented URLs)
20+
data/raw/*
21+
!data/raw/.gitkeep
22+
23+
# Processed artefacts (regenerable)
24+
data/processed/*.tsv
25+
data/processed/*.txt
26+
data/processed/*.csv
27+
data/results/*.npz
28+
29+
# Large supplementary files
30+
*.xlsx
31+
!assets/**/*.xlsx
32+
33+
# macOS
34+
.DS_Store
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: build-and-release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch: {}
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
has_figures: ${{ steps.check_figures.outputs.has_figures }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Build LaTeX
22+
uses: xu-cheng/latex-action@v3
23+
with:
24+
root_file: main.tex
25+
working_directory: manuscript
26+
latexmk_use_xelatex: false
27+
args: -pdf -interaction=nonstopmode -file-line-error
28+
29+
- name: Verify PDF produced
30+
run: |
31+
test -s manuscript/main.pdf || { echo "main.pdf missing or empty"; exit 1; }
32+
33+
- name: Lint placeholder DOIs
34+
run: |
35+
if grep -q "10.0000/placeholder" manuscript/references.bib; then
36+
echo "references.bib still contains 10.0000/placeholder entries"
37+
exit 1
38+
fi
39+
40+
- name: Check for figures
41+
id: check_figures
42+
run: |
43+
shopt -s nullglob
44+
FIGS=(manuscript/Fig*.pdf)
45+
if [ ${#FIGS[@]} -gt 0 ]; then
46+
echo "has_figures=true" >> "$GITHUB_OUTPUT"
47+
else
48+
echo "has_figures=false" >> "$GITHUB_OUTPUT"
49+
fi
50+
51+
- name: Stage release artefacts
52+
run: |
53+
SLUG="${GITHUB_REPOSITORY#*/}"
54+
mkdir -p release
55+
cp manuscript/main.pdf "release/${SLUG}.pdf"
56+
cp manuscript/main.tex "release/${SLUG}.tex"
57+
cp manuscript/references.bib release/
58+
if [ -d figures ]; then cp -r figures release/figures; fi
59+
tar_extra=()
60+
if compgen -G "manuscript/Fig*.pdf" >/dev/null; then
61+
tar_extra+=(manuscript/Fig*.pdf)
62+
fi
63+
if [ -f docs/prereg.md ]; then
64+
tar_extra+=(docs/prereg.md)
65+
fi
66+
tar -czf release/source-bundle.tar.gz \
67+
manuscript/main.tex manuscript/references.bib \
68+
manuscript/Makefile manuscript/latexmkrc \
69+
analysis README.md LICENSE .github/workflows/release.yml \
70+
"${tar_extra[@]}"
71+
ls -la release/
72+
73+
- name: Upload PDF as workflow artefact
74+
uses: actions/upload-artifact@v4
75+
with:
76+
name: manuscript-pdf
77+
path: release/*.pdf
78+
79+
- name: Attach artefacts to the tagged release
80+
if: success() && startsWith(github.ref, 'refs/tags/v')
81+
uses: softprops/action-gh-release@v2
82+
with:
83+
files: |
84+
release/*.pdf
85+
release/*.tex
86+
release/references.bib
87+
release/source-bundle.tar.gz
88+
fail_on_unmatched_files: true
89+
# Do NOT auto-generate release notes: user-supplied notes via
90+
# `gh release create --notes` are the single source of truth.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
PDF := main.pdf
2+
TEX := main.tex
3+
BIB := references.bib
4+
FIGS := $(wildcard Fig*.pdf)
5+
6+
.PHONY: all clean full
7+
8+
all: $(PDF)
9+
10+
$(PDF): $(TEX) $(BIB) $(FIGS)
11+
latexmk -pdf $(TEX)
12+
13+
full:
14+
latexmk -C
15+
pdflatex -interaction=nonstopmode $(TEX)
16+
bibtex main
17+
pdflatex -interaction=nonstopmode $(TEX)
18+
pdflatex -interaction=nonstopmode $(TEX)
19+
20+
clean:
21+
latexmk -C
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
$pdf_mode = 1;
2+
$bibtex_use = 2;
3+
$pdflatex = 'pdflatex -interaction=nonstopmode -file-line-error %O %S';
4+
@default_files = ('main.tex');

0 commit comments

Comments
 (0)