BedAdapter
Auto-generated from the config schema in the source — see the config guide for concepts. Provided by the bed plugin. View source.
Reads plain-text BED files. The adapter loads the whole file into memory, so
use BedTabixAdapter for large files.
Example usage
{
type: 'FeatureTrack',
trackId: 'my_track',
name: 'My track',
assemblyNames: ['hg38'],
adapter: {
type: 'BedAdapter',
uri: 'https://example.com/features.bed',
},
}JBrowse infers BedAdapter and FeatureTrack from features.bed, and name defaults to the file name. In a config declaring one assembly, assemblyNames comes from there too — see the shortest track.
{
trackId: 'my_track',
uri: 'https://example.com/features.bed',
assemblyNames: ['hg38'],
}Named BED columns past name/score/strand (itemRgb, thickStart, ...) are only guaranteed for BED12 or a track with an autoSql/columnNames. For a BED7-BED11 file JBrowse cannot know what the extra columns mean, so it exposes them generically as field6, field7, ... and feature.itemRgb reads as undefined in a jexl callback. Set columnNames to refer to them by name.
Related links
- Track: FeatureTrack
- Display: LinearBasicDisplay
- Display: LinearManhattanDisplay
- Display: LinearMarkDisplay
- Display: LinearMultiRowFeatureDisplay
- Display: LinearScoreDisplay
- Display: LinearWiggleDisplay
- Tutorial: Structural variants (Cancer GIAB) part 1: breakpoints
- Tutorial: Structural variants (Cancer GIAB) part 2: copy number
- User guide: GWAS / Manhattan track
- Config guide: Hi-C track
- Config guide: Supported file types
Config slots
Adapter slots go inside the track's adapter: "adapter": { "type": "BedAdapter", ... }. It also accepts the shorthand keys uri, baseUri 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 |
|---|---|
bedLocationfileLocation = { uri: '/path/to/my.bed.gz', locationType: 'UriLocation' } | path to bed file, also allows gzipped bed |
columnNamesstringArray = [] | List of column names. A column named like a standard BED column is parsed as that column's type (chromStart numeric, blockSizes a numeric list); any other column is text |
scoreColumnstring = '' | The column to use as a "score" attribute |
autoSqlstring = '' | The autoSql definition for the data fields in the file |
colRefnumber = 0 | The column to use as a "refName" attribute |
colStartnumber = 1 | The column to use as a "start" attribute |
colEndnumber = 2 | The column to use as a "end" attribute |
disableGeneHeuristicboolean = false | Disable the heuristic that auto-detects BED12 features as gene/transcript structures. Useful for files that have BED12-like structure but are not genes (e.g. tandem duplications) |