百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fq

> 前端框架
开源

用于操作 FASTQ 文件的命令行工具

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

用于操作 FASTQ 文件的命令行工具

fq

fq filters, subsamples, and validates FASTQ files.

Install

There are different methods to install fq.

Releases

Precompiled binaries are built for modern Linux distributions (x86_64-unknown-linux-gnu), macOS (x86_64-apple-darwin), and Windows (x86_64-pc-windows-msvc). The Linux binaries require glibc 2.31+ (CentOS/RHEL 9+, Debian 11+, Ubuntu 20.04+, etc.).

Conda

fq is available via Bioconda.

$ conda install fq=0.12.0

Manual

Clone the repository and use Cargo to install fq.

$ git clone --depth 1 --branch v0.12.0 https://github.com/stjude-rust-labs/fq.git
$ cd fq
$ cargo install --locked --path .

Container image

Container images are managed by Bioconda and available through Quay.io, e.g., using Docker:

$ docker image pull quay.io/biocontainers/fq:

See the repository tags for the available tags.

Alternatively, build the development container image:

$ git clone --depth 1 --branch v0.12.0 https://github.com/stjude-rust-labs/fq.git
$ cd fq
$ docker image build --tag fq:0.12.0 .

Usage

fq provides subcommands for filtering, subsampling, and validating FASTQ files.

filter

fq filter filters a given FASTQ file by a set of names or a sequence pattern. The result includes only the records that match the given options.

Usage

Filters a FASTQ file

Usage: fq filter [OPTIONS] --dsts  [SRCS]...

Arguments:
  [SRCS]...  FASTQ sources. Accepts both raw and gzipped FASTQ inputs

Options:
      --names 
          Allowlist of record names
      --sequence-pattern 
          Keep records that have sequences that match the given regular expression
      --dsts 
          Filtered FASTQ destinations
  -h, --help
          Print help
  -V, --version
          Print version

Examples

bash
# Filters an input FASTQ using the given allowlist.
$ fq filter --names allowlist.txt --dsts /dev/stdout in.fastq

# Filters FASTQ files by matching a sequence pattern in the first input's
# records and applying the match to all inputs.
$ fq filter --sequence-pattern ^TC --dsts out.1.fq --dsts out.2.fq in.1.fq in.2.fq

lint

fq lint is a FASTQ file pair validator.

Usage

…

Validators

validate includes a set of validators that run on single or paired records. By default, records are validated with all rules, but validators can be disabled using --disable-validator CODE, where CODE is one of validators listed below.

Single
Code Level Name Validation
S001 low PlusLine Plus line starts with a "+".
S002 medium Alphabet All characters in sequence line are one of "ACGTN", case-insensitive.
S003 high Name Name line starts with an "@".
S004 low Complete All four record lines (name, sequence, plus line, and quality) are present.
S005 high ConsistentSeqQual Sequence and quality lengths are the same.
S006 medium QualityString All characters in quality line are between "!" and "~" (ordinal values).
S007 high DuplicateName All record names are unique.
Paired
Code Level Name Validation
P001 medium Names Each paired read name is the same, excluding interleave.

Examples

bash
# Validate both reads using all validators. Exits cleanly (0) if no validation
# errors occur.
$ fq lint r1.fastq r2.fastq

# Log errors instead of quitting on first error.
$ fq lint --lint-mode log r1.fastq r2.fastq

# Disable validators S004 and S007.
$ fq lint --disable-validator S004 --disable-validator S007 r1.fastq r2.fastq

subsample

fq subsample outputs a subset of records from single or paired FASTQ files.

When using a probability (-p, --probability), each file is read through once, and a subset of records is selected based on that chance. Given the randomness used when sampling a uniform distribution, the output record count will not be exact but (statistically) close.

When using a record count (-n, --record-count), the first input is read twice, but it provides an exact number of records to be selected.

A seed (-s, --seed) can be provided to influence the results, e.g., for a deterministic subset of records.

For paired input, the sampling is applied to each pair.

Usage

…

Examples

…

Legal

Please see the disclaimer that applies to all crates and command line tools made available by St. Jude Rust Labs.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rustbioinformaticsfastqfastq-filesgenomics

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类前端框架
定价开源

> 相关工具

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架