macでインフォマティクス

macでインフォマティクス

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

fastqの分析結果をJSON形式で出力する fastq-scan

 

タイトルの通りのツール。開発の動機はGithubのREADME参照。

 

インストール

macos10.14のPython 3.7環境でテストした。

 

#bioconda (link)
conda install -c bioconda -y fastq-scan

fastq-scan -h

$ fastq-scan -h

Usage: cat FASTQ | fastq-scan [options]

Version: 0.4.1

 

Optional arguments:

    -g INT   Genome size for calculating estimated sequencing coverage. (Default 1)

    -p INT   ASCII offset for input quality scores, can be 33 or 64. (Default 33)

    -v       Print version information and exit

    -h       Show this message and exit

 

実行方法

fastqを指定する。ゲノムサイズも指定すればカバレッジ情報も出力される。ゲノムサイズ5Mbなら

cat input.fq | fastq-scan -g 5000000 > out.json

#gzipped fatq
zcat input.fq.gz | fastq-scan 5000000 > out.json

 

ターミナルで確認する。ここではJavaScriptの処理ツールfxで確認する。 

#fxのインストール(github)
npm install -g fx

#viewする
fx out.json

f:id:kazumaxneo:20191209195857p:plain

=>で展開。

f:id:kazumaxneo:20191209200030p:plain

 

オンラインビューアやツールも色々利用できる。

JSON Editor

https://jsoneditoronline.org

引用

https://github.com/rpetit3/fastq-scan