Starting usage

To run pyGenomeTracks a configuration file describing the tracks is required.

In a configuration file, each track is defined as a block of parameters starting with its name [track name] and continues with the parameters for that track such as the file location, its title, height, color etc.

The tracks are then plotted in the order of the configuration file from top to bottom.

The easiest way to create this file is using the program make_tracks_file which creates a configuration file with defaults that can be easily changed. make_tracks_file uses the file ending to guess the file type. Then, a region can be plotted using pyGenomeTracks. Both programs are described below:


Facilitates the creation of a configuration file for pyGenomeTracks. The program takes a list of files and does the boilerplate for the configuration file.

usage: make_tracks_file --trackFiles <bigwig file> <bed file> etc. -o tracks.ini

Named Arguments

--trackFiles, -f

Files to use in for the tracks. The ending of the file is used to define the type of track. E.g. .bw for bigwig, .bed for bed etc. For a arcs or links file, the file ending recognized is .arcs or .links

--out, -o

File to save the tracks


show program’s version number and exit


Plots genomic tracks on specified region(s). Citations : Ramirez et al. High-resolution TADs reveal DNA sequences underlying genome organization in flies. Nature Communications (2018) doi:10.1038/s41467-017-02525-w Lopez-Delisle et al. pyGenomeTracks: reproducible plots for multivariate genomic datasets. Bioinformatics (2020) doi:10.1093/bioinformatics/btaa692

usage: pyGenomeTracks --tracks tracks.ini --region chr1:1000000-4000000 -o image.png

Named Arguments


File containing the instructions to plot the tracks. The tracks.ini file can be genarated using the make_tracks_file program.


Region to plot, the format is chr:start-end


Instead of a region, a file containing the regions to plot, in BED format, can be given. If this is the case, multiple files will be created using a prefix the value of –outFileName


figure width in centimeters (default is 40)


width in centimeters of the plotting (central) part


Figure height in centimeters. If not given, the figure height is computed based on the heights of the tracks. If given, the track height are proportionally scaled to match the desired figure height.

--title, -t

Plot title

--outFileName, -out

File name to save the image, file prefix in case multiple images are stored


Font size for the labels of the plot (default is 0.3 * figure width)


Resolution for the image in case the ouput is a raster graphics image (e.g png, jpg) (default is 72)


By default the space dedicated to the track labels is 0.05 of the plot width. This fraction can be changed with this parameter if needed.


Possible choices: left, right, center

By default, the horizontal alignment of the track labels is left. This alignemnt can be changed to right or center.


By default, the x-axis is increasing. Use this option if you want to see all tracks with a decreasing x-axis.


show program’s version number and exit