Reads and writes (returns) sequencesThe simplicity of the above description of this program greatlyunderstates the rich functionality of this program.
Because EMBOSS programs can take a wide range of qualifiers thatslightly change the behaviour of the program when reading or writing asequence, this program can do many more things than simply "read andwrite a sequence".
seqret can read a sequence or many sequences from databases, files,files of sequence names, the command-line or the output of otherprograms and then can write them to files, the screen or pass them toother programs. Because it can read in a sequence from a database andwrite it to a file, seqret is a program for extracting sequences fromdatabases. Because it can write the sequence to the screen, seqret is aprogram for displaying sequences.
seqret can read sequences in any of a wide range of standard sequenceformats. You can specify the input and output formats being used. Ifyou don't specify the input format, seqret will try a set of possibleformats until it reads it in successfully. Because you can specify theoutput sequence format, seqret is a program to reformat a sequence.
seqret can read in the reverse complement of a nucleic acid sequence. It therefore is a program for producing the reverse complement of asequence.
seqret can read in a sequence whose begin and end positions you havespecified and write out that fragment. It is therefore a utility fordoing simple extraction of a region of a sequence.
seqret can change the case of the sequence being read in to upper or tolower case. It is therefore a simple sequence beautification utility.
seqret can do any combination of the above functions.
The sequence input and output specification of this (and many otherEMBOSS programs) is described as being a Uniform Sequence Address.
The Uniform Sequence Address, or USA, is a somewhat tongue-in-cheekreference to a URL-style sequence naming used by all EMBOSSapplications.
The USA is a very flexible way of specifying one or more sequences froma variety of sources and includes sequence files, database queries andexternal applications.
See the full specification of USA syntax at:http://www.uk.embnet.org/Software/EMBOSS/Themes/UniformSequenceAddress.html
The set of associated qualifiers for sequences behave in different waysdepending on where they appear.
If these qualifiers immediately follow a parameter they apply only tothat parameter and not to all cases. If they occur before anyparameters, they apply to all following sequence parameters.
If there are no two parameters of equal type, the order of parametersand their qualifiers is irrelevant.
Where a qualifier is defined more than once, for example "-sformat" for2 input sequences to be aligned, the qualifier name can have a number toindicate which sequence is meant. "-sbegin2=25" will apply only to thesecond sequence, no matter where it appears on the command line.
The -sbegin and -send qualifiers take an integer number specifying theposition to begin or end reading a sequence. If the number is positive,the number is the position counting from the first base or residue ofthe sequence. If the number is negative the position is counted fromthe end of the sequence, so position -1 is the last base or residue ofthe sequence. (If -sbegin 0 is used, it is assumed to be the same as-sbegin 1 and -send 0 is the same as -send -1.)
The filter qualifier makes the program behave like a filter, reading its(first) input 'file' from the standard input, and writing its (first)output 'file' to the standard output. The -filter qualifier will alsoinvoke the -auto qualifier, so the user is never prompted for anymissing values.
Example:
% cat sequence.seq | seqret -filter | lpr
The example shows the application seqret being run with the -filterqualifier. The input file is 'piped' into the program using the unixcommand cat and the output is 'piped' directly to the unix program lpr,which will print it on the printer.
When the -options qualifier is used and not all the parameters are givenon the command line, it will query the user for those parameters. Itwill not only query the user for the required parameters as it would dowithout the -options qualifier, but it will also query the user for theoptional parameters.
When the -stdout qualifier is used, the user will still be prompted forall the info that is required, but will write to standard output bydefault. The user will also still be prompted for an output filename,in case the user wants to save the output to a file.