1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
//! Describing one dataset in words, for a surface that only looks.
//!
//! `ligase inspect` asks a smaller question than `check` does: not "will this
//! pipeline work" but "what does Ligase think this file is". There is no
//! graph, nothing to run and nothing to compare — just one file and what the
//! loader made of it. That makes this the first thing about Ligase most
//! readers will ever see, and the reason the wording lives here rather than
//! in the command that prints it: every surface should say the same thing
//! about the same file, the way [`crate::types::Dataset::notes`] already
//! requires.
//!
//! # The same line, twice
//!
//! A description line is rendered through the helpers [`crate::check`]
//! renders a diagnostic's value lines with, so the two are one line defined
//! once. The diagnostic a reader gets after a set of descriptions is then
//! visibly a *selection* of the lines above it, rather than a second account
//! of the same file in different words.
//!
//! # Three states, not two
//!
//! A dimension is shown with its value and its source, or with the engine's
//! reason for not having one, or not at all — and the third case is the one
//! worth being careful about. [`Dimensions::reason`](crate::dim::Dimensions::reason)
//! reads its field and nothing else, so it answers for a dimension that does
//! not apply to the kind as readily as for one that does. Asking it without
//! asking [`DataKind::applies`](crate::types::DataKind::applies) first would
//! report a FASTA as *missing* a quality encoding, which is not a gap a user
//! can close: it is a category error, and it would send them looking for a
//! declaration that does not exist.
//!
//! The dimensions that do not apply are still named, once, on a line that
//! says they do not. Dropping them silently would leave a reader unable to
//! tell "this file does not say" from "this question does not arise", which
//! is the distinction the dimension matrix exists to draw.
use crate;
use crate;
use crateDataset;
/// Describe one named dataset: what it is, and what is known about it.
///
/// The name is the one a diagnostic would use for the same dataset — the
/// `ref` in `ref.organism` — so that a description and an error about the
/// same file address it the same way.
///
/// Returns the block as text, without a trailing newline, for a caller to
/// place among whatever else it is printing.
/// `a` or `an`, for the one place a kind's name follows an article.
///
/// Only the kind names pass through here, so a vowel test is enough: there
/// is no `Hour`-shaped name among them, and there will not be one without
/// this line being read again.
const
/// The dimensions two or more of these datasets state a value for.
///
/// What a verdict over several files actually covers. "These files agree" is
/// a claim a reader cannot size without it: a FASTQ and a BED share no
/// dimension either of them records, so they agree in the way two sentences
/// in different languages agree, and saying so without qualification would be
/// false comfort.
///
/// A dimension is listed when at least two of the datasets both apply it and
/// know it, which is exactly the condition under which
/// [`check_step`](crate::check::check_step) compares values. Contig naming is
/// compared *through* the reference relation when both sides know a reference
/// — `check` subsumes the one into the other to avoid reporting a single
/// cause twice — so it is compared either way and is listed either way.
///
/// In [`Dimension::ALL`] order, which is the order a report reads in.