Scientific reporting and reproducible analysis records

Practical 13: Genomics, systems biology and multi-omics

Learning objectives

Connect a question, sample definition, analysis and result; document provenance and exclusions; distinguish a numerical association from a biological conclusion.

Biological question and data

What evidence and processing record should accompany a computational result?

The example fits a simple animal-level response model to fictional data. Diet allocation, independence and the chosen covariates are assumptions of this teaching design. The report records a conditional estimate, not a livestock recommendation.

No biological download is required. Numerical inputs are hypothetical, not observed animal data. The runnable examples use base R. Count and abundance units are specified where used.

1. Define and fit the analysis

Write down the target contrast before fitting. Include batch and genotype1 because the supplied model contains these patterns or sources of variation.

Show R code
helper_dir <- if (dir.exists("R")) "R" else "../R"
stopifnot(file.exists(file.path(helper_dir,"teaching_data.R")))
source(file.path(helper_dir,"teaching_data.R"))
d <- teaching_data()
meta <- d$metadata;meta$dosage <- d$genotypes[meta$animal,"marker1"]
fit <- lm(response~diet+batch+dosage,data=meta)
summary(fit)$coefficients
                Estimate Std. Error   t value     Pr(>|t|)
(Intercept)    9.9696276  0.2828976 35.241119 6.888144e-34
dietsupplement 1.9156332  0.3042130  6.297013 1.234114e-07
batchB         0.3960978  0.3011504  1.315282 1.952283e-01
dosage         0.9720046  0.2109408  4.607950 3.477886e-05
Show R code
interval <- confint(fit)["dietsupplement",]
stopifnot(nobs(fit)==48,all(is.finite(interval)))

The diet coefficient adjusts for the supplied batch and genotype columns. The model still summarizes a particular hypothetical sample under its assumptions.

2. Create a compact evidence record

Preserve the contrast, analysis population, estimate, interval and exclusions beside the input-generation record.

Show R code
record <- data.frame(question="Diet contrast in fictional animals",unit="animal",
 n=nobs(fit),exclusions=0,estimate=unname(coef(fit)["dietsupplement"]),
 lower=interval[1],upper=interval[2],units="arbitrary response units",
 input_code_checksum=unname(tools::md5sum(file.path(helper_dir,"teaching_data.R"))))
record
                                question   unit  n exclusions estimate    lower
2.5 % Diet contrast in fictional animals animal 48          0 1.915633 1.302532
         upper                    units              input_code_checksum
2.5 % 2.528734 arbitrary response units b721054312060f42bed87443b20e6931

The checksum identifies the local input-generating source. It is not a biological validity check.

3. Write the interpretation at the level supported

Separate result, limitation and follow-up. The generated sentence deliberately avoids a causal-mechanism claim.

Show R code
cat(sprintf("Among %d fictional animals, the adjusted diet contrast is %.2f arbitrary units (95%% model interval %.2f to %.2f).\n",
 nobs(fit),coef(fit)["dietsupplement"],interval[1],interval[2]))
Among 48 fictional animals, the adjusted diet contrast is 1.92 arbitrary units (95% model interval 1.30 to 2.53).

Add the allocation, covariates, model assumptions and absence of external validation. An interval alone is not a complete report.

4. Separate fitted evidence from the claim

A results table needs direction, units, uncertainty and adjustment factors. A generic statement that a treatment is significant omits most of that information. Use an explicit contrast label and distinguish pointwise confidence intervals from multiplicity-adjusted inference.

Show R code
claim_record <- data.frame(field=c('comparison','unit','model','interpretation'),
 value=c('supplement minus control','independent animal',
 'specified response model with batch',
 'conditional group contrast; mechanism not established'))
claim_record
           field                                                 value
1     comparison                              supplement minus control
2           unit                                    independent animal
3          model                   specified response model with batch
4 interpretation conditional group contrast; mechanism not established

5. Record deviations and provenance

List exclusion reasons and counts by group. Preserve a clean-session command, input/version information and the processing steps. The fixture checksum can identify the generator source; the seed identifies a realization. Neither verifies real-world performance.

Write limitations close to the result they qualify. A biological conclusion should say which tissue, period and population were measured. A proposed follow-up should resolve an identified uncertainty, such as replication across farms or a targeted mechanistic perturbation. A polished report cannot compensate for missing replication or confounded allocation.

Interpretation challenge

How should a report handle a null result with a wide interval?

State the estimate and interval, explain the imprecision and avoid claiming equivalence. A meaningful absence claim needs an appropriately defined equivalence target and analysis.

Interpretation and limits

A real report needs species/population, measurement units, design, permissions, assay processing, software, missingness, diagnostics, validation and uncertainty. Tables and plots should allow readers to assess the conclusion without relying on an unexplained significant/not-significant label.

Exercises

  1. Name one claim the result cannot support.
  2. What changes if ten animals are excluded after looking at their outcomes?
  3. Which parts of a report remain useful when data cannot be public?
  1. A specific molecular mechanism or a dependable effect in another farm/population.
  2. Selection may bias the estimate; document and justify exclusions and assess sensitivity.
  3. Methods, variable definitions, provenance, permissions/access process and a non-sensitive reproducible demonstration.

Continue learning

B17 Integrity and B18 Synthesis.

Continue with research proposal. Return to the practical index or the unified map.