Here is a README.md
file for your GitHub repository based on the scripts you provided:
# SyRI Genome Alignment and Analysis
This repository contains scripts and workflows for genome alignment and structural rearrangement analysis using **SyRI**, **MUMmer**, **Minimap2**, and **Plotsr**.
## Table of Contents
- [Installation](#installation)
- [Genome Alignment](#genome-alignment)
- [Running SyRI](#running-syri)
- [Plotting Results](#plotting-results)
- [Multiple Genome Comparisons](#multiple-genome-comparisons)
- [References](#references)
## Installation
### 1. Install SyRI and Dependencies
You can install SyRI and its dependencies using Conda:
```bash
# Create a Conda environment and install SyRI
conda create -n syri_env -c bioconda syri
conda activate syri_env
If the Conda installation does not work due to unsatisfiable errors, install SyRI manually:
# Download SyRI from GitHub
git clone https://github.com/schneebergerlab/syri.git
cd syri
python3 setup.py install
# Make scripts executable
chmod +x bin/syri bin/chroder
conda install -c conda-forge psutil python-igraph
conda create -n plotsr_env -c bioconda plotsr
conda activate plotsr_env
You can perform whole-genome alignment using MUMmer or Minimap2.
ln -sf ref_genome.fasta refgenome
ln -sf qry_genome.fasta qrygenome
# Perform whole genome alignment using nucmer
nucmer --maxmatch -c 100 -b 500 -l 50 refgenome qrygenome
# Filter alignments
delta-filter -m -i 90 -l 100 out.delta > out.filtered.delta
# Convert alignment information
show-coords -THrd out.filtered.delta > out.filtered.coords
For large or complex genomes, use Minimap2:
minimap2 -ax asm5 -t 24 --eqx refgenome qrygenome | samtools sort -O BAM - > genome_alignment.bam
samtools index genome_alignment.bam
After generating the alignment files, run SyRI:
syri -c out.filtered.coords -d out.filtered.delta -r refgenome -q qrygenome --nosnp
For BAM-based input:
syri -c genome_alignment.bam -r refgenome -q qrygenome -F B --prefix analysis
Use Plotsr to visualize structural rearrangements:
plotsr --sr syri.out --genomes genomes.txt -o genome_plot.png
For multiple genome comparisons:
plotsr --sr sample1_sy.out --sr sample2_sy.out --genomes genomes_multi.txt -o multi_genome_plot.png
Align multiple genomes using Minimap2:
minimap2 -ax asm5 -t 4 --eqx A.fa B.fa | samtools sort -O BAM - > A_B.bam
samtools index A_B.bam
minimap2 -ax asm5 -t 4 --eqx B.fa C.fa | samtools sort -O BAM - > B_C.bam
samtools index B_C.bam
Run SyRI for each comparison:
syri -c A_B.bam -r A.fa -q B.fa -F B --prefix A_B
syri -c B_C.bam -r B.fa -q C.fa -F B --prefix B_C
Plot results:
plotsr --sr A_B_sy.out --sr B_C_sy.out --genomes genomes.txt -o multi_species_plot.png
This `README.md` file provides a clear and structured guide on installing dependencies, running alignments, executing SyRI, and plotting results. Let me know if you need modifications or additional sections! 🚀