PileupBases
Auto-generated from the config schema in the source. See the config guide for concepts. Provided by the alignments plugin. View source.
The pileup's bases layer, a cell per base over the reads:
encoding.color names what it paints, and naming a field turns it on.
show: false hides it and keeps the field for the way back. Its filter picks the modification calls the
modifications and bisulfite fields paint, and unmodified adds the
unmodified side in blue.
Under those two fields the layer also stacks modification bars in the coverage band, from the calls its cells paint, so both bands agree. A coverage-only methylation track hides the pileup and keeps the layer on, as the last example does.
Example usage
{
type: 'LinearAlignmentsDisplay',
pileup: { bases: { encoding: { color: 'baseQuality' } } },
encoding: { color: 'tags.HP' },
}{
type: 'LinearAlignmentsDisplay',
pileup: {
bases: {
encoding: { color: 'modifications' },
filter: [
{ field: 'probability', gte: 0.5 },
{ field: 'code', oneOf: ['a'] },
],
},
},
}{
type: 'LinearAlignmentsDisplay',
pileup: {
bases: {
encoding: { color: 'modifications' },
filter: [{ field: 'context', oneOf: ['CHG'] }],
unmodified: { show: true },
},
},
}{
type: 'LinearAlignmentsDisplay',
pileup: {
show: false,
bases: { encoding: { color: 'modifications' } },
},
}Config slots
A setting written to it names members one by one: a member left out stays as it is, and null resets one. Slot types (fileLocation, frozen, ...) are explained in the config slot types reference. Slots a base configuration contributes are listed here too, so this table is the whole surface.
| Slot | Description |
|---|---|
showmaybeBoolean |
Unset, the layer draws whenever encoding.color names a field. |
| encoding PileupBasesEncoding sub-schema |
The layer's channels: encoding.color, the per-base variable. |
| encoding.color AlignmentsBaseColor |
The per-base variable the layer paints. |
| filter list of FieldPredicate entries |
The modification calls drawn, by probability (0 to 1), context (CG, CHG or CHH) and code (m, h, a, ...). Unwritten, a field keeps its default: probability at least 0.1, which only the by-type view applies, context CG, which the methylation fill and bisulfite read, and every code. An entry naming a field with no test, { field: 'context' }, drops that field's default. |
| unmodified PileupBasesUnmodified |
The unmodified side, in blue, under the modifications and bisulfite fields: the methylation view. |
Related links
- Tutorial: Methylation (bisulfite)
- Config guide: Alignments track