GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
samtools-fqidx(1) Bioinformatics tools samtools-fqidx(1)

samtools fqidx - indexes or queries regions from a fastq file

samtools fqidx ref.fastq [region1 [...]]

Index reference sequence in the FASTQ format or extract subsequence from indexed reference sequence. If no region is specified, fqidx will index the file and create <ref.fastq>.fai on the disk. If regions are specified, the subsequences will be retrieved and printed to stdout in the FASTQ format.

The input and output can be files compressed in the BGZF format. When output is compressed, the default compression level is 4.

The sequences in the input file should all have different names. If they do not, indexing will emit a warning about duplicate sequences and retrieval will only produce subsequences from the first sequence with the duplicated name.

samtools fqidx should only be used on fastq files with a small number of entries. Trying to use it on a file containing millions of short sequencing reads will produce an index that is almost as big as the original file, and searches using the index will be very slow and use a lot of memory.

Write FASTQ to file rather than to stdout. If FILE ends with .gz, .bgz or .bgzf then it will be BGZF compressed.
Length for FASTQ sequence line wrapping. If zero, this means do not line wrap. Defaults to the line length in the input file.
Continue working if a non-existent region is requested.
Read regions from a file. Format is chr:from-to, one per line.
Output the sequence as the reverse complement. When this option is used, “/rc” will be appended to the sequence names. To turn this off or change the string appended, use the --mark-strand option.
Append strand indicator to sequence name. TYPE can be one of:
Append '/rc' when writing the reverse complement. This is the default.
Do not append anything.
Append '(+)' for forward strand or '(-)' for reverse complement. This matches the output of “bedtools getfasta -s”.
Append string <pos> to names when writing the forward strand and <neg> when writing the reverse strand. Spaces are preserved, so it is possible to move the indicator into the comment part of the description line by including a leading space in the strings <pos> and <neg>.
Read/Write to specified index file.
Read/Write to specified compressed file index (used with .gz files).
Print help message and exit.
Set the output format options, level=0..9 for compression level 0 to 9.
Create index for the output sequence data along with the output, in same path as <output name>.fai, <outputname>.gzi. This option is valid only for file output.
-@, --threads N
Set the number of extra threads for operations on compressed files.

Written by Heng Li, with modifications by Andrew Whitwham and Robert Davies, all from the Sanger Institute.

samtools(1), samtools-faidx(1), samtools-fasta(1), samtools-fastq(1)

Samtools website: <http://www.htslib.org/>

30 May 2025 samtools-1.22

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.