Run the analysis

From the main project folder, run:

Rscript scripts/R/run_workflow.R data/synthetic results/synthetic

This repeats the input checks, fits DESeq2 and reproduces the figures you previewed. Keep bundled inputs unchanged for the first run. Rerunning replaces the named outputs; resolve any error before interpreting a partially refreshed folder.

Understand the analysis

Step What the script does What to check
Sample summaries Sums supplied raw counts and counts nonzero genes These are not overall FASTQ or alignment quality metrics
Filtering Keeps genes with counts ≥10 in at least two samples Filtered and original gene counts can differ
Model Fits ~ donor + group Contrast is B versus A, accounting for donor; positive effects indicate the first condition
Inference Estimates size factors, dispersions and condition effects; adjusts p-values Inspect lfcSE, pvalue, padj and unavailable values
Exploration Variance-stabilizes retained counts for PCA and distances These values are not used as differential testing inputs; donor effects remain
Gene display Plots the post-analysis selected gene alongside two prespecified examples The first gene is selected after fitting; the other examples are fixed before analysis. Neither display independently confirms p-values

Find the six figures

All filenames below are inside results/synthetic/figures/.

File Inspect
library-sizes.png Raw count totals for every sample
sample-pca.png Condition colours, donor shapes, pair connections and axis percentages
sample-distances.png Distances between transformed sample profiles
ma-plot.png Average expression versus unshrunken log2 fold change
volcano.png Unshrunken log2 fold change versus -log10(adjusted p-value)
selected-gene.png Three normalized-count panels across paired conditions

MA and volcano plots use the original, unshrunken log2 fold-change estimates. Inspect their uncertainty in lfcSE. The volcano omits missing adjusted p-values and floors zero values only for plotting. Colour uses padj < 0.05 without an effect-size cutoff.

Find the supporting numbers

All TSVs below are inside results/synthetic/tables/.

File Contents
sample-qc.tsv Raw total and detected-gene count for each sample
differential-expression.tsv Model estimates, standard errors, p-values and adjusted p-values
normalized-counts.tsv Retained raw counts divided by DESeq2 size factors
size-factors.tsv Size factor used for each sample
transformed-counts.tsv Variance-stabilized retained counts
pca-scores.tsv, pca-variance.tsv Sample coordinates and percentages explained
sample-distances.tsv Numerical distances behind the heatmap
selected-gene-counts.tsv Gene ID and normalized values for the post-analysis selected gene
example-gene-counts.tsv Values and example labels for all three expression panels
input-script-hashes.tsv Hashes identifying the exact inputs and workflow script

run-log.txt records the design, contrast, filtering, selected gene and software versions. session-info.txt records the R session. Compare these records before investigating differences from bundled previews; software versions may affect final numerical values.

Checkpoint: open all six figures, locate the selected gene in the DE table and confirm the contrast in the run log. Return to the preview page and explain what each figure shows using your own generated outputs.

Next: Verify and explain