---
name: "fastahack"
section: "1"
platform: "linux"
package: "fastahack"
version: "1.0.0+dfsg-11+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/fastahack"
---

# fastahack(1)

fastahack - indexing and extracting sequences and subsequences from FASTA files

## NAME

fastahack - fastahack - indexing and extracting sequences and subsequences from FASTA files

## DESCRIPTION

usage: fastahack \[options\] \<fasta reference\>

### options:

- **-i**, **--index**

  generate fasta index \<fasta reference\>.fai

- **-r**, **--region** REGION

  print the specified region

- **-c**, **--stdin**

  read a stream of line-delimited region specifiers on stdin and print the corresponding sequence for each on stdout

- **-e**, **--entropy**

  print the shannon entropy of the specified region

- **-d**, **--dump**

  print the fasta file in the form 'seq\_name \<tab\> sequence'

REGION is of the form \<seq\>, \<seq\>:\<start\>\[sep\]\<end\>, \<seq1\>:\<start\>\[sep\]\<seq2\>:\<end\> where start and end are 1-based, and the region includes the end position. \[sep\] is "-" or ".."

Specifying a sequence name alone will return the entire sequence, specifying range will return that range, and specifying a single coordinate pair, e.g. \<seq\>:\<start\> will return just that base.

author: Erik Garrison \<erik.garrison@bc.edu\>
