The AJAX Command Definition and the commandline syntax provide the additional power that allows seqret to read and write any sequence format that EMBOSS supports, using the full power of the Uniform Sequence Address to control sequence locations and formats.
Of course, a more complicated application could actually do something before writing out the sequence.
#include "emboss.h" int main (int argc, char * argv[]) { AjPSeq seq; AjPSeqout seqout; embInit ("seqret", argc, argv); seq = ajAcdGetSeq ("sequence"); seqout = ajAcdGetSeqout ("outseq"); ajSeqWrite (seqout, seq); ajSeqWriteClose (seqout); ajExit (); } |
Both can be specified as parameters (writing "required: Y" instead of "param: 1" would make them only qualifiers), but can also use their names as qualifiers.
The same names are to be used by the application to retrieve the sequence object and the output sequence location.
appl: seqret sequence: sequence [ param: 1 ] outseq: seqout [ param: 2 ] |
In this example, a FASTA format sequence file is written to standard output in GCG format.
% seqret fasta::paamir.tfa -osformat gcg -filter !!NA_SEQUENCE 1.0 Pseudomonas aeruginosa amiC and amiR genes 2/97 PAAMIR Length: 2167 Type: N Check: 3726 .. 1 GGTACCGCTG GCCGAGCATC TGCTCGATCA CCACCAGCCG GGCGACGGGA 51 ACTGCACGAT CTACCTGGCG AGCCTGGAGC ACGAGCGGGT TCGCTTCGTA .............. lines omitted ................ 951 CATGGTTTCT TCCCGGAGAA CGCGACCATC ACCGCCTGGG CCGAGGCGGC |