Piper files
The piperfiles/ directory holds the DeepPhe pipeline definitions the
installer overlays on top of the defaults that ship in DeepPhe-NLP.zip. A
.piper file is cTAKES/DeepPhe's pipeline description language: set variables,
load sub-pipelines, and add analysis engines.
Why the installer overrides them
The NLP zip ships its own DefaultDeepPhe.piper, but the installer needs the
pipeline to emit the trimmed, split JSON the visualizer and data API consume.
Rather than fork the whole NLP distribution, the installer overlays three small
files at install time (the "Overlay installer piper files over the NLP
defaults" action):
| File | Role |
|---|---|
DefaultDeepPhe.piper | The pipeline definition |
DefaultLimits.piper | Report limits (loaded by the pipeline) |
SmallJsonPrefs.piper | Trimmed JSON output preferences (loaded by the pipeline) |
The overlay copies these over .DeepPhe/resources/pipeline/ and also writes a
DeepPheDefault.piper alias (the desktop GUI currently loads that name).
What changed vs. the stock pipeline
Compared to the DefaultDeepPhe.piper in dphe-nlp2, the installer's version:
- Loads
pipeline/SmallJsonPrefs(trimmed JSON, split per patient) instead of the fullJsonOutputPrefs+ZipOutputPrefs. - Loads
pipeline/DefaultLimitsinstead ofConfidencePrefs. - Disables the HTML / entity-table / relation-table / plaintext writers, which the visualizer doesn't use (they are commented out in the piper).
The primary output engine that matters is:
add PatientSummaryXnJsonFileWriter SubDirectory=json
which writes the per-patient JSON the DB creator reads.
SmallJsonPrefs.piper
Trims the JSON to essentials and splits it per patient:
set PrettyPrint=no
set WriteNote=yes
set WriteSections=no
set WriteConcepts=yes
set WriteConceptRelations=yes
set WriteMentions=yes
set WriteMentionRelations=yes
set WriteEvidence=yes
set SplitJson=yes # patient, cancers, concepts, documents as separate files
DefaultLimits.piper
Caps how much is reported, by count and confidence — for example:
set MinCancers=1
set MaxCancers=3
set MinCancerConfidence=0.84
set MaxTumors=2
...
Tuning these values changes how conservative or expansive the extracted phenotype summary is. See the comments in the file for the full set of knobs (cancers, tumors, attributes, concepts, and relations).
Retiring the overlay
The overlay exists only until JSON output is folded into the canonical
DefaultDeepPhe.piper in dphe-nlp2 and DefaultLimits.piper /
SmallJsonPrefs.piper are shipped inside DeepPhe-NLP.zip. At that point this
directory and the overlay action can be dropped. (See piperfiles/README.md.)