Assemblies
At its flattest an assembly is just { "name": "hg38", "uri": "hg38.fa.gz" }.
JBrowse infers the adapter from the file extension and fills in the rest. See
the BaseAssembly config docs for the full slot
reference.
Shorthand and full forms
JBrowse infers the sequence adapter from the extension, derives the
.fai/.gzi siblings, and fills in the ReferenceSequenceTrack.
refNameAliases and cytobands take the same { "uri": "..." } object, so a
relative uri resolves against the config's own location:
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "hg38",
"uri": "hg38.fa.gz",
"refNameAliases": { "uri": "hg38.aliases.txt" },
"cytobands": { "uri": "hg38.cytoBand.txt" }
}Edits config.json in the current folder, creating it if there is none. See JBrowse CLI with Desktop.
jbrowse add-assembly hg38.fa.gz \
--name hg38 \
--refNameAliases hg38.aliases.txt \
--config '{"cytobands":{"uri":"hg38.cytoBand.txt"}}' \
--load copyhg38 is one of the genomes JBrowse Desktop hosts, with gene tracks already set up: on the start screen click Browse hosted genomes and pick it. To load the files of this config instead:
In JBrowse Desktop, Open your own genome on the start screen (or File → Open genome... in a session), then Open from a URL and paste, one per line:
hg38.fa.gz
hg38.fa.gz.fai
hg38.fa.gz.gziJBrowse reads the format off the file name. Then fill in:
- Genome name:
hg38 - refName aliases (under More options):
hg38.aliases.txt - cytobands (under More options):
hg38.cytoBand.txt
hg38.fa.gz, hg38.aliases.txt, hg38.cytoBand.txt are relative to a config.json. Replace each with its URL or its path on this computer.
The full form spells out what the shorthand fills in. Write sequence.adapter
to name the adapter or set a slot on it; sequence.type and sequence.trackId
can still be omitted:
{
"name": "hg38",
"aliases": ["GRCh38"],
"sequence": {
"type": "ReferenceSequenceTrack",
"trackId": "hg38_config",
"adapter": {
"type": "BgzipFastaAdapter",
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz"
}
},
"refNameAliases": {
"adapter": {
"type": "RefNameAliasAdapter",
"location": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt"
}
}
},
"geneticCodes": { "chrM": 2 }
}Every other field is on the
BaseAssembly config docs:
displayName,
refNameColors (a list of CSS
colors cycled across the reference sequences in the whole-genome ideogram), and
the ones below that need more than a slot description.
Configuring reference name aliasing
A track that loads without error but stays empty is usually a reference name
mismatch: the file names its chromosomes chr1 or NC_000001.11 where the
assembly uses 1, and JBrowse matches by exact name. refNameAliases points at
a tab-separated file, one row per sequence, primary name first. UCSC
chromAlias files
are that format; an NCBI sequence_report.tsv or _assembly_report.txt goes
through NcbiSequenceReportAliasAdapter. A sequence report also states each
sequence's role, so a whole-genome view of that assembly opens its assembled
molecules (chromosomes, plasmids, organelle genomes) and leaves out its
unplaced, unlocalized, alt and patch scaffolds, which Show all N regions
in the view menu adds. RefName aliasing has the
adapters and how to see, in the reference track's About dialog, which names
resolved.
Configuring alternative genetic codes (translation tables)
JBrowse translates with the standard genetic code (NCBI table 1) unless told otherwise. Vertebrate mitochondria use table 2, plastids and bacteria often table 11 (the full list is on the NCBI genetic codes page).
- CDS features read the code off the GFF's
transl_tableattribute, and use the assembly'sgeneticCodesentry when they carry none (gene track). - The reference track's six-frame translation has no CDS to read, so it uses
the assembly's
geneticCodesmap, keyed by refName:
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "hg38",
"sequence": { "adapter": { "uri": "hg38.fa.gz" } },
"geneticCodes": { "chrM": 2 }
}Edits config.json in the current folder, creating it if there is none. See JBrowse CLI with Desktop.
jbrowse add-assembly hg38.fa.gz \
--name hg38 \
--config '{"geneticCodes":{"chrM":2}}' \
--load copyKeys match through refname aliasing, so chrM applies when the FASTA names the
sequence MT only if the alias file lists MT in the chrM row. With no alias
file, key the map by the FASTA's own name. A sidecar TSV
(geneticCodesLocation,
refName<TAB>geneticCodeId) supplies the same map; the inline entry wins if
both are present.
Marking circular sequences
A GenBank record whose LOCUS line says circular is read as circular. A FASTA
has no such field, and Prokka writes every record linear, so for those the
assembly's
circularRefNames lists the
plasmids, organelles and bacterial chromosomes. The circular view closes each
one into a ring, and Save track data... writes it as a circular GenBank
record:
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "sakai",
"uri": "sakai.gbk",
"circularRefNames": ["NC_002695.2", "NC_002127.1", "NC_002128.1"]
}Edits config.json in the current folder, creating it if there is none. See JBrowse CLI with Desktop.
jbrowse add-assembly sakai.gbk \
--name sakai \
--config '{"circularRefNames":["NC_002695.2","NC_002127.1","NC_002128.1"]}' \
--load copySequence adapters
Sequence file types maps
each format to its adapter; all take the
uri shorthand. Preparing a
FASTA:
bgzip -i sequence.fa # -> sequence.fa.gz + sequence.fa.gz.gzi
samtools faidx sequence.fa.gz # -> sequence.fa.gz.faiTwoBitAdapterparses upfront; achromSizesfile speeds up a 2bit with many chromosomes (UCSCfaToTwoBitmakes the file).ChromSizesAdapterhas names and lengths but no sequence, enough to anchor a karyotype, synteny or whole-genome view without a FASTA.{ "name": "hg38", "uri": "hg38.chrom.sizes" }is the whole assembly — six wheat genomes are tens of gigabytes as sequence and a few kilobytes as this.metadataLocationattaches free-form metadata to a FASTA; FFRGS is one convention, and JBrowse enforces no format.
Configuring cytoband ideograms
cytobands supplies banding data for the views that draw ideograms, read by a
CytobandAdapter from a UCSC-style cytoBand.txt, as the first example above
writes it.
See also
- User guide: Sequence track
- User guide: Basic usage
- Reference: BaseAssembly config docs