---
name: "extract-ancestors"
section: "1"
platform: "linux"
package: "bali-phy"
version: "4.0-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/extract-ancestors"
---

# extract-ancestors(1)

Extract and name ancestral sequences according to node- and branch- queries.

## NAME

**extract-ancestors** - Extract and name ancestral sequences according to node- and branch- queries.

## SYNOPSIS

**extract-ancestors** \[OPTIONS\]

## DESCRIPTION

Extract and name ancestral sequences according to node- and branch- queries.

## GENERAL OPTIONS:

- **-h**, **–help**

  produces help message

- **-V**, **–verbose**

  \[=arg(=1)\] Show more log messages on stderr.

## INPUT OPTIONS:

- **-A** *arg*, **–alignments** *arg*

  File of alignment samples

- **-T** *arg*, **–trees** *arg*

  File of corresponding tree samples

- **-x** *arg* (=10), **–subsample** *arg* (=10)

  factor by which to sub-sample trees

## ANCESTOR QUERY OPTIONS:

- **-n** *arg*, **–nodes** *arg*

  Newick tree with labelled ancestors

- **-g** *arg*, **–groups** *arg*

  File with named groups

- **–nodes-min** *arg* (=0.34)

  Minimum fraction to include a node.

- **–groups-min** *arg* (=0.34)

  Minimum fraction to include a group.

## EXAMPLES:

Add named ancestral sequences to alignments where they are present:

-

  ```
  % extract-ancestors -A C1.P1.fastas -T C1.trees --nodes query.tree --groups query.tree
  ```

## REPORTING BUGS:

BAli-Phy online help: ⟨http://www.bali-phy.org/docs.php⟩\\c .

Please send bug reports to ⟨bali-phy-users@googlegroups.com⟩\\c .

## AUTHORS

Benjamin Redelings.
