macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

比較ゲノミクスのための遺伝子座の可視化ツール LoVis4u

 

 比較ゲノム解析では、ゲノムの遺伝子座のアラインメントを可視化することがよくある。PythonやRのライブラリからスタンドアローンGUIまで、このタスクのためにいくつかのソフトウェアツールが利用可能であるが、高速で自動化された使用法と出版可能なベクター画像の作成を提供するツールが不足している。

ここでは、LoVis4uを紹介する。LoVis4uは、複数のゲノム遺伝子座を高度にカスタマイズ可能かつ高速に可視化するために設計されたコマンドラインツールとPython APIである。LoVis4uは、GenBankまたはGFFファイルからのアノテーションデータに基づいて、PDF形式のベクター画像を生成する。LoVis4uは、原核生物ゲノムのプラスミドやユーザー定義領域だけでなく、バクテリオファージの全ゲノムを可視化することができる。さらに、LoVis4uは、入力配列中のアクセサリー遺伝子やコア遺伝子を同定し、ハイライトするためのオプションのデータ処理ステップを提供する。

LoVis4uはPython3で実装されており、LinuxMacOS上で動作する。コマンドラインインターフェースは、ほとんどの実用的なユースケースをカバーし、提供されるPython APIは、Pythonプログラム内での使用、外部ツールへの統合、追加のカスタマイズを可能にする。ソースコードGitHubページで入手できる:github.com/art-egorov/lovis4u。例によるガイドを含む詳細なドキュメントは、ソフトウェアのホームページから入手できる: art-egorov.github.io/lovis4u

 

10/25追記

 

HP

https://art-egorov.github.io/lovis4u/

Gallery

https://art-egorov.github.io/lovis4u/Gallery/gallery/

 

インストール

ubuntu22.04にcondaで環境を作ってインストールした。また、WSLのubuntu22でもテストした。

#PyPI ( link )
mamba create -n lovis4u python=3.11 -y
conda activate lovis4u
python3 -m pip install lovis4u

#Linuxマシンを使っている場合、インストール後に'lovis4u --linux` コマンドを実行して、Linuxのmmseqsバイナリに切り替える必要がある
lovis4u --linux

#mmseqsが入ってない場合は導入する
mamba install -c conda-forge -c bioconda mmseqs2 -y

> lovis4u -h

LoVis4u (version 0.0.9):

Home page and documentation: https://github.com/art-egorov/lovis4u

The Atkinson Lab 4U | AE

-------------------------------

COMMAND-LINE PARAMETERS

-------------------------------

[POST-INSTALL STEPS]

--data

    Creates the 'lovis4u_data' folder in the current working directory.

    The folder contains adjustable configuration files used by lovis4u

    (e.g. config, palettes...)

--linux

    Replaces the mmseqs path in the pre-made config file from the MacOS

    version [default] to the Linux version.

--mac

    Replaces the mmseqs path in the pre-made config file from the Linux

    version [default] to the MacOS version.

-------------------------------

[MANDATORY ARGUMENTS]

-gff <folder>

    Path to a folder containing extended gff files.

    Each gff file should contain corresponding nucleotide sequence.

    (designed to handle pharokka produced annotation files).

 OR

-gb <folder>

    Path to a folder containing genbank files.

-------------------------------

[OPTIONAL ARGUMENTS | DATA PROCESSING]

-ufid, --use-filename-as-id

    Use filename (wo extension) as track (contig) id instead

    of the contig id written in the gff/gb file.

-laf, --locus-annotation-file <file path>

    Path to the locus annotation table.

    (See documentation for details)

-faf, --feature-annotation-file <file path>

    Path to the feature annotation table.

    (See documentation for details)

-mmseqs-off, --mmseqs-off

    Deactivate mmseqs clustering of proteomes of loci.

-cl-owp, --cluster-only-window-proteins

    Cluster only proteins that are overlapped with

    the visualisation windows, not all.

-fv-off, --find-variable-off

    Deactivate annotation of variable or conserved protein clusters.

-cl-off, --clust_loci-off

    Deactivate defining locus order and using similarity based hierarchical

    clustering of proteomes.

-oc, --one-cluster

    Consider all sequences to be members of one cluster but use clustering

    dendrogram to define the optimal order.

-reorient_loci, --reorient_loci

    Auto re-orient loci (set new strands) if they are not matched.

    (Function tries to maximise co-orientation of homologous features.)

-------------------------------

[OPTIONAL ARGUMENTS | LOCUS VISUALISATION]

-sgc-off, --set-group-colour-off

    Deactivate auto-setting of feature fill and stroke colours.

    (Pre-set colours specified in feature annotation table will be kept.)

-sgcf, --set-group-colour-for <feature_group1 [feature group2 ...]>

    Space-separated list of feature groups for which colours should be set.

    [default: variable, labeled]

-scc, --set-category-colour

    Set category colour for features and plot category colour legend.

-cct, --category-colour-table <file path>

    Path to the table with colour code for categories.

    Default table can be found in lovis4u_data folder.

-lls, --locus-label-style <id|description|full>

    Locus label style based on input sequence annotation.

-llp, --locus-label-position <left|bottom>

    Locus label position on figure.

-safl, --show-all-feature-labels

    Display all feature labels.

-sflf, --show-feature-label-for  <feature_group1 [feature group2 ...]>

    Space-separated list of feature groups for which label should be shown.

    [default: variable, labeled]

-sfflf, --show-first-feature-label-for <feature_group1 [feature group2 ...]>

    Space-separated list of feature group types for which label will be displayed

     only for the first occurrence of feature homologues group.

    [default: shell/core]

-ifl, --ignored-feature-labels <feature_label1 [feature_label2 ...]>

    Space-separated list of feature names for which label won't be shown.

    [default: hypothetical protein, unknown protein]

-sxa, --show-x-axis

    Plot individual x-axis for each locus track.

-hix, --hide-x-axis

    Do not plot individual x-axis for each locus track.

-dml, --draw-middle-line

    Draw middle line for each locus.

-mm-per-nt, --mm-per-nt <float value>

    Scale which defines given space for each nt cell on canvas.

    [default: 0.05]

-fw, --figure-width <float value>

    Output figure width in mm.

-------------------------------

[OPTIONAL ARGUMENTS | ADDITIONAL TRACKS]

-hl, --homology-links

    Draw homology link track.

-slt, --scale-line-track

    Draw scale line track.

-------------------------------

[OPTIONAL ARGUMENTS | OTHERS]

-o <name>

    Output dir name. It will be created if it does not exist.

[default: lovis4u_{current_date}; e.g. uorf4u_2022_07_25-20_41]

--pdf-name <name>

    Name of the output pdf file (will be saved in the output folder).

    [default: lovis4u.pdf]

-c <standard|<file.cfg>

    Path to a configuration file or name of a pre-made config file

    [default: standard]

-------------------------------

[MISCELLANEOUS ARGUMENTS]

-h, --help

    Show this help message and exit.

-v, --version

    Show program version.

--debug

    Provide detailed stack trace for debugging purposes.

--parsing-debug

    Provide detailed stack trace for debugging purposes

    for failed reading of gff/gb files.

-q, --quiet

    Don't show progress messages.

 

 

テストラン

テスト用のデータをカレントにコピーするオプションが用意されている。

lovis4u --data
cd lovis4u_data/guide/

 

実行するにはGFFファイルのディレクトリを指定する。

cd lovis4u_data/guide/
lovis4u -gff gff_files/ -hl --set-category-colour -c A4p2
  • --set-category-colour    Set category colour for features and plot category colour legend.

  • -c    Path to a configuration file or name of a pre-made config file  [default: standard]

結果はディレクトリに保存される。

lovis4u.pdf

 

レイアウトは便利なプリセットパラメータが準備されている。-cで指定する。

(gallaryより転載)


単一配列の視覚化。相同タンパク質群を異なる色でハイライトする。

cd lovis4u/lovis4u/lovis4u_data/guide/
lovis4u -gff single_gff_file/ -hl --set-category-colour -c A4p2 --set-group-colour-for conserved
  • -hl    Draw homology link track.

  • --set-category-colour    Set category colour for features and plot category colour legend.

  • -c    Path to a configuration file or name of a pre-made config file  [default: standard]

  • --set-group-colour-for    Space-separated list of feature groups for which colours should be set. [default: variable, labeled] 

 

78の大腸菌ファージのBASEL phage collection(Maffei et.al. PLOS Biology

 lovis4u -gff BaselCollection/  -hl --set-category-colour -c A4p2 -fw 500

(途中まで)

 

その他

  • "--locus-annotation-file"でTSVを指定することでユーザーが定義した領域を視覚化できる
  • 細菌ゲノム全体ではなく、特定のゲノム領域やプラスミド、ファージなどの視覚化向けに設計されている。

引用

LoVis4u: Locus Visualisation tool for comparative genomics

Artyom A. Egorov,  Gemma C. Atkinson

bioRxiv, Posted September 14, 2024.

 

LoVis4u: a locus visualization tool for comparative genomics and coverage profiles 
Artyom A Egorov, Gemma C Atkinson
NAR Genomics and Bioinformatics, Volume 7, Issue 1, March 2025

 

関連