Package: pyGenomeTracks
pyGenomeTracksStandalone program and library to plot beautiful genome browser trackspyGenomeTracks aims to produce high-quality genome browser tracks that
are highly customizable. Currently, it is possible to plot:bigwigbed/gtf (many options)bedgraphbedgraph matrices (like TAD-separation scores)epilogosnarrow peakslinks (represented as arcs, triangles or squares)Hi-C matrices (as triangle or squares)fastamaf (multiple alignment format)Here is a scheme which describe how pyGenomeTracks is working (graphical abstract ofLopez-Delisle et al. 2020):pyGenomeTracks can make plots with or without Hi-C data. The following is an example output of
pyGenomeTracks fromRamírez et al. 2017Table of contentInstallationUsageCitationDocumentationExternal usersInstallationpyGenomeTracks works with python >=3.7.The recommended way to install pyGenomeTracks is via condacondacreate-npygenometracks-cbioconda-cconda-forgepygenometrackspython=3.7To get a specific version, one can specify it. For example:condacreate-npygenometracks-cbioconda-cconda-forgepygenometracks=3.5python=3.7However, we noticed that conda installation can be quite slow so using mamba can help.
You first need to create the environment and install mamba:condacreate-npygenometracks-cbioconda-cconda-forgemambapython=3.7Then activate the environment and install pygenometracks with mamba:condaactivatepygenometracks
mambainstall-cconda-forge-cbiocondapygenometracksor if you want a specific version:condacreate-npygenometracks-cbioconda-cconda-forgemambapython=3.7
condaactivatepygenometracks
mambainstall-cconda-forge-cbiocondapygenometracks=3.5Also, pyGenomeTracks can be installed using pippipinstallpyGenomeTracksSince version 3.5, pyGenomeTracks uses BEDTools, don't forget to install it or load it into your environment.UsageTo run pyGenomeTracks a configuration file describing the tracks is required. The easiest way to create this file is using the programmake_tracks_filewhich creates a configuration file with
defaults that can be easily changed. The format is:make_tracks_file--trackFiles<file1.bed><file2.bw>...-otracks.inimake_tracks_fileuses the file ending to guess the file type.Then, a region can be plotted using:pyGenomeTracks--trackstracks.ini--regionchr2:10,000,000-11,000,000--outFileNamenice_image.pdfThe ending--outFileNamedefines the image format. If.pdfis used, then the resulting image is a pdf. The options are pdf, png and svg.Description of other possible arguments:optional arguments:
  -h, --help            show this help message and exit
  --tracks TRACKS       File containing the instructions to plot the tracks.
                        The tracks.ini file can be genarated using the
                        `make_tracks_file` program.
  --region REGION       Region to plot, the format is chr:start-end
  --BED BED             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. It will use the
                        value of --outFileName as a template and put the
                        coordinates between the file name and the extension.
  --width WIDTH         figure width in centimeters (default is 40)
  --plotWidth PLOTWIDTH
                        width in centimeters of the plotting (central) part
  --height HEIGHT       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 TITLE, -t TITLE
                        Plot title
  --outFileName OUTFILENAME, -out OUTFILENAME
                        File name to save the image, file prefix in case
                        multiple images are stored
  --fontSize FONTSIZE   Font size for the labels of the plot (default is 0.3 *
                        figure width)
  --dpi DPI             Resolution for the image in case the ouput is a raster
                        graphics image (e.g png, jpg) (default is 72)
  --trackLabelFraction TRACKLABELFRACTION
                        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.
  --trackLabelHAlign {left,right,center}
                        By default, the horizontal alignment of the track
                        labels is left. This alignemnt can be changed to right
                        or center.
  --decreasingXAxis     By default, the x-axis is increasing. Use this option
                        if you want to see all tracks with a decreasing
                        x-axis.
  --version             show program's version number and exitCitationIf you use pyGenomeTracks in your analysis, you can cite the following papers:Fidel Ramírez, Vivek Bhardwaj, Laura Arrigoni, Kin Chung Lam, Björn A. Grüning, José Villaveces, Bianca Habermann, Asifa Akhtar & Thomas Manke. High-resolution TADs reveal DNA sequences underlying genome organization in flies. Nature Communications (2018)doi:10.1038/s41467-017-02525-wLopez-Delisle L, Rabbani L, Wolff J, Bhardwaj V, Backofen R, Grüning B, Ramírez F, Manke T. pyGenomeTracks: reproducible plots for multivariate genomic data sets. Bioinformatics. 2020 Aug 3:btaa692.doi: 10.1093/bioinformatics/btaa692. Epub ahead of print. PMID: 32745185.DocumentationOurdocumentationprovideexamples, as well as thefull list of possible parametersandguidelines for developers who would like to add a new track type.External usersCoolBoxis an interactive genomic data explorer for Jupyter NotebooksGalaxyintegration offers a graphical user-interface to create PGT plots. It is also possible to include PGT into workflows and automatic pipelines.