第3世代のゲノム解読技術により、高品質のゲノムアセンブリの数が急激に増加している。このため、個々の生物種の複数のアセンブルゲノムを比較することが可能になり、その構造的特性を可視化するための新しいツールが求められている。ここでは、ゲノム間の構造の類似性やリアレンジメントを可視化する効率的なツールであるplotsrを紹介する。このツールは、ゲノムを染色体レベルで比較したり、選択した領域を拡大したりするのに利用できる。また、遺伝子やゲノムマーカーなどの領域識別や、GCコンテンツや多型密度などの連続的な特徴のヒストグラムを表示することができます。
plotsrはpythonパッケージとして実装され、プロットには標準的なmatplotlibライブラリを使用する。GitHub (https://github.com/schneebergerlab/plotsr) および bioconda (https://anaconda.org/bioconda/plotsr) にて、MITライセンスの下で自由に利用することができる。
インストール
ubuntu18でmambaを使ってインストールした(python3.10環境)。
依存
- Python >= 3.8
本体 Github
#conda (link)
mamba create -n plotsr python=3.9 -y
conda activate plotsr
mamba install -c bioconda plotsr -y
> plotsr -h
usage: Plotting structural rearrangements between genomes [-h] [--sr SR] [--bp BP] --genomes GENOMES [--markers MARKERS] [--tracks TRACKS] [--chrord CHRORD] [--chrname CHRNAME] [-o O]
[--itx] [--chr CHR] [--reg REG] [--rtr] [--nosyn] [--noinv] [--notr] [--nodup] [-s S] [--cfg CFG] [-R] [-f F] [-H H] [-W W] [-S S]
[-d D] [-b {agg,cairo,pdf,pgf,ps,svg,template}] [-v] [--log {DEBUG,INFO,WARN}] [--version]
Input/Output files:
--sr SR Structural annotation mappings (syri.out) identified by SyRI (default: None)
--bp BP Structural annotation mappings in BEDPE format (default: None)
--genomes GENOMES File containing path to genomes (default: None)
--markers MARKERS File containing path to markers (bed format) (default: None)
--tracks TRACKS File listing paths and details for all tracks to be plotted (default: None)
--chrord CHRORD File containing reference (first genome) chromosome IDs in the order in which they are to be plotted. File requires one chromosome ID per line. Not compatible with
--chr (default: None)
--chrname CHRNAME File containing reference (first genome) chromosome names to be used in the plot. File needs to be a TSV with the chromosome ID in first column and chromosome name
in the second. (default: None)
-o O Output file name. Acceptable format: pdf, png, svg (default: plotsr.pdf)
Data filtering:
--itx Use inter-chromosomal plotting mode (experimental) (default: False)
--chr CHR Select specific chromosome on reference (first genome) and plots them in the given order. Not compatible with --chrord. Can be used multiple time to select more
than one chromosomes. (default: None)
--reg REG Plots a specific region. Use as: GenomeID:ChromosomeID:Start-End. Not compatible with --chr and -R. (default: None)
--rtr When using --reg, plot all SRs that are within the boundaries of the homologous regions. For highly zoomed regions, this could result in visually disconnected
alignments. (default: False)
--nosyn Do not plot syntenic regions (default: False)
--noinv Do not plot inversions (default: False)
--notr Do not plot translocations regions (default: False)
--nodup Do not plot duplications regions (default: False)
-s S minimum size of a SR to be plotted (default: 10000)
Plot adjustment:
--cfg CFG Path to config file containing parameters to adjust plot. (default: None)
-R Join adjacent syntenic blocks if they are not interrupted by SRs. Using this would decrease gaps in the visualisation. (default: False)
-f F font size (default: 6)
-H H height of the plot (default: None)
-W W width of the plot (default: None)
-S S Space for homologous chromosome (0.1-0.75). Adjust this to make more space for annotation markers/texts and tracks. (default: 0.7)
-d D DPI for the final image (default: 300)
-b {agg,cairo,pdf,pgf,ps,svg,template}
Matplotlib backend to use (default: agg)
-v Plot vertical chromosome (default: False)
options:
-h, --help show this help message and exit
--log {DEBUG,INFO,WARN}
Log-level (default: WARN)
--version show program's version number and exit
テストラン
ランには比較するゲノムの染色体レベルのアセンブリ、比較するペアゲノム間の構造アノテーション;ゲノムA、B、Cをこの順番で可視化する場合、A対B、B対Cのゲノム比較の構造アノテーション、が必要。
このテストデータでは、4つのシロイヌナズナゲノム(Col-0,、Ler、Cvi、Eri)が比較されている(SyRで比較するステップで、比較するゲノム間で染色体数が同じである必要がある、染色体名はchr1のように文字を含む必要がある(数字だけだとエラー))。
git clone https://github.com/schneebergerlab/plotsr.git
cd plotsr/example/
gzip -d TAIR10_GFF3_genes.gff.gz
gzip -d 1001genomes.snps.sorted.bed.gz
plotsr --sr col_lersyri.filtered.out --sr ler_cvisyri.filtered.out \
--sr cvi_erisyri.filtered.out --genomes genomes.txt \
--tracks tracks.txt --markers markers.bed --cfg base.cfg \
-o output_plot.png -S 0.5 -W 7 -H 10 -f 8
- --genomes File containing path to genomes (default: None)
- --markers File containing path to markers (bed format) (default: None)
- --tracks File listing paths and details for all tracks to be plotted (default: None)
セットアップツールでインストールしても、condaで入れてもエラーが起きる。
引用
plotsr: Visualising structural similarities and rearrangements between multiple genomes
Manish Goel, Korbinian Schneeberger
Bioinformatics, Published: 15 April 2022
関連