---
name: "xpsa"
section: "5"
platform: "linux"
package: "pftools"
version: "3.2.12-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/xpsa"
---

# xpsa(5)

extended psa header

## NAME

xpsa - extended psa header

## DESCRIPTION

**xpsa** is an extension of the [**psa**(5)](/psa/5.md) file format used by the **pftools** package to describe and store biological sequences.

**xpsa** uses *keyword*=*value* pairs in the header to include information about the sequence or the alignment between the sequence and a *PROSITE* profile (or any other kind of motif). The syntax is therefore easily extensible. In this man-page, we focus on  the keywords defined and used by the **pftools** package.

In the following text we will use the more general term '*motif*' when in fact our discussion refers specifically to *PROSITE profiles*. Nevertheless the keywords defined here can be used by any kind of sequence analysis tool to store and transfer information.

None of the defined keywords are mandatory and analysis tools have often a length limit imposed on the header line. In order to keep the header line reasonably short and user readable, these tools can easily remove individual *keyword*=*value* pairs which are not important to the specific task at hand.

## SYNTAX

The general syntax of the **xpsa** header is given below. For examples please refer to the corresponding *examples* section.

The biological sequence itself starts on the next line following the header and may extend over several lines. If several sequences are contained in the same file, each must be preceded by a header line.

Syntax of the header line:

**\>***seq\_id***/***seq\_pos* { \[ *keyword*=*value* \| *free\_text* \] }

The header must start with a '**\>**' followed by the fields detailed below:

- *seq\_id*

  typically the  *accession* number and *identifier* of the sequence.  This text field should not contain any spaces.

- Note:

  If the input sequences have a well defined accession number and identifier (as is the case with SWISS-PROT entries) [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) will use as *seq\_id* the accession number separated by a '**\|**' from the identifier.\
   If the input sequences are in FASTA format, no guess can be made about the accession number or the identifier. Therefore [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) will use as *seq\_id* all text following the '**\>**' character up to the first whitespace.

- *seq\_pos*

  this field describes the sequence coordinates where a motif matches. The positions are generally given as *start\_pos*-*end\_pos* pairs.\
   If present, this field is separated from the *seq\_id* by a '**/**' character.

- *keyword*=*value*

  is an optional list of defined  *keyword*=*value* pairs. Each pair should be separated from the next or from free text by whitespaces.\
   The *keyword* is case sensitive in the current implementation of the **pftools** package. It should not exceed 24 characters in length.\
   The *value* can be numeric or alphanumeric. Values containing whitespaces should be enclosed in either *single quotes* or *double quotes*. If the same type of quote appears inside the value it must be escaped using the '**\\**' character.

  - Note:

    the **pftools** do not currently produce quote enclosed values.

- *free\_text*

  typically this is a description of the sequence. It should not contain any of the defined *keyword*=*value* pairs.

### Keywords

Keywords used by the [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) programs:

- *level*

  the highest cut-off level (as a value) exceeded by the alignment.\
   The characters '**NA**' indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.

- *level\_tag*

  the highest cut-off level (as a character string) exceeded by the alignment.\
   The characters '**NA**' indicate that the alignment score does not exceed any of the cut-off levels defined in the motif.

  - Note:

    [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) only report the first 2 characters of the level text string.

- *match\_nb*

  if the motif matches several times on the same sequence, each alignment is numbered incrementally.\
   If the motif is circular, each single repeat is numbered incrementally with the key  *repeat\_nb* (see below).

- *match\_parent*

  for each single match of a circular motif, this key references the number of the parental total match of the circular motif.

  - Note:

    if a circular motif matches only once on a given sequence, [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) do not report this key.

- *match\_type*

  identifies the type of match. Either **region** for a complete match of a motif to a sequence, or **repeat** for a single repeat of a circular motif.

- *motif*

  the name and/or identifier of the motif.

- *motif\_start*

  the motif position where the alignment begins.

- *motif\_end*

  negative offset from the end of the alignment to the end of the motif.

- *norm\_score*

  the normalized score of the alignment.

- *raw\_score*

  the raw score of the alignment.

- *repeat\_nb*

  if the motif is circular, each individual repeat is numbered incrementally with this keyword.

- *seq\_end*

  negative offset from the end of the alignment to the end of the sequence.\
   In combination with the information given by  *seq\_pos* this allows to deduce the length of the query sequence.

- *strand*

  the sequence strand on which the motif matches, when the search includes the reverse complement of a DNA sequence. The *value* is either **s** for the sens or **r** for the reverse strand.

Keywords used by the [**pfmake**(1)](/pfmake/1.md) and [**pfw**(1)](/pfw/1.md) programs:

- *weight*

  the weight of a given sequence in a multiple alignment.

## EXAMPLES

- (1)

  \>O00628\|PEX7/73-315 *motif*=PS50294\|WD\_REP *raw\_score*=1336 *match\_nb*=1 *match\_type*=region *seq\_end*=-491\
   VTW\[...\]IYD\
   \>O00628\|PEX7/540-801 *motif*=PS50294\|WD\_REP *raw\_score*=1378 *match\_nb*=2 *match\_type*=region *seq\_end*=-5\
   SFD\[...\]PAS\

  The 2 headers above describe 2 matches of the motif called '*WD\_REP*' onto the sequence '*PEX7*'. Each of the matches onto this single sequence is numbered using the the *match\_nb* keyword. These matches are not individual repeats of a circular motif as can be seen with the *region* value of the *match\_type* keyword.\
   The first match starts at position 73 of the sequence and ends at position 315. This position is 491 residues away from the end of the input sequence (*seq\_end*).\
   The next line following the [**xpsa**(5)](/xpsa/5.md) header line is the sequence of the match (it has been truncated here to help readability).\
   The second match begins at position 540 of the sequence and terminates 5 residues before the end of the input sequence, that is at position 801.

- (2)

  \>O00628\|PEX7/540-582 *motif*=PS50294\|WD\_REP *norm\_score*=7.437 *raw\_score*=180 *match\_parent*=2 *repeat\_nb*=1 *match\_type*=repeat *level*=-1 *seq\_end*=-224 *motif\_start*=1 *motif\_end*=-1\
   SFD\[...\]PLQ\

  This example illustrates the kind of header obtained when aligning a circular motif to a sequence. Each match of this motif (which we will call *total* match) can be composed of several individual repeats of the motif. Tools like [**pfsearch**(1)](/pfsearch/1.md) and [**pfscan**(1)](/pfscan/1.md) can output each total match followed by all its individual repeats. In this example we only show one of the indiviual repeats that is part of a total match between a circular profile and a sequence.\
   The [**xpsa**(5)](/xpsa/5.md) header above describes a single repeat of a match between a circular motif called  '*WD\_REP*' and the sequence '*PEX7*'.\
   This is the first individual repeat of a match of the circular motif, as identified by the *repeat\_nb* keyword. The other individual repeats have not been listed in this example.\
   The total circular motif has at least 2 distinct matches on the '*PEX7*' sequence, because this single repeat is part of the second match as described by the *match\_parent* keyword. The parental matches have been omitted from this example, they would be numbered using the *match\_nb* keyword.\
   The normalized score of this motif exceeds the cut-off level number -1  (*level* keyword) which is specified in the motif.\
   This match starts at position 1 of the profile (*motif\_start*) and position 540 of the sequence, it ends at the end of the motif (*motif\_end*=-1) and position 582 of the sequence.\
   The next line following the [**xpsa**(5)](/xpsa/5.md) header line is the sequence of the match (it has been truncated here to help readability).

## SEE ALSO

[**psa**(5)](/psa/5.md), [**pfsearch**(1)](/pfsearch/1.md), [**pfscan**(1)](/pfscan/1.md), [**pfw**(1)](/pfw/1.md), [**pfmake**(1)](/pfmake/1.md), [**psa2msa**(1)](/psa2msa/1.md)

## AUTHOR

This manual page was originally written by Volker Flegel.\
 The **pftools** package was developed by Philipp Bucher.\
 Any comments or suggestions should be addressed to \<pftools@sib.swiss\>.
