Skip to main content

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):

FileRole
DefaultDeepPhe.piperThe pipeline definition
DefaultLimits.piperReport limits (loaded by the pipeline)
SmallJsonPrefs.piperTrimmed 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 full JsonOutputPrefs + ZipOutputPrefs.
  • Loads pipeline/DefaultLimits instead of ConfidencePrefs.
  • 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.)