Skip to content
Snippets Groups Projects
README.md 12.6 KiB
Newer Older
Sebastien Leclercq's avatar
Sebastien Leclercq committed
# EasyFig 3 - version 3.2.0

<img src="Easyfig.png" alt="Easyfig" width="150"/>

Tool for graphical vizualisation of annotated genetic regions, and homologous regions comparison. It is an independent recodong of Easyfig 2 initially developped by  Mitchell J. Sullivan [https://mjsull.github.io/Easyfig/]
Sebastien Leclercq's avatar
Sebastien Leclercq committed

Sebastien Leclercq's avatar
Sebastien Leclercq committed
Authors: LECLERCQ Sébastien - BRANGER Maxime
Sebastien Leclercq's avatar
Sebastien Leclercq committed

Maxime Branger's avatar
Maxime Branger committed
## Licence
Creative Commons Attribution-ShareAlike 4.0 International  
  
Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="https://creativecommons.org/images/deed/cc_blue_x2.png" alt="CC" width="50"/>
<img src="https://creativecommons.org/images/deed/attribution_icon_blue_x2.png" alt="BY" width="50"/>
<img src="https://creativecommons.org/images/deed/sa_blue_x2.png" alt="SA" width="50"/>  
Maxime Branger's avatar
Maxime Branger committed

CC BY-SA 4.0


Sebastien Leclercq's avatar
Sebastien Leclercq committed
## Installation
### On Linux/MacOS
#### Conda
Sebastien Leclercq's avatar
Sebastien Leclercq committed
```
Sebastien Leclercq's avatar
Sebastien Leclercq committed
conda env create -f requirements.yml
./Easyfig
Sebastien Leclercq's avatar
Sebastien Leclercq committed
```
Sebastien Leclercq's avatar
Sebastien Leclercq committed
You can also add 'Easyfig' to your PATH.  

### On Windows
#### Conda
Blast is not include on conda environment for Windows.  
You need to install it by your own : [https://www.ncbi.nlm.nih.gov/books/NBK52637/](NCBI)  
Please pay attention to the Configuration section of NCBI tutorial to correctly configure your installation.  
blast executable must be in your env PATH. 
```
conda env create -f requirements_windows.yml
```
To launch Easyfig 3, you need to open an anaconda powersheel terminal, then load easyfig environment (conda activate easyfig) and finally run easyfig (python Easyfig.py).  
These steps can be done in an executable .bat file.   

## Tutorial
1. Loading sequences
2. Defining some features
3. Setting some decorum
4. Managing legends output
5. Generate your first figure


## Interface
### General
General settings are set on the top of the window. And you can access to more windows using tabs header.  
See [Descriptions options](#desc_general) for more information 

<img src="helpimages/general.png" alt="General panel" width="1000"/>


Sebastien Leclercq's avatar
Sebastien Leclercq committed
#### Image width
Sebastien Leclercq's avatar
Sebastien Leclercq committed
You can manually set the figure output width (the height is automatically determined by the number of sequences to print).  
Sebastien Leclercq's avatar
Sebastien Leclercq committed
Left/right/top/bottom margins can also manually be determined independently. 
Sebastien Leclercq's avatar
Sebastien Leclercq committed
#### Output figure
The output figure path and name can be set by clicking on the `Draw figure in` icon. If it is not set while pressing the `CREATE FIGURE` button, a prompt window will ask you to.
Sebastien Leclercq's avatar
Sebastien Leclercq committed
#### Create figure
Sebastien Leclercq's avatar
Sebastien Leclercq committed
Button to generate the figure in SVG or PNG format. 
Sebastien Leclercq's avatar
Sebastien Leclercq committed


### Saving/Loading
Sebastien Leclercq's avatar
Sebastien Leclercq committed
By clicking on the `Application` menu, you will be able to save your current project (every sequences and fields)with `Save/Save as...`, or only the configuration (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 loaded sequences and apply the saved feature/legend/decorum/blast configuration on them.


<img src="helpimages/menu.png" alt="General panel" width="1000"/>

Sebastien Leclercq's avatar
Sebastien Leclercq committed

### Sequences window
This window provides all parameters for each imported sequence.  
Sebastien Leclercq's avatar
Sebastien Leclercq committed
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 `+` icon. Multi-fasta or -Genbank are accepted ; each internal sequence will be set as an independent sequence.  The sequence name is equal to the LOCUS field of the GenBank file and cannot be modified in Easyfig. Sequence identification displayed in the figure can be changed using the `label type` field (species, description, size,...). Sequence information is provided by clicking on the `infos` icon.   

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

Space between sequences can be changed using the `space below` field.

See [Descriptions options](#desc_seq) for information on each field  
Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="helpimages/sequence.png" alt="Sequences panel" width="1000"/>


Sebastien Leclercq's avatar
Sebastien Leclercq committed
### Features definition window
This window will help you to display the features included in the GenBank annotation. You can add as many as you want using the `+` icon. Like sequences, 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. 

The most important parameter for features is the `filter` field. It will help you define on which 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 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. 


Sebastien Leclercq's avatar
Sebastien Leclercq committed
See [Descriptions options](#desc_feat) for more information   

Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="helpimages/Features.png" alt="Features panel" width="1000"/>


Sebastien Leclercq's avatar
Sebastien Leclercq committed
### Blasts window

See [Descriptions options](#desc_blst) for more information   

Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="helpimages/Blasts.png" alt="Blasts panel" width="1000"/>

Sebastien Leclercq's avatar
Sebastien Leclercq committed
### Legends window
Sebastien Leclercq's avatar
Sebastien Leclercq committed
This window allows you to manage the displayed legend 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.
Sebastien Leclercq's avatar
Sebastien Leclercq committed
See [Descriptions options](#desc_leg) for more information   

Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="helpimages/Legends.png" alt="Legends panel" width="1000"/>

Sebastien Leclercq's avatar
Sebastien Leclercq committed
### Decorum window
This window allows you to manage some additional displays on the figure, like GC%, GC skew and sequence-specific scales.  
Sebastien Leclercq's avatar
Sebastien Leclercq committed
This works like sequences and features panels. You can define common parameters or enable/disable each decorum. 
See [Descriptions options](#desc_deco) for more information   

Sebastien Leclercq's avatar
Sebastien Leclercq committed
<img src="helpimages/decorum.png" alt="Decorum panel" width="1000"/>

## Example of generated figure
This example shows the figure generated with the above options

<img src="helpimages/Figure1.png" alt="Example output" width="1000"/>


Sebastien Leclercq's avatar
Sebastien Leclercq committed
## Description of all options
You will find below the description for every options fields available.
### <a id="desc_general"></a>General
| Option | Description | Values |
|-------------|-------------|-------------|
Sebastien Leclercq's avatar
Sebastien Leclercq committed
| Image width | Define the exact size of the image width. This is a fix value in point or pixel. | Integer |
Sebastien Leclercq's avatar
Sebastien Leclercq committed
| Figure path | Define the output file path of the figure. | - |
| Margins | Define the exact margins size of the figure. | Integer |
| Background color | Define the background color of the image. | - |
| Enhance graph | Add some shadow effects to features | Checkbox |

### <a id="desc_seq"></a>Sequences
| Option | Description | Values |
|-------------|-------------|-------------|
Sebastien Leclercq's avatar
Sebastien Leclercq committed
| Sequence name | Name of the sequence | Automatically given according to the gbk/fasta LOCUS value |
Sebastien Leclercq's avatar
Sebastien Leclercq committed
| infos | Provide information about the sequence | - |
| active | Uncheck to not consider this sequence on drawing | Checkbox |
| height | Define th height of the sequence on the image | Integer |
| line width | Define the sequence line width | Integer |
| space below | Define the space below the current sequence | Integer |
| line color | Define the color of the sequence line | - |
| position | Determine the position of the sequence (inline) | left/right/center/best blast/custom |
| min | Position to consider to start on the sequence (default=1) | Integer |
| max | Position to consider to end on the sequence (default=max)| Integer or 'max' |
| reverse | Check to reverse the sequence | Checkbox |
| print label | Uncheck to hide sequence label | Checkbox |
| label type | Select the information to print as label | locus/species/description/locus+size/locus+species/locus+description |
| label position | Select the sequence label position  | left/right/top/bottom/top-left/top-right/bottom-left/bottom-right |
| offset to seq | Offset value between sequence and label | Integer |
| label color | Select sequence label color | - |
| label size | Define sequence label size | Integer |
| print feat. label | Check to display features labels | Checkbox |
| feat. label type | Select information to print as features label | gene/product/note/locus_tag/mobile_element_type |
| feat. label position | Define features label position | top/middle/bottom |
| feat color | Define features label color | - |
| feat label size | Define features label size | Integer |
| feat label rot | Define features label rotation (default=0) | Integer |

### <a id="desc_feat"></a>Features 
| Option | Description | Values |
|-------------|-------------|-------------|
| selected | Allow you to select/unselect a feature for the drawing | Checkbox |
| show in legend | Determine if this feature will be show in legend  | Checkbox |
| type | Select the type of feature  | CDS/gene/mobile_element |
| strand | Select the strand of the feature | none/lead up/lag up |
| shape | Define the shape of the feature on the draw | arrow/rectangle/frame/signal/range/rangeL |
| hatching | Define the hatching of the feature on the draw | none/hbar/hbar2/circle/crossed/crossed2/rain/diagonal/Rdiagonal/waved/dotted/crosses |
| height ratio | Define the ratio of the feature comparing to sequence height | Float |
| fill color | Color of the feature  | - |
| fill | Fill or not | Checkbox |
| line width | Line width | Integer |
| line color | Line color | - |
| filter | Using a regex to select some specific features by name/product or anything | Regex |
| in field | Fields to apply the regex filter | any/gene/product/note/mobile_element_type |
| print label | Print feature label or not | Checkbox |
| label type | Which label type to print  | gene/product/note/locus_tag/mobile_element_type |
| label position | Position of the label | Opposite/top/middle/bottom |
| label color | Color of the label | - |
| label size | Size of the label | Integer |
| label rot | Rotation of the label | Integer |

### <a id="desc_blts"></a>Blasts
| Option | Description | Values |
|-------------|-------------|-------------|
| Run BlastN |  | - |
| Load file |  | - |
| minimum length |  | Integer |
| minimum similarity |  | Integer |
| minimum e-value |  | Float |
| distance to sequence |  | Integer |
| color (min/max) |  | - |
| reversed color |  | Checkbox |
| opacity |  | Float |
| outline matches |  | Checkbox |
| show labels |  | Checkbox |
| min. match size |  | Integer |
| label color |  | - |
| label size |  | Integer |
| decimals |  | Integer |
| Matches selection |  | None/adjacent/All vs All/All vs one/Custom |

### <a id="desc_leg"></a>Legends
| Option | Description | Values |
|-------------|-------------|-------------|
| General display | Display/Hide this legend | Checkbox |
| Horizontal position | Select the horizontal position of the legend | left/middle/right |
| Vertical position | Select the vertical position of the legend | top/middle/bottom  |
| Scaling | Define a scale ratio for this legend. (default=0.3) | Float |
| Font Size | Define the font size of the legend | Integer |
| Font color | Define the font color of the legend | - |
| Cols number | Determine the exact number of columns to use to display features legend (default=1) | Integer |

### <a id="desc_deco"></a>Decorum
| Option | Description | Values |
|-------------|-------------|-------------|
| selected | Allow you to select/unselect the decorum for the drawing | Checkbox |
| show on sequences | This button opens a popup which allows you to select/unselect sequences to print this decorum | Switches on popup |
| type | Select which type of decorum to draw | GCskew/GC%/scale |
| step | Step size in bases for calculations | Integer |
| window | Window size in bases for calculations | Integer |
| position | Position of the decorum in relation to the sequence | On sequence/above/below |
| height ratio | Define the ratio of the decorum comparing to sequence height | Float |
| line width | Line width | Integer |
| line color | Line color | - |
| reverse | Reverse min/max position | Checkbox |
| print label | Print or not the decorum label  | Checkbox |
| label color | Color of the label | - |
| label size | Size of the label | Integer |
| label position | Position of the label in relation to decorum | left/right |

## Logo 
Our logo is using a licenced image : CC BY 3.0 [Designed by vecteezy](https://iconscout.com/contributors/vecteezy)