macでインフォマティクス

macでインフォマティクス

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

並列化に対応したリファレンスベースのfastq圧縮ツール LW-FQZip2

 

fastqの圧縮の方法論にはいくつか種類があるが、その内の1つリファレンスベースの圧縮ツールは、シーケンスデータをそのまま圧縮するのではなく、リファンレスとの位置合わせ結果を記録する方法論である。そのために、リファレンスにリードをアライメントして、そこでマッチした数やミスマッチや計測する作業を行う必要がある。この方式のメリットは、参照に基づく方法は参照を使わない方法に比べて優れた圧縮率を得ることにある。LW-FQZip1はロスレスのリファレンスベースの圧縮ツールとして発表された。LW-FQZip2は並列化に対応することで LW-FQZip1より高速化している。

  

 

インストール

cent OSに導入した。

本体

Github

https://github.com/Zhuzxlab/LW-FQZip2

git clone https://github.com/Zhuzxlab/LW-FQZip2.git 
cd LW-FQZip2
make clean
make 

 > ./LWFQZip2  -h

]$ ./LWFQZip2 -h

LW-FQZip 2 -- Reference-based compression of long-read FASTQ files

Usage: LWFQZip2 <mode>...[options] ...

Mode:

  -c  --compression

  -d  --decompression

 

Compression/Decompression Options:

  -i, --input FASTQ file or compressed file.

  -r, --input Reference file.

  -h, --help  print this message

  -v, --version display program version

  -m, --maximal read length,range from 30000 to 300000 (Default: 300000)

  -s, --Calculate the counts of the prefixes.

  -g, --best compression model but slowest

 for example: LWFQZip2 -c -i input -r reference -g.

LWFQZip2 -d -i input.lz -r reference -g.

  -a, --assemble-based model, An optional amount (Default: 0.3 percent of the original file size) of reads, which contains the predefined prefix (Default: 'CG', could be combined to be an artificial reference. At the end of the package, this artificial reference is included.

 for example: LWFQZip2 -c -i input -a 0.003(Default: '-a 0.003').

LWFQZip2 -d -i input.lz -a.

Mapping Options Options:

  -b, --the number of mapping thread(Default: 10, mininum:  6 )

  -p, --specify the kmer prefixes, e.g.,'CG', 'AT', and 'TAG' (Default: '-p CG'). 'AA' is not recommended as a prefix.

  -k, --length of a kmer used in locate local alignment. (Default: '-k 8')

  -e, --the tolerance rate of mismatches.(Default: '-e 0.05')

  -L, --the mini length of a legal alignment.(Default: '-l 12')

  -o, --open the complementart palindrome mode.(Default: '-o 1' means open the complementart palindrome mode.)

同じディレクトリのzpaq、lpaq9mが動作しないとだめなので、そちらも確認してからパスを通しておく。

 

ラン

圧縮。

LWFQZip2 -c -i SRR1063349.fastq -r NC_017634.1.fasta -b 6
  • -i  --input FASTQ file or compressed file.  
  • -r  --input Reference file.
  • -b --the number of mapping thread(Default: 10, mininum:  6 )

はじめにリファレンス配列にリードはアライメントされ、それから圧縮が行われる。ファイルサイズはうまくいけば元の10%以下になる。  

解凍。

LWFQZip2 -d -i SRR1063349.fastq.lz -r NC_017634.1.fasta

 

低頻度のk-merの頻度を確認した限り完全なロスレス圧縮 だが、ファイルサイズは圧縮・解凍後、わずかに変動している。

 

 

引用

LW-FQZip 2: a parallelized reference-based compression of FASTQ files.

Huang ZA, Wen Z, Deng Q, Chu Y, Sun Y, Zhu Z.

BMC Bioinformatics. 2017 Mar 20;18(1):179.

 

Light-weight reference-based compression of FASTQ data.

Zhang Y, Li L, Yang Y, Yang X, He S, Zhu Z.

BMC Bioinformatics. 2015 Jun 9;16:188.