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

NAME

fastax -- select sequence records by NCBI taxonomic names or IDs

SYNOPSIS

fastax [OPTION]... [NODES-FILE] [NAMES-FILE] [TAXON] [MULTIFASTA-FILE]...

fastax --tax-id-mode [OPTION]... [NODES-FILE] [TAXON] [MULTIFASTA-FILE]...

DESCRIPTION

fastax takes NCBI Taxonomy data and sequence or alignment data on input and, if directed to valid NCBI Taxonomic ID labels in the sequence records, outputs sequence records that belong to a taxonomic clade as specified by a query argument. For example, a query of "Alphaproteobacteria" will match data such as "Rickettsiales" and "Caulobacter crescentus NA1000" but not "Escherichia coli O157:H7" or "Metazoa"

NCBI Taxonomy data must be downloaded separately from <NCBI Taxonomy|http://www.ncbi.nlm.nih.gov/taxonomy>, particularly one of the files marked "taxdump" from for example ftp://ftp.ncbi.nih.gov/pub/taxonomy. Only the files "nodes.dmp" and "names.dmp" are used.

By default, the entire description must exactly match a valid NCBI taxonomic identifier for a record to match. fastax can optionally match identifiers or indexed fields in descriptions split by default on strings of white-space or a user-defined regex.

Options specific to fastax: -T, --tax-id-mode search records by NCBI taxonomic IDs instead of names -i, --identifier search records by sequence identifiers -f, --field=<int> search records using indexed fields -S, --split-on-regex=<regex> split descriptions or identifiers into fields using <regex> -v, --negate return records that do *not* match query -s, --strict-negate return records that do *not* match query only if it does match a valid taxon

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

fastax 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

-v, --negate

return all sequences that are not from the taxon

-s, --strict-negate

return all sequences that are not from the taxon, but only if they are from a recognized taxon

-i, --identifier

taxa are searched over sequence identifiers (default is over descriptions)

-f [int], --field=[int]

sequence descriptions or identifers are split into fields and field <int> (1-based) is searched for taxonomic identifiers

-S [string], --regex-split=[string]

in field-mode (-f) split on perl-regex <regex> instead of the default separator, which is strings of white-space. Do "man perlre" and "man perlfunc" for split.

-T --tax-id-mode

NCBI Taxonomic data in sequence records are numeric IDs, not names.

-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

Print sequence that belong to Rhizobiales:

    fastax -f 3 -S " \| " nodes.dmp names.dmp Rhizobiales t/data/tRNAdb-CE.sample2000.fas

TODO

  • Create, store and access persistent NCBI taxonomy data for easier and faster usage, possibly using Storable and File::Share

SEE ALSO

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..