BgzipMafAdapter
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the maf plugin. View source.
Example usage
The uri shorthand auto-resolves the sibling .tai index; nhUri names the
Newick tree:
{
type: 'MafTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'BgzipMafAdapter',
uri: 'https://example.com/aln.maf.gz',
},
}A bgzip-compressed MAF with a Taffy .tai index — the form whole-genome
multiple alignments are actually distributed in. HPRC release 2 publishes
hprc-v2.1-mc-grch38.full.maf.gz (53 GB, 464 haplotypes) with a sibling
.tai, and Cactus/taffy write the pair for any HAL export. The index gives
random access, so a locus is a small ranged read rather than a download: a
10 kb query against HPRC's own index resolves to about 924 KB.
Use BgzipTaffyAdapter for TAF (taffy's own, more compact format),
MafTabixAdapter for a maf2bed BED, and BigMafAdapter for bigMaf.
Related links
- Track: MafTrack
- Display: LinearMafDisplay
- Display: LinearMarkDisplay
- Config guide: MAF track
- Config guide: Supported file types
Config slots
These slots go inside the track's adapter: "adapter": { "type": "BgzipMafAdapter", ... }. It also accepts the shorthand keys uri, baseUri, nhUri in place of writing a location slot out. 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 |
|---|---|
mafGzLocationfileLocation = { uri: '/path/to/my.maf.gz', locationType: 'UriLocation' } | bgzip-compressed MAF file |
taiLocationfileLocation = { uri: '/path/to/my.maf.gz.tai', locationType: 'UriLocation' } | The Taffy index. The same .tai format BgzipTaffyAdapter reads — it describes bgzf virtual offsets against reference coordinates and does not care which text format sits inside — so taffy index produces it for a MAF as readily as for a TAF. |
samplesfrozen = [] | string[] or {id:string,label:string,color?:string,assemblyName?:string,assemblyConfigLocation?:UriLocation}[]; assemblyName makes rows for that sample navigable to its own genome, and assemblyConfigLocation says where to load that assembly from when the session lacks it |
nhLocationmaybeFileLocation | newick tree naming and ordering the species rows; its leaf names are the sample ids, and any samples entries supply label/color overrides matched by id |
summaryAdaptermaybeFrozen | optional swappable sub-adapter (a BedTabixAdapter over a maf2bed --summary BED, or a BigBedAdapter over UCSC bigMafSummary.bb) used for cheap zoom-out rendering; leave it unset to disable. The .tai makes a read cost the span on screen rather than the blocks it lands in, which is why this slot was left off at first — but span is only half of it. Cost is span × depth, and measured against HPRC's own v2.1 index the constant is about 19 compressed bytes per bp at 464 haplotypes, flat from 100 kb up: 1 Mb is a 19 MB read and chr1 whole is 4.4 GB. So a deep alignment still runs out, just linearly instead of by block |
samplesTsvLocationmaybeFileLocation | optional tab-separated table of per-sample metadata. It needs a header row, and its first column is the sample name exactly as the adapter spells it: a VCF sample, a MultiWiggle subtrack's name, a MAF species id. Every other column (population, tissue, ...) becomes an attribute of that sample, which the multi-row displays group, sort, color and tooltip rows by; a MAF adapter reads the label, color and assemblyName columns onto its species rows, over its samples entries. The table also narrows the adapter's samples to the ones it lists, and a table naming none of them is an error. An adapter that lists no samples of its own (a MAF track discovering its species from the file) takes the table's rows as its samples |
annotationAdaptermaybeFrozen | optional sub-adapter (typically a BigBedAdapter over a UCSC multiz |