Plotting continuous genomic data

GraphTrack

class genomeview.GraphTrack(name=None, x=None, y=None)[source]

Visualizes quantitative data as a line across coordinates within the current genomic view.

One or more datasets can be visualized (with different colors) on the same track using the add_series() method.

add_series(x, y, color=None, label=None)[source]

Add a dataset corresponding to a single line in the track (ie, a “series”). Note that while a single GraphTrack can visualize multiple datasets, they are all plotted on the same y-axis and so should share the same units.

Parameters:
  • x – a list of genomic coordinates
  • y – a list of data values; each y-value must correspond to a single x-value
  • color – an SVG color for the line being plotted
  • label – an optional text label for the graph being plotted (currently unused)
class genomeview.BigWigTrack(path, nbins=1000, name=None)[source]

Visualizes continuous-valued data from a bigwig file. Requires pyBigWig module to be installed. Supports using web URLs as well as file paths.