wyp1125 / MCScanX

MCScanX: Multiple Collinearity Scan toolkit X version. The most popular synteny analysis tool in the world!
http://chibba.pgml.uga.edu/mcscan2/
218 stars 60 forks source link
c-plus-plus dynamic-programming java perl visualization

MCScanX

:License: BSD <http://creativecommons.org/licenses/BSD/>_

.. contents ::

Overview

The MCScanX package has two major components: a modified version of MCscan algorithm <https://github.com/tanghaibao/mcscan>_ allowing users to handle MCScan more conveniently and to view multiple alignment of syntenic blocks more clearly, and a variety of downstream analysis tools to conduct different biological analyses based on the synteny data generated by the modified MCScan algorithm.

All programs are executed using command line options on Linux systems or Mac OS. Usage or help information are well built into the programs. To show them on the screen, users just need to run the program without giving any options::

$./program_name

.. image:: https://lh4.ggpht.com/_O4Q4Y0oWQYU/Tcn3sydLaSI/AAAAAAAAA0w/foXv6yt4S2Y/s400/Figure1backup.jpg :alt: MCScanX flow chart

All code is copiable, distributable, modifiable, and usable without any restrictions. Contact: Yupeng Wang, wyp1125@uga.edu; Xu Tan, tanxu87@gmail.com

Installation

Make :::::: Simply put MCscanX.zip into a directory and run::

$unzip MCscanx.zip
$cd MCScanx
$make

The following is the list of executable programs ::::::::::::::::::::::::::::::::::::::::::::::::: Main programs (in the main folder)

Downstream analysis programs (in the downstream_analyses folder)

Main programs

MCScanX :::::::: This program, implementing a modified MCScan algorithm, detects syntenic blocks and progressively aligns multiple syntenic blocks against reference genomes (PIVOT).

Here is a typical parameter setting for generating the xyz.blast file::

$blastall  -i  query_file  -d database -p blastp -e 1e-10 -b 5 -v 5 -m 8 -o xyz.blast

The xyz.bed file holds gene positions, following a tab-delimited format::

chr#    starting_position   ending_position gene

Note: for chr#, a two-letter short name is used as prefix for the species; # is the chromosome number. (For example, the second chromosome of Arabidopsis thaliana should be denoted as at2.) The bed format is defined here <http://genome.ucsc.edu/FAQ/FAQformat.html#format1>_, and is especially useful since there are a ton of tools that can handle bed files, most notably BEDTOOLS. The xyz.bed file can be generated by parsing the .gff3 file released by the sequencing initiatives. Repeat of the same gene is not allowed in the .bed file. When comparing multiple genomes, simply concatenate all inter-/intra-species m8 blast output into xyz .blast file and concatenate all gene positions of different species into xyz.bed file.

It is advised that to make MCscanX generate more reasonable results, the number of BLASTP hits for a gene should be restricted to around top 5. When you have xyz.blast and xyz.bed ready, put them in the same folder. Then you can simply use::

$ ./MCScanx  dir/xyz

and one directory xyz.html , containing html files that display multiple alignment of syntenic blocks against each chromosome. The HTML files must be viewed through a web browser. In a HTML file, the first column shows the number of syntenic blocks at each gene locus, the second column shows the genes in PIVOT (reference chromosome) where tandem genes are marked in red, and the following is aligned syntenic blocks where only match genes are displayed.

MCScanX_h :::::::::::::::::::::::::: The BLASTP input of MCScanX can be replaced by a tab-delimited file containing more reliable pairwise homologous relationships. In this case, users should use MCScanX_h instead. The executation of MCScanX_h is very similar to that of MCScanX, except that the "xyz.blast" file should be replaced by "xyz.homology" file. At the bottom of screen output, statistics on numbers / percentages of collinear homolog pairs are shown.

Duplicate_gene_classifier :::::::::::::::::::::::::: Users may use this program, which incorporate the MCScanX algorithm, to classify origins of the duplicate genes of ONE genome into whole genome /segmental (match genes in syntenic blocks), tandem (continuous repeat), proximal (in nearby chromosomal region but not adjacent) or dispersed (other modes than segmental, tandem and proximal) duplications.

The input of duplicate_gene_classifier is the same with MCscanX, except an additional option for defining the maximum distance (# of genes) between 2 proximal duplicates.

Note: 0, 1, 2, 3, 4 stand for singleton, dispersed, proximal, tandem, segmental respectively. It is not reasonable to apply this program to data of multiple genomes.

Downstream analyses :::::::::::::::::::::

1) Detect_syntenic_tandem_arrays :::::::::::::::::::::::::::::::::: Tandem duplications often complicate synteny detection. To enhance the power of synteny detection, MCScan algorithms use the gene with best BLASTP hit to represent a tandem array. This program transforms match genes in syntenic blocks into tandem arrays if tandem duplications exist there.

2) Dissect_multiple_alignment :::::::::::::::::::::::::::::: This program dissects the number of syntenic blocks at each gene locus of the reference genome(s) into the number of intra-species syntenic blocks and the number of inter-species syntenic blocks.

3) dot_plotter ::::::::::::::: This java script generates a dot plot for all the syntenic blocks on two sets of chromosomes given by the user. Note that JDK is needed for executing Java programs.

The input files include a gff file containing all gene positions, a synteny file generated by MCScanX, and a control file (.ctl) containing plot size and chromosome IDs. The control file can be easily made by modifying the dot.ctl file::

800 //dimension (in pixels) of x axis
800 //dimension (in pixels) of y axis
sb1,sb2,sb3,sb4,sb5,sb6,sb7,sb8,sb9,sb10    //chromosomes in x axis
os1,os2,os3,os4,os5,os6,os7,os8,os9,os10,os11,os12  //chromosomes in y axis

Note that no space is allowed between adjacent chromosome IDs.

4) dual_synteny_plotter :::::::::::::::::::::::: This java script generates a dual synteny plot which links all the synteny blocks between two sets of chromosomes using straight lines.

The input files include a gff file containing all gene positions, a synteny file generated by MCScanX, and a control file (.ctl) containing plot size and chromosome IDs. The control file can be easily made by modifying the column.ctl file::

200 //plot width (in pixels)
800 //plot height (in pixels)
sb1,sb2 //chromosomes in the left column
os1,os2,os3 //chromosomes in the right column

Note that no space is allowed between adjacent chromosome IDs.

5) Circle_plotter :::::::::::::::::: This Java scripts generates a circular plot which links all the syntenic blocks with curved lines between and within the chromosome set given by users.

The input files include a gff file containing all gene positions, a synteny file generated by MCScanX, and a control file (.ctl) containing plot size and chromosome IDs. The control file can be easily made by modifying the circle.ctl file::

800 //plot width and height (in pixels)
sb1,sb2,os1,os2,os3 //chromosomes in the circle

Note that no space is allowed between adjacent chromosome IDs.

6) Bar_plotter ::::::::::::::: This Java scripts generates a bar plot displaying chromosome rearrangement between reference and target chromosome sets given by users.

The input files include a gff file containing all gene positions, a synteny file generated by MCScanX, and a control file (.ctl) containing plot size and chromosome IDs. The control file can be easily made by modifying the bar.ctl file::

800 //dimension (in pixels) of x axis
800 //dimension (in pixels) of y axis
sb1,sb2,sb3,sb4,sb5,sb6,sb7,sb8,sb9,sb10    //reference chromosomes
os1,os2,os3,os4,os5,os6,os7,os8,os9,os10,os11,os12  //target chromosomes

Note that no space is allowed between adjacent chromosome IDs.

7) add_kaks_to_synteny.pl ::::::::::::::::::::::::::: This program calculates the Ka & Ks value of each syntenic gene pair shown in the MCscan2 output (.synteny file). Bio-perl is needed for executing this program.

The input is a xyz.syteny file generated by MCScanX and a coding sequence file of corresponding gene set in fasta format.

8) group_collinear_genes.pl ::::::::::::::::::::::::::: This program groups genes through connecting collinear genes until any gene in each group has no collinear gene outside the group. This analysis can be used to construct gene families based on syntenic relationships.

Input includes a xyz.syteny file generated by MCScanX.

9) detect_collinearity_within_gene_families.pl :::::::::::::::::::::::::::::::::::::::::: This program detects collinear gene pairs within gene families.

Input includes a xyz.syteny file generated by MCScanX and a gene family file in tab-delimited format with gene family name in the first column::

Gene_family_1   gene1   gene2   gene3   ... genex
Gene_family_2   gene1   gene2   gene3   ... genex

10) family_circle_plotter ::::::::::::::::::::::::::: This java script generates a circular plot which links all sytenic genes within a gene family with red curved lines, and places the gene family synteny into a genomic synteny background.

The input files include a .gff file containing all gene positions, a .synteny file generated by MCScanX, a control file (.ctl) containing the plot size and chromosome IDs and a gene family file containing only one gene family with the aforementioned format. The control file can be easily made by modifying the family.ctl file::

800 //plot width and height (in pixels)
at1, at2, at3, at4, at5 //chromosomes in the circle

Note: users can input just the chromosomes of interest into the family.ctl file. This will generate a circular plot within the given chromosomes set.

11) family_tree_plotter.java :::::::::::::::::::::::::::::: This java script generates a gene family tree on which syntenic gene pairs and tandem gene groups are linked with red and blue curves respectively.

The input files include a .synteny file generated by MCScanX and a tree file for the gene family in newick format (bracket tree).

Users can set up the plot width, plot height, and font_size with the following options: -x plot_width -y plot height -f font_size

Note: this script aims to show the synteny and tandem overview for a gene family. The branch lengths are disregarded, thus do not reflect the true value.

12) origin_enrichment_analysis.pl ::::::::::::::::::::::::::::::::::: This program identifies potential enrichment of duplicate gene origins for input gene families according to the result of Duplicate_gene_classifier.

This perl program takes in a gene family file with the same format as the above ones and the gene origin file generated by Duplicate_gene_classifier.