macでインフォマティクス

macでインフォマティクス

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

系統的忠実性が高い高度に保存された20個のシングルコピー遺伝子を使い、細菌ゲノムから自動で系統再構成を行う VBCG

 

 系統学的解析は、細菌の多様性と進化を研究する上で切っても切り離せないものとなっており、多くの異なる細菌のコア遺伝子が照合され、系統樹の再構築に用いられてきた。しかし、これらの遺伝子は、すべての細菌ゲノムにおけるその存在と単一コピー率に基づいて選択されており、遺伝子の「系統学的忠実性」は検討されていない。

 11,262種からの完全長の30,522ゲノムから、これまでに系統学的解析に用いられてきた148の細菌コア遺伝子を調べた。遺伝子の存在とシングルコピー率に加えて、各遺伝子の系統を対応する16S rRNA遺伝子の系統樹と比較することにより、遺伝子の系統的忠実度を評価した。148の細菌遺伝子のうち、20の検証済み細菌コア遺伝子(VBCG)が、細菌の系統学的忠実度が最も高いコア遺伝子セットとして選択された。より大規模な遺伝子セットと比較して、20遺伝子のコアセットは、すべての遺伝子が存在する種が多く、欠損データのある種が少ないという結果をもたらし、系統学的解析の精度を向上させた。大腸菌株を著名な細菌性食中毒病原体の例として用い、16S rRNA遺伝子ツリーのみでは不可能であった、20 VBCGが種および株レベルでより高い忠実度と解像度を持つ系統樹を作成することを実証した。

検証された20のコア遺伝子セットにより、系統学的解析の忠実性とスピードが向上した。他の用途の中でも、このツールはヒト病原体などの細菌株の進化、タイピング、追跡を探求する能力を向上させる。

 

レポジトリより

20 個の検証済みコア遺伝子セットは、系統学的解析の忠実度とスピードを向上させる。他の用途の中でも、このツールはヒト病原体などの細菌株の進化、タイピング、追跡を探求する能力を向上させる。Pythonパイプラインとデスクトップグラフィックアプリ(GitHubで入手可能)を開発し、ユーザーが高い忠実度と解像度で系統解析を行えるようにした。

 

インストール

ubuntu22.04でテストした。windows向けには簡単なGUIアプリが準備されており、.EXE形式のインストーラーをダウンロードできる(link)。

依存

  • Bio >= 1.5.3
  • Pandas
  • Prodigal
  • HMMER

Github

mamba create -n vbcg python=3.9 -y
conda activate vbcg
pip install biopython pandas
mamba install -c bioconda prodigal hmmer

> python bin/vbcg.py -h

usage: vbcg.py [-h] -i INDIR [-H HMM] [-o OUTDIR] [-m {raxml,fasttree}] [-g MISSING_GENES] [-n NPROC]

 

VBCG v1.3

This program build a phylogenomic tree of 20 validated bacterial core genes (VBCG) with input of whole genome sequence FASTA files. In addition, you can specify a custom bacterial core gene set with the option -H. 

The processes include gene prediction with Prodigal, gene annotation with HMMER, protein sequence alignment with Muscle, alignment trimming with Gblock, ML tree reconstruction with FastTree or RAxML.

 

optional arguments:

  -h, --help            show this help message and exit

  -i INDIR, --indir INDIR

                        Input directory with whole genome sequence FASTA files

  -H HMM, --hmm HMM     HMM models for core genes to concatenate. If you use a custom HMM model file, please index it using hmmpress first [Default: /home/kazu/Documents/vbcg/bin/../lib/vbcg.hmm]

  -o OUTDIR, --outdir OUTDIR

                        Output directory [Default: vbcg_out/]

  -m {raxml,fasttree}, --tree_maker {raxml,fasttree}

                        Tools for phylogenetic tree reconstruction. options include fasttree (FastTree) and raxml (RAxML). [Default: fasttree]

  -g MISSING_GENES, --genes MISSING_GENES

                        Number of missing genes allowed for each species [default: 4]

  -n NPROC, --nproc NPROC

                        Number of CPUs to use [default: 10]

 

 

 

実行方法

本プログラムvbcg.pyは、全ゲノム配列FASTAファイルを入力し、20の検証済み細菌コア遺伝子(VBCG)の系統樹を構築する。また、-Hオプションでカスタム細菌コア遺伝子セットを指定することもできる(デフォルトの20遺伝子のHMMファイルはインストール時に含まれている)。vbcg.pyを実行することで、Prodigalによる遺伝子予測、HMMERによる遺伝子アノテーション、Muscleによるタンパク質配列アライメント、Gblockによるアライメントトリミング、FastTreeまたはRAxMLによるMLツリー再構築が行われる。

 

実行するには、ゲノムのfastaファイル(.gzやzip圧縮していても、非圧縮でもOK)を配置したディレクトリと出力ディレクトリ、系統学的再構築のためのツール、使用スレッド数を指定する。

python bin/vbcg.py -i input_genomes/ -o outdir -m fasttree
  • -i      Input directory with whole genome sequence FASTA files
  • -o     Output directory [Default: vbcg_out/]
  • -m {raxmlfasttree}   Tools for phylogenetic tree reconstruction. options include fasttree (FastTree) and raxml (RAxML). [Default: fasttree]
  • -n     Number of CPUs to use [default: 10]

fastaファイルのディレクトリにFASTA以外のファイルやサブフォルダは含めてはならない。また、ディレクトリ名やファイル名にスペースを含めない)

 

ゲノム10個を用いてテストしたところ、計算は1分以内に終了した(3990X、20スレッド指定)。

出力例

> ls -alth outdir/

 

論文より

  • これまでの研究はすべて、遺伝子の存在比とシングルコピー比を利用して、保存されたシングルコピー遺伝子をスクリーニングし、系統樹を構築してきた。しかし、これには明らかな欠点がある。すなわち、選択された遺伝子は系統樹を再構築する際に忠実であるかどうか調べられておらず、その結果、進化のシグナルが一致しない可能性があることである。コアゲノムの系統樹は、他の複数遺伝子系統樹と同様に、選択された遺伝子セットの連結配列に基づいて再構築される。ある遺伝子を含むと、その遺伝子の系統樹が他の遺伝子の系統樹と不一致を示す時、進化のシグナルが低下し、その結果得られる系統樹トポロジーと解像度の精度が低下する。従って、正確な系統樹を再構築するためにコアゲノムの遺伝子を選択するためには、高い存在率と単一コピー比に加えて、遺伝子セット内の遺伝子の系統樹の一致度を示す指標である系統樹忠実度についても調べる必要があることを提案する。ここでは、16 s rRNA遺伝子ツリーを用いて、コア遺伝子候補の系統的忠実度を評価・比較し、細菌系統学的解析のための20の高忠実度遺伝子を同定した。このコア遺伝子セットを用いて、ゲノム配列を入力として系統樹を自動構築するパイプラインVBCGを開発した。

引用

VBCG: 20 validated bacterial core genes for phylogenomic analysis with high fidelity and resolution

Renmao Tian, Behzad Imanian 

Microbiome. 2023 Nov 8;11(1):247

関連

最新のバクテリアコア遺伝子セットを使った系統解析パイプライン UBCG2

 

膣内細菌叢の16S rRNA遺伝子の分類学的分類を配列ごとに迅速かつ正確に行う SpeciateIT

 

 大量の16S rRNA遺伝子配列を分類学的に分類するには、OTUへのクラスタリングやノイズ除去法が主流である。本著者らは、個々のアンプリコン配列を迅速かつ正確に分類する新しい分類学的分類ツールspeciateITを開発した(https://github.com/Ravel-Laboratory/speciateIT)。環境特異的な参照データベースは一般的に最適な分類学的割り当てをもたらす。この目的のために、膣内細菌叢からの16S rRNA遺伝子アンプリコン配列の分類学的分類のためのカスタム参照データベースであるvSpeciateDBも紹介する。speciateITは、他のアルゴリズムと比較して最小限の計算資源しか必要とせず、vSpeciateDBと組み合わせることで、環境特異的な方法で正確な種レベルの分類が可能であることを示す。

ここでは、新しく実用的に重要な 2 つのリソースについて説明する。新規の分類アルゴリズムであるspeciateITは、7次マルコフ連鎖モデルに基づいており、高速かつ正確な配列ごとの分類学的割り当てが可能である(107配列で最短10分)。その意義は、この環境特異的データベースの優位性にあり、普遍的なデータベースと比較して、より多くの種の解像度を提供する。

 

レポジトリより

SpeciateITは、高速で正確な個々の配列の分類学的分類が可能なアルゴリズムである。また、モデルvSpeciateDBは、膣内細菌叢を分類するためカスタム参照配列セットから構築されたモデルである。分類学的に調整されたアンプリコン特異的領域配列でトレーニングされた細菌種を表現するモデルガイドツリーと7次マルコフ連鎖モデルを使用することで、speciateITはわずかな計算リソースで、大規模な配列データセットを迅速に処理することができる。

インストール

Makefilemacosx用に設定されているのでmacでビルドした(Linuxマシン用にビルドする場合、CC、CXX、LINKをそれぞれgcc、g++、g++に変更する。また、LDFLAGSも変更する必要がある)。

git clone https://github.com/ravel-lab/speciateIT.git
cd speciateIT/
figshare(link)から3つのモデルをダウンロードし、vSpeciateDB_modelsに配置する
#それから
make all
export PATH="$PWD/bin/:$PATH"

> classify

$ classify

 

ERROR in ./classify.cc at line 285: Input fasta file is missing. Please specify it with the -i flag.

 

Given a fasta file of query sequences, a directory of MC model files and the reference tree

classify each sequence of the fasta file to a taxonomic rank corresponding to model

with the highest probability given that the | log( p(x | M_L) / p(x | M_R) | > thld (obsolete) 

 

 

USAGE 

 

 Using prebuilt MC models to classify sequences of an input fasta file

 

classify -d < MC models directory> -i <input fasta file> -o <output directory> [Options]

 

Options:

-d <mcDir>      - directory containing MC model files

-o <outDir>     - output directory for MC taxonomy files

-i <inFile>     - input fasta file with sequences for which -log10(prob(seq | model_i)) are to be computed

-r <model tree> - model tree with node labels corresponding to the names of the model files

-t <trgFile>    - file containing paths to training fasta files

-f <fullTx>     - fullTx file. Its optional parameter for printing classification output in a long format like in RDP classifier

-g <faDir>      - directory with reference fasta files

--rev-comp, -c          - reverse complement query sequences before computing classification posterior probabilities

--skip-err-thld         - classify all sequences to the species level

--pp-embedding          - for each internal node report pp's of all children on the given sequence.

                            Each internal node's table is written to a file <node name>_ref_lpps.txt (log posterior probabilities)

--max-num-amb-codes <n> - maximal acceptable number of ambiguity codes for a sequence

                          above this number sequence's log10prob() is not computed and

                          the sequence's id it appended to <genus>_more_than_<n>_amb_codes_reads.txt file.

                          Default value: 5

 

--pseudo-count-type, -p <f>  - f=0 for add 1 to all k-mer counts zero-offset

                              f=1 for add 1/4^k to k-mer counts zero-offset

                              f=2 the pseudocounts for a order k+1 model be alpha*probabilities from

                                  an order k model, recursively down to pseudocounts of alpha/num_letters

                                  for an order 0 model.

-q|--quiet           - suppers pregress messages

-v|--verbose         - verbose mode

-h|--help            - this message

 

Conditional probabitity tables are store in

<file_i>.MC<order>.log10cProb

 

 

Output file format:

 

seqId   model1        model2 ...

seq_1   log10prob11   log10prob12  ...

seq_2   log10prob21   log10prob22  ...

...

 

where log10prob_ij is log10 of the prob(seq_i | model_j)

 

 

Example: 

classify -d vaginal_v2_MCdir -f vaginal_v2.fullTx -i vaginal_v2.1.fa -o testDir

 

classify -d vaginal_v2_MCdir -r vaginal_v2_dir/model.tree -i vaginal_v2.1.fa -o testDir

 

classify -e 2BVBACT-97 -t vaginal_v2_dir/spp_paths.txt -k 8 -r vaginal_sppCondensed_v2i.tree -o testDir

 

 

 

テストラン

モデルと配列を指定する。

cd speciateIT/
classify -d vSpeciateDB_models/vSpeciateIT_V3V4 -i test.fasta -o MyProject

#force species-level annotations
classify -d vSpeciateDB_models/vSpeciateIT_V3V4 -i test.fasta -o MyProject --skip-err-thld
  • -d    directory containing MC model files
  • -o    output directory for MC taxonomy files
  • -i     input fasta file with sequences for which -log10(prob(seq | model_i)) are to be computed
  • --skip-err-thld    classify all sequences to the species level

膣内細菌叢の SpeciateIT モデルには、16S rRNA 遺伝子 V1-V3、V3-V4、および V4 領域配列のトレーニングセットが含まれている。

 

出力

> cat MyProject/MC_order7_results.txt 

 

  • training_data/のCatMap.txtファイルは各領域で提供され、対象となる可変領域でどの生物種が区別できないかを示す。

引用

SpeciateIT and vSpeciateDB: Novel, fast and accurate per sequence 16S rRNA gene taxonomic classification of vaginal microbiota

Johanna B. Holm, Pawel Gajer,  Jacques Ravel

bioRxiv, Posted April 22, 2024.

 

 

DNA配列中のk-merを2次元空間に視覚化する KMAP

 

 DNA配列中のパターンを同定し図示することは、様々な生物学的データ解析において極めて重要な作業である。この作業では、DNA配列の基本的な構成要素であるkmmerの集合によってパターンが表現されることが多い。これらのパターンを視覚的に明らかにするためには、各kmerを2次元空間の点に投影すればよい。しかし、この投影は、kmerの高次元の性質とそのユニークな数学的性質のために困難が伴う。そこで、本著者らはkmer多様体の特異性に対処する数学的体系を確立した。このkmer多様体理論を活用して、kmerパターンを検出し、2次元空間で可視化するKMAPと名付けた統計的手法を開発した。KMAPを3つの異なるデータセットに適用し、その有用性を示した。KMAPは、HT-SELEXデータからのモチーフ発見において、約90%の類似性を示し、古典的手法MEMEと同等の性能を達成した。ユーイング肉腫(EWS)のH3K27ac ChIP-seqデータの解析では、BACH1、OTX2、ERG1がゲノム全体のプロモーター領域やエンハンサー領域に結合することで、EWSの予後に影響を与える可能性があることを見出した。また、ETV6の分解後にFLI1がエンハンサー領域に結合することを見出し、ETV6とFLI1の競合的結合を示した。さらに、KMAPはAAVS1遺伝子座の遺伝子編集データにおいて4つの一般的なパターンを同定し、文献で報告された知見と一致した。これらの応用は、KMAPが様々な生物学的背景において価値あるツールとなり得ることを強調している。KMAPはhttps://github.com/chengl7-lab/kmapから利用できる。

 

インストール

レポジトリの指示に従ってubuntu22で環境を作ってテストした(RTX3090使用)。

Github

mamba create --name=kmap_test python=3.11 -y
conda activate kmap_test
mamba install anaconda::scipy -y
mamba install anaconda::scipy -y
mamba install anaconda::numpy -y
mamba install anaconda::matplotlib -y
mamba install anaconda::pandas -y
mamba install anaconda::click -y
mamba install anaconda::tomli-w -y
mamba install anaconda::requests -y
mamba install conda-forge::biopython -y
mamba install bioconda::logomaker -y
pip install taichi
pip install kmer-map

> kmap

$ kmap

[Taichi] version 1.7.1, llvm 15.0.4, commit 0f143b2f, linux, python 3.11.9

[Taichi] Starting on arch=cuda

GPU is available

 

This software is affiliated with the following paper:

Title: Your Paper Title

Authors: First Author, Second Author, Third Author

Journal: Journal Name

Year: 2023

DOI: https://doi.org/your-paper-doi

Usage: kmap [OPTIONS] COMMAND [ARGS]...

 

  KMAP: visualize kmers in 2d.

 

Options:

  --help  Show this message and exit.

 

Commands:

  draw_logo

  ex_hamball

  preproc

  scan_motif

  visualize_kmers

kmap visualize_kmers --help

[Taichi] version 1.7.1, llvm 15.0.4, commit 0f143b2f, linux, python 3.11.9

[Taichi] Starting on arch=cuda

GPU is available

 

This software is affiliated with the following paper:

Title: Your Paper Title

Authors: First Author, Second Author, Third Author

Journal: Journal Name

Year: 2023

DOI: https://doi.org/your-paper-doi

Usage: kmap visualize_kmers [OPTIONS]

 

Options:

  --res_dir TEXT   Result directory for storing all outputs  [required]

  --debug BOOLEAN  display debug information.

  --help           Show this message and exit.

 

 

テストラン

1、テストラン用のfastaファイルの前処理。

git clone https://github.com/chengl7-lab/kmap.git
cd kmap/
mkdir test && cp tests/test.fa test/
kmap preproc --fasta_file ./test/test.fa --res_dir ./test

 

2、モチーフのスキャン。

kmap scan_motif --res_dir ./test --debug true

10分くらいかかる。

 

3、kmersの可視化。

kmap visualize_kmers --res_dir ./test --debug True

ld_data.pdf

10分ほどかかった。

 

レポジトリより

  • ./test/config.tomlファイルを編集し、第3セクションの可視化前にn_max_iter = 2500をn_max_iter = 100に変更する。これで最適化ステップが2500から100に減り、実行時間が大幅に短縮される。

引用

KMAP: Kmer Manifold Approximation and Projection for visualizing DNA sequences

Chengbo Fu, Einari A. Niskanen, Gong-Hong Wei, Zhirong Yang, Marta Sanvicente-García, Marc Güell,  Lu Cheng

bioRxiv, Posted April 15, 2024.

 

高速かつ様々なプロファイルに対応可能な、次世代シークエンシングデータの次世代のシミュレーター NGSNGS

 

 シークエンシングの世代が変わるにつれてDNAシークエンサーの性能が急速に向上し、生成されるデータ量も増加した。この進化は、新しいバイオインフォマティクスの手法にもつながっており、モデルの精度やゲノム解析パイプラインの頑健性を検証する際に、in silicoデータが非常に重要になってきている。ここでは、現在利用可能な手法やプログラムよりも高速にリードをシミュレートする、次世代シーケンサーデータ用のマルチスレッド次世代シミュレーター(NGSNGS)を紹介する。NGSNGSは、ヌクレオチド品質スコアプロファイルに基づくプラットフォーム固有の特性を持つリードのシミュレーションが可能であり、古代DNAのシミュレーションに関連する死後損傷モデルも含んでいる。シミュレートされた配列は、ハプロイドゲノム、ポリプロイドアセンブリ、あるいは集団ハプロタイプを表すことができるリファレンスDNAゲノムから(置換を伴って)サンプリングされ、ユーザーは既知の可変部位を直接シミュレートすることができる。このプログラムはマルチスレッドフレームワークで実装されており、現在利用可能なツールよりも高速である。本手法と関連プログラムはオープンソースソフトウェアとして公開されており、コードとユーザーマニュアルはhttps://github.com/RAHenriksen/NGSNGSから利用できる。

 

インストール

htslibが必要。NGSNGSのmake時、HTSSRC環境変数にhtslibライブラリのパスを指定する。

git clone https://github.com/RAHenriksen/NGSNGS.git
cd NGSNGS/
git clone https://github.com/samtools/htslib.git
cd htslib/
git submodule update --init --recursive
make -j20
cd ../
make HTSSRC=./htslib -j20

> ./ngsngs

Next Generation Simulator for Next Generation Sequencing Data version v0.9.2.2: 37be551

 

Usage

./ngsngs [options] -i <input_reference.fa> -r/-c <Number of reads or depth of coverage> -l/-lf/-ld <fixed length, length file or length distribution> -seq <SE/PE> -f <output format> -o <output name prefix>

 

Example 

./ngsngs -i Test_Examples/Mycobacterium_leprae.fa.gz -r 100000 -t 2 -s 1 -lf Test_Examples/Size_dist_sampling.txt -seq SE -m b,0.024,0.36,0.68,0.0097 -q1 Test_Examples/AccFreqL150R1.txt -f bam -o MycoBactBamSEOut

 

./ngsngs -i Test_Examples/Mycobacterium_leprae.fa.gz -c 3 -t 2 -s 1 -l 100 -seq PE -ne -a1 AGATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATTCGATCTCGTATGCCGTCTTCTGCTTG -a2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATTT -q1 Test_Examples/AccFreqL150R1.txt -q2 Test_Examples/AccFreqL150R2.txt -f fq -o MycoBactFqPEOut

 

./ngsngs -i Test_Examples/Mycobacterium_leprae.fa.gz -r 100000 -t 1 -s 1 -ld Pois,78 -seq SE -mf Test_Examples/MisincorpFile.txt -f fa -o MycoBactFaSEOut

 

./ngsngs -i Test_Examples/Mycobacterium_leprae.fa.gz -r 100000 -t 1 -s 1 -lf Test_Examples/Size_dist_sampling.txt -ll 50 -seq SE -qs 40 -f fq -o MycoBactFqQsLlSEOut

 

./ngsngs -i Test_Examples/hg19MSub.fa -r 1000 -t 1 -s 100 -l 150 -seq SE -ne -vcf Test_Examples/ChrMtSubDeletionDiploid.vcf -id 0 -q1 Test_Examples/AccFreqL150R1.txt -chr MT -DumpVCF DeltionInfo -f fq -o MtDeletionOut 

 

-h   | --help:  Print help page.

 

-v   | --version:  Print NGSNGS version, git commit and htslib library.

 

----- Required ----- 

 

-i   | --input:  Reference file in fasta format (.fa,.fasta) to sample reads.

 

Sequence reads: 

 

-r   | --reads:  Number of reads to simulate, conflicts with -c option.

-c   | --coverage:  Depth of Coverage to simulate, conflics with -r option.

 

Fragment Length: 

 

-l   | --length:  Fixed length of simulated fragments, conflicts with -lf & -ld option.

-lf  | --lengthfile:  CDF of a length distribution, conflicts with -l & -ld option.

-ld  | --lengthdist:  Discrete or continuous probability distributions, given their Probability density function, conflicts with -l & -lf option.

<Uni,Min,Max>  Uniform distribution from a closed interval given a minimum and maximum positive integer, e.g. Uni,40,180.

<Norm,Mean,Variance>  Normal Distribution, given a mean and variance, e.g. Norm,80,30.

<LogNorm,Mean,Variance>  Log-normal Distribution, given a mean and variance, e.g. LogNorm,4,1.

<Pois,Rate>  Poisson distribution, given a rate, e.g. Pois,165.

<Exp,Rate>  Exponential distribution, given a rate, e.g. Exp,0.025.

<Gam,Shape,Scale>  Gamma distribution, given a shape and scale, e.g. Gam,20,2.

 

Output characteristics: 

 

-seq | --sequencing:  Simulate single-end or paired-end reads.

<SE> single-end 

  <PE> paired-end.

-f   | --format:  File format of the simulated output reads.

Nucletide sequence w. different compression levels. 

<fa||fasta> 

<fa.gz||fasta.gz>

Nucletide sequence with corresponding quality score w. different compression levels. 

<fq||fastq> 

<fq.gz||fastq.gz>

Sequence Alignment Map w. different compression levels. 

<sam||bam||cram>

-o   | --output:  Prefix of output file name.

 

Format specific: 

 

-q1  | --quality1:  Read Quality profile for single-end reads (SE) or first read pair (PE) for fastq or sequence alignment map formats.

-q2  | --quality2:  Read Quality profile for for second read pair (PE) for fastq or sequence alignment map formats.

-qs  | --qualityscore:  Fixed quality score, for both read pairs in fastq or sequence alignment map formats. It overwrites the quality profiles.

 

----- Optional ----- 

 

Reference Variations: 

 

-mr | --mutationrate:  Adding stochastic variations to the reference genome (-i) from a fixed mutation rate, conflicts with number of variations (-v), default = 0.0

-g | --generations:  Adding stochastic variations to the reference genome (-i) according to the fixed mutation rate (-mr) across numerous generations, default = 1

-v | --variations:  Adding a fixed number of stochastic variations to the reference genome (-i), conflicts with mutation rate (-mr), default = 0

 

Genetic Variations: 

 

-bcf | -vcf:  Variant Calling Format (.vcf) or binary format (.bcf)

-id  | --indiv:  Integer value (0 - index) for the number of a specific individual defined in bcf header from -vcf/-bcf input file, default = -1 (no individual selected).

e.g -id 0 First individual in the provided vcf file.

-DumpVCF: The prefix of an internally generated fasta file, containing the sequences representing the haplotypes with the variations from the provided vcf file (-vcf|-bcf), for diploid individuals the fasta file contains two copies of the reference genome with the each allelic genotype.

 

Stochastic Variations: 

 

-indel:  Input probabilities and lambda values for a geometric distribution randomly generating insertions and deletions of a random length.

<InsProb,DelProb,InsParam,DelParam>  

Insertions and deletions -indel 0.05,0.1,0.1,0.2 

Only Insertions -indel 0.05,0.0,0.1,0.0 

Only Deletions -indel 0.0,0.5,0.0,0.9 

-DumpIndel:  The prefix of an internally generated txt file, containing the the read id, number of indels, the number of indel operations saving the position before and after and length of the indel, simulated read length before and after, see supplementary material for detailed example and description.

 

Postmortem damage (PMD) - Deamination: 

 

-m   | --model:  Choice of deamination model.

<b,nv,Lambda,Delta_s,Delta_d>  || <briggs,nv,Lambda,Delta_s,Delta_d>  Parameters for the damage patterns using the Briggs model altered to suit modern day library preparation.

<b7,nv,Lambda,Delta_s,Delta_d> || <briggs07,nv,Lambda,Delta_s,Delta_d>  Parameters for the damage patterns using the Briggs model 2007.

nv: Nick rate per site. 

  Lambda: Geometric distribution parameter for overhang length.

  Delta_s: PMD rate in single-strand regions.

  Delta_d: PMD rate in double-strand regions.

e.g -m b,0.024,0.36,0.68,0.0097

 

-dup | --duplicates:  Number of PCR duplicates, used in conjunction with briggs modern library prep -m <b,nv,Lambda,Delta_s,Delta_d>

<1,2,4>  Default = 1

 

Nucleotide Alterations: 

 

-mf  | --mismatch:  Nucleotide substitution frequency file.

-ne  | --noerror:  Disabling the sequencing error substitutions based on nucleotide qualities from the provided quality profiles -q1 and -q2.

 

Read Specific: 

 

-na  | --noalign:  Using the SAM output as a sequence container without alignment information.

-cl  | --cycle:  Read cycle length, the maximum length of sequence reads, if not provided the cycle length will be inferred from quality profiles (q1,q2).

-ll  | --lowerlimit:  Lower fragment length limit, default = 30. The minimum fragment length for deamination is 30, so simulated fragments below will be fixed at 30.

-bl  | --bufferlength:  Buffer length for generated sequence reads stored in the output files, default = 30000000.

-chr | --chromosomes:  Specific chromosomes from input reference file to simulate from.

 

-a1  | --adapter1:  Adapter sequence to add for simulated reads (SE) or first read pair (PE).

e.g. Illumina TruSeq Adapter 1: AGATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATTCGATCTCGTATGCCGTCTTCTGCTTG 

 

-a2  | --adapter2:  Adapter sequence to add for second read pair (PE). 

e.g. Illumina TruSeq Adapter 2: AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATTT 

 

-p   | --poly:  Create Poly(X) tails for reads, containing adapters with lengths below the inferred readcycle length. 

  e.g -p G or -p A 

 

Simulation Specific: 

 

-t   | --threads:  Number of sampling threads, default = 1.

-t2  | --threads2:  Number of compression threads, default = 0.

-s   | --seed:  Random seed, default = current calendar time (s).

-rng | --rand:  Pseudo-random number generator, OS specific

<0,1,2,3> 

0 :   drand48_r, default for linux or unix, not available for MacOS.

1 :   std::uniform_int_distribution

2 :   rand_r

3 :   erand48, default for MacOS.

 

 

実行方法

1、ヒトhg19.faから1000リードをシミュレートする。100塩基長、出力fastqはfq.gz、シングルエンド、1スレッド使用。fastqとsamのシミュレーションでは、リードのクオリティプロファイルのテキストも指定する必要がある。Test_Examplesのプロファイルを指定する。

ngsngs -i hg19.fa -r 1000 -f fq.gz -l 100 -seq SE -t 1 -q1 Test_Examples/AccFreqL150R1.txt -o prefix
  • -i     Reference file in fasta format (.fa,.fasta) to sample reads.

  • -r     Number of reads to simulate, conflicts with -c option.

  • -c    Depth of Coverage to simulate, conflics with -r option.

  • -l      Fixed length of simulated fragments, conflicts with -lf & -ld option.

  • -t      Number of sampling threads, default = 1.

  • -q1   Read Quality profile for single-end reads (SE) or first read pair (PE) for fastq or sequence alignment map formats.
  • -o     Prefix of output file name.
  • -f      File format of the simulated output reads. Nucletide sequence w. different compression levels. 
    <fa || fasta
    <fa.gz || fasta.gz
      Nucletide sequence with corresponding quality score w. different compression levels. 
      <fq || fastq
      <fq.gz || fastq.gz
      Sequence Alignment Map w. different compression levels. 
      <sam || bam || cram
  • -seq     Simulate single-end or paired-end reads.
    <SE> single-end 
    <PE> paired-end.

prefix.fq.gzが出力される。

 

2、hg19.faから 1000 リードをシミュレート。シングルエンド、固定品質スコア、下限フラグメント長50。

./ngsngs -i hg19.fa -r 1000 -f fq -lf Test_Examples/Size_dist_sampling.txt -ll 50 -seq SE -t 1 -qs 40 -o prefix
  • -ll      Lower fragment length limit, default = 30. The minimum fragment length for deamination is 30, so simulated fragments below will be fixed at 30.

  • -qs    Fixed quality score, for both read pairs in fastq or sequence alignment map formats. It overwrites the quality profiles.

 

3、hg19.faから 1000 リードをシミュレート。ペアエンド (-seq)、フラグメント(インサート)長は正規分布で平均350塩基長、SD 20、サイクル長を固定 (-cl)、2つの独立した品質プロファイル (-q1,-q2) で生成する。

./ngsngs -i hg19.fa -r 1000 -f fq -ld norm,350,20 -cl 100 -seq PE -t 1 -q1 Test_Examples/AccFreqL150R1.txt -q2 Test_Examples/AccFreqL150R2.txt -o prefix
  • -ld     Discrete or continuous probability distributions, given their Probability density function, conflicts with -l & -lf option.
     <UniMinMax>   Uniform distribution from a closed interval given a minimum and maximum positive integer, e.g. Uni,40,180.
     <Norm, Mean, Variance>   Normal Distribution, given a mean and variance, e.g. Norm,80,30.
     <LogNorm, Mean, Variance>  Log-normal Distribution, given a mean and variance, e.g. LogNorm,4,1.
     <Pois,Rate>   Poisson distribution, given a rate, e.g. Pois,165.
     <Exp,Rate>   Exponential distribution, given a rate, e.g. Exp,0.025.
     <Gam,Shape,Scale>   Gamma distribution, given a shape and scale, e.g. Gam,20,2.

  • -cl     Read cycle length, the maximum length of sequence reads, if not provided the cycle length will be inferred from quality profiles (q1,q2).
  • -q1    Read Quality profile for single-end reads (SE) or first read pair (PE) for fastq or sequence alignment map formats.
  • -q2    Read Quality profile for for second read pair (PE) for fastq or sequence alignment map formats.
  • -qs     Fixed quality score, for both read pairs in fastq or sequence alignment map formats. It overwrites the quality profiles. 

prefix_R1.fqとprefix_R2.fqが出力される。

 

4、hg19.faから 1000 リードをシミュレート。プラットフォーム固有のエラーを無効化(-ne)、Briggs 2007モデルによる脱アミノ化パターンを追加、古代のフラグメント長分布(-lf)、シード4(-s)を使用。

./ngsngs -i hg19.fa -r 1000 -f fq -s 4 -ne -lf Test_Examples/Size_dist_sampling.txt -seq SE -m b7,0.024,0.36,0.68,0.0097 -q1 Test_Examples/AccFreqL150R1.txt -o prefix
  • -ne     Disabling the sequencing error substitutions based on nucleotide qualities from the provided quality profiles -q1 and -q2.

  • -lf      CDF of a length distribution, conflicts with -l & -ld option.
  •  -s      Random seed, default = current calendar time (s).
  • -m     Choice of deamination model.  <b,nv,Lambda,Delta_s,Delta_d>  || <briggs,nv,Lambda,Delta_s,Delta_d>   Parameters for the damage patterns using the Briggs model altered to suit modern day library preparation.<b7,nv,Lambda,Delta_s,Delta_d> || <briggs07,nv,Lambda,Delta_s,Delta_d>  Parameters for the damage patterns using the Briggs model 2007.
      nv: Nick rate per site. 
       Lambda: Geometric distribution parameter for overhang length.
       Delta_s: PMD rate in single-strand regions.
       Delta_d: PMD rate in double-strand regions.
      e.g -m b,0.024,0.36,0.68,0.0097 

 

5、hg19.faから 1000 リードをシミュレート。ペアエンドリード、フラグメント(インサート)長400、Quality Profile (-q1)の分布からサイクル長150とし、内部距離100(400-150*2)と推定、アダプターを追加。

./ngsngs -i hg19.fa -r 1000 -f fq -l 400 -seq PE -q1 Test_Examples/AccFreqL150R1.txt -q2 Test_Examples/AccFreqL150R1.txt -a1 AGATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATTCGATCTCGTATGCCGTCTTCTGCTTG -a2 AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATTT -o prefix
  • -a1    Adapter sequence to add for simulated reads (SE) or first read pair (PE).
      e.g. Illumina TruSeq Adapter 1: AGATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATTCGATCTCGTATGCCGTCTTCTGCTTG 

  • -a2    Adapter sequence to add for second read pair (PE). 
      e.g. Illumina TruSeq Adapter 2: AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTAGATCTCGGTGGTCGCCGTATCATTT  

  • -l      Fixed length of simulated fragments, conflicts with -lf & -ld option.

 

6、hg19.faから 1000 リードをシミュレート。シングルエンド、アダプター配列付与、ポリGテール(-p)付与。

./ngsngs -i hg19.fa -r 1000 -f fq -l 80 -seq SE -q1 Test_Examples/AccFreqL150R1.txt -a1 AGATCGGAAGAGCACACGTCTGAACTCCAGTCACCGATTCGATCTCGTATGCCGTCTTCTGCTTG -p G -o prefix
  • -p      Create Poly(X) tails for reads, containing adapters with lengths below the inferred readcycle length.  e.g -p G or -p A

 

レポジトリから

  • 実行可能なフラグメント長の上限は10,000で、30塩基以下のフラグメントは脱アミノ化されない。
  • 1024以上のフラグメントの脱アミノ化をシミュレートする場合、相補的なG>A置換で3'末端は脱アミノされない。
  • これらは今後のリリースで修正される予定。
  • 1千万のシングルエンドリードのシミュレーションに要した時間は16秒だった(20スレッド、3990X CPU使用)。

引用

NGSNGS: next-generation simulator for next-generation sequencing data 

Rasmus Amund Henriksen,   Lei Zhao,   Thorfinn Sand Korneliussen  Author Notes

Bioinformatics, Volume 39, Issue 1

 

アノテーションされたトランスポーザブル・エレメント(TE)のキュレーションを支援する TEtrimmer

 

レポジトリより

トランスポーザブル・エレメント(TE)の発見とアノテーションのために多くのツールが開発されている。しかし、高品質なTEコンセンサスライブラリーの構築には、依然としてTEを手作業でキュレーションする必要があり、それには時間がかかり、専門家が必要である。

TEtrimmerは、TEの手動キュレーションを自動化するために設計された強力なソフトウェアである。入力は、EDTA2やRepeatModeler2などのde novo TE探索ツールによるTEライブラリ、または近縁種のTEライブラリである。各入力コンセンサス配列に対して、TEtrimmerは自動的にBLAST、配列抽出、伸長、多重配列アライメント(MSA)、MSAクラスタリング、MSAクリーニング、TE境界定義、およびTE分類を実行する。TEtrimmerはまた、予測されたTEを検査し、改善するためのグラフィカルユーザーインターフェースGUI)を提供し、手作業によるキュレーションレベルのTEコンセンサスライブラリーを容易に達成できるよう支援する。

 

 

manual

https://github.com/qjiangzhao/TEtrimmer/blob/main/docs/TEtrimmerv1.2.0Manual.pdf

 

インストール

ubuntu22でレポジトリの指示に従ってインストールした。macOSではTEtrimmer condaパッケージを直接インストールできる(レポジトリ参照)。

依存

Github

git clone https://github.com/qjiangzhao/TEtrimmer.git
cd TEtrimmer/
mamba env create -f TEtrimmer_env_for_linux.yml
conda activate TEtrimmer

> python tetrimmer/TEtrimmer.py --help

Usage: TEtrimmer.py [OPTIONS]

 

  ##########################################################################################

  

  ████████╗███████╗████████╗██████╗ ██╗███╗   ███╗███╗   ███╗███████╗██████╗ 

  ╚══██╔══╝██╔════╝╚══██╔══╝██╔══██╗██║████╗ ████║████╗ ████║██╔════╝██╔══██╗

     ██║   █████╗     ██║   ██████╔╝██║██╔████╔██║██╔████╔██║█████╗  ██████╔╝

     ██║   ██╔══╝     ██║   ██╔══██╗██║██║╚██╔╝██║██║╚██╔╝██║██╔══╝  ██╔══██╗

     ██║   ███████╗   ██║   ██║  ██║██║██║ ╚═╝ ██║██║ ╚═╝ ██║███████╗██║  ██║

     ╚═╝   ╚══════╝   ╚═╝   ╚═╝  ╚═╝╚═╝╚═╝     ╚═╝╚═╝     ╚═╝╚══════╝╚═╝  ╚═╝

     

   Version: v1.2.0 (19/April/2024) 

 

   Github: https://github.com/qjiangzhao/TEtrimmer

 

   Developers:

   Jiangzhao Qian;      RWTH Aachen University;                Email: jqian@bio1.rwth-aachen.de

   Hang Xue;            University of California, Berkeley;    Email: hang_xue@berkeley.edu

   Stefan Kusch;        Research Center Juelich;               Email: s.kusch@fz-juelich.de

 

   Funding source:

   Ralph Panstruga Lab; RWTH Aachen University;                Email: panstruga@bio1.rwth-aachen.de

   Website: https://www.bio1.rwth-aachen.de/PlantMolCellBiology/index.html

 

   ##########################################################################################

 

   python ./path_to_TEtrimmer_bin/TEtrimmer.py -i <TE_consensus_file> -g <genome_file>

 

   TEtrimmer is designed to replace manual curation of transposable elements (TEs).

 

   Two mandatory arguments are required, including   <genome file>, the genome FASTA file, and   <TE consensus file>

   from TE annotation software like RepeatModeler, EDTA, or REPET.   TEtrimmer can do BLAST, sequence extension,

   multiple sequence alignment, and defining TE boundaries.

 

Options:

  -i, --input_file TEXT           Path to TE consensus file (FASTA format). Use the output from RepeatModeler, EDTA,

                                  REPET, et al.  [required]

  -g, --genome_file TEXT          Path to genome FASTA file (FASTA format).  [required]

  -o, --output_dir TEXT           Path to output directory. Default: current working directory.

  -s, --preset [conserved|divergent]

                                  Choose one preset config (conserved or divergent).

  -t, --num_threads INTEGER       Thread number used for TEtrimmer. Default: 10

  --classify_unknown              Use RepeatClassifier to classify the consensus sequence if the input sequence is not

                                  classified or is unknown or the processed sequence length by TEtrimmer is 2000 bp

                                  longer or shorter than the query sequence.

  --classify_all                  Use RepeatClassifier to classify every consensus sequence. WARNING: This may take a

                                  long time.

  -ca, --continue_analysis        Continue from previous unfinished TEtrimmer run and would use the same output

                                  directory.

  --dedup                         Remove duplicate sequences in input file.

  -ga, --genome_anno              Perform genome TE annotation using RepeatMasker with the TEtrimmer curated TE

                                  libraries.

  --hmm                           Generate HMM files for each processed consensus sequence.

  --debug                         debug mode. This will keep all raw files. WARNING: Many files will be generated.

  --fast_mode                     Reduce running time at the cost of lower accuracy and specificity.

  -pd, --pfam_dir TEXT            Pfam database directory. TE Trimmer will download the database automatically. Only

                                  turn on this option if you want to use a local PFAM database or the automatic

                                  download fails.

  --cons_thr FLOAT                The minimum level of agreement required at a given position in the alignment for a

                                  consensus character to be called. Default: 0.8

  --mini_orf INTEGER              Define the minimum ORF length to be predicted by TEtrimmer. Default: 200

  --max_msa_lines INTEGER         Set the maximum number of sequences to be included in a multiple sequence alignment.

                                  Default: 100

  --top_msa_lines INTEGER         If the sequence number of multiple sequence alignment (MSA) is greater than

                                  <max_msa_lines>, TEtrimmer will first sort sequences by length and choose

                                  <top_msa_lines> number of sequences. Then, TEtrimmer will randomly select sequences

                                  from all remaining BLAST hits until <max_msa_lines>sequences are found for the

                                  multiple sequence alignment. Default: 100

  --min_seq_num INTEGER           The minimum blast hit number required for the input sequence. We do not recommend

                                  decreasing this number. Default: 10

  --min_blast_len INTEGER         The minimum sequence length for blast hits to be included for further analysis.

                                  Default: 150

  --max_cluster_num INTEGER       The maximum number of clusters assigned in each multiple sequence alignment. Each

                                  multiple sequence alignment can be grouped into different clusters based on

                                  alignment patterns WARNING: using a larger number will potentially result in more

                                  accurate consensus results but will significantly increase the running time. We do

                                  not recommend increasing this value to over 5. Default: 2

  --ext_thr FLOAT                 The threshold to call “N” at a position. For example, if the most conserved

                                  nucleotide in a MSA columnhas proportion smaller than <ext_thr>, a “N” will be

                                  called at this position. Used with <ext_check_win>. The lower the value of

                                  <ext_thr>, the more likely to get longer the extensions on both ends. You can try

                                  reducing <ext_thr> if TEtrimmer fails to find full-length TEs. Default: 0.7

  --ext_check_win TEXT            the check windows size during defining start and end of the consensus sequence based

                                  on the multiple sequence alignment. Used with <ext_thr>. If <ext_check_win> bp at

                                  the end of multiple sequence alignment has “N” present (ie. positions have

                                  similarity proportion smaller than <ext_thr>), the extension will stop, which

                                  defines the edge of the consensus sequence. Default: 150

  --ext_step INTEGER              the number of nucleotides to be added to the left and right ends of the multiple

                                  sequence alignment in each extension step. TE_Trimmer will iteratively add

                                  <ext_step> nucleotides until finding the TE boundary or reaching <max_ext>. Default:

                                  1000

  --max_ext INTEGER               The maximum extension in nucleotides at both ends of the multiple sequence

                                  alignment. Default: 7000

  --gap_thr FLOAT                 If a single column in the multiple sequence alignment has a gap proportion larger

                                  than <gap_thr> and the proportion of the most common nucleotide in this column is

                                  less than <gap_nul_thr>, this column will be removed from the consensus. Default:

                                  0.4

  --gap_nul_thr FLOAT             The nucleotide proportion threshold for keeping the column of the multiple sequence

                                  alignment. Used with the <gap_thr> option. i.e. if this column has <40% gap and the

                                  portion of T (or any other) nucleotide is >70% in this particular column, this

                                  column will be kept. Default: 0.7

  --crop_end_div_thr FLOAT        The crop end by divergence function will convert each nucleotide in the multiple

                                  sequence alignment into a proportion value. This function will iteratively choose a

                                  sliding window from each end of each sequence of the MSA and sum up the proportion

                                  numbers in this window. The cropping will continue until the sum of proportions is

                                  larger than <--crop_end_div_thr>. Cropped nucleotides will be converted to -.

                                  Default: 0.7

  --crop_end_div_win INTEGER      Window size used for the end-cropping process. Used with the <--crop_end_div_thr>

                                  option. Default: 40

  --crop_end_gap_thr FLOAT        The crop end by gap function will iteratively choose a sliding window from each end

                                  of each sequence of the MSA and calculate the gap proportion in this window. The

                                  cropping will continue until the sum of gap proportions is smaller than

                                  <--crop_end_gap_thr>. Cropped nucleotides will be converted to -. Default: 0.1

  --crop_end_gap_win INTEGER      Define window size used to crop end by gap. Used with the <--crop_end_gap_thr>

                                  option. Default: 250

  --start_patterns TEXT           LTR elements always start with a conserved sequence pattern. TEtrimmer searches the

                                  beginning of the consensus sequence for these patterns. If the pattern is not found,

                                  TEtrimmer will extend the search of <--start_patterns> to up to 15 nucleotides from

                                  the beginning of the consensus sequence and redefine the start of the consensus

                                  sequence if the pattern is found. Note: The user can provide multiple LTR start

                                  patterns in a comma-separated list, like: TG,TA,TC (no spaces; the order of patterns

                                  determines the priority for the search). Default: TG

  --end_patterns TEXT             LTR elements always end with a conserved sequence pattern. TEtrimmer searches the

                                  end of the consensus sequence for these patterns. If the pattern is not found,

                                  TEtrimmer will extend the search of <--end_patterns> to up to 15 nucleotides from

                                  the end of the consensus sequence and redefine the end of the consensus sequence if

                                  the pattern is found. Note: The user can provide multiple LTR end patterns in a

                                  comma-separated list, like: CA,TA,GA (no spaces; the order of patterns determines

                                  the priority for the search). Default: CA

  --help                          Show this message and exit.

 

 

実行方法

ランするにはFASTA 形式(.fa または .fasta)のゲノム配列のほかに、TEコンセンサスライブラリーが必要。具体的にはRepeatModelerやEDTAのようなde novo TEアノテーションツールのTEコンセンサスライブラリが必要。

TEtrimmer --input_file TE_consensus_library.fa --genome_file genome.fasta --output_dir outdir --num_threads 20 --classify_all                  

 -pdでpfamデータベースのパスを指定する必要がある。認識されなければコマンド実行時に自動でダウンロードされる。

出力例

(レポジトリに出力についての説明あり)

 

TEtrimmerのラン後、TEコンセンサスライブラリを検査、改善する目的でGUIツールが準備されている。TEコンセンサスライブラリーの品質を従来の手動キュレーションレベルまで高めるために、この作業を行うことが強く推奨されている。

#launch GUI

> python tetrimmer/TEtrimmer_proof_anno_GUI/annoGUI.py 

 

引用

https://github.com/qjiangzhao/TEtrimmer/tree/main

 

コメント

現在論文が準備中とのことです。早めに紹介しました。ゲノムアセンブリアノテーションされたTEのキュレーションで苦労されている方は試してみると良いのでは無いかと思います。特にトラブルなく動作しますが、計算にはある程度時間がかかるので、初回はTEの配列数が少し小さめのデータセットでテストされると良いかもしれません(提供したTE配列に対してキュレーションをするので、TE配列数が数千以上あるとそれなりに時間がかかる)。

 

可変長タンデム反復配列のアノテーション(多型コール)を行う vamos

 

 ヒトゲノムのおよそ3%は可変反復配列(VNTR)で構成されている。これらの遺伝子座は多型性が高いが、アラインメントのブレイクポイントに基づいてバリアントを定義しマージする現在のアプローチでは、その多様性を完全に捉えることはできない。ここではvamosの手法を紹介する: VNTR Annotation using efficient Motif Sets)は、異なるレベルのモチーフ多様性において、VNTRをリピート組成を用いてアノテーションする方法である。74のハプロタイプ解析されたヒトアセンブリにvamosを適用したところ、遺伝子座あたり7.4-16.7対立遺伝子と推定された。

 

インストール

ubuntu22.04でcondaで環境を作ってテストした。

ビルド依存

  • g++ (>= 8.3.0), htslib, abpoa, edlib and alglib are required. htslib and abpoa can be installed through bioconda. Static libraries libalglib.a and libedlib.a are distributed along with vamos.

Github

#conda (link)
mamba create --name vamos python=3.10
conda activate vamos
mamba install bioconda::vamos 

> vamos

Usage: vamos [subcommand] [options] [-b in.bam] [-r vntrs_region_motifs.bed] [-o output.vcf] [-s sample_name] [-t threads] 

Version: 1.3.6

subcommand:

vamos --contig [-b in.bam] [-r vntrs_region_motifs.bed] [-o output.vcf] [-s sample_name] [-t threads] 

vamos --read [-b in.bam] [-r vntrs_region_motifs.bed] [-o output.vcf] [-s sample_name] [-t threads] [-p phase_flank] 

vamos -m [verison of efficient motif set]

 

   Input: 

       -b   FILE         Input indexed bam file. 

       -r   FILE         File containing region coordinate and motifs of each VNTR locus. 

                         The file format: columns `chrom,start,end,motifs` are tab-delimited. 

                         Column `motifs` is a comma-separated (no spaces) list of motifs for this VNTR. 

       -s   CHAR         Sample name. 

   Output: 

       -o   FILE         Output vcf file. 

       -S                Output assembly/read consensus sequence in each call.

   Dynamic Programming: 

       -d   DOUBLE       Penalty of indel in dynamic programming (double) DEFAULT: 1.0. 

       -c   DOUBLE       Penalty of mismatch in dynamic programming (double) DEFAULT: 1.0. 

       -a   DOUBLE       Global accuracy of the reads. DEFAULT: 0.98. 

       --naive           Specify the naive version of code to do the annotation, DEFAULT: faster implementation. 

   Phase reads: 

       -p   INT            Range of flanking sequences which is used in the phasing step. DEFAULT: 15000 bps. 

   Downloading motifs:

Original (no filtering) 

   curl "https://zenodo.org/record/8357361/files/original_motifs.set148.bed.gz?download=1" > original_motifs.set148.bed.gz

q10:

   curl "https://zenodo.org/record/8357361/files/q-0.1_motifs.set148.bed.gz?download=1"  > q-0.1_motifs.set148.bed.gz

q20:

   curl "https://zenodo.org/record/8357361/files/q-0.2_motifs.set148.bed.gz?download=1"  > q-0.2_motifs.set148.bed.gz

q30:

   curl "https://zenodo.org/record/8357361/files/q-0.3_motifs.set148.bed.gz?download=1"  > q-0.3_motifs.set148.bed.gz

 

   Others: 

       -L   INT          Maximum length locus to compute annotation for (10000)

       -t   INT          Number of threads, DEFAULT: 1. 

       --debug           Print out debug information. 

       -h                Print out help message. 

 

 

テストラン

contigモード(--conitg)とreadモード(--read)がある。

 

ラン例としてレポジトリではreadモードのランが紹介されている。ランするには、リードをリファレンスにマッピングして得たbamと、モチーフのbedファイルが必要。

git clone https://github.com/ChaissonLab/vamos.git
cd vamos/
vamos --read -b example/demo.aln.bam -r example/region_motif.bed -s NA24385_CCS_h1 -o reads.vcf -t 8
  • -b      Input indexed bam file.
  • -r       File containing region coordinate and motifs of each VNTR locus. The file format: columns `chrom,start,end,motifs` are tab-delimited. Column `motifs` is a comma-separated (no spaces) list of motifs for this VNTR.
  • -s      Sample name.
  • -o      Output vcf file.
  • -t       Number of threads, DEFAULT: 1.

出力はVCF形式。VCFのinfoフィールドに各サンプルの各VNTR遺伝子座の遺伝子型を記録する。

 

レポジトリより

  • snakefile/configs/vntr_region_motifs.e.bed.gzに467104個のVNTR遺伝子座の効率的なモチーフが提供されている。snakefile/configs/vntr_region_motifs.o.bed.gzは467104個のVNTR遺伝子座のオリジナルモチーフを提供する。これらは、ヒトゲノム構造変異コンソーシアムによって構築された32のハプロタイプresolve LRSゲノムのコレクションからVNTR遺伝子座とモチーフがhg38からのリフトオーバーによって定義され、Tandem Repeats Finder (TRF)によってモチーフに分解することで得られている。

  • vamos出力のvcfをマルチサンプルvcfに結合するpythonスクリプトsnakefile/pyscript/combine_vcf.pyが提供されている。

引用

vamos: variable-number tandem repeats annotation using efficient motif sets

Jingwen Ren, Bida Gu & Mark J. P. Chaisson 

Genome Biology volume 24, Article number: 175 (2023) 

 

微生物の増殖曲線をインタラクティブに解析するウェブアプリケーション Dashing Growth Curves

 

 微生物の成長を記録し分析することは、ライフサイエンスにおける日常的な作業である。数十から数百の増殖曲線を同時に記録するマイクロプレートリーダーは、この作業にますます使用されるようになり、その迅速で信頼性の高い分析に対する需要が高まっている。ここでは、研究者がコーディングの知識を必要とせず、オペレーティングシステムに依存することなく、増殖曲線を迅速に可視化・解析できる対話型ウェブアプリケーション、Dashing Growth Curves(http://dashing-growth-curves.ethz.ch/)を紹介する。増殖曲線は、パラメトリックおよびノンパラメトリックモデル、または手動でフィッティングすることができる。このアプリケーションは、最大成長率だけでなく、ラグタイム、指数関数的成長段階の長さ、最大個体数などの他の特徴も抽出する。さらに、Dashing Growth Curvesは、複製サンプルを自動的にグループ化し、すべての成長パラメーターについてダウンロード可能なサマリープロットを作成する。Dashing Growth Curvesは、微生物増殖曲線の解析に必要な時間を数時間から数分に短縮するオープンソースウェブアプリケーションである。

 

Github

https://github.com/mretier/growthdash

(Local installationについての説明もあり)

 

Tutorial

https://www.youtube.com/watch?v=lhvgZyPlHzA&ab_channel=DashingGrowthCurves

 

 

簡単に見ていきます(windowschrome使用)。

webサービス

https://dashing-growth-curves.ethz.ch/にアクセスする。

 Excelデータファイルをドラッグ&ドロップするか、ボックス内をクリックしてデータファイルを選択する。

 

デモファイルをexcelで開いた。Dashing Growth Curvesが成長データを解析するためには、シンプルな表形式で、タイムスタンプとサンプル名を含む必要がある。

1行目には時間が0から0.33分間隔で書かれている。1列目にはサンプルグループ名がある。2行目2列目以降には測定値が書かれている。フォーマットについては、論文でも説明されています(Fig.2)。

 

出力例

Data OverviewとData Analysisに分かれている。

 

Data Overview

アップロードされたデータは、各反復の個々のトレース(図の左側のプロット)、または同じサンプルに属する全部の反復の平均を表すトレース(図の右側のプロット)として表示される。どのデータを表示するかは、左右の図の真ん中の凡例をクリックしてON・OFFできる。同じサンプルグループの反復のトレースは同じ色で表示されている。

右の図の平均値のトレースの周りのエラーバンドは標準偏差を表している。図はインタラクティブに操作可能;パン、ズームしたりしてインタラクティブにデータを探索できる。

 

Data Analysis(サンプルビュー)

サンプルの増殖曲線とそれに関連するパラメータ、ブランクを表示する。

Dashing Growth Curvesは、すべてのサンプルの倍加時間、最大増殖率、ラグタイム、測定された最小個体数から最大個体数までの倍加数、対数成長期の倍加数、収量(すなわち最大個体数)を抽出する。対数成長期が観察されない場合、関連するパラメータは未決定のままとなる(論文より)。

 

blank、 optical densityの波長は変更できる。

デフォルトでは、データファイルの最初の3検体をブランクとして使用する。結果を可視化して見て、(技術的な理由などで)曲線を除外するなどの対応も可能。

 

フィッティングモデルも選べる。メニュー左のをクリックするとフィッティングが実行される。

 

Fitting modelについて

 

増殖曲線のフィッティング適用後

左のパネルは関連するブランクとその平均値(上でブランクは選べる)と現在選択されているサンプルの生トレース(左中央)、blankedトレース(左下)。右の図は、 blanked traceのプロット。右端は現在選択されているサンプルの各増殖パラメータ。右のグラフの中をドラッグすると、Logistic growthの曲線部分をマニュアルで指定できる(上の図の縦の灰色線が出ている間の部分)。

 

その下にはダッシュ増殖曲線のサマリーがプロットされる。サンプルの反復は自動的にグループ化される。

6つ棒グラフがある。例えば左上はsample1とsample2のdoubling timeプロット。

 

それぞれの結果はボトムにあるボタンからダウンロードできる。

 

引用

Dashing Growth Curves: a web application for rapid and interactive analysis of microbial growth curves

Michael A. Reiter & Julia A. Vorholt 

BMC Bioinformatics volume 25, Article number: 67 (2024)