Skip to content
Closed
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
6 changes: 3 additions & 3 deletions apps/01-hello-c/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 01 - hello, C

[01-hello-rust](../01-hello-rust) written in C. C apps build with a WASI clang
toolchain rather than Emscripten, because Emscripten's standalone modules can't
open the files an Ark mounts.
[01-hello-rust](../01-hello-rust/README.md) written in C. C apps build with a
WASI clang toolchain rather than Emscripten, because Emscripten's standalone
modules can't open the files an Ark mounts.

The Makefile finds a wasi-sdk install at `/opt/wasi-sdk`, or falls back to
Homebrew's WASI toolchain. `WASI_SDK` points it at any other clang that carries
Expand Down
4 changes: 2 additions & 2 deletions apps/01-hello-go/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# 01 - hello, Go

[01-hello-rust](../01-hello-rust) written in Go. The Makefile builds Go apps
with TinyGo, which produces a module a fraction of the size the standard
[01-hello-rust](../01-hello-rust/README.md) written in Go. The Makefile builds
Go apps with TinyGo, which produces a module a fraction of the size the standard
toolchain emits.

## Build and run
Expand Down
6 changes: 3 additions & 3 deletions apps/01-hello-python/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 01 - hello, Python

[01-hello-rust](../01-hello-rust) written in Python. The module carries a
trimmed CPython along with the app, so it is megabytes where the others are
kilobytes, and it takes noticeably longer to start on an Ark.
[01-hello-rust](../01-hello-rust/README.md) written in Python. The module
carries a trimmed CPython along with the app, so it is megabytes where the
others are kilobytes, and it takes noticeably longer to start on an Ark.

The first Python build compiles that interpreter once and reuses it for every
Python app. [05-running.md](../../docs/05-running.md) covers what it needs.
Expand Down
4 changes: 2 additions & 2 deletions apps/01-hello-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

The smallest Ark app. It prints its manifest when run with no arguments and a
greeting when given a data directory, and it reads no data. Start here, then
compare the [Go](../01-hello-go), [C](../01-hello-c) and
[Python](../01-hello-python) versions.
compare the [Go](../01-hello-go/README.md), [C](../01-hello-c/README.md) and
[Python](../01-hello-python/README.md) versions.

## Build and run

Expand Down
4 changes: 2 additions & 2 deletions apps/04-cilantro-mini-c/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 04 - cilantro-mini (C)

[04-cilantro-mini-rust](../04-cilantro-mini-rust) written in C. Only
[04-cilantro-mini-rust](../04-cilantro-mini-rust/README.md) written in C. Only
`errno == ENOENT` means no answer, and any other failure to open or read a file
stops the app. Each file is read into a buffer that grows to fit, since a
genotype can hold long alleles. [01-hello-c](../01-hello-c) covers the
genotype can hold long alleles. [01-hello-c](../01-hello-c/README.md) covers the
toolchain.

## Build and run
Expand Down
5 changes: 3 additions & 2 deletions apps/04-cilantro-mini-go/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# 04 - cilantro-mini (Go)

[04-cilantro-mini-rust](../04-cilantro-mini-rust) written in Go. It distinguishes
an absent genotype from a failed read with `errors.Is(err, fs.ErrNotExist)`.
[04-cilantro-mini-rust](../04-cilantro-mini-rust/README.md) written in Go. It
distinguishes an absent genotype from a failed read with
`errors.Is(err, fs.ErrNotExist)`.

## Build and run

Expand Down
9 changes: 5 additions & 4 deletions apps/04-cilantro-mini-python/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# 04 - cilantro-mini (Python)

[04-cilantro-mini-rust](../04-cilantro-mini-rust) written in Python. An absent
genotype arrives as `FileNotFoundError` and reads as no answer, while every
other `OSError` stops the app. [01-hello-python](../01-hello-python) covers what
a Python module costs.
[04-cilantro-mini-rust](../04-cilantro-mini-rust/README.md) written in Python.
An absent genotype arrives as `FileNotFoundError` and reads as no answer, while
every other `OSError` stops the app.
[01-hello-python](../01-hello-python/README.md) covers what a Python module
costs.

## Build and run

Expand Down
8 changes: 5 additions & 3 deletions apps/04-cilantro-mini-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ makes the count inconclusive. An absent genotype is reported as no answer, never
as two reference alleles. Any other read error stops the app.
[04-reading-data.md](../../docs/04-reading-data.md) explains why.

The same mini exists in [Go](../04-cilantro-mini-go),
[C](../04-cilantro-mini-c) and [Python](../04-cilantro-mini-python), and
[04-cilantro-soapiness](../04-cilantro-soapiness) turns it into a report.
The same mini exists in [Go](../04-cilantro-mini-go/README.md),
[C](../04-cilantro-mini-c/README.md) and
[Python](../04-cilantro-mini-python/README.md), and
[04-cilantro-soapiness](../04-cilantro-soapiness/README.md) turns it into a
report.

## Build and run

Expand Down
15 changes: 8 additions & 7 deletions apps/04-cilantro-soapiness/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# 04 - cilantro-soapiness

The single variant from [04-cilantro-mini-rust](../04-cilantro-mini-rust),
turned into a full report in the shape [06-reports.md](../../docs/06-reports.md)
describes, with a finding, the evidence behind it, the method, its limitations
and sources. A no-call and an absent genotype each get their
own finding instead of a verdict, and a call without exactly two copies shows
its copies without a homozygous or heterozygous label. The `reference` grant is
read for one file, the assembly build the coordinate is reported on.
The single variant from
[04-cilantro-mini-rust](../04-cilantro-mini-rust/README.md), turned into a full
report in the shape [06-reports.md](../../docs/06-reports.md) describes, with a
finding, the evidence behind it, the method, its limitations and sources. A
no-call and an absent genotype each get their own finding instead of a verdict,
and a call without exactly two copies shows its copies without a homozygous or
heterozygous label. The `reference` grant is read for one file, the assembly
build the coordinate is reported on.

## Build and run

Expand Down
4 changes: 2 additions & 2 deletions apps/05-drunk-o-type/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

A panel of eleven variants, scored on three axes of how a body handles alcohol:
flushing, reward and histamine. Each variant is its own `rsids/` grant, so the
access pattern is [04-cilantro-mini-rust](../04-cilantro-mini-rust) repeated,
and the owner sees every site by name before approving.
access pattern is [04-cilantro-mini-rust](../04-cilantro-mini-rust/README.md)
repeated, and the owner sees every site by name before approving.

The app counts the allele each study tested, which isn't always the ALT allele.
A missing allele or an absent genotype makes its axis inconclusive rather than
Expand Down
8 changes: 4 additions & 4 deletions apps/06-genes-mini-c/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# 06 - genes-mini (C)

[06-genes-mini-rust](../06-genes-mini-rust) written in C. It takes the sequence
length from `stat`, reads each scalar into a buffer that grows to fit, and
treats only `errno == ENOENT` as no answer. [01-hello-c](../01-hello-c) covers
the toolchain.
[06-genes-mini-rust](../06-genes-mini-rust/README.md) written in C. It takes the
sequence length from `stat`, reads each scalar into a buffer that grows to fit,
and treats only `errno == ENOENT` as no answer.
[01-hello-c](../01-hello-c/README.md) covers the toolchain.

## Build and run

Expand Down
6 changes: 3 additions & 3 deletions apps/06-genes-mini-go/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 06 - genes-mini (Go)

[06-genes-mini-rust](../06-genes-mini-rust) written in Go. It takes the sequence
length from `os.Stat` and distinguishes an absent scalar from a failed read
with `errors.Is(err, fs.ErrNotExist)`.
[06-genes-mini-rust](../06-genes-mini-rust/README.md) written in Go. It takes
the sequence length from `os.Stat` and distinguishes an absent scalar from a
failed read with `errors.Is(err, fs.ErrNotExist)`.

## Build and run

Expand Down
9 changes: 5 additions & 4 deletions apps/06-genes-mini-python/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# 06 - genes-mini (Python)

[06-genes-mini-rust](../06-genes-mini-rust) written in Python. It takes the
sequence length from `os.stat` and reads an absent scalar as no answer when
`FileNotFoundError` arrives. [01-hello-python](../01-hello-python) covers what a
Python module costs.
[06-genes-mini-rust](../06-genes-mini-rust/README.md) written in Python. It
takes the sequence length from `os.stat` and reads an absent scalar as no answer
when `FileNotFoundError` arrives.
[01-hello-python](../01-hello-python/README.md) covers what a Python module
costs.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/06-genes-mini-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ to fit in memory. An absent value prints as no answer, while a missing sequence
is an error.

The gene grant also covers the owner's `changes` in it, even though this mini
doesn't read them. [06-bitter-meter](../06-bitter-meter) does.
doesn't read them. [06-bitter-meter](../06-bitter-meter/README.md) does.

The same mini exists in [Go](../06-genes-mini-go), [C](../06-genes-mini-c) and
[Python](../06-genes-mini-python).
The same mini exists in [Go](../06-genes-mini-go/README.md),
[C](../06-genes-mini-c/README.md) and
[Python](../06-genes-mini-python/README.md).

## Build and run

Expand Down
8 changes: 4 additions & 4 deletions apps/07-powerhouse-of-the-cell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

A full report on the mitochondrial genome, read as one interval. It streams the
`sequence` for GC content and density windows, and lists the owner's `changes`
with a text map of where they fall. Like [06-bitter-meter](../06-bitter-meter),
it counts listed positions without leaves and splits genotypes around symbolic
and breakend alleles. It isn't a haplogroup caller, an ancestry test or a
medical report.
with a text map of where they fall. Like
[06-bitter-meter](../06-bitter-meter/README.md), it counts listed positions
without leaves and splits genotypes around symbolic and breakend alleles. It
isn't a haplogroup caller, an ancestry test or a medical report.

## Build and run

Expand Down
6 changes: 3 additions & 3 deletions apps/07-regions-mini-c/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 07 - regions-mini (C)

[07-regions-mini-rust](../07-regions-mini-rust) written in C. It reads the
sequence in 8 KiB chunks with `fread`, so the interval never has to fit in
memory. [01-hello-c](../01-hello-c) covers the toolchain.
[07-regions-mini-rust](../07-regions-mini-rust/README.md) written in C. It reads
the sequence in 8 KiB chunks with `fread`, so the interval never has to fit in
memory. [01-hello-c](../01-hello-c/README.md) covers the toolchain.

## Build and run

Expand Down
6 changes: 3 additions & 3 deletions apps/07-regions-mini-go/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# 07 - regions-mini (Go)

[07-regions-mini-rust](../07-regions-mini-rust) written in Go. It reads the
sequence in 8 KiB chunks with `os.File.Read`, so the interval never has to fit
in memory.
[07-regions-mini-rust](../07-regions-mini-rust/README.md) written in Go. It
reads the sequence in 8 KiB chunks with `os.File.Read`, so the interval never
has to fit in memory.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/07-regions-mini-python/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 07 - regions-mini (Python)

[07-regions-mini-rust](../07-regions-mini-rust) written in Python. It reads the
sequence in 8 KiB chunks of bytes, so the interval never has to fit in memory.
[01-hello-python](../01-hello-python) covers what a Python module costs.
[07-regions-mini-rust](../07-regions-mini-rust/README.md) written in Python. It
reads the sequence in 8 KiB chunks of bytes, so the interval never has to fit in
memory. [01-hello-python](../01-hello-python/README.md) covers what a Python
module costs.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/07-regions-mini-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ its length and GC content, so memory use doesn't grow with the interval. A
missing sequence or a failed read stops the app.

The interval grant also covers the owner's `changes`, which
[07-powerhouse-of-the-cell](../07-powerhouse-of-the-cell) lists.
[07-powerhouse-of-the-cell](../07-powerhouse-of-the-cell/README.md) lists.

The same mini exists in [Go](../07-regions-mini-go),
[C](../07-regions-mini-c) and [Python](../07-regions-mini-python).
The same mini exists in [Go](../07-regions-mini-go/README.md),
[C](../07-regions-mini-c/README.md) and
[Python](../07-regions-mini-python/README.md).

## Build and run

Expand Down
8 changes: 4 additions & 4 deletions apps/08-vcf-mini-c/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# 08 - vcf-mini (C)

[08-vcf-mini-rust](../08-vcf-mini-rust) written in C. It reads the call file
with `getline`, which accepts long records while keeping only one line in
memory, over a 64 KiB `setvbuf` buffer. The default buffer is small enough to
[08-vcf-mini-rust](../08-vcf-mini-rust/README.md) written in C. It reads the
call file with `getline`, which accepts long records while keeping only one line
in memory, over a 64 KiB `setvbuf` buffer. The default buffer is small enough to
make a whole-genome scan an order of magnitude slower.
[01-hello-c](../01-hello-c) covers the toolchain.
[01-hello-c](../01-hello-c/README.md) covers the toolchain.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/08-vcf-mini-go/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 08 - vcf-mini (Go)

[08-vcf-mini-rust](../08-vcf-mini-rust) written in Go. It reads the call file
with `bufio.Reader.ReadString`, which accepts long records while keeping only
one line in memory, over a 64 KiB buffer from `bufio.NewReaderSize`.
[08-vcf-mini-rust](../08-vcf-mini-rust/README.md) written in Go. It reads the
call file with `bufio.Reader.ReadString`, which accepts long records while
keeping only one line in memory, over a 64 KiB buffer from
`bufio.NewReaderSize`.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/08-vcf-mini-python/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# 08 - vcf-mini (Python)

[08-vcf-mini-rust](../08-vcf-mini-rust) written in Python. Iterating the open
file yields one line at a time, so a whole-genome call file never has to fit in
memory. [01-hello-python](../01-hello-python) covers what a Python module costs.
[08-vcf-mini-rust](../08-vcf-mini-rust/README.md) written in Python. Iterating
the open file yields one line at a time, so a whole-genome call file never has
to fit in memory. [01-hello-python](../01-hello-python/README.md) covers what a
Python module costs.

## Build and run

Expand Down
7 changes: 4 additions & 3 deletions apps/08-vcf-mini-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ The app grants the whole call file, `v1/genome/snp-indel`, and streams `vcf` one
line at a time to count its header lines and records. A whole-genome call file
runs to gigabytes, far past an app's 128 MiB of memory, so it's never loaded
whole. A failed read stops the app instead of reporting zero records.
[08-vcf-roll-call](../08-vcf-roll-call) parses the same file with a library.
[08-vcf-roll-call](../08-vcf-roll-call/README.md) parses the same file with a
library.

It reads through a 64 KiB buffer into one reused line. Both matter over
millions of records, since every refill leaves the sandbox and a fresh line per
record would allocate for each one.

The same mini exists in [Go](../08-vcf-mini-go), [C](../08-vcf-mini-c) and
[Python](../08-vcf-mini-python).
The same mini exists in [Go](../08-vcf-mini-go/README.md),
[C](../08-vcf-mini-c/README.md) and [Python](../08-vcf-mini-python/README.md).

## Build and run

Expand Down
2 changes: 1 addition & 1 deletion docs/01-app-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ same report every time:
unrelated to real time.

An app that needs a random-looking choice derives it from its input.
[10-fortune-cookie](../apps/10-fortune-cookie) does exactly that.
[10-fortune-cookie](../apps/10-fortune-cookie/README.md) does exactly that.

## Limits

Expand Down
9 changes: 5 additions & 4 deletions docs/02-manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ category = "traits"
license = "BSD-3-Clause"
```

[04-cilantro-soapiness](../apps/04-cilantro-soapiness) prints this manifest,
with a longer listing.
[04-cilantro-soapiness](../apps/04-cilantro-soapiness/README.md) prints this
manifest, with a longer listing.

## Format

Expand Down Expand Up @@ -120,7 +120,8 @@ It suits data that adds to a report without being needed for its answer.
absent answer, as [04-reading-data.md](04-reading-data.md#least-privilege)
shows.

[02-permissions](../apps/02-permissions) asks for one optional variant.
[02-permissions](../apps/02-permissions/README.md) asks for one optional
variant.

## Choosing grants

Expand Down Expand Up @@ -170,7 +171,7 @@ per input and named after it, in UTF-8 with no trailing newline. A choice's file
holds the picked choice. A multiple choice's file holds the picks one per line,
in the order of `choices`, and is empty when nothing was picked. A text's file
holds the text, which is never empty.
[03-sundae-order](../apps/03-sundae-order) reads all three.
[03-sundae-order](../apps/03-sundae-order/README.md) reads all three.

Inputs never change what an app reads. An app whose reads depend on an answer
grants everything the answer can select. The Ark's journal records which inputs
Expand Down
Loading
Loading