MCScanX Full Protocol

A complete guide for synteny analysis using MCScanX

Software & Requirements

Required Software
Optional Tools
System Requirements
  • OS: Linux or macOS
  • Compiler: g++ (Linux) or Xcode (macOS)
  • RAM: 8 GB+ recommended
A Docker image is available: wyp1125/mcscanx

Part 1: MCScanX Installation ~10 min

Clone the repository and compile the source code.

git clone https://github.com/wyp1125/MCScanX.git cd MCScanX make

Part 2: Input File Preparation ~1-24h

MCScanX requires two main inputs: a simplified GFF file and a BLAST results file.

1. Simplified GFF

A tab-delimited file with four columns: chromosome gene_id start end.

# Example GFF format Chr1 AT1G01010 3631 5899 Chr1 AT1G01020 6788 9130
2. All-vs-All BLAST

Run an all-vs-all BLASTP of protein sequences and format the output as -outfmt 6.

# Create BLAST database makeblastdb -in proteins.fasta -dbtype prot -out my_prot_db # Run BLASTP blastp -query proteins.fasta -db my_prot_db -evalue 1e-10 -outfmt 6 -num_threads 8 > all_vs_all.blast

Part 3: Detecting Collinear Blocks ~10 min

Run MCScanX with your GFF and BLAST files (they must have the same prefix).

# Assuming files are named `my_data.gff` and `my_data.blast` MCScanX my_data

This generates the key .collinearity and .tandem files.

Part 4: Visualization ~2h

Use the downstream tools included with MCScanX to create plots.

# Example: Create a dot plot java dot_plotter -g my_data.gff -s my_data.collinearity -c dot_plotter.ctl -o my_dot_plot.png

Part 5: Evolutionary Analyses ~5h

A) Ka/Ks Calculation

Calculate Ka/Ks ratios for collinear gene pairs.

# This requires a helper script and CDS sequences add_kaks_to_collinearity.pl -i my_data.collinearity -d sequences.cds -o my_data.kaks
B) Gene Duplication Classifier

Classify genes into different duplication types (WGD, tandem, etc.).

duplicate_gene_classifier my_data