API documentation

Classes:

trackhub.base.HubComponent()

Base class for various track hub components.

trackhub.Hub(hub[, short_label, long_label, ...])

Represents a top-level track hub container.

trackhub.GenomesFile([genome, filename])

Represents the genomes file on disk.

trackhub.Genome(genome[, trackdb, ...])

Represents a 2-line genome stanza within a "genomes.txt" file.

trackhub.TrackDb([tracks, filename])

Represents the file containing one or more Track objects (which each represent a stanza).

trackhub.BaseTrack(name[, tracktype, ...])

Represents a single track stanza, base class for other track types.

trackhub.Track([url])

Represents a single track stanza along with the file it describes.

trackhub.CompositeTrack(*args, **kwargs)

Represents a composite track.

trackhub.ViewTrack(view, *args, **kwargs)

Represents a View track.

trackhub.SuperTrack(*args, **kwargs)

Represents a Super track.

trackhub.AggregateTrack(aggregate, *args, ...)

Represents an Aggregate or Overlay track.

trackhub.SubGroupDefinition(name, label, mapping)

Represents a subgroup line in a composite track.

trackhub.parsed_params.Param(name, fmt, ...)

param name:

Name of the parameter

Classes specific to assembly hubs:

trackhub.GroupsFile(groups[, filename])

Represents the groups file on disk, used for assembly hubs.

trackhub.GroupDefinition(name[, label, ...])

Represents a group of tracks in a trackhub.

trackhub.Assembly(genome[, twobit_file, ...])

Represents a genome stanza within a "genomes.txt" file for a non-UCSC genome.

Functions

trackhub.upload.stage_hub(hub[, staging])

Stage a hub by symlinking all its connected files to a local directory.

trackhub.upload.upload_hub(hub, host, remote_dir)

Renders, stages, and uploads a hub.

trackhub.helpers.dimensions_from_subgroups(s)

Given a sorted list of subgroups, return a string appropriate to provide as a composite track's dimensions arg.

trackhub.helpers.filter_composite_from_subgroups(s)

Given a sorted list of subgroups, return a string appropriate to provide as the a composite track's filterComposite argument

trackhub.helpers.hex2rgb(h)

Convert hex colors to RGB tuples

trackhub.helpers.sanitize(s[, strict])

Sanitize a string.

trackhub.helpers.data_dir()

Returns the data directory that contains example files for tests and documentation.