---
name: "fastaq-filter"
section: "1"
platform: "linux"
package: "fastaq"
version: "3.17.0-9"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fastaq-filter"
---

# fastaq-filter(1)

Filter sequences to get a subset of them

## NAME

fastaq\_filter - Filter sequences to get a subset of them

## DESCRIPTION

usage: fastaq\_filter \[options\] \<infile\> \<outfile\>

Filters a sequence file by sequence length and/or by name matching a regular expression

### positional arguments:

- infile

  Name of input file to be filtered

- outfile

  Name of output file

### options:

- **-h**, **--help**

  show this help message and exit

- **--min\_length** INT

  Minimum length of sequence to keep \[0\]

- **--max\_length** INT

  Maximum length of sequence to keep \[inf\]

- **--regex** REGEX

  If given, only reads with a name matching the regular expression will be kept

- **--ids\_file** FILENAME

  If given, only reads whose ID is in th given file will be used. One ID per line of file.

- **-v**, **--invert**

  Only keep sequences that do not match the filters

### Mate file for read pairs options:

- **--mate\_in** FILENAME

  Name of mates input file. If used, must also provide **--mate\_out**

- **--mate\_out** FILENAME

  Name of mates output file

- **--both\_mates\_pass**

  By default, if either mate passes filter, then both reads output. Use this flag to require that both reads of a pair pass the filter
