# Changelog

## 1.0.0 (2026-11-25)

Note: 0.9.12 on PyPI dates from 2020-01-18 and predates everything below.

### Breaking changes from 0.9

Each is described in full in its entry below.

- Python 3.10 is no longer supported; detk 1.0 needs Python 3.11 or later,
  numpy 2 and pandas 3
- statsmodels and patsy are no longer installed with detk: statsmodels is
  test-only (the `test` extra), and design formulas are built with
  formulaic (DETK-0024, DETK-0026)
- `environment.yml` is removed; `pyproject.toml` is the one list of
  dependencies (DETK-0048)
- Design formulas, now built by formulaic:
  - with an interaction, the interaction columns come after all the main
    effects, so the last column (`detk-de deseq2 --last-term-only`) is the
    interaction, and the DESeq2 and Firth result columns follow that order
    (DETK-0049)
  - the text of some design errors changes (formulaic's wording)
  - a lone interaction of two categorical terms (`counts ~ a:b`) gives its
    interaction columns, where it was fitted silently as `counts ~ 1`
    (DETK-0040)
  - formulas take column names only: a term that looks like a call, such as
    `np.log(x)`, and is not a column is an error (DETK-0050)
  - a number-like term other than the intercept's `0` and `1` is a usage
    error (DETK-0190)
  - the Python module `de_toolkit.patsy_lite` is now `de_toolkit.formula`,
    `PatsyLiteParseError` is `FormulaParseError` and `patsy_lite_to_patsy`
    is `to_formulaic`, with no aliases (DETK-0027)
- Every command parses its command line with argparse (DETK-0023) and exits
  0 on success, 2 on a usage error and 1 on any other failure (DETK-0031);
  docopt exited 1 on a usage error, and some checks made after parsing now
  exit 2
- Option metavars are renamed to one convention (DETK-0025); only help
  changes
- Command lines that worked only by accident are usage errors (DETK-0033):
  `detk-transform rlog` with one of `<design>` and `<cov_fn>`, a
  `detk-stats -f` other than `csv` or `table`, a `detk-util gather
  --format` or `--on-mismatch` outside its choices, and `--version` other
  than as an argument of its own
- `--column-data` is removed from `detk-filter`, `detk-stats summary` and
  `detk-stats pca`; pass the column data as the positional `<cov_fn>`
  (DETK-0030)
- `detk-outlier entropy -p` is a fraction strictly between 0 and 1
  (`-p 0.05` is the 5th percentile), where 0.x read it as a percent; `-p 5`
  is now a usage error. The flag column is named from all of the
  threshold's decimal digits, at least two: `-p 0.1` gives `entropy_p0_10`,
  where it gave `entropy_p0_1` (DETK-0200)
- In a `detk-filter` expression, `and` binds tighter than `or`: `A and B or
  C` is `(A and B) or C`, where 0.x read `A and (B or C)` (DETK-0270)
- The provenance crate is written into the report directory, beside
  `detk_report.html`, not the working directory, and module JSON and the
  crate record paths relative to the report directory, never absolute
  (DETK-0280, DETK-0281)
- `detk-util record` no longer takes `-d`/`--out-delim` (#135)
- Feature IDs and sample names are read as text exactly as written, in
  Python and through R: a zero-padded ID such as `007` stays `007`, where it
  was read as the number 7 (#48, DETK-0015)
- Runs that exited 0 in 0.9 now fail: `detk-filter` with a group its column
  does not have (`mean(cond[Z]) > 1`) is a usage error, exit 2 (#112); a
  table with a one-field header over data lines that split unalike exits 1
  (#145); `detk-stats summary --color-col` without column data, and a
  `detk-transform rlog --blind` value other than `True` or `False`, are
  usage errors, exit 2 (DETK-0081)
- `detk-transform rlog --blind False` now runs DESeq2's non-blind rlog with
  the design and column data given, where it ran a blind one, so its output
  changes (DETK-0081)
- FPKM values change: FPKM is now `count * 1e9 / (length * library size)` as
  documented (a correction of 0.9.x)

### Changed
- Modernized to Python 3.11-3.13, numpy 2, and pandas 3
- Python 3.10 is no longer supported (it reached end of life in October 2026)
- Python 3.14 is best effort for 1.0: detk is expected to install and run
  on it, but it is not tested in CI or listed in the classifiers, and 1.0
  promises only the versions CI tests
- New toolchain: `pyproject.toml` with the hatchling build backend, uv for
  environment/dependency management, ruff for lint and formatting
- Documentation moved to MkDocs Material, published on GitHub Pages at
  https://bu-neuromics.github.io/de_toolkit/
- Report frontend rebuilt on vendored Vega-Lite, removing the Highcharts
  licensing conflict; every module now has report views
- Snakemake removed from the internal machinery
- statsmodels is no longer installed with detk: no module of detk imports
  it, and only the test suite uses it, so it moved to the `test` extra
  (`pip install 'de_toolkit[test]'`) and the uv `dev` group. CI checks that
  every detk module imports, and a detk command runs, without it
- Design formulas are built with formulaic instead of patsy (#78,
  DETK-0024). The formula syntax, the `variable__level` column names and the
  values of the model matrix are unchanged. patsy is no longer installed with
  detk: only the test suite's statsmodels brings it in. Two things users can
  see change:
  - With an interaction in the design, the interaction columns now come
    after all the main effects (DETK-0049), as in R: `counts ~ a*b` gives
    `Intercept, a__x, b__y, a__x:b__y`, where it gave
    `Intercept, a__x, a__x:b__y, b__y`. So the last column, the one
    `detk-de deseq2 --last-term-only` reports, is now the interaction. The
    DESeq2 and Firth result columns come in this order too
  - The text of some design errors: an unknown column or level now reads
    "Unable to evaluate factor ..." (formulaic's wording, where patsy's was
    "Error evaluating factor ..."); a level list that leaves out a level the
    data has names the missing level and the list; a design with nothing
    before the `~` says it has no left hand side
- The formula module is `de_toolkit.formula` (DETK-0027), where it was
  `de_toolkit.patsy_lite`, and its syntax is called the detk formula syntax.
  Its parse error `PatsyLiteParseError` is now `FormulaParseError`, with no
  alias kept, and `patsy_lite_to_patsy` is now `to_formulaic`. An invalid
  design's message reads "detk formula syntax could not parse", where it
  read "patsy lite could not parse"
- Formulas take column names only (DETK-0050): a term that is not a column
  of the column data file and looks like a call, such as `np.log(x)` or
  `log2(x)`, is an error that says so; a derived column belongs in the
  column data file, and points to the Miller recipes page. docs/formulas.md
  no longer says such expressions may be passed; they never worked
  (`np.log(x)` was read as a column name)
- A term of a design formula that looks like a number, other than the
  intercept numbers `0` and `1` (`counts ~ 0 + x`, `counts ~ 1`), is a usage
  error (exit 2) naming it, on either side of `~` (DETK-0190). A column
  whose name looks like a number, such as `3`, `2.5` or `-2.5`, is no longer
  read as a column (`counts ~ 2.5` was, on the 1.0 development branch); the
  message says to rename it to start with a letter or underscore. In 0.x a
  number was never a column either (#112)
- `environment.yml`, an out-of-date conda environment file that nothing
  referred to, is removed; `pyproject.toml` is the one list of detk's
  dependencies
- Many latent bug fixes, including: FLGCounts params were never recorded,
  FPKM report emission was unserializable, and shadowed tests were revived;
  `detk-norm library` and `detk-norm fpkm` failed on every CLI run (the
  library command was handed the count object, the lengths file was read as
  a table) and now run
- Feature IDs in a counts file, and sample names in a sample-info file, are
  read as text exactly as written, so a zero-padded ID such as `007` is no
  longer read as the number 7: it matches a lengths or mapping file that
  writes `007`, and every command writes it back as `007` (#48). This holds
  through R too: `detk-de deseq2` and `firth` and `detk-transform vst` and
  `rlog` read the IDs and sample names as text in R and wrapr reads R's
  output back the same way, so `007` and sample names such as `001` are
  kept, `detk-de deseq2` no longer stops on `001`-style sample names, and
  all-numeric versioned IDs such as `1.10` and `1.1` no longer collapse to
  one duplicate row name; `detk-enrich fgsea` reads the result's ID column
  as text, so `007` matches `007` in the GMT file, and `detk-util
  tidy-counts` and `tidy-covs` match `001`-style sample names, where they
  used to exit 1 (#67, DETK-0015). For R scripts run through
  `de_toolkit.wrapr`, the `output` and `metadata_out` tables are indexed by
  their first column read as text (they were typed by pandas), and the
  script can call `read.id.csv(fn, row.names=TRUE)` to read the counts or
  metadata with the IDs as text. The IDs are kept exactly as written,
  including whitespace: `" 007"` stays `" 007"`, where it used to become 7
  (text IDs always kept it)
- `de_toolkit.transform.rlog(count_obj, blind=False)`, rlog with a design,
  works: it passed the counts and an intercept column to DESeq2, which adds
  its own intercept, and failed in R ("not full rank"); it now drops both,
  as `detk-de deseq2` does. The command line cannot reach it yet:
  `detk-transform rlog --blind` passes its value to R as text, where DESeq2
  stops; leave `--blind` out for a blind rlog
- FPKM values change from 0.9.x: FPKM is now
  `count * 1e9 / (length * library size)` as documented, where 0.9.x computed
  `count / (1e6 * length)` and never divided by library size. In 0.9.x the
  wrong values reached users through the Python function
  `de_toolkit.norm.fpkm()`; the `detk-norm fpkm` command failed outright. This is a
  correction. `fpkm` now also refuses missing, zero and negative lengths, as
  `tpm` does
- Every `detk-*` command parses its command line with argparse instead of
  docopt-ng, which is no longer a dependency (DETK-0001, DETK-0023). The
  command lines that worked before work the same, with the exceptions
  listed here; the tests in `tests/cli/` pin the rest
- `--help` has a fixed layout for every command and subcommand (DETK-0025):
  description, usage, positional arguments, options, common options and
  examples, at least one example per subcommand (CI checks that each parses,
  and runs it where test data allows). Every option states its metavar,
  default and choices. The `detk version: X` line at the top of help is
  gone; `--version` prints the version
- Breaking: a usage error (unknown option or subcommand, missing or extra
  argument) exits with status 2, as argparse does, where docopt exited 1;
  the message names the problem and points at the subcommand's `--help`
- Breaking: option metavars follow one convention (DETK-0025): FILE for a
  file, DIR for a directory, N for a number, and CHAR, COL, COLS, FMT,
  REGEX, WHAT, BOOL, NAME or TEXT for other values. Changed: `detk-filter -o/--output`
  (was `<out_fn>`), `detk-stats --color-col` (was COLNAME) and `summary
  --bins` (was BINS), `--rda` of `detk-de` and `detk-transform` (was RDA),
  `detk-enrich -p/--cores` (was PROCS), `-i/--idcol` and `-c/--statcol` of
  `detk-enrich` and `detk-util annotate` (was FIELD), `detk-enrich
  --minSize`, `--maxSize` and `--nperm` (was INT), `detk-transform plog
  -b/--base` (was B), `rlog --blind` (was N), `detk-outlier entropy
  -p/--percentile` (was P), and `detk-wrapr --rpath`, `--meta-in`,
  `--meta-out`, `--params-in`, `--params-out` (was PATH, now FILE) and
  `--routput-dir` (was PATH, now DIR). Only help changes; the options take
  the same values
- Breaking: command lines that worked only by accident are now usage errors
  (DETK-0033): `detk-transform rlog` takes both or neither of `<design>` and
  `<cov_fn>`; `detk-stats -f/--format` accepts only `csv` or `table` (any
  other value silently meant csv); `detk-util gather --format` and
  `--on-mismatch` reject a value outside their choices when parsing;
  `--version` is honoured only as an argument of its own, so `-o --version`
  is a missing value for `-o`, and an unknown subcommand before `--version`
  is reported. The unreachable `trim` branch of `detk-outlier` is removed
- `detk-util gather` files may still come between its options
  (`a.sf --format=salmon b.sf`); an option given twice, and `--`, are still
  usage errors, as they were under docopt
- Breaking: the deprecated `--column-data` option is removed from
  `detk-filter`, `detk-stats summary` and `detk-stats pca` (DETK-0030);
  pass the column data file as the positional `<cov_fn>` instead, as their
  usage has shown since 0.9. `--column-data` is now an unknown option, a
  usage error (exit 2). `detk-util tidy --column-data-output` is a
  different option and stays
- Breaking: every command exits 0 on success, 2 on a usage error and 1 on
  any other failure (DETK-0031), and help ends with these codes. A usage
  error includes the checks detk makes after parsing: a design without
  `counts`, or one detk cannot parse, and a number option whose value is not
  a number, and a `detk-filter` expression that does not parse, names a
  column the column data lacks, or names a column with no column data
  given, now exit 2 with the usage (they exited 1). Any other failure (a
  bad input file, a missing R or R package, a failing step) ends with one
  line on stderr, `<command>: error: <cause>`, and no traceback unless
  `--verbose` is given; an error R reports names R's error line and, with
  `--routput-dir`, the directory holding R's output
- A command with an optional positional (`detk-filter`, `detk-stats summary`
  and `pca`, `detk-transform rlog`, `detk-wrapr run`) accepts options
  between its positionals on every supported Python, as 0.9 did
  (DETK-0151): `detk-stats summary counts.csv -o out.csv cov.csv` was a
  usage error on Python 3.11
- `detk-filter` accepts a column or group name of one character
  (`mean(cond[a]) > 1`), which its expression language rejected
- The provenance crate (`ro-crate-metadata.json`) is written into the report
  directory, beside `detk_report.html`, and rooted there (#133, DETK-0280);
  it was written to the working directory, where two reports with different
  `--report-dir` values overwrote each other's crate. Its files are named
  relative to the report directory (`../counts.csv`), never by a `file://`
  URI. `detk-report clean` removes the crate with the report directory and
  leaves a `./ro-crate-metadata.json` an earlier version wrote alone
- Module JSON (schema 1.2) holds no absolute path of the machine: `workdir`
  is relative to the report directory (`..` for the default
  `./detk_report`), `argv[0]` is the command's name (`detk-stats`), and the
  file paths (`in_file_path`, `out_file_path`, `column_data_path`,
  `in_file_paths`, `out_file_paths`) are relative to `workdir`, a path typed
  as absolute too. So is an absolute path among the other arguments of
  `argv` (alone, `--opt=/abs` or `-o/abs`) and in `detk-util record`'s
  parameters and checksums, its command string rebuilt from them; the
  command runs as typed (DETK-0281). A consumer resolves a file as report directory, then
  `workdir`, then the path; an older document's absolute `workdir` resolves
  the same way
- In a `detk-filter` expression, `and` binds tighter than `or` and both
  group to the left, as in Python, SQL and R (DETK-0270, #124). An
  expression that mixes `and` and `or` without parentheses now groups
  differently and may keep different rows: `A and B or C` is `(A and B) or
  C`, where 0.x read it as `A and (B or C)`. Parenthesized expressions, and
  ones using only `and` or only `or`, keep the same rows. To keep the 0.x
  result, add the parentheses: `A and (B or C)`
- `detk-util record` no longer takes `-d`/`--out-delim` (#135): it writes no
  table, so the option did nothing there; it is now refused as an unknown
  option, and every other command keeps it. record's help says plainly that
  without `--tool-version` it runs `<command> --version` once to read the
  version, so a script that ignores `--version` would run its whole step a
  second time
- `detk-util record` writes the program of the command it records, typed as
  an absolute path, as its bare name when PATH finds that same file by that
  name (DETK-0390, #156): `detk-util record -- /usr/bin/cp a b` is recorded
  `cp a b`, in `params.argv` and `params.command`, in `argv` and in the
  crate, where it was a `../` chain as deep as the working directory. A
  program PATH does not find by its name, or finds as another file, is
  written relative to `workdir` as before; either way the recorded line
  re-runs from `workdir`
- The documentation describes the 1.0 command line (#162, DETK-0001,
  DETK-0025). Every usage block in `docs/tools/` and `docs/report.md` is the
  subcommand's own part of its `--help` (usage, positional arguments,
  options), and a test (`tests/docs/test_docs_usage.py`) fails when one
  differs from the installed help or a subcommand has none;
  `tests/docs/docs_usage.py` regenerates them. The home page and the API
  reference state what 1.0 promises about help: its sections in order, each
  argument's metavar, default, choices and one-line description, and the
  examples, not the wording. `docs/concepts.md` documents the exit codes
  (0 success, 2 usage error, 1 anything else; DETK-0031), how to load the
  bash, zsh and tcsh completion scripts (DETK-0032), and that a one-field
  header over rows that split unalike is an error. `docs/report.md` says
  what a recorded path leaves out: a path inside a quoted argument
  (`sh -c "cp /abs/a /abs/b"`) is written as typed; a program typed as an
  absolute path is written by its name only when PATH finds that same file,
  so `/bin/cp` stays a relative path where `/bin` and `/usr/bin` are
  separate directories and PATH finds `/usr/bin/cp` first (DETK-0390); and
  a report directory in another tree records a `../` chain. Its crate
  section says standard output is no File and that only the files
  `detk-util record` checksummed carry `sha256` and `contentSize`, as
  `crate.py`'s docstring now does too. `docs/agent-skills.md` lists
  `references/covariates.md`, and a test fails when a skill file is not
  listed. `docs/dev/cli.md` says how to add a command, subcommand or option
  with argparse

### Added
- Shell completion for bash, zsh and tcsh, for `detk` and every
  `detk-<command>` with their subcommands, options, choices and file
  arguments (DETK-0032). The scripts are generated from the command line
  parsers by shtab and ship with detk; `detk completion <shell>` prints one
  (`eval "$(detk completion bash)"` in `~/.bashrc`; `detk completion --help`
  says how to load each). shtab is a development dependency only, and a test
  fails when the shipped scripts fall behind the parsers
- Versioned module JSON schema for report data. Schema 1.1 adds the
  optional `in_file_paths` and `out_file_paths`, every input and output file
  of a step with several (written by `detk-util record`); every 1.0 document
  is still valid (DETK-0061)
- `detk-de` records its column data file (`column_data_path`) in its module
  JSON, so the crate shows the column data as an input of the `detk-de` run
  and traces it to the step that produced it (DETK-0161)
- Process Run Crate (RO-Crate) provenance for CLI runs
- `detk-norm cpm` (counts per million) and `detk-norm tpm` (transcripts per
  million, from the same lengths file as `fpkm`), each with a report view.
  The lengths file (for `tpm` and `fpkm`) may start with a header line, which
  is recognized only when its length field is text other than a missing-value
  token such as `NA`; a feature listed twice is refused; feature IDs are
  matched as text, so numeric IDs work; `tpm` and `fpkm` require every length
  to be a positive number
- `detk-util annotate`: join feature metadata such as gene symbols onto a
  result table from a user-supplied mapping file, with `--strip-versions`
  for Ensembl version suffixes and a report of mapped and unmapped IDs (#29)
- Agent skill `detk` under `skills/`, installable with
  `npx skills add BU-Neuromics/de_toolkit`, and its docs page. It covers the
  1.0 commands: `detk-util gather` from quantifier outputs, `detk-norm`
  `deseq2`, `cpm`, `tpm`, `fpkm` and `library`, and `detk-util annotate` for
  gene symbols (#62)
- `detk-util gather`: combine per-sample salmon, kallisto, htseq-count or
  featureCounts outputs into a counts matrix, with the format detected from
  each file's header, sample names from the paths (or `--name-from`), an
  error when the samples list different features (`--on-mismatch=fill` or
  `drop` to go on) and a report of what was joined; it replaces csvgather in
  the documented workflow (#25)
- `detk-util record [-i FILE]... -o FILE... -- <command> [<arg>...]`: run a
  command outside detk (Miller, awk, an R script) and record it as a step, so
  the report lists it and the provenance crate shows it as the producer of
  its outputs (DETK-0051, DETK-0061). The command runs without a shell, with
  detk's stdin, stdout and stderr; a missing input, a command not found or
  failing, or a missing output exits 1 and records nothing. The module JSON
  holds the command, the tool and its version (`--tool`, `--tool-version`,
  else `<command> --version`) and the SHA-256 and size of every file; in the
  crate the tool is the step's instrument. Its options use two new metavars,
  NAME and TEXT. A subcommand that takes a command after `--` is the one
  exception to detk's refusing `--` (DETK-0160)
- Tutorials section in the docs, whose pages run as integration tests: a
  pytest runner in `tests/tutorials/` runs each page's bash blocks in order
  and checks the outputs the page shows (DETK-0064); `docs/dev/tutorials.md`
  says how to write one (#83)
- Tutorial: from quantifier outputs to a normalized matrix. Salmon
  `quant.sf` files to a counts matrix, a sample sheet, CPM and TPM, a log
  transform, summary statistics, the report and the crate, with no R, on
  data simulated by a seeded script next to the page; it runs in every test
  job (#100)
- Tutorial: differential expression on airway. The airway analysis
  (statistics, filtering, DESeq2 normalization with `--size-factors`, VST,
  entropy outliers, `detk-de deseq2` with the cell + dex design, gene
  symbols with `detk-util annotate`, the report and the crate) as one page
  that runs in the CI job with R; a test checks its DESeq2 results and size
  factors against DESeq2 run directly in R. The airway commands now exist
  only on that page: `docs/example.md` links it, `examples/airway/run.sh`
  runs it and publishes its report and crate as `docs/example/` (regenerated
  from it), and `tests/example/` is gone. The agent skill's airway reference
  shows the same workflow, `--size-factors` restored, and a test keeps it in
  step with the page (#111)
- Tutorial: derived covariates and recorded steps. From the airway data,
  with the read length kept in the sample sheet, it adds a constant column,
  the z-score and the log of the read length with the Miller recipes, each
  through `detk-util record`; shows a recipe stopping on a missing value and
  naming the sample; fits `detk-de deseq2` with the z-scored column in the
  design; shows that a call in a formula is an error (DETK-0050); and follows
  the sheet `detk-de` read back through the crate to the Miller steps, with
  mlr's version and each file's checksum. It runs in the CI job with R and
  Miller (#153)
- Derived covariates with Miller (`docs/recipes/covariates.md`): tested
  Miller recipes for the derived columns a design formula no longer computes
  (DETK-0051, DETK-0062): a constant column, `<column>_log2`, `_log10`,
  `_ln`, `_log2_pc1`, `_zscore` (sd over n - 1), `_center` and `_minmax`,
  each run through `detk-util record`. Each checks its input first: a
  missing or non-numeric value, a value at or below zero for a log (after
  the pseudocount), or a column that does not vary for the z-score and
  min-max exits 1, names the samples on stderr and leaves no output file.
  The page runs as a tutorial; tests check the values against numpy and
  R's `scale()`, the IDs as written and every failure. Miller is not a detk
  dependency: the tests skip without `mlr`, and the CI job with R installs
  it. The agent skill carries the recipes (`references/covariates.md`) and
  warns that tidyr's and csvtk's `gather` pivot to long format, unlike
  `detk-util gather` (#115)

### Fixed
- A recorded command line no longer rewrites an argument that only starts
  with `/` as if it were a path (DETK-0580, #162): an awk program
  (`'/^gene/ {print}'`), a regular expression (`'/^g1,/'`) or a shell script
  (`sh -c "/usr/bin/env echo hi"`) was recorded as a `../` chain
  (`'../../../^gene/ {print}'`), a different program from the one that ran.
  An argument is now taken for an absolute path, and written relative to
  `workdir`, only when it has no whitespace and its parent directory exists
  (an output not yet written, in a directory that exists, still is), or
  when it exists, whitespace or not, so `/home/me/proj/My Data/c.csv` is
  recorded `My Data/c.csv` (DETK-0590, #166); any other is recorded as typed
- `detk completion bash | head` no longer prints `Broken pipe` and exits 1:
  a reader that stops early is not a failure, so it exits 0 quietly
- The quickstart's commands run as written (#162): its filter kept the rows
  with fewer than half their counts nonzero (`nonzero(all) < 0.5`), the
  opposite of what the page said, and is now `nonzero(all) > 0.5`, as is
  the example on the report page; its design names the reference level
  (`counts ~ cond[control]`) and its GSEA ranks by the column DESeq2 writes,
  `cond__treated__log2FoldChange`, where it named `cond__log2FoldChange`,
  which no result has. A test runs the quickstart (its R steps where R is
  installed). docs/tools/de.md names a result column with its level
  (`Status__case__log2FoldChange`), and the `detk-wrapr run` example on
  docs/tools/wrapr.md is one shell command (its comments after `\` broke it)
- The Process Run Crate lists no File for standard output: a command that
  wrote its result to stdout (module JSON's `out_file_path` is `stdout`, the
  marker) has no `result` for it, where the crate named a file `../stdout`
  that did not exist. A file really named `stdout` in the working directory
  (`-o ./stdout`, or the absolute path) is recorded `./stdout` in module JSON
  and `argv`, so it is not read as the marker, and is listed in the crate;
  `detk-util record`'s outputs, checksummed files, are always listed
  (#147, DETK-0420)
- `detk-util record` shows a failed command on one line in its messages
  (exit status, killed by signal, output file not written): an argument
  that spans several lines, such as a Miller program, is shown as its first
  line and `...` in its quotes, or as `'...'`, where the message ended in a
  lone `'` (#140)
- The z-score and min-max recipes for derived covariates stop on a sheet
  with a header and no samples with a message of their own (`age_zscore:
  age has no values: the sheet has no samples`), not Miller's `conditional
  expression did not evaluate to boolean`; they still exit 1 and write
  nothing. The recipes page and the skill's covariates reference say that
  Miller reads a zero-padded number (`010`, `05`) as text, so a recipe
  names it as missing or not a number, and to write it without its leading
  zeros; that the constant-column recipe's column name and value are
  changed too; and that Miller's `stddev` gives about 1e-7, not 1.2e-7,
  for six 7.2s (#140)
- A sample sheet with one column in R's `write.table(sep=",")` layout, a
  header of one field over rows of two (`"condition"` over `"S1","a"`), is
  read with the rows' delimiter, where `detk-util tidy` and every command
  that reads column data stopped with `'' expected after '"'`. When a
  table's first line has no delimiter, the delimiter is sniffed from its
  first data line. It counts only when the first data lines (up to 10) all
  split on it, outside quotes, into the same number of fields, at least 2,
  and, for space, only when the line's first field is quoted, as R's
  default `write.table` writes it (`"condition"` over `"S1" "a"`).
  Otherwise the table is one column, as before: a bare list of IDs, quoted
  or not, stays one column, an unquoted ID with a space in it
  (`ctrl 1`, as Excel exports it) included. R's `write.table(quote=FALSE,
  sep=" ")` one-column sheet (`condition` over `S1 a`) cannot be told from
  such a list and is still read as one column (#136, DETK-0320)
- A table whose header has one field over data lines that split unalike on
  a delimiter (`condition` over `S1,a`, `S2`, `S3`) is an error: every detk
  command that reads it exits 1, naming the file, the delimiter and the
  first two lines whose field counts differ. It was read as one column, so
  `detk-util tidy` matched `S1,a` to no sample and silently dropped S1
  (exit 0, logged only at INFO). A delimiter counts as in DETK-0320 (not
  space, or space with the line's first field quoted), so what stays one
  column is unchanged: a bare list of IDs, quoted IDs holding a comma
  (`"S1,a"`), unquoted IDs with spaces (`ctrl 1`) (#145)
- `detk-util tidy` names a ragged sample sheet (a one-field header over
  data lines that split unalike) by the path it was given when the sheet is
  read through a FIFO or a process substitution (`-p out.csv counts.csv
  <(cat sheet.csv)`), where the error said `<stream>`; a sheet given as a
  regular file was, and is, named by its path (#158)
- `detk-outlier entropy` names the flag column from all of the threshold's
  decimal digits, at least two: `-p 0.05` gives `entropy_p0_05`, `-p 0.1`
  (or `0.10`) `entropy_p0_10`, `-p 1e-05` `entropy_p0_00001`. A `-p` written
  in exponent form failed naming the column (exit 1), and `-p 0.1` gave
  `entropy_p0_1`. The report's outlier card draws the threshold at its
  percentile (`-p 0.05` at the 5th) (#123, DETK-0200)
- `detk-outlier entropy -p P` flags the features below the P-th fraction of
  the entropies, as its help says: `-p 0.05` is the 5th percentile. It was
  passed to numpy as a percent, so `-p 0.05` flagged the features below the
  0.05th percentile (13 of the airway tutorial's 24,706 genes, where the 5th
  percentile flags 925). A `-p` that is not strictly between 0 and 1 is a
  usage error (exit 2); 0.x runs that passed `-p 5` for the 5th percentile
  must now pass `-p 0.05` (#123, DETK-0200)
- `detk-outlier entropy` runs on a counts matrix with features that are zero
  in every sample: their entropy is missing (empty in the CSV) and they are
  not flagged, the percentile is taken over the other features, and one
  warning gives how many there are. It failed with "Series.replace cannot
  specify both a dict-like 'to_replace' and a 'value'" (pandas 1.x and 2.x
  raise the same error, so 0.x on those failed too). Each entropy and flag is
  written on the row of the feature it was computed for, in the input's
  order: past the failing line, the rows were relabelled by position, which
  would have put another feature's result on every feature after an all-zero
  one (#123)
- A design that formula syntax reads but detk cannot build (a column the
  column data does not have, a level its column lacks, a number-like term
  under DETK-0190) is reported as `Invalid design: <reason>`, no longer as
  `Invalid design, detk formula syntax could not parse it: ...`; a design
  the syntax cannot read says `Invalid design: could not read the design
  ...` (#124)
- `detk-filter` writes nothing of its own on stderr: ply's `Generating
  LALR tables` and `WARNING: 4 shift/reduce conflicts` are gone, and the
  parser is built once, in memory, and its grammar has no conflicts (#124)
- A design starting with `-`, such as `'-2.5 ~ counts'`, is read as the
  design by `detk-de deseq2`, `detk-de firth` and `detk-transform rlog`,
  and gets DETK-0190's message, where it was rejected as `unrecognized
  arguments`. A word starting with `-` that holds a `~` or a space and is
  none of the command's options is a value; options still parse anywhere
  on the line (#124)
- `detk-util tidy -p FILE` and `detk-util tidy-covs` write the tidied
  column data with the sample sheet's own header and columns, in its order,
  each value as written: the first header cell is kept (`sample,condition`,
  not `,condition,counts`) and no `counts` column of zeros is added. A
  sheet with its own `counts` column keeps it. The tidied counts are
  unchanged (#114)
- `detk-util tidy`, `tidy-counts` and `tidy-covs` write to the report
  unless `--no-report`, as their help says: a module entry (`tidy`,
  `tidycounts`, `tidycovs`) naming both input files and every output,
  `-p`'s included, so the Process Run Crate lists the step with its inputs
  and outputs. They wrote no report before (#114)
- Module JSON (`detk_report/json/*.json`), the report's embedded payload
  and `ro-crate-metadata.json` are strictly valid JSON: a missing or
  non-finite number (NaN, inf, -inf) is written as `null`, where detk wrote
  the bare tokens `NaN` and `inf` that jq, `JSON.parse` and other strict
  readers reject (seen with a missing `--color-col` value, PCA and
  `rowzero`). Serialization refuses a bare NaN or Infinity, the report's
  views show the nulls as missing, and `detk-report` still re-renders a
  report directory written before, with bare NaN in its module JSON (#116)
- `detk-transform vst` and `detk-transform rlog` with `--rda FILE` write
  FILE, as their help says: the `DESeqTransform` object DESeq2 returns,
  with `saveRDS()`, as `detk-de deseq2 --rda` does. The option was accepted
  and nothing was written (#101, DETK-0081)
- `detk-stats summary --color-col COL` colors the summary's per-sample
  plots in the report (the count distributions, the zero counts and the
  PCA) by column COL of the column data, and records COL's value of each
  sample in the module JSON (`color_by`). The option was accepted and
  ignored; the CSV output is unchanged. A COL the column data does not
  have, or `--color-col` without `<cov_fn>`, is a usage error (exit 2)
  (#101, DETK-0081)
- `detk-transform rlog --blind BOOL` takes `True` or `False`, in any case;
  any other value is a usage error (exit 2). `--blind False` runs DESeq2's
  non-blind rlog with the design and column data given, where it ran
  against a placeholder design (the value reached detk as the text
  `"False"`, which Python takes as true); without `<design>` and `<cov_fn>`
  it is a usage error. Not given, the rlog is blind, as before. The module
  JSON's params record `blind` and the design used (`~ 1` when blind)
  (#101, DETK-0081)
- `detk-norm deseq2 --size-factors=FILE` writes the size factors, as its
  help says: a tab separated file with a header line `sample`,
  `size_factor` (DETK-0082), then one row per sample of its name and size
  factor, in the counts file's column order, with sample names as written
  (`001` stays `001`). The option was accepted and nothing was written. The
  values are the ones the report's module JSON records, and the normalized
  counts are unchanged. The file is written before the normalized counts, so
  a path that cannot be written stops the command before any output (#44,
  DETK-0029)
- The umbrella command `detk <command>` runs every module command:
  `detk enrich`, `detk report` and `detk util` printed the usage or did
  nothing, and its help now lists all ten commands (DETK-0025)
- A design with an interaction of two categorical terms written alone,
  such as `counts ~ binary_str:cat_str`, gives its interaction columns; it
  used to be fitted silently as `counts ~ 1`. A reference level inside an
  interaction, `binary_str[control]:cat_str`, and names that need quoting,
  `fld.cat:age(yrs)`, are accepted where they were errors. The reference of
  a `TRUE`/`FALSE` column can be named, in any case: `flag[FALSE]` (#78,
  DETK-0040)
- A column data column named like a call, such as `print(1)` or
  `file.create(1)`, is read by R as a column name and never run: every name
  in the design that is not a syntactic R name (or is a reserved word) is
  backtick-quoted before R's `formula()` reads it, in `detk-de deseq2` and
  `firth`, `detk-transform rlog` with a design, and the DESeq2
  normalization's R path. R used to evaluate such a name as code when it
  built the model frame. The design detk records (`params.design`) and the
  results' column names are unchanged; DESeq2, which makes its column data
  names syntactic, stops with an error naming the column (#94, DETK-0050)
- The design examples in the formulas documentation show the columns detk
  gives: an integer `batch` needs `batch[1]` to be categorical, and
  categories without a level list come in sorted order (#78, DETK-0040)
- The report embeds its module JSON with `<`, `>` and `&` escaped, so a
  feature ID, sample name or annotation value containing `</script>` no
  longer breaks the report or injects markup; object keys (such as sample
  names) holding a quote or backslash no longer make the payload invalid
  JSON (#46)
- The report page shows every view's text as text: a filter command, DE
  term names, annotation and gather notes, a chart error, and an unknown
  module's name (in its card title, link, anchor and "Show data" button) are
  no longer inserted as markup by the page. Only the static SVG chart for
  very large point sets is inserted as markup. The charts' tooltips are
  written as text too: vega-embed's default tooltip wrote them as HTML and
  turned a field named `image` into an image, so a covariate column named
  `image` in a PCA chart could run script on hover. The charts' menu no longer offers
  "View Source", "View Compiled Vega" or "Open in Vega Editor": the first two
  wrote the chart's data, sample names included, unescaped into a new page
  of the report's origin, and the last sent it to an outside site. "Save as
  SVG" and "Save as PNG" remain, and "Show data" shows each module's JSON.
  An unknown module named like a chart (`pca-vis`) or like one of the
  page's own elements (`main`, `nav`, `vg-tooltip-element`, ...) no longer
  shares that element's id (#65)
- A design no longer loses a term silently: `counts ~ -2.5` was fitted as
  `counts ~ 1` and `-2.5 ~ c` with no outcome (#112, DETK-0190). An invalid
  design (an unknown column, a misspelled term, a reference level the column
  does not have, a number, a character or operator detk formula syntax does
  not take) is reported in one plain line naming the offending term and
  what the column data has instead, as in `nope in the design is not a
  column of the column data file (its columns: ...)`: it was Python tuple
  text with formulaic's terminal colour codes (#112)
- `detk-filter` with a group its column does not have, as in
  `mean(cond[Z]) > 1`, is a usage error (exit 2) naming the column, the
  group and the values the column has, and writes no output; it warned
  twice and wrote a file with no rows. A group matches a column of numbers
  or booleans as written: `flag[1]` selects the samples with `1` in a 0/1
  column, `dose[0.5]` and `b[true]` (any case) likewise, where they selected
  nothing (a group that is a number did not parse) (#112)
- A one-column input file, such as a bare list of IDs, is read as one
  column; the delimiter sniffer no longer splits it on a letter of its
  header (`gene_id` became `g`, `n`, `_id`). The delimiter of every sniffed
  input (counts and column data, `detk-util annotate`, `tidy`,
  `tidy-counts`, `tidy-covs`, `detk-enrich fgsea` results) is now one of
  comma, tab, semicolon, pipe or space, taken from the first line, with
  space used only when no other splits it (a pipe table with a space in a
  header, such as a BioMart export, is no longer split on the spaces). A
  URL input is fetched once (#47)
- The published example report and its crate (`docs/example/`) no longer
  hold paths of the machine that built them: the report embedded the run's
  absolute working directory and the absolute path of each installed
  `detk-*` command. They are regenerated from the airway tutorial with the
  relative paths of DETK-0280 (and the outlier card of DETK-0200), by a
  manually run CI workflow (`.github/workflows/example.yml`), and a test
  fails on any absolute path, `file://` URI or home, temp or drive path in
  them (#141)

## [ 0.9.12 ]
### Added
- --filter-unannotated to fgsea

## [ 0.9.11 ]
### Changed
- ensure fgsea execution only uses SerialParam when no additional cores are provided
### Added
- WrapR objects now capture stdout and stderr from R scripts to files of the same name
  in the r output directory

## [ 0.9.10 ]
### Changed
- fixed ascii decode error when GMT file contains non-ascii characters

## [ 0.9.9 ]
### Added
- fgseaMultilevel support in enrich.fgsea

## [ 0.9.8 ]
### Changed
- fixed null statistic name json error in fgsea R deserialization

## [ 0.9.7 ]
### Added
- it's better than bad, it's good! logging
### Changed
- fixed entropy testing bug

## [ 0.9.6 ]
### Changed
- yup, maybe reporting is actually fixed now

## [ 0.9.5 ]
### Changed
- working fix for ascii encoding error on report write

## [ 0.9.4 ]
### Changed
- reverted bad ascii encoding error in report fix

## [ 0.9.3 ]
### Changed
- removed deprecated pandas.read_table calls
- fixed bug where R stupidly renames columns
- fixed bug where report generation through ascii encoding errors

## [ 0.9.2 ]
### Added
- added detk-util CLI entry points that were left out in 0.9.1
### Changed
- fixed deseq2 test now that samples as replicates is disabled in
  DESeq2 >v1.22
- fixed incorrect exception type in design matrix column drop

## [ 0.9.1 ]
### Added
- added attention admonition for patsy-lite in de module docs
- fullscreen mode for all plots
- detk-util tidy modules for tidying counts and column data
- standalone report generation
### Changed
- reduced test report counts
- removed DESeq2 require in norm class
- added interactivity to PCA report plots
- fixed but in report shutil.copy path in python 3.5
- reduced precision in JSON output, reducing file output by 80%

## [ 0.9.0 ]
### Added
- modular report functionality
### Changed
- moved version info into module
- updated all CLI docs to have common options
- significant stats module performance improvements
- fixed incorrect ascending/descending text in enrich fgsea CLI
- fixed bug with missing column data in detk-de deseq2

## [ 0.8.2 ]
### Changed
- fixed parse error on underscore in filter
- fixed parse error on period in filter
- changed zeros filter to zero in filter + docs

## [ 0.8.1 ]
### Changed
- fixed bug where fgsea would crash if passed NaN stats

## [ 0.8.0 ]
### Added
- detk-enrich fgsea and tests
### Changed
- fixed incorrect count shrinking
- fixed bug when counts to rlog are not integers
- removed erroneous cli arg print in filter

## [ 0.7.2 ]
### Changed
- CLI bugfix for filter module

## [ 0.7.1 ]
### Changed
- complete overhaul to filter system

## [ 0.7.0 ]
### Changed
- fixed transform CLI bug #42
- enable estimateDispersionsGeneEst functionality when DESeq2 complains about
  dispersions being within two orders of magnitude
- small fixes to CLI docopt usage text
- code refactor and doc changes to outlier module
### Added
- fully implemented vst, rlog, and plog transforms, with tests and docs
- outlier.shrink outlier shrinking method

## [ 0.6.1 ]
### Changed
- fixed bug where patsy lite model term order was different than specified formula
- fixed bug where deseq2 model term order was wrong, causing --last-term-only
  functionality to be incorrect
- fixed issue #37
- addressed issue #39 by changing the default deseq2 behavior to accept raw
  counts by default

## [ 0.6.0 ]
### Added
- tabular output to stats module, in either csv or terminaltables table format
### Changed
- fixed stats pca cli bug
- fixed pct calculation in rowdist and coldist
- refactored stats module into objects for better output control
- better PCA tests

## [ 0.5.1 ]
### Changed
- fix for #35, incorrectly specified stats cli docopt usage
- fix for stats json output bug and tests

## [ 0.5.0 ]
### Added
- norm.fpkm
- norm and de docs page
- de.deseq2
### Changed
- major CLI help overhaul, added individual help messages for norm, de, and stats
- modified entrypoint function signatures to fix cli problems when calling with both detk <cmd> and detk-<cmd> forms
- fixed incorrect JSON output format in stats
- monkeypatched JSON encoding error due to mpld3 NumpyEncoder bug
- many test improvements
- fixed issue #34, allowing some non-alphanumeric characters in patsy_lite formula term names
- switched docs to RTD theme
- workflow docs update

## [ 0.4.0 ]
### Added
- new wrapr interface to replace rpy2
- wrapr tests and docs
- entropy outlier filtering
- t-test differential expression
- preliminary workflow doc
### Changed
- removed all trace of rpy2 hooray

## [ 0.3.4 ]
### Changed
- fixed critical bug in stats entropy function

## [ 0.3.3 ]
### Added
- filter module and docs
- new conda build environment for readthedocs build

## [ 0.3.2 ]
### Changed
- fixed bug in stats.rowzero

## [ 0.3.1 ]
### Added
- PCA to stats model
- more develop stats html output
- preliminary filter nonzero function
### Changed
- fixed deprecated .ix use package wide
- updated setup.py and conda package dependencies

## [ 0.3.0 ]
### Added
- new model description language for de module

## [ 0.2.5 ]
### Changed
- fixed import bug in stats.py

## [ 0.2.4 ]
### Added
- stats module implementation and docs

## [ 0.2.3 ]
### Changed
- fixed issues #3 and #4
- Firth DE attempts to use profile likelihood to estimate confidence intervals
  but falls back to Wald if that fails
- better handling of sample name mismatches between counts and column data
  files

## [ 0.2.2 ]
### Added
- common.py module tests

### Changed
- Added py vs rpy2 deseq2 norm cross check tests
- Reorganized some of the CountMatrix constructor signatures
- Added CountMatrix counts/column name strict checking

## [ 0.2.1 ] - 2017-04-14
### Added
- DESeq2 norm tests and CLI usage bug fix

## [ 0.2.0 ] - 2017-04-12
### Added
- detk-norm deseq2 output option added

## [ 0.1.1 ] - 2017-04-07
### Added
- Firth's logistic regression functionality and tests with CLI output

## [ 0.1 ] - 2017-04-06
### Added
- very limited functionality, what do you want it's the first release
- no CLI output support
- DESeq2 and library size normalization methods and tests implemented
- lots o' stubs
