Home Software Services About Contact usearch manual
fastx_getsubseq command

See also


Extract a subsequence from a FASTA or FASTQ file. The label is given by the -label option. The start-end coordinates are specified by the subseq_start and subseq_end options.

Positions, are 1-based so are in the range 1, 2 ... L where L is the sequence length.

Both -subseq_start and/or -subseq_end may be omitted, they default to 1 and L respectively.

If the ‑label_substr_match option is specified, then the label given on the command-line may be a substring of a sequence label.

Output is written to -fastaout (FASTA) and/or -fastqout (FASTQ). You cannot use -fastqout if the input is FASTA because the quality scores are not known.


usearch -fastx_getsubseq human.fa -label chr7 -subseq_start 1677654 -subseq_end 1677699 \
  -fastaout chr7_segment.fa