macでインフォマティクス

macでインフォマティクス

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

ロングリードのメタゲノムアセンブラ myloasm

2025/09/09 プレプリント引用

 

ロングリードメタゲノムアセンブリは、マイクロバイオームからの完全なゲノム復元を約束する。しかし、メタゲノムの複雑性は課題をもたらす。本著者らは、PacBio HiFiおよびOxford Nanopore Technologies (ONT) R10.4ロングリード向けメタゲノムアセンブラ「myloasm」を提案する。myloasmはpolymorphic k-mersを用いて高解像度文字列グラフを構築し、差分豊度を活用してグラフを簡素化する。実世界のONTメタゲノムにおいて、myloasmは次善のアセンブラと比較して3倍完全な環状コンティグをアセンブルした。myloasmはONTとHiFiのアセンブリ性能を同等化できる:jointly sequenced gutメタゲノムにおいて、ONTを用いたmyloasmはHiFiを用いたいかなるアセンブラよりも完全な環状ゲノムをアセンブルした。Myloasmは従来アクセス不可能だった種内多様性を回復する。腸内メタゲノムからPrevotella copriの完全な単一コンティグゲノム6つを、口腔メタゲノムからは93%以上の相同性を有する完全なTM7(Saccharibacteria)コンティグ8つを回収した。この解像度向上により、ヒト腸内で異なる株特異的移動性遺伝要素を介して拡散する98%相同性のermF抗生物質耐性遺伝子2つを同定した。

 

HPより

Myloasmはロングリードシーケンスデータ用のde novoメタゲノム・アセンブラである。シークエンシングリードを取り込み、研磨されたコンティグを1コマンドで出力する。MyloasmはNanopore R10 simplex reads (with > ~97% accuracy (basecalled in sup or hac mode)とPacBio HiFi readsで動作する。

 

Documentation

myloasm - metagenomic assembly with (noisy) long reads

 

2025/09/09

 

 

インストール

Github

#latest binary
wget https://github.com/bluenote-1577/myloasm/releases/download/v0.1.0/myloasm-0.1.0-x86_64-avx2
chmod +x myloasm-0.1.0-x86_64-avx2

#cargo
git clone https://github.com/bluenote-1577/myloasm --recurse-submodules  
cd myloasm
cargo install --path .

#conda
mamba create -n myloasm -y
cond activate myloasm
mamba install bioconda::myloasm -y

$ myloasm -h

myloasm - high-resolution metagenomic assembly with noisy long reads.

 

EXAMPLE (Nanopore R10): myloasm nanopore_reads.fq.gz -o output_directory -t 50

EXAMPLE (PacBio HiFi): myloasm pacbio_reads.fq.gz -o output_directory -t 50 --hifi

 

Usage: myloasm [OPTIONS] <FASTQ/FASTA (.gz)>...

 

Arguments:

  <FASTQ/FASTA (.gz)>...  Input read file(s) -- multiple files are concatenated

 

Options:

  -o, --output-dir <OUTPUT_DIR>  Output directory for results; created if it does not exist [default: myloasm-out]

  -t, --threads <THREADS>        Number of threads to use for processing [default: 20]

      --clean-dir                Do not dump large intermediate data to disk (intermediate data is useful for rerunning)

  -l, --log-level <LOG_LEVEL>    Verbosity level. Warning: trace is very verbose [default: debug] [possible values: error, warn, info, debug, trace]

  -h, --help                     Print help

  -V, --version                  Print version

 

Technology Presets:

      --nano-r10  (DEFAULT) R10 nanopore mode for sup/hac data (> ~97% median accuracy). Specifying this flag does not do anything for now

      --hifi      PacBio HiFi mode -- assumes less chimericism and higher accuracy

 

Basic Algorithmic Parameters:

  -c, --c <C>

          Compression ratio (1/c k-mers selected). Must be <= 15 [default: 11]

      --min-reads-contig <MIN_READS_CONTIG>

          Output contigs with >= this number of reads [default: 1]

      --quality-value-cutoff <QUALITY_VALUE_CUTOFF>

          Disallow reads with < % identity for graph building (estimated from base qualities) [default: 90]

      --min-ol <MIN_OL>

          Minimum overlap length for graph construction [default: 500]

  -b, --bloom-filter-size <BLOOM_FILTER_SIZE>

          Bloom filter size in GB. Increase for massive datasets [default: 10]

      --aggressive-bloom

          More aggressive filtering of low-abundance k-mers. May be non-deterministic

 

Overlap Parameters (advanced):

      --read-map-batch-size <READ_MAP_BATCH_SIZE>

          Batch size of indexing for read-to-read mapping and overlap stage [default: 1000000]

      --snpmer-threshold-strict <SNPMER_THRESHOLD_STRICT>

          Snpmer identity threshold for containment and strict overlaps [default: 100]

      --snpmer-threshold-lax <SNPMER_THRESHOLD_LAX>

          Snpmer identity threshold for relaxed overlaps [default: 99]

      --snpmer-error-rate-lax <SNPMER_ERROR_RATE_LAX>

          Binomial test error parameter for relaxed overlaps [default: 0.025]

      --snpmer-error-rate-strict <SNPMER_ERROR_RATE_STRICT>

          Binomial test error parameter strict overlaps [default: 0]

      --contain-subsample-rate <CONTAIN_SUBSAMPLE_RATE>

          Relaxed compression ratio during containment; must be > c [default: 44]

      --absolute-minimizer-cut-ratio <ABSOLUTE_MINIMIZER_CUT_RATIO>

          Cut overlaps with > (c * this) number of bases between minimizers on average [default: 8]

      --relative-minimizer-cut-ratio <RELATIVE_MINIMIZER_CUT_RATIO>

          Cut overlaps with > (this) times more bases between minimizers than the best overlap on average [default: 5]

      --disable-error-overlap-rescue

          Disables a SNPmer error overlap rescue heuristic during graph construction

 

Graph Parameters (advanced):

      --small-bubble-threshold <SMALL_BUBBLE_THRESHOLD>

          Base bubble popping length threshold; this gets multiplied by 5-30x during progressive graph cleaning [default: 50000]

      --z-edge-threshold <Z_EDGE_THRESHOLD>

          Cut z-edges that are < this times smaller than the adjacent overlaps [default: 1]

      --tip-length-cutoff <TIP_LENGTH_CUTOFF>

          Base length of tip to remove; this gets multiplied by 5-30x during simplification [default: 20000]

      --tip-read-cutoff <TIP_READ_CUTOFF>

          Number of reads in tips to remove; this gets multiplied by 5-30x during simplification [default: 3]

 

実行方法

ロングリードのfasta|fastqまたはfastq.gzファイルを指定する。

ONT(R10.4)

myloasm reads1.fq reads2.fq reads3.fq -o output_directory -t 20
  • -o    Output directory for results; created if it does not exist [default: myloasm-out]
  • -t      Number of threads to use for processing [default: 20]
  • --nano-r10    R10 nanopore mode for sup/hac data (> ~97% median accuracy). Specifying this flag does not do anything for now (DEFAULT

 

PacBio HiFi

myloasm reads1.fq reads2.fq reads3.fq -o output_directory -t 20 --hifi
  • --hifi     PacBio HiFi mode -- assumes less chimericism and higher accuracy

 

出力例

出力について

Primary files - myloasm - metagenomic assembly with (noisy) long reads

 

コメント

まだ論文になってませんが、問題なく動作するので早めに紹介しました。早いうちにプレプリントが投稿されるそうです。投稿されたら引用します。

=> 追記しました。ベンチマークでは非常に高い性能を示していますね。

 

その他(レポジトリより)

  • --clean-dir  myloasmははデフォルトでは中間失敗からの再実行を可能にするために、大きな中間ファイルを結果ディレクトリにダンプする。このフラグを指定すると、これらの大きなファイルをダンプしない。

  • --min-reads-contig    myloasmはデフォルトで全てのコンティグを出力する。これを増やすと、 >= Xリードのコンティグだけを保持する。

  • -c    メモリを減らして速度を上げるが、感度は多少落ちる。15以下にする。

  • --quality-value-cutoff    myloasmはグラフを作成するために、 >= Xの推定精度のリードだけを保持する。これを増やすと、感度は落ちるが、より正確なアセンブリーグラフを作ることができる。

  • --min-ol    長さ >= X のリードオーバーラップをアセンブリグラフの構築に使用する。デフォルトはかなりアグレッシブで、低カバレッジではより高感度だが、偽陽性が増える可能性がある。高カバレッジ時は、コンティグをより正確にするために、この値を増やすことを検討する。

  • --bloom-filter-size    ブルームフィルターのサイズ(GB)。Myloasmはk-merカウントの段階でブルームフィルターを使用してメモリを削減する。大規模なメタゲノム(> 100 Gbp)の場合は増やすことを検討する。

  • --aggressive-bloom    より積極的なブルームフィルタリングを行う。結果は非決定的になるが、最初のk-merカウント段階でのメモリを多少節約できる。

 

引用

myloasm - metagenomic assembly with (noisy) long reads

 

2025/09/09

High-resolution metagenome assembly for modern long reads with myloasm

Jim Shaw,  Maximillian G Marin,  Heng Li

bioRxiv, Posted September 06, 2025.

 

 

関連