Explore raw RNA-seq counts, CPM and ratio size factors with the Airway dataset. The example covers count summaries and normalization, not differential-expression accuracy or full DESeq2 parity.
1. Load raw counts with matching identifiers
Use airway_raw_counts_app_ready.csv: 63,677 gene rows and eight library columns, with the eight SRR library identifiers retained in order. Gene identifiers describe rows; library identifiers describe columns. Do not transpose the matrix or substitute normalized values without changing the input contract. Preserve the original CSV, its checksum and the identifier mapping.
The app requires a two-dimensional matrix with at least ten genes and two libraries, finite nonnegative raw count values and positive total counts in every library. Its QC gate checks integer-like values; the ratio primitive requires exact integer-valued counts. Supply raw integer counts rather than relying on a tolerance or rounding transformed data. Missing or invalid inputs should produce a refusal or unavailable result.
The recorded QC reports no gene lengths, gene-body profiles, read-distribution records or library group labels. TPM and FPKM require one positive length in base pairs for every count row, with matching identifiers. Gene-body and read-distribution analyses need their own uploaded measurements. The absence of those inputs is not repaired by choosing a method, and this count-only run does not contain a treatment design.
2. Distinguish the two normalization quantities
| Quantity | Meaning in this workflow |
|---|---|
| Library total | Sum of all raw counts in one column. SRR1039508 has 20,637,971 recorded counts. A library total is not a size factor or a treatment effect. |
| CPM | For each gene and library: count / library total × 10⁶. This adjusts for library size, without gene-length correction. It does not establish comparable expression across genes of different lengths. |
| DESeq2 default ratio size factor | Use only genes positive in every library. For each eligible gene, subtract its across-library mean log count from each log count, then take exp(median(log ratios)) for each library. The recorded input has 18,870 eligible genes. |
No pseudocount is added to make a gene eligible. If no gene is positive in every library, the ratio method refuses rather than inventing a factor. The current implementation follows the median in log space; for an even number of eligible genes, this is not generally identical to taking the ordinary median of the unlogged ratios. Keep that detail when reproducing the reference calculation.
Dividing a library’s counts by its size factor produces normalized counts. This step does not fit dispersions, coefficients, contrasts, adjusted p-values or a DESeq2 differential-expression model. Normalized library totals need not be identical. Similarly, a named local transformation or another normalization route does not inherit acceptance from the ratio size-factor comparison.
3. Review the eight recorded routes within their scope
The continuous workflow shows CPM, ratio size factors, library sizes, count distributions, library distance, gene detection, normalization comparison and an RNA-seq report. Inspect the input QC before comparing these views. A zero median CPM in a sparse library does not mean the entire library is empty: this recording has positive library totals and many zero gene counts.
Use the distance and detection summaries to explore data quality and differences among the recorded libraries. They do not establish a biological cause, treatment response or differential-expression result. The independent comparison covers default ratio size factors only; it does not certify all eight routes.
4. Separate exported precision from reference precision
The saved DESeq2_Size_Factors.csv contains these eight size factors:
| Library | Recorded exported factor |
|---|---|
| SRR1039508 | 1.0236 |
| SRR1039509 | 0.8962 |
| SRR1039512 | 1.1795 |
| SRR1039513 | 0.6701 |
| SRR1039516 | 1.1777 |
| SRR1039517 | 1.3990 |
| SRR1039520 | 0.9208 |
| SRR1039521 | 0.9445 |
The app rounds these factors to four decimal places before placing them in its summary table. CSV formatting may add two trailing zeros: 1.023600 still represents a four-decimal factor. The reference value for SRR1039508 is 1.02364764926706, giving an absolute difference of about 0.0000476493. The recorded export comparison allows 0.00005000001 for this disclosed rounding, and all eight factors pass.
Normalized totals in this table are separately rounded to whole counts. They were calculated using internal factors; dividing a raw total by the rounded CSV factor need not reproduce the saved normalized total. Keep raw totals, factors and normalized totals distinct when checking arithmetic.
The earlier independent run executed the unmodified official estimateSizeFactorsForMatrix function from DESeq2 RELEASE_3_23 source in R 4.5.3; the full DESeq2 package was not installed. Its eight full-precision primitive comparisons use an absolute tolerance of 10⁻¹². Those values and older source hashes belong to that reference run. The later recorded CSV comparison validates the rounded exports against those reference values; it is not a new full-precision or full-package claim.
5. Save the summaries and their provenance
- Retain the source CSV, gene/library order, selected methods, missing-input warnings and exact app/helper versions. The export manifest’s provenance object is empty in this recording, so preserve these identities alongside the bundle rather than assuming the manifest includes them.
- Save and reopen the native bundle. This recording lists 20 artifacts: eight PNGs, ten CSV tables, one summary and one analysis report, plus the artifact manifest itself. Two input-QC CSVs reflect two saved QC tables; they are not duplicate scientific validation.
- Compare every artifact’s bytes and SHA-256 with
artifact_manifest.json. ReadRNA-Seq_Input_QC.csv,Library_Size_Analysis.csvandDESeq2_Size_Factors.csvtogether. Keep all eight library labels and check factor values using the rounding tolerance above. - These CSVs contain descriptive summaries. This bundle does not contain a complete 63,677 × 8 normalized count matrix. Complete saved summary rows do not imply full gene-level numerical export, and figures do not substitute for the source matrix.
- Open an exported PNG outside the viewer and retain the original counts for a rerun. File reopening does not establish a reloadable scientific session, hosted download acceptance or a reproducible differential-expression analysis.