Skip to content
Snippets Groups Projects

GenoFig - version 1.0.5

Genofig

Tool for graphical vizualisation of annotated genetic regions, and homologous regions comparison. It is an independent recoding of Easyfig 2 initially developped by at the S. Beatson Lab [https://mjsull.github.io/Easyfig/]

Authors: LECLERCQ Sébastien - BRANGER Maxime

Table of content

License

GNU GPL 3.0

Copyright 2023 INRAE, Université de Tours

The GenoFig logo is trademark of INRAE, Université de Tours
Some parts of the logo are under a CC BY 3.0 license: Dna Icon Designed by vecteezy

Installation

On Linux/MacOS

Conda

Download the GenoFig source code using the 'Download' button on top of this page. Cloning is currently not available for people not member of the INRAE French Institution. After decompression, open a terminal in the folder containing the decompressed files and run:

conda env create -f requirements.yml
./SETUP.sh

You can then run GenoFig with:

./Genofig

You can also add the GenoFig directory to your PATH by executing

echo 'export PATH="'$(pwd)':$PATH"' >> ~/.bashrc

After opening a new terminal, this will allow to execute the program from any directory by simply typing 'Genofig'.

For MACOS users: You may experience mouse pointer icon weird behavior, due to system-specific implementation of GTK3 libraries. It shouldn't affect functionality.

Compiled version for MacOS

A bundled version of release 1.0.3 can be found here This version was compiled for intel-based 64 bit systems and do not work for arm64-based Apple Silicon (M1/M2/M3) systems

The bundled version does not include latest bux fixes and improvement. Note also that it takes a while to start, without any prompt (~1 min, please be patient after clicking on the icon!).

On Windows

Blast installation

On Windows, Blast is not automatically installed with GenoFig. You will need to install it on your own : Blast+ on NCBI

Please pay attention to the Configuration section of NCBI tutorial to correctly configure your installation.
blast executable must be in your env PATH.

Compiled version for Windows 10 and later

A compiled version of release 1.0.3 can be found here

Note that the compiled version takes a while to start without any prompt (~1 min., please be patient after clicking on the icon!), and does not include latest bux fixes and improvement.

Conda version

You first need to install Miniconda: Conda installation for windows.

Then, download the GenoFig source code using the Download button on top of this page and decompress it. Cloning is currently not available for people not member of the INRAE French Institution. Open an anaconda prompt (i.e. powersheel terminal), navigate to the folder containing the decompressed GenoFig code and run:

conda env create -f requirements_windows.yml
conda activate genofig
pip3 install cairosvg
conda deactivate 

Launch Genofig from an anaconda powersheel terminal in the directory where GenoFig was decompressed, with:

conda activate genofig
python Genofig.py
conda deactivate  

These steps can be inserted in an executable .bat file.

Interface

General

General panel

General settings are proposed on top of the application.

You can manually set the figure output width (the height is automatically determined by the number of sequences to print).
Left/right/top/bottom margins can also be determined independently.

The output figure path and name can be set by clicking on the Draw figure in icon.

The CREATE FIGURE button generates the figure in SVG or PNG format. If no figure path and name is set when pressing it, a prompt window will ask you to.

See Descriptions options for more information

Saving/Loading

Menu panel

By clicking on the Application menu, you will be able to save your current project (every sequences and display settings) with Save/Save as..., or only the display settings (features, blast, legends and decorum) with Save configuration.

You will also be able to load previous saved projects with Open or configuration files with Load configuration. Loading a configuration file will keep already imported sequences and apply the saved display settings on them.

Under LINUX, a specific configuration can also be saved as default, and will be automatically loaded upon GenoFig start.

Status bar

Status bar

Information about actions is displayed in the status bar at the bottom of the application. Standard information are in black, while it turns green when the figure was successfully created or red when an error occurred.

Sequences panel

Sequences panel

This panel provides all parameters for each imported sequence. The General line defines default values that will be used if no specific parameter is set for a sequence (i.e. when '-' is set in a field).

Sequences in fasta or GenBank formats can be imported using the plus icon. Only nucleotide/genomic sequences are accepted. Multi-fasta or -Genbank are accepted ; each internal sequence will be imported as an independent sequence. The sequence name is equal to the LOCUS field in the GenBank file and cannot be modified in GenoFig. Sequence identification displayed in the figure can be changed using the label type field (species, description, size,...).

GenBank sequence information is provided by clicking on the infos icon. If any information (except the LOCUS field) is modified in GenBank files while GenoFig is running, the file must be loaded again using the reload button from the sequence information pop-up.

Sequences can be deleted using the cross icon on the left of the sequence name. Beware, there is currently no warning for sequence deletion !

You can enable/disable a sequence drawing with the active field. Sequence ordering can be changed by dragging up and down the sequence name.

Vertical space between sequences can be changed using the space below field.

For MACOS users: drag-and-drop will copy the sequence instead of moving it, due to system-specific implementation of GTK3 libraries. You will need to delete the original sequence using the cross icon.

See Descriptions options for detailed information on each field

Features panel

Features panel

This panel will help you to display the features included in the GenBank annotation. You can add as many as you want using the plus icon. Like for the Sequences panel, the General line defines common parameters if no specific value is set up for a feature's field. You can choose to display or not a feature with the selected field.

Feature definitions can be deleted or copied using the cross and copy icons on the left of the feature name. Feature names are editable.

The most important parameter for Features is the filter field. It will help you define on which GenBank features to apply the selected parameters. For instance, defining a CDS feature with a fill color set as green and a filter set as "kinase" will print in green all CDS having the term "kinase" in any of the fields of the GenBank file. The in field field allows you to reduce the scope of the seach to a specific field of the GenBank feature (gene, product, etc.).

Values in the filter field are interpreted using regex syntax, in a case-insensitive way. This means that the OR operator '|' or metacharacters such as \d+ will work. More information on regex syntax here: https://www3.ntu.edu.sg/home/ehchua/programming/howto/Regexe.html

Features definition are interpeted from top to bottom, and only the last valid definition will be selected for each feature in the figure. For instance, a feature definition with filter set to "kinase" will never be applied if another feature definition with filter set to "kin" is present lower. Features ordering can be changed by dragging up and down the feature name.

For MACOS users: drag-and-drop will copy the feature instead of moving it, due to system-specific implementation of GTK3 libraries. You will need to delete the original feature using the cross icon.

See Descriptions options for more information

Homologies panel

Homologies panel

Homologies between sequences can be calculated using BlastN or TBlastX. When all sequences are loaded, the Run BlastN button produces an All-vs-All blast output which needs to be saved on the disk. Blast needs to be run again only if new sequences are imported. Various parameters allow you to filter which blast hits to display from the total hits stored in the Blast file.

Homologies can be displayed between adjacent sequences, between all sequences, or all against a single sequence using the Matches selection area. Used-defined homology comparisons can also be set up using the Custom option.

The TBlastX area is hidden by default and can be displayed by clicking on the TBLASTX square button.

See Descriptions options for more information

Legends panel

Legends panel

This panel allows you to manage legends displayed on the figure. By default, only the scale is printed. You can easily enable or disable each type of legend and choose where to print them out. The Scaling parameter is a factor of the figure size. Blast legends use the vertical figure size while features and scale legends use the horizontal figure size. The scale is automatically reduced to the closest informative size (1Kbp, 2Kbp, 10Kbp, 20Kbp,...).

The features legend uses feature names as identifiers. Spaces are allowed, but try to avoid other special characters as much as possible.

Beware that legends are displayed in the margins of the figure. If a legend overlaps the sequences, you can enlarge the corresponding margin in the figure's General options.

See Descriptions options for more information

Decorations panel

Decorations panel

This panel allows you to manage some additional sequence information, like GC%, GC skew or sequence-specific scales.
It works like Sequences and Features panels.

For GC% and GC skew information, the value is calculated every X nucleotides, given by the field step, on a fragment of size Y given by the window field.
For the Scale information, step and window fields represent minor and major tick bars, respectively.

By default, decorations are displayed for all sequences. They can be displayed only on some sequences by using the show on sequences icon field which will open a pop-up menu for sequence selection.

For MACOS users: drag-and-drop will copy the decoration instead of moving it, due to system-specific implementation of GTK3 libraries. You will need to delete the original decoration using the cross icon.

See Descriptions options for more information

Example of generated figure

This example shows the figure generated with the display options presented in the above example images

Example output

Description of all options

General panel

Option Description Values
Image width Define the exact size of the image width in pixels. Image height will be automatically computed Integer
Figure path Define the output file path for the figure. SVG and PNG formats are supported
Margins Define the top/right/bottom/left margins of the figure in pixels. Integer
Background color Define the background color of the image. RGB color or transparent
Enhance graph Add some shadow effects to features Checkbox

Sequences panel

Option Description Values
Sequence name Name of the sequence Automatically set to the GenBank/fasta locus name
infos Provide information about the sequence -
active Draw/hide the sequence Checkbox
position Determine the horizontal position of the sequence left/right/center/best blast/custom
min Start to draw the sequence at this position (default=1) Integer
max End to draw the sequence at this position (default=max) Integer or 'max'
reverse Reverse complement the sequence Checkbox
height Define the height of features on the sequence pixel
space below Define the space below the current sequence pixel
line width Define the sequence line width pixel
line color Define the color of the sequence line -
seq. label Print the sequence label Checkbox
label type Select which information to print as label. Information are extracted from the GenBank definition and may be empty for FASTA sequences locus/accession/organism/strain/description/size or a combination
label position Select the label position relative to the sequence left/right/top/bottom or a combination
label offset distance between the sequence and its label pixel
label color Sequence label color -
label size Sequence label size pixel
B Sequence label in bold Checkbox
I Sequence label in italic Checkbox
feat. label Display features labels in this sequence Checkbox
feat. label type Select which information to print as features label gene/product/note/locus_tag/mobile_element_type
feat. label position Label position relative to the features top/middle/bottom
feat color Features label color -
feat label size Features label size pixel
feat label rot Features label rotation (default=0) angle

Features panel

Option Description Values
selected activate the feature's definition Checkbox
in legend Determine if this feature will be shown in the feature legend Checkbox
type Type of the feature as defined in GenBank CDS/gene/mobile_element/tRNA/rRNA/misc_feature
filter Value to select some specific features on Regex command
in field Field on which to apply the regex filter any/gene/product/note/mobile_element_type
strand Display feature according to its strand orienttion none/lead up/lag up
shape Shape of the feature in the picture arrow/rectangle/frame/signal/range/rangeL
height ratio Size ratio of the feature compared to the sequence height value Float
fill Fill the feature with color Checkbox
fill color Filling color -
line width feature line width pixel
line color feature line color -
hatching Fill the feature with hatching, using line color and width several choices
label Print the feature label Checkbox
label type Which GenBank field to use as label gene/product/note/locus_tag/mobile_element_type
label position Label position relative to the feature Opposite/top/middle/bottom
label color Feature label color -
label size Feature label size pixel
label rot Feature label rotation angle

Homologies panel

Hits correspond to homologous regions detected by Blast.

Option Description Values
Run BlastN/TBlastX Execute blast comparisons between all sequences from the Sequence panel. Save the results in an output file -
Load file Load a previous Blast file run. Warning: only hits matching sequences (according to the LOCUS entry) from the sequence panel will be considered -
minimum length minimum hit size to display nucleotides
minimum similarity minimum hit nucleotide similarity to display percent
minimum e-value minimum hit e-value to display Float
distance to sequence distance of the beginning of the hit to the Sequence line center. pixel
color (min/max) Color gradient for balst hits display, according to min and max hit similarities -
reversed color Allow the definition of an alternative gradient for hits in reversed orientation Checkbox
opacity transparency of displayed hits Float
outline matches draw a thin outer line around hits Checkbox
show labels display hit nucleotide similarity in the center of the hit Checkbox
min. match size Minimum hit size to display the label nucleotides
label color hit label color -
label size hit label size pixel
decimals number of decimal to display Integer
Matches selection Selet between which sequences to display homologies None/adjacent/All vs All/All vs one/Custom

Legends panel

Option Description Values
General display Display/Hide this legend Checkbox
Horizontal position Horizontal position of the legend in the picture left/middle/right
Vertical position Vertical position of the legend in the picture top/middle/bottom
Scaling Scale ratio for this legend relative to the total picture size (default=0.3) Float
Font Size Font size of the legend pixel
Font color Font color of the legend -
Cols number Number of columns into which feature legends should be distributed (default=1) Integer

Decorations panel

Option Description Values
selected Show/hide the decoration when drawing Checkbox
show on sequences Select on which sequences to apply the decoration Switches on popup
type Type of decoration GCskew/GC%/scale
step GC% and GC-skew window step OR Scale minor tick interval nucleotides
window GC% and GC-skew window size OR Scale major tick interval nucleotides
position Position of the decoration relative to the sequence On sequence/above/below
height ratio Size ratio of the decoration compared to the sequence height value Float
line width Decoration line width pixel
line color Decoration line color -
reverse Reverse min/max position Checkbox
print label Print the GC%/GC-skew min max values OR positions of the scale major tick bars Checkbox
label color Decoration label color -
label size Decoration label size pixel
label position Position of the label relative to the decoration left/right/middle
use original GenBank position Display scale positions relative to the GenBank original region, when the sequence originates from a GenBank file with a REGION property (typically after downloading a subpart of a large GenBank annotated sequence) Checkbox