Builds a loose track spec — list(uri = url) plus whatever you pass — that the view expands into a full track config when it loads, inferring the track type and adapter from the file extension with JBrowse's own format plugins (the same inference the "Add track" flow uses). No extension table lives in R, so every format a bundled plugin recognizes works: .bam/.cram (alignments), .vcf (variants), .gff/.gff3/.gtf/.bed (features), .bb/.bigBed (features), .bw/.bigWig (quantitative), .hic (Hi-C), and more. A bgzipped file (.gff.gz, …) resolves to its indexed tabix adapter, a plain one to the whole-file adapter. JBrowse derives index locations (.bai/.crai/.tbi) and, for CRAM, the reference from the assembly, so only the data URL is required.

track(
  url,
  name = NULL,
  track_id = NULL,
  assembly_names = NULL,
  index = NULL,
  ...
)

Arguments

url

URL to the track data.

name

Track display name. Left NULL, the view derives it from the file's base name.

track_id

A unique id for the track. Left NULL, the view derives one.

assembly_names

Assembly name(s) the track belongs to. Usually left NULLJBrowseR() backfills it from the loaded assembly.

index

URL of the index file when it isn't the conventional sibling of url (.bai/.crai/.tbi). A .csi index is detected by extension.

...

Extra config merged onto the track, overriding the inferred defaults (e.g. category = list("Genes"), or a type = "AlignmentsTrack" override).

Value

a loose track spec list

Examples

track("https://jbrowse.org/genomes/hg19/gencode.v19.sorted.gff.gz", name = "Genes")
#> $uri
#> [1] "https://jbrowse.org/genomes/hg19/gencode.v19.sorted.gff.gz"
#> 
#> $name
#> [1] "Genes"
#>