The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

faspaste - concatenate sequence record data

SYNOPSIS

faspaste [OPTION]... [MULTIFASTA-FILE]...

DESCRIPTION

faspaste processes sequence record data from one or more input sources in parallel, concatenating data one-at-a-time across correspoding records from each source. faspaste concatenates only one record component at a time; by default, sequences. Optionally descriptions or identifiers may be concatenated instead.

The order of input sources to faspaste is determined by the argument list to faspaste, which may be file pathnames or "-" indicating the standard input stream. If a file pathname or "-" is repeated in the argument list, sequence records from that input source will be concatenated repeatedly in the output sequence record.

The default output of faspaste are the records from the first input source with components replaced by the concatenated data. Optionally, any of the input streams may be designated as the "recipient" of concatenated data.

When sequence records are exhausted for any input source, that source will be treated as an endless source of empty records. When the "recipient" input source is exhausted of data, the program terminates. With the -r or --repeat option, the last record from an empty source is used repeatedly as needed. By default, records from the first input source are "recipient" sequence records as templates to receive the concatenated data for output. By default, if the first (leftmost) named input source is exhausted of records, the second-left-most input source is used as a template to receive output data, and so on. Alternatively, with the -R or --recipient option, the nth named input stream may be optionally designated to always receive data (one-based indexing is used, so the first argument designates the first input stream. Output ceases when this stream of records becomes exhausted.

By default, sequences and identifiers are concatenated with the empty string, and descriptions are concatenated with a single space character.Other delimiters for joining data may be specified with the -j option.

Options specific to faspaste: -i, --identifier paste identifiers -d, --description paste descriptions -r, --repeat repeat data from last record for empty sources -R, --recipient=<int> use records from input stream <int> (one-based) as output template -j, --join=<string> concatenate data using <string>

Options general to FAST: -h, --help print a brief help message --man print full documentation --version print version -l, --log create/append to logfile -L, --logname=<string> use logfile name <string> -C, --comment=<string> save comment <string> to log --format=<format> use alternative format for input --moltype=<[dna|rna|protein]> specify input sequence type -q, --fastq use fastq format as input and output

INPUT AND OUTPUT

faspaste is part of FAST, the FAST Analysis of Sequences Toolbox, based on Bioperl. Most core FAST utilities expect input and return output in multifasta format. Input can occur in one or more files and or on standard input. Output occurs to STDOUT. The FAST utility fasconvert can reformat other formats to and from multifasta.

OPTIONS

-i, --identifier

Concatenate identifiers. The default join-string is the empty string.

-d, --description

Concatenate descriptions. The default join-string is a single space characer.

-j string, --join=string

Use <string> to concatenate data. Use "\t" to indicate a tab-character.

-r, --repeat

Once records are exhausted from any source, repeat the last entry from that source in subsequent operations.

-R int, --recipient=int

Use input source #<int> as template to receive concatenated data. One-based indexing is used, with input source 1 as default.

-h, --help

Print a brief help message and exit.

--man

Print the manual page and exit.

--version

Print version information and exit.

-l, --log

Creates, or appends to, a generic FAST logfile in the current working directory. The logfile records date/time of execution, full command with options and arguments, and an optional comment.

-L [string], --logname=[string]

Use [string] as the name of the logfile. Default is "FAST.log.txt".

-C [string], --comment=[string]

Include comment [string] in logfile. No comment is saved by default.

--format=[format]

Use alternative format for input. See man page for "fasconvert" for allowed formats. This is for convenience; the FAST tools are designed to exchange data in Fasta format, and "fasta" is the default format for this tool.

-q --fastq

Use fastq format as input and output.

EXAMPLES

Join sequences from two files together:

    faspaste data.fas data2.fas

Join both descriptions and sequences

    faspaste data.fas data2.fas | faspaste -d - data2.fas

Paste the first sequence repeatedly to every other sequence in a file

    fashead -n 1 t/data/fasxl_test4.fas | faspaste -r - t/data/fasxl_test4.fas

Paste the first sequence of one file repeatedly to every other sequence in another file, with output identifiers and descriptions taken from the second file.

    fashead -n 1 t/data/fasxl_test3.fas | faspaste -r -R 2 - t/data/fasxl_test4.fas

SEE ALSO

man FAST
perldoc FAST

Introduction and cookbook for FAST

The FAST Home Page"

CITING

If you use FAST, please cite Lawrence et al. (2015). FAST: FAST Analysis of Sequences Toolbox. and Bioperl Stajich et al..