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: show turns it
on and encoding.color names what it paints. It draws while show is on
and a field is named. 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: { show: true, encoding: { color: 'baseQuality' } } },
encoding: { color: 'tags.HP' },
}{
type: 'LinearAlignmentsDisplay',
pileup: {
bases: {
show: true,
encoding: { color: 'modifications' },
filter: [
{ field: 'probability', gte: 0.5 },
{ field: 'code', oneOf: ['a'] },
],
},
},
}{
type: 'LinearAlignmentsDisplay',
pileup: {
bases: {
show: true,
encoding: { color: 'modifications' },
filter: [{ field: 'context', oneOf: ['CHG'] }],
unmodified: { show: true },
},
},
}{
type: 'LinearAlignmentsDisplay',
pileup: {
show: false,
bases: { show: true, 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 |
|---|---|
showboolean = false | draw the per-base layer over the reads, and its modification bars in the coverage band |
| 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 FieldPredicate | 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