LoginSignup
1
2

More than 5 years have passed since last update.

fastqファイルからランダムサンプリングする

Last updated at Posted at 2015-12-17

色々方法はあると思いますがここではfastq-toolsを使用します。

インストール

git clone https://github.com/dcjones/fastq-tools
cd fastq-tools
sudo sh autogen.sh && sudo ./configure && sudo make install

実行

色々コマンドがありますが、ここではfastq-sampleを用います。
サンプル元ファイルはgzされていてもいなくてもかまいません
いったん解凍しなければならないようです。

sh
fastq-sample -p 0.1 path/to/my.fastq.gz -o splitted

fastq-sample -p 0.1 path/to/my.fastq -o splitted

カレントディレクトリにsplitted.fastqができます。

ここでは-pでサンプルする割合を指定しましたが、-nで数を指定することも可能です。
- -r ... 復元抽出する。デフォルトは非復元抽出

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2