---
name: "split_fasta"
section: "1"
platform: "linux"
package: "coop-computing-tools"
version: "1:7.14.5-1+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/split_fasta"
---

# split\_fasta(1)

Split a fasta file according to sequence and character counts

## NAME

**split\_fasta** - Split a fasta file according to sequence and character counts

## SYNOPSIS

FCsplit\_fasta query\_granularity character\_granularity fasta\_fileFT

## DESCRIPTION

**split\_fasta** is a simple script to split a fasta file according to user provided parameters.  The script iterates over the given file, generating a new sub\_file called input.i each time the contents of the previous file (input.(i-1)) exceed the number of queries given by query\_granularity or the number of characters given by character\_granularity.

## OPTIONS

## EXIT STATUS

On success, returns zero.  On failure, returns non-zero.

## ENVIRONMENT VARIABLES

## EXAMPLES

To split a fasta file smallpks.fa into pieces no larger than 500 queries and with no piece receiving additional sequences if it exceeds 10000 characters we would do:

```

```

-

  python split\_fasta 500 10000 smallpks.fa

This would generate files input.0, input.1, ..., input.N where N is the number of appropriately constrained files necessary to contain all sequences in smallpks.fa.

## COPYRIGHT

The Cooperative Computing Tools are Copyright (C) 2022 The University of Notre Dame.  This software is distributed under the GNU General Public License.  See the file COPYING for details.

## SEE ALSO

- •

  **Cooperative Computing Tools Documentation**

- •

  **Makeflow User Manual**

- •

  **[makeflow(1)](/makeflow/1.md)** **[makeflow\_monitor(1)](/makeflow_monitor/1.md)** **[makeflow\_analyze(1)](/makeflow_analyze/1.md)** **[makeflow\_viz(1)](/makeflow_viz/1.md)** **[makeflow\_graph\_log(1)](/makeflow_graph_log/1.md)** **[starch(1)](/starch/1.md)** **[makeflow\_ec2\_setup(1)](/makeflow_ec2_setup/1.md)** **[makeflow\_ec2\_cleanup(1)](/makeflow_ec2_cleanup/1.md)**
