Scroll to navigation

FAIDX(1) User Commands FAIDX(1)


faidx - Fetch sequences from FASTA


faidx [-h] [-b BED] [-o OUT] [-i {bed,chromsizes,nucleotide,transposed}] [-c] [-r] [-n | -f] [-x] [-l] [-s DEFAULT_SEQ] [-d DELIMITER] [-g REGEX] [-m | -M] [--version] fasta [regions [regions ...]]


Fetch sequences from FASTA. If no regions are specified, all entries in the input file are returned. Input FASTA file must be consistently line-wrapped, and line wrapping of output is based on input line lengths.


Positional arguments

FASTA file
space separated regions of sequence to fetch e.g. chr1:1-1000

Optional arguments

show this help message and exit
bed file of regions
output file name (default: stdout)
transform the requested regions into another format. default: None
complement the sequence. default: False
reverse the sequence. default: False
omit sequence names from output. default: False
output full names including description. default: False
write each region to a separate file (names are derived from regions)
fill in --default-seq for missing ranges. default: False
default base for missing positions and masking. default: N
delimiter for splitting names to multiple values (duplicate names will be discarded). default: None
regular expression for filtering non-matching sequence names. default: .*
mask the FASTA file using --default-seq default: False
mask the FASTA file by changing to lowercase. default: False
print pyfaidx version number


Please cite: Shirley MD, Ma Z, Pedersen BS, Wheelan SJ. (2015) Efficient "pythonic" access to FASTA files using pyfaidx. PeerJ PrePrints 3:e1196

October 2015 faidx 0.4.2