Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 36 additions & 4 deletions docs/DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2125,9 +2125,8 @@ continuation of those nine has 40% to 59%. In seven of them it is far ahead of t
reads against 7): read errors scatter the rest. The pooled denoiser reads rows with the same
continuations as the table.

With 8 jobs the pecan cohort (376 samples) takes 1,384 s, sweetpotato (80) 381 s and alfalfa (356)
466 s. Counting continuations from a tag's first read, without the three-read rule, took 1,929 s
on pecan.
Counting continuations from a tag's first read, without the three-read rule, added 39% to the
pecan cohort's run time (1,929 s against 1,384 s when it was measured).

**Ties between the Ref and Alt readings.** When the Alt tag needs fewer separate gaps for the same
number of edits, 0.03% to 0.10% of rows change category (0.002% to 0.04% of reads), all of them to
Expand Down Expand Up @@ -2168,6 +2167,37 @@ marker. A marker that leads its group has an empty `LocusGroup` cell and now cou
On the grapevine panel `auto` had linked `12_996164__t192` with `13_13607473` that way; their
shared window is chromosome 12 sequence.

**Run time and memory.** With 8 jobs, and run back to back with 0.13.0, the sweetpotato cohort
(80 samples) takes 189 s against 323 s, and the alfalfa cohort (356) takes 221 s against 417 s.
The pecan cohort (376) took 657 s against 1,249 s. Those two pecan runs were not back to back, and
the 657 s is from before the caches moved to gzip level 6. The main process peaks at 7.0 GB on
pecan, 4.1 GB on alfalfa and 1.8 GB on sweetpotato, against 12.5 GB, 9.4 GB and 2.9 GB with 0.13.0
(peak memory footprint, which counts compressed pages).

Each worker holds one sample at a time. Its read pass peaks at 136 MB to 293 MB on one sample of
these cohorts (peak resident size). That is 2% to 9% more than without the shortcuts, because the
primer search keeps a store of 5 MB to 13 MB.

The read pass is about four fifths of a run, and three things dominate it. Each is done the cheap
way that gives the same answer. A tag with an N is compared with a sequence in the stretches
between its N's. The gapped prescreen makes a design tag's bit masks once, runs that tag's pass
first, stops at the first of its two passes that settles the question, and skips the Alt tag when
the Ref tag's bound is already too far. The primer search is taken up from its state after 12
bases, which reads of one amplicon share. A start that leads to no primer is not kept. Reads that
match no primer share few starts, and keeping theirs added about 100 MB to a worker on a sample of
random reads.

Most of a run's memory is sequences seen once or twice: 82% of the sequences of an alfalfa sample
have one read. Partial reads are added without copying a sample's tables. Evidence is tallied
only for sequences that reach a route's read count in some sample, because no other sequence can
pass. A sample as read is let go once it is denoised. The per-sequence quality tallies are
counted and cached, and they stay in the worker unless the quality route is on.

Each shortcut gives the answer of the plain computation (`tests/test_same_answers.py`). With the
shortcuts, the three cohorts' tables and variants sidecars are the same byte for byte as without,
the cache contents are the same, and the QC files are the same apart from the time stamp and the
output paths.

## Downstream fixed allele IDs

This pipeline's responsibility ends with generation of the raw MADC-like
Expand Down Expand Up @@ -2273,7 +2303,7 @@ By default sample columns use the unique FASTQ filename stem.
python3 -m unittest discover -s tests -v
```

The suite contains 251 unit and end-to-end tests across nine files:
The suite contains 268 unit and end-to-end tests across ten files:

- `test_madcats.py` (96): core `generate` pipeline and intake subcommands
- `test_unresolved.py` (23), `test_read_continuation.py` (27), and `test_reading_ties.py` (15):
Expand All @@ -2283,6 +2313,8 @@ The suite contains 251 unit and end-to-end tests across nine files:
real `mappy` aligner are skipped when `mappy` is not installed)
- `test_tiled_markers.py` (4): tiled markers across `generate` and `filter-paralogs` (1 `mappy`
test is skipped when `mappy` is not installed)
- `test_same_answers.py` (17): each shortcut that saves time or memory in `generate` beside the
plain computation it stands in for
- `test_example.py` (5): bundled `examples/madcats-demo` project against simulated truth
- `test_docs.py` (1): synchronization between `docs/src/commands/` tables and the CLI parser

Expand Down
1 change: 1 addition & 0 deletions docs/src/development/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Notable changes by version. Measurements behind each change are in the
uses the stored counts without modifying them.
- **Other changes.** MADC readers accept a header whose first column is not `AlleleID`, as in
HapApp's fixed-allele-ID output. The cache format is now 0.8.0, so existing caches rebuild once.
`generate` also runs faster: three DArTag cohorts took 41% to 47% less time than with 0.13.0.
This release also revises the CLI help text across subcommands.

## 0.13.0
Expand Down
Loading
Loading