2019 5/14リンク追加
2019 5/30 インストール追記
ConsensusFixerはjavaコマンドラインアプリケーション。virusのウルトラディープNGSのアライメント(インフレーム挿入とあいまいなヌクレオチドを含む)からコンセンサスシーケンスを計算、出力する。European Virus Bioinformatics Center のツール一覧(リンク)で紹介されている。
インストール
依存
本体 Github
リリースから.jarファイルをダウンロードするかcondaで導入する。
#bioconda
conda install -c bioconda -y consensusfixer
> java -jar ConsensusFixer.jar
$ java -jar ConsensusFixer.jar
No input given
ConsensusFixer version: 0.4
USAGE: java -jar ConsensusFixer.jar options...
-------------------------
=== GENERAL options ===
-i INPUT : Alignment file in BAM format (required).
-r INPUT : Reference file in FASTA format (optional).
-o PATH : Path to the output directory (default: current directory).
-mcc INT : Minimal coverage to call consensus.
-mic INT : Minimal coverage to call insertion.
-plurality DOUBLE : Minimal relative position-wise base occurence to integrate into wobble (default: 0.05).
-pluralityN DOUBLE : Minimal relative position-wise gap occurence call N (default: 0.5).
-m : Majority vote respecting pluralityN first, otherwise allow wobbles.
-f : Only allow in frame insertions in the consensus.
-d : Remove gaps if they are >= pluralityN.
-mi : Only the insertion with the maximum frequency greater than mic is incorporated.
-pi : Progressive insertion mode, respecting mic.
-pis INT : Window size for progressive insertion mode (default: 300).
-dash : Use '-' instead of bases from the reference.
-s : Single core mode with low memory footprint.
-------------------------
=== Technical options ===
-XX:NewRatio=9 : Reduces the memory consumption (RECOMMENDED to use).
-Xms2G -Xmx10G : Increase heap space.
-XX:+UseParallelGC : Enhances performance on multicore systems.
-XX:+UseNUMA : Enhances performance on multi-CPU systems.
-------------------------
=== EXAMPLES ===
java -XX:+UseParallelGC -Xms2g -Xmx10g -XX:+UseNUMA -XX:NewRatio=9 -jar ConsensusFixer.jar -i alignment.bam -r reference.fasta
-------------------------
実行方法
bamとリファレンスのfastaを指定する。リファレンスのfastaにchrが2つ以上含まれているとエラーになる。
java -jar ConsensusFixer.jar -i input.bam -r reference.fasta -mcc 0 -o output
- -i Alignment file in BAM format (required).
- -r Reference file in FASTA format (optional).
- -o Path to the output directory (default: current directory).
- -mcc Minimal coverage to call consensus.
outputconsensus.fastaが出力される。
追記
samtoolsを使った方法は
sam/bamファイルを変換、編集したり分析するためのツール - macでインフォマティクス の下の方にある"Consensus fasta"のコマンドを参照。
引用
https://github.com/cbg-ethz/ConsensusFixer
参考
Question: Generate consensus sequence from BAM without ambiguity codes
https://www.biostars.org/p/302736/