NAME
fassub -- regex-based substitutions on sequence records
SYNOPSIS
fassub [OPTION]... [PERL-REGEX] [SUBSTITUTION] [MULTIFASTA-FILE]...
DESCRIPTION
fassub takes multifasta format sequence or alignment data as input, and faciliates text substitutions on sequence identifiers (by default), sequences or descriptions using the Perl s/// substitution operator. fassub takes two mandatory arguments corresponding to the two arguments of s///; the first a Perl regex matching a set of strings to be substituted and the second, replacement text, possibly including special characters that require backslash quoting or capture buffer expressions. The first regex argument may require quoting to protect special characters from interpretation by the shell. By default, only the left-most match is substituted, use --global/-g to substitute all matches. Use single quotes on arguments at the shell to deploy numbered match variables like "$1" in your substitutions, which will back-reference capture groups in your regex.
Options specific to fassub: -s, --sequence substitute on sequences -d, --description substitute on descriptions -i, --insensitive match text case-insensitively -g, --global substitute all matches in the data
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 -q, --fastq use fastq format as input and output
INPUT AND OUTPUT
fassub 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 or on STDIN. Output occurs to STDOUT. The FAST utility fasconvert can reformat other formats to and from multifasta.
OPTIONS
- -s, --sequence
-
Substitute on the sequences. By default substitution occurs on identifiers.
- -d, --description
-
Substitute on the descriptions. By default substitution occurs on identifiers.
- -i, --insensitive
-
Substitute case-insensitively.
- -g, --global
-
Substitute all matches in the data. By default only the first match on each line will be subsituted.
- -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.
- -m [dna|rna|protein], --moltype=[dna|rna|protein]
-
Specify the type of sequence on input (should not be needed in most cases, but sometimes Bioperl cannot guess and complains when processing data).
- -q --fastq
-
Use fastq format as input and output.
EXAMPLES
Reverse genus and species in t/data/P450.fas:
fassub -d '\[(\w+) (\w+)\]' '[$2 $1]' t/data/P450.fas
SEE ALSO
man perlre
perldoc perlre
-
Documentation on perl regular expressions.
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..