esl-sfetch(1)

NAME

esl-sfetch - retrieve (sub-)sequences from a sequence file

SYNOPSIS

Single sequence retrieval:
    esl-sfetch [options] seqfile key

Single subsequence retrieval:
    esl-sfetch -c <from>..<to> seqfile key

Multiple sequence retrieval:
    esl-sfetch -f [options] seqfile keyfile

Multiple subsequence retrieval:
    esl-sfetch -Cf [options] seqfile subseq-coord-file

Indexing a sequence file for retrieval:
    esl-afetch --index msafile

DESCRIPTION
esl-sfetch retrieves one or more sequences or subsequences from seqfile. The seqfile should be indexed first using esl-sfetch --index <seqfile>. This creates an SSI index file <seqfile>.ssi. An SSI file is not necessary, but it greatly accelerates retrieval. To retrieve a single complete sequence, do esl-sfetch <seqfile> <key> where key is the name or accession of the desired sequence. To retrieve a single subsequence rather than a complete sequence, use the -c start-end option to provide start and end coordinates. The start and end coordinates are provided as one string, separated by any nonnumeric, nonwhitespace character or characters you like; for example, -c 23..100 , -c 23/100 , or -c 23-100 all work. To retrieve a suffix of a subsequence, you can omit the end ; for example, -c 23: would work. To retrieve more than one complete sequence at once, you may use the -f option, and the second command line argument will specify the name of a keyfile that contains a list of names or accessions, one per line; the first whitespace-delimited field on each line of this file is parsed as the name/accession. To retrieve more than one subsequence at once, use the -C option in addition to -f , and now the second argument is parsed as a list of subsequence coordinate lines, with each line containing at least four whitespace-delimited fields: new_name from to name/accession. For each such line, sequence name/accession is found, a subsequence from..to is extracted, and the subsequence is renamed new_name before being output.

In DNA/RNA files, you may extract (sub-)sequences in reverse complement orientation in two different ways: either by providing a from coordinate that is greater than to, or by providing the -r option. The sequence file may be in any of several different common unaligned sequence formats including FASTA, GenBank, EMBL, UniProt, or DDBJ. It may also be an alignment file, in Stockholm format for example. By default the file format is autodetected. The --informat <s> option allows you to specify the format and override autodetection. This option may be useful for making esl-sfetch more robust, because format autodetection may fail on unusual files. When the -f option is used to do multiple (sub-)sequence retrieval, the file argument may be - (a single dash), in which case the list of names/accessions (or subsequence coordinate lines) is read from standard input. However, because a standard input stream can't be SSI indexed, (sub-)sequence retrieval from stdin may be slow.

OPTIONS

-h  Print brief help; includes version number and summary of all options, including expert options.

-c <coords>
    Retrieve a subsequence with start and end coordinates specified by the <coords> string. This string consists of start and end coordinates separated by any nonnumeric, nonwhitespace character or characters you like; for example, -c 23..100 , -c 23/100 , or -c 23-100 all work. To retrieve a suffix of a subsequence, you can omit the end ; for example, -c 23: would work. To specify reverse complement (for DNA/RNA sequence), specify <from> greater than <to>; for example, -c 100..23 retrieves the reverse complement strand from 100 to 23.

-f  Interpret the second argument as a keyfile instead of as just one key. The first whitespace-limited field on each line of keyfile is interpreted as a name or accession to be fetched. This option doesn't work with the --index option. Any other fields on a line after the first one are ignored. Blank lines and lines beginning with # are ignored.

-o <f>
    Output retrieved sequences to a file <f> instead of to stdout.

-n <s>
    Rename the retrieved (sub-)sequence <s>. This is incompatible with the -f option.

-r  Reverse complement the retrieved (sub-)sequence. This only works for DNA/RNA sequences.

-C  Multiple subsequence retrieval mode, with -f option (required). Specifies that the second command line argument is to be parsed as a subsequence coordinate file, consisting of lines containing four whitespace-delimited fields: new_name from to name/accession. For each such line, sequence name/accession is found, a subsequence from..to is extracted, and the subsequence is renamed new_name before being output. Any other fields after the first four are ignored. Blank lines and lines beginning in # are ignored.

-O  Output retrieved sequence to a file named <key>. This is a convenience for saving some typing: instead of esl-sfetch -o SRPA_HUMAN swissprot SRPA_HUMAN you can just type esl-sfetch -O swissprot SRPA_HUMAN. The -O option only works if you're retrieving a single alignment; it is incompatible with -f.

--index
    Instead of retrieving a key, the special command esl-afetch --index msafile produces an SSI index of the names and accessions of the alignments in the msafile. Indexing should be done once on the msafile to prepare it for all future fetches.

EXPERT OPTIONS

--informat <s>
    Specify that the sequence file is in format <s>, where <s> may be FASTA, GenBank, EMBL, UniProt, DDBJ, or Stockholm. This string is case-insensitive ("genbank" or "GenBank" both work, for example).

AUTHOR
Easel and its documentation are @EASEL_COPYRIGHT@. @EASEL_LICENSE@. See COPYING in the source code distribution for more details. The Easel home page is: @EASEL_URL@