macでインフォマティクス

macでインフォマティクス

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

ロングリードのマッピングからタンデムリピートを検出する tandem-genotypes

 

 タンデムリピートは、ゲノムDNA中に複数のコピー配列が隣接して存在する領域である。これらの領域は、細胞分裂中の複製エラーのために個体間で非常に可変である。それらは、疾患および健康における表現型変動のソースでもある。タンデムリピートのコピー数改変により、30以上のヒトの病気が引き起こされている(ref.1)。
 リファレンスと比較した病原性コピー数の変化の範囲は、数個から数千まで変化し、リピート単位長は、 3(トリプレット反復病)〜 数千(マクロサテライト反復) に及ぶ。このような多様な根底から予想されるように、疾患メカニズムもまた変化し得る。タンパク質コード領域におけるtriplet-repeat expansion diseases の周知の例は、ポリグルタミン病(例えば、脊髄および球筋萎縮、ハンチントン病)である。グルタミンをコードするCAGまたはCAAコドンのトリプレットリピート拡大は、毒性タンパク質凝集および神経細胞死を招く。トリプレットリピート病の別の例は、DMPK遺伝子からの転写物の3'UTRにおけるCUGリピート拡大によって引き起こされ、スプライシングファクタータンパクを隔離し、異常なスプライシングを引き起こし、複数の症状をもたらす毒性のある機能獲得転写産物を生じる。機能獲得の突然変異だけでなく、転写サイレンシングに起因するプロモーター領域における機能喪失の繰り返し変化も報告されている(例えば、脆弱X症候群)。短いタンデムリピート疾患に加えて、ヒト疾患におけるリピートコピー数異常も、マクロサテライトリピート(D4Z4)において報告されている。 D4Z4リピートの短縮は、筋肉細胞に毒性作用を有するフランキング遺伝子DUX4の異常な発現を引き起こす。コード領域における病原性反復拡大の閾値は、通常100コピー未満であり、時にはいくつかのコピーの相違によっても疾患(例えば、眼咽頭筋ジストロフィー)を引き起こすことがある。対照的に、イントロンまたはUTRにおけるタンデムリピート伸長を引き起こすいくつかの疾患は、非常に長くなり得る(例えば、DMPK)。さらに、いくつかの反復は、異なる配列(例えば、DMPK、ATXN10、SAMD12)によって中断され、正確なリピート構造を解析することが困難になる。
 高スループットのショートリードシーケンサーが臨床遺伝学に導入されてからおよそ10年が経った。主にターゲットシーケンス解析(例えば全エキソームシーケンス)のおかげで、特にコード領域における小さなサイズのヌクレオチド変化が多数同定されている。しかし、診断率は30%(使用されている診断プラットフォームによって異なる)のままであり、Mendelian病の大部分は未解決である。多くの理由があるかもしれないが、最も単純なのは、残りの患者が「非コード領域」に突然変異を有しているか、またはショートリードシーケンス技術の限界のために見過ごされたコード領域に突然変異を有する可能性があることである。 1つの候補はタンデムリピート領域であり、これは従来技術によってゲノム全体を解析することは困難である。疾患を引き起こすタンデムリピート数変化を同定するには、通常、古典的な遺伝子技術(すなわち、連鎖解析、サザンブロットなど)および多数のファミリーにおけるtargeted repeat region analysis によって実現される。
 最近のロングリード・シーケンシング技術の進歩は、リードがリピート全体を十分含むことができ、隣接するユニークなシーケンスを使用して解析できるので、良い解決策を提供できる。非常に最近、PacBioまたはナノポアシーケンサーのようなロングリードシーケンサーが臨床遺伝学に来ている。 2018年現在、これらの技術は精度とデータ出力の点で絶え間なく向上している。しかし、臨床検査室では、費用対効果と大規模データの計算負荷のためにまだ困難なままである。可能であれば低カバレッジデータ(〜10X)でタンデムリピート変化を検出できることが望ましい。
 著者らは、ロングリード・シーケンシングからタンデムリピートのコピー数を決定する既存の方法を2つ認識している:PacmonSTRおよびRepeatHMM。これらのメソッドは、リファレンスゲノムにリードをアライメントし、リファレンスのタンデムリピート領域をカバーするリードを取得し、これらのリードと繰り返しシーケンスとの洗練された確率ベースの比較を実行する。しかし、この研究から、それらの方法が現在のロングリードシーケンスデータでは必ずしも成功するとは限らないことがわかる。
 著者らは最近、ゲノムリアレンジメントとduplicationを考慮したゲノムとロングリードのアライメントに、LASTソフトウェアを使用する方法を提唱している(pubmed)。この方法には2つの重要な特徴がある。最初に、データの挿入、欠失、および各種置換の割合を決定し、これらの率を使用して最も可能性の高いアライメントを決定する。第2に、各リードを分割し(1つまたは複数の)、各部分で最も可能性の高い位置合わせを行うことである。この方法は、多様なタイプのゲノムリアレンジメントを見出したが、その中で最も一般的なものは、tandem multiplication (例えばheptuplication )であり、しばしばタンデムリピート領域であった(pubmed)。
ここでは、ロングリードをリファレンスゲノムにLASTでアライメントさせ、これらのアライメントを非常に効果的な方法で分析することにより、タンデムリピートコピー数の変化を検出する。著者らは、タンデムリピートシーケンスを分析することでいくつかの実用上の困難を指摘しており、これは我々(著者ら)のクルードな分析方法の動機づけとなっている。この手法は、比較的低いカバレッジシーケンシングデータであってもゲノム全体でタンデムリピートを解析することができる。我々(著者ら)は、このツールが、ショートリードシーケンスでは見過ごされているヒト疾患におけるタンデムリピート領域での疾患原因突然変異の同定に非常に有用であると考えている。

 

 tandem genotypesに関するツイート。


インストール

mac os10.12を使用。lastはpython2.7環境で実行し、nanosvはAnaconda3.5.2環境で実行した。

依存

  • LAST

git clone https://github.com/mcfrith/tandem-genotypes.git
cd
tandem-genotypes/

python tandem-genotypes -h

$ python tandem-genotypes -h

Usage: tandem-genotypes [options] microsat.txt alignments.maf

 

Try to indicate genotypes of tandem repeats.

 

Options:

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

  -g FILE, --genes=FILE

                        read genes from a genePred or BED file

  -m PROB, --mismap=PROB

                        ignore any alignment with mismap probability > PROB

                        (default=1e-06)

  --postmask=NUMBER     ignore mostly-lowercase alignments (default=1)

  -p BP, --promoter=BP  promoter length (default=300)

  -s N, --select=N      select: all repeats (0), non-intergenic repeats (1),

                        non-intergenic non-intronic repeats (2) (default=0)

  -u BP, --min-unit=BP  ignore repeats with unit shorter than BP (default=2)

  -f BP, --far=BP       require alignment >= BP beyond both sides of a repeat

                        (default=100)

  -n BP, --near=BP      count insertions <= BP beyond a repeat (default=60)

  --mode=LETTER         L=lenient, S=strict (default=L)

  -v, --verbose         show more details

 

 

ラン

こちらを参考にmafファイルを作成する。

https://github.com/mcfrith/last-rna/blob/master/last-long-reads.md

 

1、ゲノムの準備。

#1-1 リピートマスクなしの場合。16thread使いindex
lastdb -P16 -uNEAR -R01 mydb genome.fa
#mydb~というファイルが複数できる。2に進む。

#1-2 リピートマスクあり。windowmaskerを使う(pubmed)。
windowmasker -mk_counts -in genome.fa > genome.wmstat
windowmasker -ustat genome.wmstat -outfmt fasta -in genome.fa > genome-wm.fa
#リピートが小文字になったコピーファイルgenome-wm.faが作成される。
lastdb -P16 -uNEAR -R11 -c mydb genome-wm.fa

 

2、シーケンスデータがfastqなら、ここでfastaに変換しておく。 

awk '/>/ {$0 = ">" ++n} 1' nanopore.fq > nanopore.fa

 

3、last-train(リンク)を使い、置換とgapのレートを算出する。16スレッド指定している。

last-train -P16 mydb nanopore.fa > myseq.par

事前設定されたパラメータ条件でマッピングが行われ、よりよいパラメータ条件が出力される。

 

4、Duplicationやリアレンジメントを考慮し、リードをゲノムにアライメント。3のlast-trainで得られたパラメータ条件ファイルmyseq.parを指定している。

lastal -P16 -p myseq.par mydb nanopore.fa | last-split -m1e-6 - > myseq.maf

 

5、tandem-genotypesを動かすには、マイクロサテライトやリピートファイルのファイルを与える必要がある。UCSCリンク)からダウンロードして使う時は、最初の4カラムを抽出する。例えばhumanのマイクロサテライトなら、リンク先からmicrosatelliteを選んでダウンロード。"cut -f 1-4 input"で先頭4カラムを抽出。

f:id:kazumaxneo:20180710115854j:plain

以下のようなフォーマットになっていればOK(GIthubより)。

chr22  41914573  41914611  GCGCGA

chr22  41994883  41994923  TG

次のステップで使うので、遺伝子のBEDファイルもUCSCのtable browserからダウンロードしとく(humanリンク)。

 

6、tandem-genotypesを使い、タンデムリピートを検出する。microsat.txtがstep5で調整したリピートファイル。refGene.txtはstep5でダウンロードしたbedファイル。

tandem-genotypes -g refGene.txt microsat.txt myseq.maf > tg.txt

 

 7、ヒストグラムをプロット。

python tandem-genotypes-plot tg.txt

リピートの出現回数の ヒストグラムPDFが出力される。

 

引用

Robust detection of tandem repeat expansions from long DNA reads

Satomi Mitsuhashi, Martin C Frith, Takeshi Mizuguchi, Satoko Miyatake, Tomoko Toyota, Hiroaki Adachi, Yoko Oma, Yoshihiro Kino, Hiroaki Mitsuhashi, Naomichi Matsumoto

bioRxiv preprint first posted online Jun. 27, 2018; doi: http://dx.doi.org/10.1101/356931.

 

論文追記 2019 3/24

Tandem-genotypes: robust detection of tandem repeat expansions from long DNA reads
Satomi Mitsuhashi, Martin C. Frith, Takeshi Mizuguchi, Satoko Miyatake, Tomoko Toyota, Hiroaki Adachi, Yoko Oma, Yoshihiro Kino, Hiroaki Mitsuhashi, Naomichi Matsumoto
Genome Biology 2019 20:58

高速なロングリードのマッピング、エラー修正、アセンブリツール MECAT

2020 2/7 タイトル修正

 

 MECATは、1分子シークエンシング(SMRT)リードの超高速マッピング、エラー訂正、およびデノボアセンブリを行うツール。State of the artのアライナとエラー訂正ツールよりもはるかに効率的な、新しいアライメントとエラー訂正アルゴリズムを採用している。 MECATは、ラージゲノムの効率的なde novo アセンブリに使用できる。例えば、2.0GHz CPUを搭載した32スレッドコンピュータ環境下では、MECATは54xのSMRTヒトゲノムシーケンスデータを9.5日でアセンブリできる。これは現在のPBcR-Mhap pipelineの40倍速い。また、MECATを用いて、diploidのヒトゲノムの102x SMRTデータをわずか25日でアセンブリできる。後者のアセンブリは、54倍の一倍体SMRTデータから組み立てられた以前のゲノムの品質を大幅に改善するものである。 MECATの性能は、PBcR-Mhapパイプライン、FALCONおよびCanu(v1.3)と5つの実際のデータセットで比較した。 MECATによって作成されたコンティグの品質は、PBcR-MhapパイプラインおよびFALCONと同等以上だった。Githubの表に2.0GHzのCPUと512GBのRAMメモリを備えた32スレッドコンピュータでの上記ツールの比較がある(リンク)。

 

ランニングタイム

f:id:kazumaxneo:20180714182831p:plain

 Githubより転載。

 

"MECAT assembly"に関するツイート。

 

インストール

ubuntu16.04でソースからテストした。またdockerイメージもテストした。

依存

  • HDF5
  • dextract
#HDF5
wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8/hdf5-1.8.15-patch1/src/hdf5-1.8.15-patch1.tar.gz
tar xzvf hdf5-1.8.15-patch1.tar.gz
mkdir hdf5
cd hdf5-1.8.15-patch1
./configure --enable-cxx --prefix=/public/users/chenying/smrt_asm/hdf5
make
make install
cd ..

#dextract
git clone https://github.com/PacificBiosciences/DEXTRACTOR.git
cp MECAT/dextract_makefile DEXTRACTOR
cd DEXTRACTOR
export HDF5_INCLUDE=/public/users/chenying/smrt_asm/hdf5/include
export HDF5_LIB=/public/users/chenying/smrt_asm/hdf5/lib
make -f dextract_makefile
cd ..

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/public/users/chenying/smrt_asm/hdf5/lib

本体 Github

git clone https://github.com/xiaochuanle/MECAT.git
cd MECAT
make -j 8
cd ..

#MECAT/Linux-amd64/binにパスを通す、dextractにもパスを通す

4つの代表的なコマンドがある。

  • mecat2pw, a fast and accurate pairwise mapping tool for SMRT reads

  • mecat2ref, a fast and accurate reference mapping tool for SMRT reads

  • mecat2cns, correct noisy reads based on their pairwise overlaps

  • mecat2canu, a modified and more efficient version of the Canu pipeline. Canu is a customized version of the Celera Assembler that designed for high-noise single-molecule sequencing

ここではdocker imageを使う。

https://hub.docker.com/r/robegan21/mecat/

docker pull robegan21/mecat

ホストからヘルプを表示。--rmでジョブ終了後コンテナを捨てる(ジョブを投げるたびに停止したコンテナが増殖してしまうので毎回消す)。

 > docker run --rm -it robegan21/mecat mecat2pw -h

$ docker run --rm -it robegan21/mecat mecat2pw -h

[parse_arguments, 142] unrecognised option 'h'

 

usage:

mecat2pw [-j task] [-d dataset] [-o output] [-w working dir] [-t threads] [-n candidates] [-g 0/1]

 

options:

-j <integer> job: 0 = seeding, 1 = align

default: 1

-d <string> reads file name

-o <string> output file name

-w <string> working folder name, will be created if not exist

-t <integer> number of cput threads

default: 1

-n <integer> number of candidates for gapped extension

Default: 100

-a <integer> minimum size of overlaps

Default: 2000 if x = 0, 500 if x = 1

-k <integer> minimum number of kmer match a matched block has

Default: 4 if x = 0, 2 if x = 1

-g <0/1> whether print gapped extension start point, 0 = no, 1 = yes

Default: 0

-x <0/x> sequencing technology: 0 = pacbio, 1 = nanopore

Default: 0

docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2ref -h

$ docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2ref -h

Error: argument to option 'h' is missing!

 

 

usage:

mecat2ref [-d reads] [-r reference] [-o output] [-w working dir] [-t threads]

 

options:

-d <string> reads file name

-r <string> reference file name

-o <string> output file name

-w <string> working folder name, will be created if not exist

-t <integer> number of cput threads

default: 1

-n <integer> number of of candidates for gap extension

default: 10

-b <integer> output the best b alignments

default: 10

-m <0/1/2> output format: 0 = ref, 1 = m4, 2 = sam

default: 0

-x <0/1> sequencing technology: 0 = pacbio, 1 = nanopore

default: 0

 

> docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2cns -h

$ docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2cns -h

input_type: 1

number of threads: 1

batch size: 100000

mapping ratio: 0.9

align size: 2000

cov: 6

min size: 5000

partition files: 10

tech: 0

USAGE:

mecat2cns [options] input reads output

 

OPTIONS:

-x <0/1> sequencing platform: 0 = PACBIO, 1 = NANOPORE

default: 0

-i <0/1> input type: 0 = candidte, 1 = m4

-t <Integer> number of threads (CPUs)

-p <Integer> batch size that the reads will be partitioned

-r <Real> minimum mapping ratio

-a <Integer> minimum overlap size

-c <Integer> minimum coverage under consideration

-l <Integer> minimum length of corrected sequence

-k <Integer> number of partition files when partitioning overlap results (if < 0, then it will be set to system limit value)

-h print usage info.

 

If 'x' is set to be '0' (pacbio), then the other options have the following default values: 

-i 1 -t 1 -p 100000 -r 0.9 -a 2000 -c 6 -l 5000 -k 10

 

If 'x' is set to be '1' (nanopore), then the other options have the following default values: 

-i 1 -t 1 -p 100000 -r 0.4 -a 400 -c 6 -l 2000 -k 10

docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2canu -h

$ docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat mecat2canu -h

 

usage: canu [-correct | -trim | -assemble] \

            [-s <assembly-specifications-file>] \

             -p <assembly-prefix> \

             -d <assembly-directory> \

             genomeSize=<number>[g|m|k] \

             errorRate=0.X \

            [other-options] \

            [-pacbio-raw | -pacbio-corrected | -nanopore-raw | -nanopore-corrected] *fastq

 

  By default, all three stages (correct, trim, assemble) are computed.

  To compute only a single stage, use:

    -correct  - generate corrected reads

    -trim     - generate trimmed reads

    -assemble - generate an assembly

 

  The assembly is computed in the (created) -d <assembly-directory>, with most

  files named using the -p <assembly-prefix>.

 

  The genome size is your best guess of the genome size of what is being assembled.

  It is used mostly to compute coverage in reads.  Fractional values are allowed: '4.7m'

  is the same as '4700k' and '4700000'

 

  The errorRate is not used correctly (we're working on it).  Set it to 0.06 and

  use the various utg*ErrorRate options.

 

  A full list of options can be printed with '-options'.  All options

  can be supplied in an optional sepc file.

 

  Reads can be either FASTA or FASTQ format, uncompressed, or compressed

  with gz, bz2 or xz.  Reads are specified by the technology they were

  generated with:

    -pacbio-raw         <files>

    -pacbio-corrected   <files>

    -nanopore-raw       <files>

    -nanopore-corrected <files>

 

Complete documentation at http://canu.readthedocs.org/en/latest/

 

ERROR:  Invalid command line option '-h'.  Did you forget quotes around options with spaces?

ERROR:  Assembly name prefix not supplied with -p.

ERROR:  Directory not supplied with -d.

ERROR:  Required parameter 'genomeSize' is not set

 

 

 

 

ラン

テスト1、Pacbio

1、 テストシーケンスデータをダウンロード。

cd /home/kazu/MECAT/
wget http://gembox.cbcb.umd.edu/mhap/raw/ecoli_filtered.fastq.gz
gzip -dv ecoli_filtered.fastq.gz

ecoli_filtered.fastqができる。 

 

dockerを使い、ホスト側からジョブを投げる。見にくいのでMECATのコマンド部分手前でエスケープして改行し、さらにMECATコマンド部は太字にする。

2、mecat2pw: a fast and accurate pairwise mapping tool for SMRT reads

2、mappingによるオーバーラップ検出。ecoli_filtered.fastqを指定する。

#現在のパス /home/kazu/MECAT/
sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2pw -j 0 -d ecoli_filtered.fastq -o ecoli_filtered.fastq.pm.can -w wrk_dir -t 16

ecoli_filtered.fastq.pm.canが出力される。

 

3、mecat2cns: correct noisy reads based on their pairwise overlaps

エラー訂正。ecoli_filtered.fastq.pm.canとecoli_filtered.fastqを指定する。

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2cns -i 0 -t 16 ecoli_filtered.fastq.pm.can ecoli_filtered.fastq corrected_ecoli_filtered.fasta

 corrected_ecoli_filtered.fastaが出力される。

 

4、extract the longest 25X corrected reads。推定ゲノムサイズとカバレッジを指定する(リンク)。

#extract_sequences usage 
extract_sequences inputReads outputReads-prefix genomeSize coverage

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
extract_sequences corrected_ecoli_filtered.fasta corrected_ecoli_25x 4800000 25

corrected_ecoli_25x.fastaが 出力される。

 

5、mecat2canu: a modified and more efficient version of the Canu pipeline. Canu is a customized version of the Celera Assembler that designed for high-noise single-molecule sequencing

アセンブリ

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2canu -trim-assemble -p ecoli -d ecoli genomeSize=4800000 ErrorRate=0.02 maxMemory=40 maxThreads=16 useGrid=0 Overlapper=mecat2asmpw -pacbio-corrected corrected_ecoli_25x.fasta

 

 

スト2、Nanopore

1、ダウンロード。

wget http://nanopore.s3.climb.ac.uk/MAP006-PCR-1_2D_pass.fasta

2、mappingによるオーバーラップ検出。

#現在のパス /home/kazu/MECAT/
sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2pw -j 0 -d MAP006-PCR-1_2D_pass.fasta -o candidatex.txt -w wrk_dir -t 16 -x 1

3、エラー訂正。

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2cns -i 0 -t 16 -x 1 candidates.txt MAP006-PCR-1_2D_pass.fasta corrected_ecoli.fasta

4、extract the longest 25X corrected reads

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
extract_sequences corrected_ecoli.fasta corrected_ecoli_25x.fasta 4800000 25

5、アセンブリ

sudo docker run --rm -it -v /home/kazu/MECAT/:/root robegan21/mecat \
mecat2canu -trim-assemble -p ecoli -d ecoli genomeSize=4800000 \ ErrorRate=0.06 maxMemory=40 maxThreads=16 useGrid=0 \
Overlapper=mecat2asmpw -nanopore-corrected corrected_ecoli_25x.fasta

 

 

マッピングにはmecat2refを使う。

 

 

引用

MECAT: fast mapping, error correction, and de novo assembly for single-molecule sequencing reads

Xiao CL, Chen Y, Xie SQ, Chen KN, Wang Y, Han Y, Luo F, Xie Z.

Nat Methods. 2017 Nov;14(11):1072-1074

 

 

融合遺伝子とキメラ転写産物を検出する ChimPipe

2020 5/11 リンク追加

2021 12/5 誤字修正 


 キメラtranscriptsは、ゲノム中の異なる2つ以上の遺伝子に由来する配列を有する転写産物であり[論文より ref.1]、ゲノムまたは転写レベルでいくつかの異なる生物学的メカニズムによって説明することができる。ガンとの歴史的関係については、最もよく知られているメカニズムはゲノム再編成である。このプロセスは、生殖系列ゲノムにおいて、そして癌ゲノムにおいて、遠く離れた同じ方向にある2つの遺伝子を互いに近接させる。このようにして作出された融合遺伝子は、タンパク質または転写産物として有害な役割を果たす可能性がある[ref.1,2]。ガンにおけるキメラの既知の役割以外に、正常細胞または腫瘍細胞でキメラ形成を説明できる他の転写機構もある:ポリメラーゼリードスルーおよびトランススプライシング[ref.1]。

 その名前で示されるように、ポリメラーゼのリードスルーは、ポリメラーゼが1つの遺伝子を次の遺伝子に読み込み、2つの隣接する遺伝子の間にキメラを作成するときに起こる。当初、例外であると考えられていたこの機構は、EST(発現配列タグ)およびcDNA(相補的DNA)の大量のコレクションが利用可能になりゲノムにマッピングされ、そしてENCODE (Encyclopedia of DNA Elements)コンソーシアムが注釈付きタンパク質コード遺伝子に関連するトランスクリプトームを系統的に調査した[ref.6-9]結果、哺乳動物に広く広がっていることが判明している[ref.3-5]。隣接する遺伝子のエキソン間、好ましくは上流(5 ')遺伝子の最後から2番目のエキソンと下流(3')遺伝子の第2エキソンとの間でリードスルーが起こり、両親のドメインを含む新しいタンパク質が得られる。それゆえ、種のプロテオーム多様性を増加させる[ref.1,3,4,10,11]。それらは脊椎動物においても大部分保存されており[ref.11,12]、親遺伝子の一方または両方の発現を調節する方法となりうる[ref.12]。

 トランススプライシングは、よく知られているシススプライシングとは異なり、核の3次元(3D)空間で近くに存在し、同じ"transcription factory"に属すると考えられる2つの異なるプレメッセンジャーRNA(プレmRNA)分子間で起こるスプライシング機構である。 2つのプレmRNAが2つの異なる遺伝子に由来する場合、転写キメラが生成される[ref.1,13-16]。したがって、2つの連結された遺伝子は、ゲノムの遠区離れた位置に存在することができるが、キメラ接合部は正規のスプライス部位を有さなければならない。当初、トリパノソーマに限定されると考えられていたが、いくつかの研究で、根底にあるゲノム再編成の証拠なしに、異なる染色体または鎖上の遺伝子の間にキメラを発見して以来、ヒト研究で関心を集めている[ref.13,14,16]。 1つの仮説は、正常細胞で起こるこのようなトランススプライシングされた転写産物がゲノムリアレンジメントを引き起こし、それが(異なる機構を介して)より多くのこのようなトランススプライシング転写産物を生成し、最終的に腫瘍形成に至ることである[ref.13]。

 

(3段落省略) 

 最先端のキメラ検出プログラムは、通常、(1)キメラリードのためのマッピングおよびフィルタリング、(2)キメラ接合部検出、および(3)キメラアセンブリおよびフィルタリングの3つのステップを含む。これらは、ゲノム(そして場合によってはトランスクリプトーム)にリードをマッピングし、キメラ検出のための2種類の情報を利用する(1) discordant paired-end (PE) reads、すなわちペアエンドのペアがアノテーション上の遺伝子構造と一致しないマップ、例えば異なるクロモソーム間にマッピングされる。 (2) ‘split’ reads、すなわちゲノムに連続的にマップされないが、ゲノムにマップするために複数のブロック(通常は2つ)に分割マッピングされる(論文 図1)。さらに、1種類または2種類のリードを使用することにより、(1) the whole paired-end アプローチ、 (2) the direct fragmentation アプローチ、そして(3) the paired-end + fragmentation アプローチ [41]の3つのアプローチをキメラジャンクション検出に取ることができる。

 これらのプログラムのベンチマーキングは、偽陽性率が高く、同じデータセットでの出力間のintersectionの割合が不十分であることを示している[ref.42,43]。他方で、これらのプログラムは、通常、ヒトのガンでの融合遺伝子検出に開発されており、従って、リードスルーイベントを常に検出することはできず、ヒト以外の種に使うこともできない。さらに、これらのプログラムは、遺伝子対ごとに複数のアイソフォームを常に予測できるとは限らず、より重要なことに、塩基対の分解能を提供し、下流の機能検証を妨げる。これらの問題に対処するために、著者らはノーマルと腫瘍の両方からのイルミナペアエンドRNA-seqデータからキメラ転写産物および融合遺伝子の両方を確実に検出する、ペアエンド + フラグメンテーションアプローチおよび厳格なフィルターセットを使用するモジュラー法であるChimPipeを提示する(以下略) 。

 

マニュアル

https://chimpipe.readthedocs.io/en/latest/

 

インストール

依存

  • 64-bit Linux System (ChimPipe is written in Bash and Awk)
  • Bedtools v2.20.1 or higher
  • Samtools v0.1.19 or higher
  • Blast v2.2.29+ or higher 

本体 Github

git clone https://github.com/Chimera-tools/ChimPipe.git
cd ChimPipe/

 > ./ChimPipe.sh 

$ ./ChimPipe.sh 

[ERROR] The mate 1 FASTQ provided does not exist. Mandatory argument --fastq_1

 

**** ChimPipe version v0.9.5 ****

 

Execute ChimPipe on one Illumina paired-end RNA-seq dataset (sample).

 

*** USAGE

 

FASTQ:

 

./ChimPipe.sh --fastq_1 <mate1_fastq> --fastq_2 <mate2_fastq> -g <genome_index> -a <annotation> -t <transcriptome_index> -k <transcriptome_keys> [OPTIONS]

 

BAM:

 

./ChimPipe.sh --bam <bam> -g <genome_index> -a <annotation> [OPTIONS]

 

*** MANDATORY 

 

* FASTQ:

 

--fastq_1 <FASTQ> First mate sequencing reads in FASTQ format. It can be gzip compressed [.gz].

--fastq_2 <FASTQ> Second mate sequencing reads in FASTQ format. It can be gzip compressed [.gz].

-g|--genome-index <GEM> Reference genome index in GEM format.

-a|--annotation <GTF> Reference gene annotation file in GTF format.                                

-t|--transcriptome-index <GEM> Annotated transcriptome index in GEM format.

-k|--transcriptome-keys <KEYS> Transcriptome to genome coordinate conversion keys.  

--sample-id <STRING> Sample identifier (output files are named according to this id).  

 

* BAM:

 

--bam <BAM> Mapped reads in BAM format. A splicing aware aligner is needed to map the reads. 

-g|--genome-index <GEM> Reference genome index in GEM format.

-a|--annotation <GTF> Reference genome annotation file in GTF format.

--sample-id <STRING> Sample identifier (the output files are named according to this id).  

 

*** [OPTIONS] can be:

 

* General: 

--threads <INTEGER> Number of threads to use. Default 1.

-o|--output-dir <PATH> Output directory. Default current working directory. 

--tmp-dir <PATH> Temporary directory. Default /tmp.

--no-cleanup Keep intermediate files. 

-h|--help Display partial usage information, only mandatory plus general arguments.

-f|--full-help Display full usage information with additional options. 

 

A complete documentation for ChimPipe can be found at: http://chimpipe.readthedocs.org/en/latest/index.html

 

ラン

テストランできるAll in one packageが準備されている(リンク) (5.2GB)。

wget http://public-docs.crg.es/rguigo/Papers/ChimPipe/ChimPipe_tutorial.tar.gz
tar -zxvf ChimPipe_tutorial.tar.gz

 

ダウンロードしたテストデータを走らせる。

cd ChimPipe_tutorial/input/

../../ChimPipe.sh --fastq_1 MCF-7_1.fastq.gz --fastq_2 MCF-7_2.fastq.gz -g Homo_sapiens.GRCh37.chromosomes.chr.M.gem \
-a gencode.v19.annotation.long.gtf -t gencode.v19.annotation.long.gtf.junctions.gem \
-k gencode.v19.annotation.long.gtf.junctions.keys --sample-id MCF-7 --threads 20 \
--similarity-gene-pairs gencode.v19.annotation.long.similarity.txt

GEMToolsのラン中に、-qのフラグ内が指定されてないとのエラーが起きた。本体のシェルスクリプトを開き、283行目のrun "$gemtools --loglevel $logLevel rna-pipeline -の行の手前にquality="33"の行を追加する応急処置を行ってランした。

 

引用

ChimPipe: accurate detection of fusion genes and transcription-induced chimeras from RNA-seq data.

Rodríguez-Martín B, Palumbo E, Marco-Sola S, Griebel T, Ribeca P, Alonso G, Rastrojo A, Aguado B, Guigó R, Djebali S.

BMC Genomics. 2017 Jan 3;18(1):7.

 

複数bamを様々な評価指標で分析して結果を統合する picardmetrics

2020 8/24 タイトル修正

 

picardmetricsはKamil Slowikowskiさんが公開されたPicard(ピカード)Toolsのbamを分析する各コマンドを走らせ、その結果を統合してくれるシェルスクリプト。 

 

コマンド

https://slowkow.github.io/picardmetrics/

インストール

ubuntu18.04に導入した。

依存

#statsの導入
git clone https://github.com/arq5x/filo.git
cd filo/
make
#/usr/local/bin/にコピー
sudo cp bin/stats /usr/local/bin/

kentutilsのgtfToGenePredバイナリをリンクからダウンロードしてパスの通ったディレクトリに移動。gtfToGenePredは上記のKentutilsのftpサーバにアクセスし、バイナリ(linux)をダウンロード、パスの通ったディレクトリに移動する。

本体 Github

git clone https://github.com/slowkow/picardmetrics 
cd picardmetrics

# Download and install the dependencies.
make get-deps PREFIX=~/.local

# Install picardmetrics and the man page.
make install PREFIX=~/.local

 homeディレクトリ($HOME)にpicardmetrics.confがコピーされる。以後はこの$HOME/picardmetrics.confをconfigファイルとして使ってpicardmetricsの解析が行われる。ゲノムFASTAのパスは適当なので、初回はpicardmetrics.confのfastaファイルのパスを修正する。Picard-toolsのパスも違うなら修正しておく。RNA seqに使うなら、アノテーションファイルも修正する必要がある。

#configファイルを修正。emacsvim、viで開く。
vi ~/picardmetrics.conf

 もしくは、毎回 -fでpicardmetrics.confを指定してランする。

 

 

ラン

data/project1/sample/にある全bamを解析する。

for bam in data/project1/sample/?.bam
do
picardmetrics run -k -o out/rnaseq $bam
done

#out/に善データが出力される。サンプルごとに個別の分析ファイルとPDFができる。これをcollateコマンドで統合する。
#データの統合。out/にある全データを統合し、summary/に出力
picardmetrics collate out/ summary/

default-all-metrics.tsvができる。

Excelで表示。ここでは2サンプルのbamの分析結果を統合している。

f:id:kazumaxneo:20180707204934j:plain

評価項目は68もあるので、ここではその先頭カラムだけ表示(画面の右に大量にカラムがある)。

 

ggplot2でplot。

R #Rに入る

> library(ggplot2)
> dat <- read.delim("project1-all-metrics.tsv", stringsAsFactors = FALSE)
> ggplot(dat) + geom_point(aes(PF_READS, PF_ALIGNED_BASES))

 

 引用

GitHub - slowkow/picardmetrics: Run Picard on BAM files and collate 90 metrics into one file.

 

somaticとgermlineのバリアント検出ツール Scalpel

注: docker イメージのリンクも紹介してますが、テストするとエラーを吐きました。condaを使いlinuxマシンでに導入するのが無難なようです。

 

 SNVsの分析はヒト遺伝学を研究するための標準的な技術となっているが[論文より ref.1]。、DNA配列(indels)の挿入と欠失は確実に検出することはできない[ref.2,3]。 Indelsはヒトゲノムで最も2番目に一般的な変異であり、構造変異中では最も多い[ref.4]。マイクロサテライト(単純配列反復、SSR、1〜6bpモチーフ)内で、indelsはリピートモチーフの長さを変え、40以上の神経学的疾患に関連している[ref.5]。 Indelsもまた、自閉症において重要な遺伝的要素を担っている。コードされたタンパク質を破壊する可能性のあるde novo indelsは、影響を受けていない兄弟よりも2倍近くも豊富である[ref.6]。

 indel検出は、いくつかの理由から困難である。(1)indel配列とオーバーラップするリードはアライメントが難しく、gapではなく複数のミスマッチとして扱われることがある。 (2)エキソームシーケンシングのキャプチャ効率のばらつきおよび不均一なリード分布は、偽陽性の数を増加させる。 (3)エラー率増加は、マイクロサテライト内での検出を非常に困難にする。この研究で示されているように、(4)局在化、ほぼ同一の反復配列は、高い陽性率をもたらす可能性がある。これらの理由から、利用可能なソフトウェアツールで検出可能なindelサイズは比較的小さく、数十塩基を超えるものは少ない[ref.8]。

 現在、indels検出には2つの主要なパラダイムが使用されている。最も一般的なアプローチは、リードマッパー(BWA、Bowtie、Novoalignなど)を使用してすべてのリードをリファレンスゲノムにマッピングすることだが、利用可能なアルゴリズムは数塩基以上のindel間のマッピングには有効ではない。先進的なアプローチではより長い変異を検出するためにペアエンド情報を使い local realignments を行うが(例えば、GATK UnifiedGenotyper[ref.1]およびDindel[ref.9])、実際には、より長い変異(≧20bp)ではその感度が大幅に低下する。 Split-read methods(例えば、Pindel[ref.10]およびSplitread[ref.11])は、理論的には任意のサイズの欠失を検出できるが、現在のシーケンス技術ではリード長が短いために(論文執筆時点)挿入を検出する能力は限られている。第2のパラダイムは、デノボ全ゲノムアセンブリを行い、組み立てられたコンティグとリファレンスゲノムとの間の変異を検出することからなる[ref.12,13]。より大きな突然変異を検出する可能性を有する一方で、実際には、このパラダイムは、ホモ接合型およびヘテロ接合型突然変異を正確に報告するために、細かくかつ局在化した分析が必要である。最近では、de novo aasemblyを使ったGATK HaplotypeCaller、SOAPindel[ref.14]、およびCortex[ref.15]の3種類のアプローチが開発されている。他の最近のアプローチであるTIGRA[ref.16]も、ローカルアセンブリを使用するが、ブレークポイントのみ検出するよう調整されており、indelsの配列は報告しない。

 著者らは、exome-captureデータ内のindelsを検出するマイクロアセンブリパイプラインScalpelを提示する(論文より 図1)。マッピングアセンブリの力を組み合わせることにより、Scalpelはde Bruijn graphを慎重に検索し、各エキソンにまたがるシーケンスパス(コンティグ)を探す。このアルゴリズムには、各エキソンのオンザフライリピート組成分析と、セルフチューニングのk-mer戦略が含まれる。

 

公式HP

http://scalpel.sourceforge.net/manual.html

マニュアル1

http://scalpel.sourceforge.net/manual.html

マニュアル2

https://sourceforge.net/p/scalpel/wiki/Manual/

Scalpelに関するツイート。

 

インストール

ubuntu18.04のAnaconda2.4.2でテストした。

Github

#Anaconda環境ならcondaを使う(linux only)
conda install -c bioconda scalpel

#dockerイメージも提供されている。
docker pull hanfang/scalpel:0.5.3

docker imagesでIDを調べてから

scalpel-discovery -h

$ scalpel-discovery -h

Local date and time: Sat Jul  7 10:13:11 2018

 

Program: scalpel-discovery (micro-assembly variant detection)

Version: 0.5.3 (beta), January 25 2016

Contact: Giuseppe Narzisi <gnarzisi@nygenome.org>

 

usage: scalpel-discovery <COMMAND> [OPTIONS]

 

COMMAND:

 

    --help    : this (help) message

    --verbose : verbose mode

 

    --single  : single exome study 

    --denovo  : family study (mom,dad,affected,sibling)

    --somatic : normal/tumor study

 

scalpel-discovery --single

$ scalpel-discovery --single

Local date and time: Sat Jul  7 10:14:20 2018

 

Program: scalpel-discovery (micro-assembly variant detection)

Version: 0.5.3 (beta), January 25 2016

Contact: Giuseppe Narzisi <gnarzisi@nygenome.org>

 

usage: scalpel-discovery --single --bam <BAM file> --bed <BED file> --ref <FASTA file> [OPTIONS]

 

Detect indels in one single dataset (e.g., one individual).

 

OPTIONS:

 

    --help             : this (help) message

    --verbose          : verbose mode

 

  Required:

  

    --bam <BAM file>   : BAM file with the reference-aligned reads

    --bed <BED file>   : file with list of regions (BED format) in sorted order or single region in format chr:start-end (example: 1:31656613-31656883)

    --ref <FASTA file> : reference genome in FASTA format (same one that was used to create the BAM file)

 

  Optional:

  

    --kmer <int>       : k-mer size [default 25]

    --covthr <int>     : threshold used to select source and sink [default 5]

    --lowcov <int>     : threshold used to remove low-coverage nodes [default 2]

    --covratio <float> : minimum coverage ratio for sequencing errors (default: 0.01)

    --radius <int>     : left and right extension (in base-pairs) [default 100]

    --window <int>     : window-size of the region to assemble (in base-pairs) [default 400]

    --maxregcov <int>  : maximum average coverage allowed per region [default 10000]

    --step <int>       : delta shift for the sliding window (in base-pairs) [default 100]

    --mapscore <int>   : minimum mapping quality for selecting reads to assemble [default 1]

    --pathlimit <int>  : limit number of sequence paths to [default 1000000]

    --mismatches <int> : max number of mismatches in near-perfect repeat detection [default 3]

    --dir <directory>  : output directory [default ./outdir]

    --numprocs <int>   : number of parallel jobs (1 for no parallelization) [default 1]

    --sample <string>  : only process reads/fragments in sample [default ALL]

    --coords <file>    : file with list of selected locations to examine [default null]

 

  Output:

  

    --format           : export mutations in selected format (annovar | vcf) [default vcf]

    --intarget         : export mutations only inside the target regions from the BED file

    --logs             : keep log files

 

  Note 1: the list of detected indels is saved in file: OUTDIR/variants.indel.*

  where OUTDIR is the output directory selected with option "--dir" [default ./outdir]

 

  Note 2: use the export tool (scalpel-export) to export mutations using different filtering criteria

 

scalpel-discovery --somatic

$ Local date and time: Sat Jul  7 10:14:53 2018

 

Program: scalpel-discovery (micro-assembly variant detection)

Version: 0.5.3 (beta), January 25 2016

Contact: Giuseppe Narzisi <gnarzisi@nygenome.org>

 

usage: scalpel-discovery --somatic --normal <BAM file> --tumor <BAM file> --bed <BED file> --ref <FASTA file> [OPTIONS]

 

Detect somatic indels in a tumor/normal pair

 

OPTIONS:

 

    --help                : this (help) message

    --verbose             : verbose mode

 

  Required:

  

    --normal <BAM file>   : normal BAM file

    --tumor  <BAM file>   : tumor BAM file

    --bed    <BED file>   : file with list of regions (BED format) in sorted order or single region in format chr:start-end (example: 1:31656613-31656883)

    --ref    <FASTA file> : reference genome in FASTA format (same one that was used to create the BAM file)

 

  Optional:

  

    --kmer <int>          : k-mer size [default 25]

    --covthr <int>        : threshold used to select source and sink [default 5]

    --lowcov <int>        : threshold used to remove low-coverage nodes [default 2]

    --covratio <float>    : minimum coverage ratio for sequencing errors (default: 0.01)

    --radius <int>        : left and right extension (in base-pairs) [default 100]

    --window <int>        : window-size of the region to assemble (in base-pairs) [default 400]

    --maxregcov <int>     : maximum average coverage allowed per region [default 10000]

    --step <int>          : delta shift for the sliding window (in base-pairs) [default 100]

    --mapscore <int>      : minimum mapping quality for selecting reads to assemble [default 1]

    --pathlimit <int>     : limit number of sequence paths to [default 1000000]

    --mismatches <int>    : max number of mismatches in near-perfect repeat detection [default 3]

    --dir <directory>     : output directory [default ./outdir]

    --numprocs <int>      : number of parallel jobs (1 for no parallelization) [default 1]

    --coords <file>       : file with list of selected coordinates to examine [default null]

    --two-pass            : perform second pass of analysis to confirm candidate calls

 

  Output:

  

    --format              : export mutations in selected format (annovar | vcf) [default vcf]

    --intarget            : export mutations only inside the target regions from the BED file

    --logs                : keep log files

 

  Note 1: the list of somatic indels is saved in file: OUTDIR/somatic.indel.* 

  where OUTDIR is the output directory selected with option "--dir" [default ./outdir].

  

  Note 2: use the export tool (scalpel-export) to export mutations using different filtering criteria

scalpel-discovery --denovo

$ Local date and time: Sat Jul  7 10:15:27 2018

 

Program: scalpel-discovery (micro-assembly variant detection)

Version: 0.5.3 (beta), January 25 2016

Contact: Giuseppe Narzisi <gnarzisi@nygenome.org>

 

usage: scalpel-discovery --denovo --dad <BAM file> --mom <BAM file> --aff <BAM file> --sib <BAM file> --bed <BED file> --ref <FASTA file> [OPTIONS]

 

Detect de novo indels in a family of four individuals (mom, dad, aff, sib).

 

OPTIONS:

 

    --help             : this (help) message

    --verbose          : verbose mode

 

  Required:

  

    --dad <BAM file>   : father BAM file

    --mom <BAM file>   : mother BAM file

    --aff <BAM file>   : affected child BAM file

    --sib <BAM file>   : sibling BAM file

    --bed <BED file>   : file with list of regions (BED format) in sorted order or single region in format chr:start-end (example: 1:31656613-31656883)

    --ref <FASTA file> : reference genome in FASTA format (same one that was used to create the BAM file)

 

  Optional:

  

    --kmer <int>       : k-mer size [default 25]

    --covthr <int>     : threshold used to select source and sink [default 5]

    --lowcov <int>     : threshold used to remove low-coverage nodes [default 2]

    --covratio <float> : minimum coverage ratio for sequencing errors (default: 0.01)

    --radius <int>     : left and right extension (in base-pairs) [default 100]

    --window <int>     : window-size of the region to assemble (in base-pairs) [default 400]

    --maxregcov <int>  : maximum average coverage allowed per region [default 10000]

    --step <int>       : delta shift for the sliding window (in base-pairs) [default 100]

    --mapscore <int>   : minimum mapping quality for selecting reads to assemble [default 1]

    --pathlimit <int>  : limit number of sequence paths to [default 1000000]

    --mismatches <int> : max number of mismatches in near-perfect repeat detection [default 3]

    --dir <directory>  : output directory [default ./outdir]

    --numprocs <int>   : number of parallel jobs (1 for no parallelization) [default 1]

    --coords <file>    : file with list of selected coordinates to examine [default null]

    --two-pass         : perform second pass of analysis to confirm candidate calls

 

  Output:

  

    --format           : export mutations in selected format (annovar | vcf) [default vcf]

    --intarget         : export mutations only inside the target regions from the BED file

    --logs             : keep log files

 

  Note 1: the list of de novo indels is saved in file: OUTDIR/denovos.indel.*

  where OUTDIR is the output directory selected with option "--dir" [default ./outdir]

 

  Note 2: use the export tool (scalpel-export) to export mutations using different filtering criteria

 

 

ラン

1、シングルサンプル。

bedでエキソームキャプチャ領域を指定する。

scalpel-discovery --single --bam file.bam --bed regions.bed --ref genome.fa

デフォルトではoutdir/にvariants.indel.*というファイル名で出力される。scalpel-exportを使うと、そこから特定のタイプのバリアントのみ選抜できる。--single、--denovo、--somaticなどが選べる。ここでは--singleを選ぶ。databaseファイルとしてoutdir/variants.db.dirを使う。

scalpel-export --single --db outdir/variants.db.dir --bed regions.bed --ref genome.fa > single.vcf

 

2、 somatic変異。

tumor/normal比較から体細胞変異を検出する。正常組織由来のbamと腫瘍由来のbamを指定する。

scalpel-discovery --somatic --normal normal.bam --tumor tumor.bam --bed regions.bed --ref genome.fa --two-pass

#somaticをexport。1の例と同様、dbファイルを指定する。
scalpel-export --somatic --db DBfile --bed regions.bed --ref genome.fa > somatic.vcf

バリアント検出時、--two-passオプションをつけることで、ランタイムは増えるがfalse positiveがへりprecisionが改善する。

ビューアで確認する。

igv -g human_g1k_v37_decoy.fa normal.bam/tumor.bam,somatic.vcf

 tumor(下半分)特異的な変異が出力されている。

f:id:kazumaxneo:20180807111320j:plain

 

 

3、de novo変異。

例えばdad、mom、sib、affectedのFamily quad解析を行いaffのde novo変異を検出する。

scalpel-discovery --denovo --dad dad.bam --mom mom.bam --aff aff.bam --sib sib.bam --bed regions.bed --ref genome.fa --two-pass

#de novoをexport。-1の例と同様、dbファイルを指定する。
scalpel-export --denovo --db DBfile --bed regions.bed --ref genome.fa

scalpel-discoveryが終わると、outdir/main/下に、dad、mam、aff、sibの4つのサブディレクトリができ、その各々にindels.vcfとdatabaseファイルが保存される。family trio解析に使う場合、--affと--sibに同じサンプルbamを指定する。他の pedigree typesについては今後対応予定らしい。

 

 

bed以外にchr:start-endで1つの領域を直接指定することで、関心のある領域だけ素早く解析することができるようになっている。 

scalpel-discovery --single --bam file.bam --ref genome.fa --bed chr1:1000-4000

 

exportコマンドについては、以下のオプションを考慮するようアドバイスされている。

  1. mininum altertnative count:
    • Change this number according to the type of study (germline, somatic, denovo) and the expected coverage.
    • Smaller values will give more sensitivity but increase the number of false-positive calls.
  2. minimum variant allele frequency VAF (altCoverage/totalCoverage)
    • Similarly to the minimum alternative count parameter, smaller values will increase sensitivity but reduce specificity.
  3. maximum chi-squared score:
    • Chi square test statistic computed using the reference and alternative coverage for the mutation.
    • Larger values will give more sensitivity but produce a large number of false-positives.
    • For germline and denovo discovery we recommend using chi-square score ≤ 20 to select high confidence indels.
  4. minimum fisher exact test score:
    • Fisher exact test statistic computed using the reference and alternative counts in tumor and normal samples.
    • Goal is to test the independence between the allele balances in the tumor and the normal.
    • We recommend using a fisher score > 10 to select high confidence somatic indels.

 

ヒトのwhole exomeをモデルに開発されているが、whole genomeにも使用できる。WGS に使用する時は、メモリ使用量の関係から染色体ごとに実施するよう推奨されている。またウィンドウサイズをdefaultの400から"--window 600"に変更することが提案されている(--window <int> : window-size of the region to assemble (in base-pairs) [default 400] )。 "--output-format annovar"をつけると、annnovarフォーマットで出力できる(デファルトはvcf)。

 

引用

Accurate detection of de novo and transmitted indels within exome-capture data using micro-assembly

Giuseppe Narzisi, Jason A. O'Rawe, Ivan Iossifov, Han Fang, Yoon-ha Lee, Zihua Wang, Yiyang Wu, Gholson J. Lyon, Michael Wigler, and Michael C. Schatz

Nat Methods. 2014 Oct; 11(10): 1033–1036.  Published online 2014 Aug 17.

 

Reducing INDEL calling errors in whole-genome and exome sequencing data

Fang H, Wu Y, Narzisi G, O’Rawe JA, Jimenez Barron LT, Rosenbaum J, Ronemus M, Iossifov I, Schatz MC, Lyon GJ

Genome Medicine (2014) doi:10.1186/s13073-014-0089-z

 

Indel variant analysis of short-read sequencing data with Scalpel

Fang H, Grabowska EA, Arora K, Vacic V, Zody M, Iossifov I, O’Rawe JA, Y Wu, Jimenez-Barron LT, Rosenbaum J, Ronemus M, Lee Y, Wang Z, Dikoglu E, Jobanputra V, Lyon GJ, Wigler M, Schatz MC, Narzisi G*,  

Preprint in bioRxiv (2016) doi: dx.doi.org/10.1101/028050

bamとvcfの可視化分析ツール bam.iobio.ioとvcf.iobio.io

 

 今日の大きなゲノムデータセットの分析は、all-or-nothingアプローチ、すなわち、時間がかかり直感的ではない完全なエンド・ツー・エンドの分析を生み出す。それはまた、かなりの計算専門知識と高価なコンピュータインフラストラクチャを必要とし、多くのベンチ生物学者をゲノムスケールの分析から排除してしまう。著者らは、すべての生物学者が容易に、インタラクティブに、視覚的に分析できるように、Webベースの分析システムiobio(http://iobio.io/)を開発し、継続的に拡大している。煩わしいリソースを必要としないことは研究に不可欠である。ゲノム規模の「ビッグデータ」の主な例は、BAM形式のDNA配列アラインメントファイルである。 BAMファイルは、ハイスループットシーケンス解析の普遍的な通貨として機能する、多様なタイプの遺伝解析の基礎となっている。ここでは、オープンソースダッシュボードWebアプリケーションであるbam.iobio(論文 図1; http://bam.iobio.io/)の最初の完全なiobio Webアプリケーションを報告する。このWebアプリケーションは、人間が読み取り可能なBAMファイルを作成し、ユーザーがそれらのアラインメントをリアルタイムで分析できるようにする。

 

iobio HP

f:id:kazumaxneo:20180707004344p:plain

bam.iobio.ioを選択する。

 

ソート済みのbamとbam.baiファイルをアップロードする。bam.baiが無ければsamtoolsかbamtoolsで作成する(持ってなければ"brew install samtools bamtools"で導入)。

bamtools index -in input.bam

または

samtools index input.bam

 

Demoファイルを開くと以下のような感じになる。

 

フラグメントサイズ、リードサイズ、マッピングクオリティなどの各種情報が表示される。

f:id:kazumaxneo:20180707011210p:plain

 

左上の染色体番号をクリックすることで、その染色体だけの情報に変更できる。

f:id:kazumaxneo:20180707011000p:plain

chr9。

 

また、ドラッグすることで特定の領域を拡大できる。変更の都度、statistics情報は更新される。

 

vcf.iobioも同じようにつかえる。

http://vcf.iobio.io/?species=Human



exampleデータ表示例。

 

Taxonomer。

引用

bam.iobio: a web-based, real-time, sequence alignment file inspector
Chase A Miller, Yi Qiao, Tonya DiSera, Brian D’Astous, and Gabor T Marth

Nat Methods. 2014 Dec; 11(12): 1189.

NGSデータをマッピングする Magic-BLAST

2019 4/2 文章修正

2021 8/14  論文引用

2023/07/06 help更新

 

 Magic-BLASTは、NGSシーケンスデータ(Illumina、Roche-454、ABI(SOLiDを除く))をゲノムやトランスクリプトーム全体に対してマッピングするため開発されたNCBI BLASTの派生ツール。Magic-BLASTは他のBLASTプログラムと同様に動作し、はじめにシード16塩基の正確なマッチを見つけ、左右にアライメントを拡張する。 スプライスシグナルが検出された場合、イントロンをまたぐ短いアライメントは1つに繋ぐため、真核生物のRNA seqのマッパーとしても使用することができるとされる。ペアエンドも考慮しており、累積ペアスコアを使用して最適なマッピングを選択する。繰り返しのマッピングを避けるために、Magic-BLASTはデータベースをスキャンし、16塩基のwordを数える機能をもち、defaultでは 10回以上出現するものは拡張されない。この機能は、-limit_lookup Fオプションを使用して無効化できる。

 入力は、FASTA、FASTQ、そしてローカルのSRAファイルにも対応する。SRA ID を指定することでリモートのSRAのデータを直接扱うこともできる。

 

NCBI Insights

Introducing Magic-BLAST | NCBI Insights

How Magic-BLAST works(Documentation)

https://ncbi.github.io/magicblast/doc/tutorial.html

 

インストール

Github

https://github.com/ncbi/magicblast

 ftpサイトからプログラムのバイナリをダウンロードし、パスの通ったディレクトリにコピーする。

https://ncbi.github.io/magicblast/doc/download.html

追記

condaを使う

mamba install -c bioconda magicblast -y

> makeblastdb -help

USAGE

  makeblastdb [-h] [-help] [-in input_file] [-input_type type]

    -dbtype molecule_type [-title database_title] [-parse_seqids]

    [-hash_index] [-mask_data mask_data_files] [-mask_id mask_algo_ids]

    [-mask_desc mask_algo_descriptions] [-gi_mask]

    [-gi_mask_name gi_based_mask_names] [-out database_name]

    [-blastdb_version version] [-max_file_sz number_of_bytes]

    [-logfile File_Name] [-taxid TaxID] [-taxid_map TaxIDMapFile] [-version]

 

DESCRIPTION

   Application to create BLAST databases, version 2.12.0+

 

REQUIRED ARGUMENTS

 -dbtype <String, `nucl', `prot'>

   Molecule type of target db

 

OPTIONAL ARGUMENTS

 -h

   Print USAGE and DESCRIPTION;  ignore all other parameters

 -help

   Print USAGE, DESCRIPTION and ARGUMENTS; ignore all other parameters

 -version

   Print version number;  ignore other arguments

 

 *** Input options

 -in <File_In>

   Input file/database name

   Default = `-'

 -input_type <String, `asn1_bin', `asn1_txt', `blastdb', `fasta'>

   Type of the data specified in input_file

   Default = `fasta'

 

 *** Configuration options

 -title <String>

   Title for BLAST database

   Default = input file name provided to -in argument

 -parse_seqids

   Option to parse seqid for FASTA input if set, for all other input types

   seqids are parsed automatically

 -hash_index

   Create index of sequence hash values.

 

 *** Sequence masking options

 -mask_data <String>

   Comma-separated list of input files containing masking data as produced by

   NCBI masking applications (e.g. dustmasker, segmasker, windowmasker)

 -mask_id <String>

   Comma-separated list of strings to uniquely identify the masking algorithm

    * Requires:  mask_data

    * Incompatible with:  gi_mask

 -mask_desc <String>

   Comma-separated list of free form strings to describe the masking algorithm

   details

    * Requires:  mask_id

 -gi_mask

   Create GI indexed masking data.

    * Requires:  parse_seqids

    * Incompatible with:  mask_id

 -gi_mask_name <String>

   Comma-separated list of masking data output files.

    * Requires:  mask_data, gi_mask

 

 *** Output options

 -out <String>

   Name of BLAST database to be created

   Default = input file name provided to -in argumentRequired if multiple

   file(s)/database(s) are provided as input

 -blastdb_version <Integer, 4..5>

   Version of BLAST database to be created

   Default = `5'

 -max_file_sz <String>

   Maximum file size for BLAST database files

   Default = `1GB'

 -logfile <File_Out>

   File to which the program log should be redirected

 

 *** Taxonomy options

 -taxid <Integer, >=0>

   Taxonomy ID to assign to all sequences

    * Incompatible with:  taxid_map

 -taxid_map <File_In>

   Text file mapping sequence IDs to taxonomy IDs.

   Format:<SequenceId> <TaxonomyId><newline>

    * Requires:  parse_seqids

    * Incompatible with:  taxid

 

./magicblast -help

$ magicblast -help

USAGE

  magicblast [-h] [-help] [-db database_name] [-gilist filename]

    [-seqidlist filename] [-negative_gilist filename]

    [-negative_seqidlist filename] [-taxids taxids] [-negative_taxids taxids]

    [-taxidlist filename] [-negative_taxidlist filename]

    [-db_soft_mask filtering_algorithm] [-db_hard_mask filtering_algorithm]

    [-subject subject_input_file] [-subject_loc range] [-query input_file]

    [-out output_file] [-gzo] [-out_unaligned output_file]

    [-word_size int_value] [-gapopen open_penalty] [-gapextend extend_penalty]

    [-perc_identity float_value] [-fr] [-rf] [-penalty penalty]

    [-lcase_masking] [-validate_seqs TF] [-infmt format] [-paired]

    [-query_mate infile] [-sra accession] [-sra_batch file]

    [-parse_deflines TF] [-sra_cache] [-outfmt format] [-unaligned_fmt format]

    [-md_tag] [-no_query_id_trim] [-no_unaligned] [-no_discordant] [-tag tag]

    [-num_threads int_value] [-max_intron_length length] [-score num]

    [-max_edit_dist num] [-splice TF] [-reftype type] [-limit_lookup TF]

    [-max_db_word_count num] [-lookup_stride num] [-version]

 

DESCRIPTION

   Short read mapper

 

OPTIONAL ARGUMENTS

 -h

   Print USAGE and DESCRIPTION;  ignore all other parameters

 -help

   Print USAGE, DESCRIPTION and ARGUMENTS; ignore all other parameters

 -version

   Print version number;  ignore other arguments

 

 *** Input query options

 -query <File_In>

   Input file name

   Default = `-'

    * Incompatible with:  sra, sra_batch

 -infmt <String, `asn1', `asn1b', `fasta', `fastc', `fastq'>

   Input format for sequences

   Default = `fasta'

    * Incompatible with:  sra, sra_batch

 -paired

   Input query sequences are paired

 -query_mate <File_In>

   FASTA file with mates for query sequences (if given in another file)

    * Requires:  query

 -sra <String>

   Comma-separated SRA accessions

    * Incompatible with:  query, infmt, sra_batch

 -sra_batch <File_In>

   File with a list of SRA accessions, one per line

    * Incompatible with:  sra, query, infmt

 

 *** General search options

 -db <String>

   BLAST database name

    * Incompatible with:  subject, subject_loc

 -out <File_Out, file name length < 256>

   Output file name

   Default = `-'

 -gzo

   Output will be compressed

 -out_unaligned <File_Out>

   Report unaligned reads to this file

    * Incompatible with:  no_unaligned

 -word_size <Integer, >=12>

   Minimum number of consecutive bases matching exactly

   Default = `18'

 -gapopen <Integer>

   Cost to open a gap

   Default = `0'

 -gapextend <Integer>

   Cost to extend a gap

   Default = `4'

 -penalty <Integer, <=0>

   Penalty for a nucleotide mismatch

   Default = `-4'

 -max_intron_length <Integer, >=0>

   Maximum allowed intron length

   Default = `500000'

 

 *** BLAST-2-Sequences options

 -subject <File_In>

   Subject sequence(s) to search

    * Incompatible with:  db, gilist, seqidlist, negative_gilist,

   negative_seqidlist, taxids, taxidlist, negative_taxids, negative_taxidlist,

   db_soft_mask, db_hard_mask

 -subject_loc <String>

   Location on the subject sequence in 1-based offsets (Format: start-stop)

    * Incompatible with:  db, gilist, seqidlist, negative_gilist,

   negative_seqidlist, taxids, taxidlist, negative_taxids, negative_taxidlist,

   db_soft_mask, db_hard_mask, remote

 

 *** Formatting options

 -outfmt <String, Permissible values: 'asn' 'sam' 'tabular' >

   alignment view options:

   sam = SAM format,

   tabular = Tabular format,

   asn = text ASN.1

   Default = `sam'

 -unaligned_fmt <String, Permissible values: 'fasta' 'sam' 'tabular' >

   format for reporting unaligned reads:

   sam = SAM format,

   tabular = Tabular format,

   fasta = sequences in FASTA format

   Default = same as outfmt

    * Requires:  out_unaligned

 -md_tag

   Include MD tag in SAM report

 -no_query_id_trim

   Do not trim '.1', '/1', '.2', or '/2' at the end of read ids for SAM format

   andpaired runs

 -no_unaligned

   Do not report unaligned reads

    * Incompatible with:  out_unaligned

 -no_discordant

   Suppress discordant alignments for paired reads

 -tag <String>

   A user tag to add to each alignment

 

 *** Query filtering options

 -lcase_masking

   Use lower case filtering in subject sequence(s)?

 -validate_seqs <Boolean>

   Reject low quality sequences 

   Default = `true'

 -limit_lookup <Boolean>

   Remove word seeds with high frequency in the searched database

   Default = `true'

 -max_db_word_count <Integer, (>=2 and =<255)>

   Words that appear more than this number of times in the database will be

   masked in the lookup table

   Default = `30'

 -lookup_stride <Integer>

   Number of words to skip after collecting one while creating a lookup table

   Default = `0'

 

 *** Restrict search or results

 -gilist <String>

   Restrict search of database to list of GIs

    * Incompatible with:  seqidlist, taxids, taxidlist, negative_gilist,

   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -seqidlist <String>

   Restrict search of database to list of SeqIDs

    * Incompatible with:  gilist, taxids, taxidlist, negative_gilist,

   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -negative_gilist <String>

   Restrict search of database to everything except the specified GIs

    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,

   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -negative_seqidlist <String>

   Restrict search of database to everything except the specified SeqIDs

    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,

   negative_gilist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -taxids <String>

   Restrict search of database to include only the specified taxonomy IDs

   (multiple IDs delimited by ',')

    * Incompatible with:  gilist, seqidlist, taxidlist, negative_gilist,

   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -negative_taxids <String>

   Restrict search of database to everything except the specified taxonomy IDs

   (multiple IDs delimited by ',')

    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,

   negative_gilist, negative_seqidlist, negative_taxidlist, remote, subject,

   subject_loc

 -taxidlist <String>

   Restrict search of database to include only the specified taxonomy IDs

    * Incompatible with:  gilist, seqidlist, taxids, negative_gilist,

   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,

   subject_loc

 -negative_taxidlist <String>

   Restrict search of database to everything except the specified taxonomy IDs

    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,

   negative_gilist, negative_seqidlist, negative_taxids, remote, subject,

   subject_loc

 -db_soft_mask <String>

   Filtering algorithm ID to apply to the BLAST database as soft masking

    * Incompatible with:  db_hard_mask, subject, subject_loc

 -db_hard_mask <String>

   Filtering algorithm ID to apply to the BLAST database as hard masking

    * Incompatible with:  db_soft_mask, subject, subject_loc

 -perc_identity <Real, 0..100>

   Percent identity cutoff for alignments

   Default = `0.0'

 -fr

   Strand specific reads forward/reverse

    * Incompatible with:  rf

 -rf

   Strand specific reads reverse/forward

    * Incompatible with:  fr

 

 *** Miscellaneous options

 -parse_deflines <Boolean>

   Should the query and subject defline(s) be parsed?

   Default = `true'

 -sra_cache

   Enable SRA caching in local files

    * Requires:  sra

 -num_threads <Integer, >=1>

   Number of threads (CPUs) to use in the BLAST search

   Default = `1'

    * Incompatible with:  remote

 

 *** Mapping options

 -score <String>

   Cutoff score for accepting alignments. Can be expressed as a number or a

   function of read length: L,b,a for a * length + b.

   Zero means that the cutoff score will be equal to:

   read length,      if read length <= 20,

   20,               if read length <= 30,

   read length - 10, if read length <= 50,

   40,               otherwise.

   Default = `0'

 -max_edit_dist <Integer>

   Cutoff edit distance for accepting an alignment

   Default = unlimited

 -splice <Boolean>

   Search for spliced alignments

   Default = `true'

 -reftype <String, `genome', `transcriptome'>

   Type of the reference: genome or transcriptome

   Default = `genome'

 

 

 

ラン

1、index

データベースの作成。

makeblastdb -in ref.fa -dbtype nucl -parse_seqids -out my_database
  • -parse_seqids   Option to parse seqid for FASTA input if set, for all other input types seqids are parsed automatically

 

 2、mapping

SRAのIDを指定すると、データをダウンロードしてmapingを実行する。sraはIDのみ記載する。.sraまで記載するとエラーを起こす。ペアエンドは自動で認識される。出力はsam形式。

magicblast -sra <accessionID> -db my_database -num_threads 8 -out output.sam
  •  -outfmt    output.format. SAM format, tabular = Tabular format, asn = text ASN.1 Default = `sam'

デフォルトではスプライスアライメントがONになっている。bacteria RNA seqや一般的なDNA seqでは、スプライスアライメントをOFFにする"-splice F"フラグを立てる。

 

またはローカルのペアエンドのfastqをマッピングする。アンマップのリードは捨てる。samtoolsにパイプして出力はポジションソート(coordinate sort)のbamとする。"-infmt fastq"がないとエラーになる。

magicblast -query pair1.fastq -query_mate pair2.fastq -db my_database -infmt fastq -num_threads 8 -no_unaligned |\
samtools view -@ 8 -bS - |\
samtools sort -@ 8 -O BAM -o output.bam - # *1
  • -no_unaligned   Do report unaligned reads

NGSデータがFASTAフォーマットなら-infmt fastqは消す。

*1 上のコマンドはsamtools1.2など古いsamtoolsでは動作しません。

 

トランスクリプトームがデータベースの場合、"-reftype transcriptome"フラグを立てる。これは"-splice F -limit_lookup F"の一括設定で、スプライスアライメントOFFとリピートアライメント無効化のキャンセル(否定)になる。

magicblast -query reads.fa -db my_database -reftype transcriptome -num_threads 8 -out output.sam 

 

publishされたペーパーがなく単なる感想になってしまいますが、1サンプルだけテストした限り、ランニングタイムはそれなりに長めですが、アライメント感度が非常に高いという結果が得られました。BLAST譲りの高い感度があるようなので、適材適所で使うケースを間違えなければ使えるアライナーではないでしょうか?すでにMagic-BLASTをフローに組み込んだツールも出てきています。

 

引用

Copyright

https://ncbi.github.io/magicblast/dev/copyright.html

 

Magic-BLAST, an accurate RNA-seq aligner for long and short reads
Grzegorz M. Boratyn, Jean Thierry-Mieg, Danielle Thierry-Mieg, Ben Busby & Thomas L. Madden
BMC Bioinformatics volume 20, Article number: 405 (2019)