Framework Architecture¶
At a high level, In-Sight separates the stack into reusable layers.
Layer 1: Command Orchestration¶
Examples:
in_sight/commands/bayesmonstr2insights.pyin_sight/commands/plot2insights.pyin_sight/commands/cf2insights.pyin_sight/commands/scrna2insights.py
Responsibilities:
- parse user intent
- validate input combinations
- choose a backend workflow
- choose an R layout
- define output paths
Layer 2: Visualization Workflows¶
Examples:
in_sight/vis_flow.pyin_sight/str_vis_flow.pyin_sight/str_vis_flow_simple.pyin_sight/bulkmonster_vis_flow.py
Responsibilities:
- parse regions
- set processors
- build dataframe intermediates
- call the plotting backend
Layer 3: Read Processing Core¶
Examples:
in_sight/reads_manager.pyin_sight/reads_import.pyin_sight/samplers.py
Responsibilities:
- iterate aligned reads
- apply filters and sampling
- organize layout and y-level placement
- emit standardized dataframes
Layer 4: R Plotting Backend¶
Examples:
in_sight/r_plot.pyin_sight/r_script/plot_base.Rin_sight/r_script/plot_plain_with_full_features.Rin_sight/r_script/plot_size_helpers.R
Responsibilities:
- map layouts to R scripts
- validate CSV inputs
- execute
Rscript - render specialized layouts
Why This Matters¶
If you want to build a new application, you usually should not start by writing a new BAM parser or a new dataframe builder. Most of the time you only need:
- a new command
- maybe a new workflow wrapper
- maybe a new R layout
That is why the existing commands are valuable reference material.