Skip to main content

Synopsis

hhalign -i <query> -t <template> [options]

Description

HHalign aligns a query alignment/HMM to a template alignment/HMM by HMM-HMM alignment. If only one alignment/HMM is given, it is compared to itself and the best off-diagonal alignment plus all further non-overlapping alignments above significance threshold are shown.

Required Parameters

-i
file
required
Input/query: single sequence or multiple sequence alignment (MSA) in a3m, a2m, or FASTA format, or HMM in hhm format
-t
file
required
Input/template: single sequence or multiple sequence alignment (MSA) in a3m, a2m, or FASTA format, or HMM in hhm format

Input Alignment Format

-M
string
default:"a2m"
Input alignment format:
  • a2m or a3m: upper case = Match; lower case = Insert; ’-’ = Delete; ’.’ = gaps aligned to inserts
  • first: FASTA format where columns with residue in 1st sequence are match states
  • [0-100]: FASTA format where columns with fewer than X% gaps are match states
-tags
flag
Neutralize His-, C-myc-, FLAG-tags, and trypsin recognition sequence to background distribution
-notags
flag
default:"true"
Do NOT neutralize tags (default)

Output Options

-o
file
Write results in standard format to file (default: <infile.hhr>)
-oa3m
file
Write query alignment in a3m format to file
-opsi
file
Write query alignment in PSI-BLAST format to file
-aa3m
file
Append query alignment in a3m format to file
-apsi
file
Append query alignment in PSI-BLAST format to file
-Ofas
file
Write pairwise alignments in FASTA format
-Oa2m
file
Write pairwise alignments in A2M format
-Oa3m
file
Write pairwise alignments in A3M format
-add_cons
flag
Generate consensus sequence as master sequence of query MSA
-hide_cons
flag
Don’t show consensus sequence in alignments
-hide_pred
flag
Don’t show predicted 2ndary structure in alignments
-hide_dssp
flag
Don’t show DSSP 2ndary structure in alignments
-show_ssconf
flag
Show confidences for predicted 2ndary structure in alignments
-seq
integer
default:"varies"
Max. number of query/template sequences displayed
-aliw
integer
default:"80"
Number of columns per line in alignment list
-p
float
default:"0.0"
Minimum probability in summary and alignment list (range: 0-100)
-E
float
default:"1e+06"
Maximum E-value in summary and alignment list (range: 0-inf)
-Z
integer
default:"100"
Maximum number of lines in summary hit list
-z
integer
default:"1"
Minimum number of lines in summary hit list
-B
integer
default:"100"
Maximum number of alignments in alignment list
-b
integer
default:"1"
Minimum number of alignments in alignment list

Filter Options

Filter options applied to query MSA, template MSA, and result MSA.
-all
flag
Show all sequences in result MSA; do not filter result MSA
-id
integer
default:"90"
Maximum pairwise sequence identity (range: 0-100)
-diff
integer
default:"0"
Filter MSAs by selecting most diverse set of sequences, keeping at least this many seqs in each MSA block of length 50. Zero and non-numerical values turn off the filtering.
-cov
integer
default:"0"
Minimum coverage with master sequence (%) (range: 0-100)
-qid
integer
default:"0"
Minimum sequence identity with master sequence (%) (range: 0-100)
-qsc
float
default:"-20.0"
Minimum score per column with master sequence
-mark
flag
Do not filter out sequences marked by ”>@” in their name line

HMM-HMM Alignment Options

-norealign
flag
Do NOT realign displayed hits with MAC algorithm
-realign
flag
default:"true"
Realign displayed hits with max. accuracy (MAC) algorithm (default)
-mact
float
default:"0.35"
Posterior prob threshold for MAC realignment controlling greediness at alignment ends: 0=global, >0.1=local (range: 0-1)
-glob
flag
Use global alignment mode for searching/ranking
-loc
flag
default:"true"
Use local alignment mode for searching/ranking (default)
-excl
string
Exclude query positions from the alignment, e.g. ‘1-33,97-168’
-template_excl
string
Exclude template positions from the alignment, e.g. ‘1-33,97-168’
-ovlp
integer
default:"0"
Banded alignment: forbid this many largest diagonals |i-j| of DP matrix
-alt
integer
default:"1"
Show up to this many alternative alignments with raw score > smin
-smin
float
default:"20.0"
Minimum raw score for alternative alignments
-shift
float
default:"0.0"
Profile-profile score offset (range: -1 to 1)
-corr
float
default:"0.1"
Weight of term for pair correlations (range: 0-1)
-sc
integer
default:"1"
Amino acid score (tja: template HMM at column j):
  • 0: log2 Sum(tja*qia/pa) (pa: aa background frequencies)
  • 1: log2 Sum(tjaqia/pqa) (pqa = 1/2(pa+ta))
  • 2: log2 Sum(tja*qia/ta) (ta: av. aa freqs in template)
  • 3: log2 Sum(tja*qia/qa) (qa: av. aa freqs in query)
  • 5: local amino acid composition correction
-ssm
integer
default:"2"
Secondary structure scoring:
  • 0: no ss scoring
  • 1,2: ss scoring after or during alignment
  • 3,4: ss scoring after or during alignment, predicted vs. predicted
-ssw
float
default:"0.11"
Weight of ss score (range: 0-1)
-ssa
float
default:"1.0"
SS confusion matrix = (1-ssa)I + ssapsipred-confusion-matrix (range: 0-1)
-wg
flag
Use global sequence weighting for realignment

Gap Cost Options

-gapb
float
default:"1.0"
Transition pseudocount admixture (range: 0-inf)
-gapd
float
default:"0.15"
Transition pseudocount admixture for open gap (range: 0-inf)
-gape
float
default:"1.0"
Transition pseudocount admixture for extend gap (range: 0-1.5)
-gapf
float
default:"0.6"
Factor to increase/reduce gap open penalty for deletes (range: >0)
-gapg
float
default:"0.6"
Factor to increase/reduce gap open penalty for inserts (range: >0)
-gaph
float
default:"0.6"
Factor to increase/reduce gap extend penalty for deletes (range: >0)
-gapi
float
default:"0.6"
Factor to increase/reduce gap extend penalty for inserts (range: >0)
-egq
float
default:"0.0"
Penalty (bits) for end gaps aligned to query residues (range: 0-inf)
-egt
float
default:"0.0"
Penalty (bits) for end gaps aligned to template residues (range: 0-inf)

Pseudocount Options

Context-specific HHM pseudocounts

-pc_hhm_contxt_mode
integer
default:"3"
Position dependence of pc admixture ‘tau’ (pc mode):
  • 0: no pseudo counts: tau = 0
  • 1: constant: tau = a
  • 2: diversity-dependent: tau = a/(1+((Neff[i]-1)/b)^c)
  • 3: CSBlast admixture: tau = a(1+b)/(Neff[i]+b)
-pc_hhm_contxt_a
float
default:"0.9"
Overall pseudocount admixture (range: 0-1)
-pc_hhm_contxt_b
float
default:"4.0"
Neff threshold value for mode 2 (range: 1-inf)
-pc_hhm_contxt_c
float
default:"1.0"
Extinction exponent c for mode 2 (range: 0-3)

Context-independent HHM pseudocounts

-pc_hhm_nocontxt_mode
integer
default:"2"
Position dependence of pc admixture ‘tau’ (used for templates; used for query if contxt file is not available)
-pc_hhm_nocontxt_a
float
default:"1.0"
Overall pseudocount admixture (range: 0-1)
-pc_hhm_nocontxt_b
float
default:"1.5"
Neff threshold value for mode 2 (range: 1-inf)
-pc_hhm_nocontxt_c
float
default:"1.0"
Extinction exponent c for mode 2 (range: 0-3)

Context-specific pseudocounts

-nocontxt
flag
Use substitution-matrix instead of context-specific pseudocounts
-contxt
file
Context file for computing context-specific pseudocounts
-csw
float
default:"1.6"
Weight of central position in cs pseudocount mode (range: 0-inf)
-csb
float
default:"0.85"
Weight decay parameter for positions in cs pc mode (range: 0-1)

Other Options

-v
integer
default:"2"
Verbose mode:
  • 0: no screen output
  • 1: only warnings
  • 2: verbose
-atab
file
Write all alignments in tabular layout to file
-maxseq
integer
default:"65535"
Max number of input rows
-maxres
integer
default:"20000"
Max number of HMM columns
-maxmem
float
default:"3.0"
Limit memory for realignment (in GB, range: 1-inf)

Examples

Align two alignments

hhalign -i T0187.a3m -t d1hz4a_.hhm -o result.hhr

Self-alignment to find internal repeats

hhalign -i query.a3m -o repeats.hhr

Exit Codes

  • 0: Success
  • 1: File format error
  • 2: File access error
  • 3: Memory error
  • 4: Command line error
  • 5: Internal numeric error

See Also

Build docs developers (and LLMs) love