seqret

 

Wiki

The master copies of EMBOSS documentation are available at http://emboss.open-bio.org/wiki/Appdocs on the EMBOSS Wiki.

Please help by correcting and extending the Wiki pages.

Function

Read and write (return) sequences

Description

seqret reads in one or more sequences and writes them out again. The sequence input may be a literal sequence or read from a database, file, file of sequence names, or even the command-line or the output of another programs. The sequence output can be written to screen, to file, or passed to another program. A wide range of standard sequence formats may be specified for input and output. If you don't specify the input format, seqret will try a set of possible formats until it reads it in successfully. The sequence input and output, as for all EMBOSS programs, is described by a Uniform Sequence Address. This is is a very flexible way of specifying one or more sequences from a variety of sources and includes sequence files, database queries and external applications.

There are many options built-in into EMBOSS for detailed specification of the input and output sequences, for example the sequence type, file format. specification of sequence regions by begin and end positions, or generation of the reverse complement of a nucleic acid sequence. On output seqret can change the case of the sequence to upper or to lower case.

seqret is useful for a variety of tasks, including extracting sequences from databases, displaying sequences, reformatting sequences, producing the reverse complement of a sequence, extracting fragments of a sequence, sequence case conversion or any combination of the above functions.

Usage

Here is a sample session with seqret

Extract an entry from a database and write it to a file:


% seqret 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: 

Go to the input files for this example
Go to the output files for this example

Example 2

Read all entries in the database 'tembl' that start with 'ab' and write them to a file. In this example the specification is all done in the command line and to stop Unix getting confused by the '*' character, it has to have a backslash ('\') before it:


% seqret "tembl:ab*"  aball.seq 
Read and write (return) sequences

Go to the output files for this example

Example 3

seqret does not read in features by default because this results in slightly faster performance. If however you wish to read in features with your sequence and write them out on output, using '-feature' will change the default behaviour to use any features present in the sequence. N.B. use embl format for the output file as the default format 'fasta' reports the features in gff (file "<seqname>.gff")


% seqret -feature 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: embl::x65923.embl

Go to the output files for this example

Example 4

Display the contents of the sequence on the screen:


% seqret 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: stdout

>X65923 X65923.1 H.sapiens fau mRNA
ttcctctttctcgactccatcttcgcggtagctgggaccgccgttcagtcgccaatatgc
agctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacggtcg
cccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgc
tcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggaggccc
tgactaccctggaagtagcaggccgcatgcttggaggtaaagttcatggttccctggccc
gtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaagaaga
agacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtgccca
cctttggcaagaagaagggccccaatgccaactcttaagtcttttgtaattctggctttc
tctaataaaaaagccacttagttcagtcaaaaaaaaaa

Example 5

Write the result in GCG format by using the qualifier '-osformat'.


% seqret -osf gcg 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.gcg]: 

Go to the output files for this example

Example 6

Write the result in GCG format by specifying the format in the output USA on the command line.


% seqret -outseq gcg::x65923.gcg 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923

Example 7

Write the result in GCG format by specifying the format in the output USA at the prompt.


% seqret 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: gcg::x65923.gcg

Example 8

Write the reverse-complement of a sequence:


% seqret -srev 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: 

Go to the output files for this example

Example 9

Extract the bases between the positions starting at 5 and ending at 25:


% seqret -sbegin 5 -send 25 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: 

Go to the output files for this example

Example 10

Extract the bases between the positions starting at 5 and ending at 5 bases before the end of the sequence:


% seqret -sbegin 5 -send -5 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:x65923
output sequence(s) [x65923.fasta]: 

Go to the output files for this example

Example 11

Read all entries in the database 'tembl' that start with 'h' and write them to a file:


% seqret 
Read and write (return) sequences
Input (gapped) sequence(s): tembl:h*
output sequence(s) [h45989.fasta]: hall.seq

Go to the output files for this example

Command line arguments

Read and write (return) sequences
Version: EMBOSS:6.6.0.0

   Standard (Mandatory) qualifiers:
  [-sequence]          seqall     (Gapped) sequence(s) filename and optional
                                  format, or reference (input USA)
  [-outseq]            seqoutall  [.] Sequence set(s)
                                  filename and optional format (output USA)

   Additional (Optional) qualifiers: (none)
   Advanced (Unprompted) qualifiers:
   -feature            boolean    Use feature information
   -firstonly          boolean    [N] Read one sequence and stop

   Associated qualifiers:

   "-sequence" associated qualifiers
   -sbegin1            integer    Start of each sequence to be used
   -send1              integer    End of each sequence to be used
   -sreverse1          boolean    Reverse (if DNA)
   -sask1              boolean    Ask for begin/end/reverse
   -snucleotide1       boolean    Sequence is nucleotide
   -sprotein1          boolean    Sequence is protein
   -slower1            boolean    Make lower case
   -supper1            boolean    Make upper case
   -scircular1         boolean    Sequence is circular
   -squick1            boolean    Read id and sequence only
   -sformat1           string     Input sequence format
   -iquery1            string     Input query fields or ID list
   -ioffset1           integer    Input start position offset
   -sdbname1           string     Database name
   -sid1               string     Entryname
   -ufo1               string     UFO features
   -fformat1           string     Features format
   -fopenfile1         string     Features file name

   "-outseq" associated qualifiers
   -osformat2          string     Output seq format
   -osextension2       string     File name extension
   -osname2            string     Base file name
   -osdirectory2       string     Output directory
   -osdbname2          string     Database name to add
   -ossingle2          boolean    Separate file for each entry
   -oufo2              string     UFO features
   -offormat2          string     Features format
   -ofname2            string     Features file name
   -ofdirectory2       string     Output directory

   General qualifiers:
   -auto               boolean    Turn off prompts
   -stdout             boolean    Write first file to standard output
   -filter             boolean    Read first file from standard input, write
                                  first file to standard output
   -options            boolean    Prompt for standard and additional values
   -debug              boolean    Write debug output to program.dbg
   -verbose            boolean    Report some/full command line options
   -help               boolean    Report command line options and exit. More
                                  information on associated and general
                                  qualifiers can be found with -help -verbose
   -warning            boolean    Report warnings
   -error              boolean    Report errors
   -fatal              boolean    Report fatal errors
   -die                boolean    Report dying program messages
   -version            boolean    Report version number and exit

Qualifier Type Description Allowed values Default
Standard (Mandatory) qualifiers
[-sequence]
(Parameter 1)
seqall (Gapped) sequence(s) filename and optional format, or reference (input USA) Readable sequence(s) Required
[-outseq]
(Parameter 2)
seqoutall Sequence set(s) filename and optional format (output USA) Writeable sequence(s) <*>.format
Additional (Optional) qualifiers
(none)
Advanced (Unprompted) qualifiers
-feature boolean Use feature information Boolean value Yes/No No
-firstonly boolean Read one sequence and stop Boolean value Yes/No No
Associated qualifiers
"-sequence" associated seqall qualifiers
-sbegin1
-sbegin_sequence
integer Start of each sequence to be used Any integer value 0
-send1
-send_sequence
integer End of each sequence to be used Any integer value 0
-sreverse1
-sreverse_sequence
boolean Reverse (if DNA) Boolean value Yes/No N
-sask1
-sask_sequence
boolean Ask for begin/end/reverse Boolean value Yes/No N
-snucleotide1
-snucleotide_sequence
boolean Sequence is nucleotide Boolean value Yes/No N
-sprotein1
-sprotein_sequence
boolean Sequence is protein Boolean value Yes/No N
-slower1
-slower_sequence
boolean Make lower case Boolean value Yes/No N
-supper1
-supper_sequence
boolean Make upper case Boolean value Yes/No N
-scircular1
-scircular_sequence
boolean Sequence is circular Boolean value Yes/No N
-squick1
-squick_sequence
boolean Read id and sequence only Boolean value Yes/No N
-sformat1
-sformat_sequence
string Input sequence format Any string  
-iquery1
-iquery_sequence
string Input query fields or ID list Any string  
-ioffset1
-ioffset_sequence
integer Input start position offset Any integer value 0
-sdbname1
-sdbname_sequence
string Database name Any string  
-sid1
-sid_sequence
string Entryname Any string  
-ufo1
-ufo_sequence
string UFO features Any string  
-fformat1
-fformat_sequence
string Features format Any string  
-fopenfile1
-fopenfile_sequence
string Features file name Any string  
"-outseq" associated seqoutall qualifiers
-osformat2
-osformat_outseq
string Output seq format Any string  
-osextension2
-osextension_outseq
string File name extension Any string  
-osname2
-osname_outseq
string Base file name Any string  
-osdirectory2
-osdirectory_outseq
string Output directory Any string  
-osdbname2
-osdbname_outseq
string Database name to add Any string  
-ossingle2
-ossingle_outseq
boolean Separate file for each entry Boolean value Yes/No N
-oufo2
-oufo_outseq
string UFO features Any string  
-offormat2
-offormat_outseq
string Features format Any string  
-ofname2
-ofname_outseq
string Features file name Any string  
-ofdirectory2
-ofdirectory_outseq
string Output directory Any string  
General qualifiers
-auto boolean Turn off prompts Boolean value Yes/No N
-stdout boolean Write first file to standard output Boolean value Yes/No N
-filter boolean Read first file from standard input, write first file to standard output Boolean value Yes/No N
-options boolean Prompt for standard and additional values Boolean value Yes/No N
-debug boolean Write debug output to program.dbg Boolean value Yes/No N
-verbose boolean Report some/full command line options Boolean value Yes/No Y
-help boolean Report command line options and exit. More information on associated and general qualifiers can be found with -help -verbose Boolean value Yes/No N
-warning boolean Report warnings Boolean value Yes/No Y
-error boolean Report errors Boolean value Yes/No Y
-fatal boolean Report fatal errors Boolean value Yes/No Y
-die boolean Report dying program messages Boolean value Yes/No Y
-version boolean Report version number and exit Boolean value Yes/No N

Input file format

seqret reads one or more nucleotide or protein sequences.

The input is a standard EMBOSS sequence query (also known as a 'USA').

Major sequence database sources defined as standard in EMBOSS installations include srs:embl, srs:uniprot and ensembl

Data can also be read from sequence output in any supported format written by an EMBOSS or third-party application.

The input format can be specified by using the command-line qualifier -sformat xxx, where 'xxx' is replaced by the name of the required format. The available format names are: gff (gff3), gff2, embl (em), genbank (gb, refseq), ddbj, refseqp, pir (nbrf), swissprot (swiss, sw), dasgff and debug.

See: http://emboss.sf.net/docs/themes/SequenceFormats.html for further information on sequence formats.

Input files for usage example

'tembl:x65923' is a sequence entry in the example nucleic acid database 'tembl'

Database entry: tembl:x65923

ID   X65923; SV 1; linear; mRNA; STD; HUM; 518 BP.
XX
AC   X65923;
XX
DT   13-MAY-1992 (Rel. 31, Created)
DT   18-APR-2005 (Rel. 83, Last updated, Version 11)
XX
DE   H.sapiens fau mRNA
XX
KW   fau gene.
XX
OS   Homo sapiens (human)
OC   Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia;
OC   Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae;
OC   Homo.
XX
RN   [1]
RP   1-518
RA   Michiels L.M.R.;
RT   ;
RL   Submitted (29-APR-1992) to the INSDC.
RL   L.M.R. Michiels, University of Antwerp, Dept of Biochemistry,
RL   Universiteisplein 1, 2610 Wilrijk, BELGIUM
XX
RN   [2]
RP   1-518
RX   PUBMED; 8395683.
RA   Michiels L., Van der Rauwelaert E., Van Hasselt F., Kas K., Merregaert J.;
RT   "fau cDNA encodes a ubiquitin-like-S30 fusion protein and is expressed as
RT   an antisense sequence in the Finkel-Biskis-Reilly murine sarcoma virus";
RL   Oncogene 8(9):2537-2546(1993).
XX
DR   Ensembl-Gn; ENSG00000149806; Homo_sapiens.
DR   Ensembl-Tr; ENST00000279259; Homo_sapiens.
DR   Ensembl-Tr; ENST00000434372; Homo_sapiens.
DR   Ensembl-Tr; ENST00000525297; Homo_sapiens.
DR   Ensembl-Tr; ENST00000526555; Homo_sapiens.
DR   Ensembl-Tr; ENST00000527548; Homo_sapiens.
DR   Ensembl-Tr; ENST00000529259; Homo_sapiens.
DR   Ensembl-Tr; ENST00000529639; Homo_sapiens.
DR   Ensembl-Tr; ENST00000531743; Homo_sapiens.
XX
FH   Key             Location/Qualifiers
FH
FT   source          1..518
FT                   /organism="Homo sapiens"
FT                   /chromosome="11q"
FT                   /map="13"
FT                   /mol_type="mRNA"
FT                   /clone_lib="cDNA"
FT                   /clone="pUIA 631"
FT                   /tissue_type="placenta"
FT                   /db_xref="taxon:9606"
FT   misc_feature    57..278
FT                   /note="ubiquitin like part"
FT   CDS             57..458
FT                   /gene="fau"
FT                   /db_xref="GDB:135476"
FT                   /db_xref="GOA:P35544"
FT                   /db_xref="GOA:P62861"
FT                   /db_xref="H-InvDB:HIT000322806.14"
FT                   /db_xref="HGNC:3597"
FT                   /db_xref="InterPro:IPR000626"
FT                   /db_xref="InterPro:IPR006846"
FT                   /db_xref="InterPro:IPR019954"
FT                   /db_xref="InterPro:IPR019955"
FT                   /db_xref="InterPro:IPR019956"
FT                   /db_xref="PDB:2L7R"
FT                   /db_xref="UniProtKB/Swiss-Prot:P35544"
FT                   /db_xref="UniProtKB/Swiss-Prot:P62861"
FT                   /protein_id="CAA46716.1"
FT                   /translation="MQLFVRAQELHTFEVTGQETVAQIKAHVASLEGIAPEDQVVLLAG
FT                   APLEDEATLGQCGVEALTTLEVAGRMLGGKVHGSLARAGKVRGQTPKVAKQEKKKKKTG
FT                   RAKRRMQYNRRFVNVVPTFGKKKGPNANS"
FT   misc_feature    98..102
FT                   /note="nucleolar localization signal"
FT   misc_feature    279..458
FT                   /note="S30 part"
FT   polyA_signal    484..489
FT   polyA_site      509
XX
SQ   Sequence 518 BP; 125 A; 139 C; 148 G; 106 T; 0 other;
     ttcctctttc tcgactccat cttcgcggta gctgggaccg ccgttcagtc gccaatatgc        60
     agctctttgt ccgcgcccag gagctacaca ccttcgaggt gaccggccag gaaacggtcg       120
     cccagatcaa ggctcatgta gcctcactgg agggcattgc cccggaagat caagtcgtgc       180
     tcctggcagg cgcgcccctg gaggatgagg ccactctggg ccagtgcggg gtggaggccc       240
     tgactaccct ggaagtagca ggccgcatgc ttggaggtaa agttcatggt tccctggccc       300
     gtgctggaaa agtgagaggt cagactccta aggtggccaa acaggagaag aagaagaaga       360
     agacaggtcg ggctaagcgg cggatgcagt acaaccggcg ctttgtcaac gttgtgccca       420
     cctttggcaa gaagaagggc cccaatgcca actcttaagt cttttgtaat tctggctttc       480
     tctaataaaa aagccactta gttcagtcaa aaaaaaaa                               518
//

Output file format

The output is a standard EMBOSS sequence file.

The results can be output in one of several styles by using the command-line qualifier -osformat xxx, where 'xxx' is replaced by the name of the required format. The available format names are: embl, genbank, gff, pir, swiss, dasgff, debug, listfile, dbmotif, diffseq, excel, feattable, motif, nametable, regions, seqtable, simple, srs, table, tagseq.

See: http://emboss.sf.net/docs/themes/SequenceFormats.html for further information on sequence formats.

The output from seqret is one or more sequences, and by default will be written in FASTA format.

If the '-firstonly' qualifier is used then only the first sequence of the input USA specification will be written out.

In some cases the output filename will be the same as the input filename, but as seqret reads only the first sequence before opening the output file it may try to overwrite the input. Note that this is not true of seqretset which reads all sequences into memory at startup, but which can need a large amount of memory for many sequences.

Output files for usage example

File: x65923.fasta

>X65923 X65923.1 H.sapiens fau mRNA
ttcctctttctcgactccatcttcgcggtagctgggaccgccgttcagtcgccaatatgc
agctctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacggtcg
cccagatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgc
tcctggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggaggccc
tgactaccctggaagtagcaggccgcatgcttggaggtaaagttcatggttccctggccc
gtgctggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaagaaga
agacaggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtgccca
cctttggcaagaagaagggccccaatgccaactcttaagtcttttgtaattctggctttc
tctaataaaaaagccacttagttcagtcaaaaaaaaaa

Output files for usage example 2

File: aball.seq

>AB009602 AB009602.1 Schizosaccharomyces pombe mRNA for MET1 homolog, partial cds.
gttcgatgcctaaaataccttcttttgtccctacacagaccacagttttcctaatggctt
tacaccgactagaaattcttgtgcaagcactaattgaaagcggttggcctagagtgttac
cggtttgtatagctgagcgcgtctcttgccctgatcaaaggttcattttctctactttgg
aagacgttgtggaagaatacaacaagtacgagtctctcccccctggtttgctgattactg
gatacagttgtaatacccttcgcaacaccgcgtaactatctatatgaattattttccctt
tattatatgtagtaggttcgtctttaatcttcctttagcaagtcttttactgttttcgac
ctcaatgttcatgttcttaggttgttttggataatatgcggtcagtttaatcttcgttgt
ttcttcttaaaatatttattcatggtttaatttttggtttgtacttgttcaggggccagt
tcattatttactctgtttgtatacagcagttcttttatttttagtatgattttaatttaa
aacaattctaatggtcaaaaa
>AB000095 AB000095.1 Homo sapiens mRNA for hepatocyte growth factor activator inhibitor, complete cds.
cggccgagcccagctctccgagcaccgggtcggaagccgcgacccgagccgcgcaggaag
ctgggaccggaacctcggcggacccggccccacccaactcacctgcgcaggtcaccagca
ccctcggaacccagaggcccgcgctctgaaggtgacccccctggggaggaaggcgatggc
ccctgcgaggacgatggcccgcgcccgcctcgccccggccggcatccctgccgtcgcctt
gtggcttctgtgcacgctcggcctccagggcacccaggccgggccaccgcccgcgccccc
tgggctgcccgcgggagccgactgcctgaacagctttaccgccggggtgcctggcttcgt
gctggacaccaacgcctcggtcagcaacggagctaccttcctggagtcccccaccgtgcg
ccggggctgggactgcgtgcgcgcctgctgcaccacccagaactgcaacttggcgctagt
ggagctgcagcccgaccgcggggaggacgccatcgccgcctgcttcctcatcaactgcct
ctacgagcagaacttcgtgtgcaagttcgcgcccagggagggcttcatcaactacctcac
gagggaagtgtaccgctcctaccgccagctgcggacccagggctttggagggtctgggat
ccccaaggcctgggcaggcatagacttgaaggtacaaccccaggaacccctggtgctgaa
ggatgtggaaaacacagattggcgcctactgcggggtgacacggatgtcagggtagagag
gaaagacccaaaccaggtggaactgtggggactcaaggaaggcacctacctgttccagct
gacagtgactagctcagaccacccagaggacacggccaacgtcacagtcactgtgctgtc
caccaagcagacagaagactactgcctcgcatccaacaaggtgggtcgctgccggggctc
tttcccacgctggtactatgaccccacggagcagatctgcaagagtttcgtttatggagg
ctgcttgggcaacaagaacaactaccttcgggaagaagagtgcattctagcctgtcgggg
tgtgcaaggcccctccatggaaaggcgccatccagtgtgctctggcacctgtcagcccac
ccagttccgctgcagcaatggctgctgcatcgacagtttcctggagtgtgacgacacccc
caactgccccgacgcctccgacgaggctgcctgtgaaaaatacacgagtggctttgacga
gctccagcgcatccatttccccagtgacaaagggcactgcgtggacctgccagacacagg
actctgcaaggagagcatcccgcgctggtactacaaccccttcagcgaacactgcgcccg
ctttacctatggtggttgttatggcaacaagaacaactttgaggaagagcagcagtgcct
cgagtcttgtcgcggcatctccaagaaggatgtgtttggcctgaggcgggaaatccccat
tcccagcacaggctctgtggagatggctgtcgcagtgttcctggtcatctgcattgtggt
ggtggtagccatcttgggttactgcttcttcaagaaccagagaaaggacttccacggaca
ccaccaccacccaccacccacccctgccagctccactgtctccactaccgaggacacgga
gcacctggtctataaccacaccacccggcccctctgagcctgggtctcaccggctctcac
ctggccctgcttcctgcttgccaaggcagaggcctgggctgggaaaaactttggaaccag
actcttgcctgtttcccaggcccactgtgcctcagagaccagggctccagcccctcttgg
agaagtctcagctaagctcacgtcctgagaaagctcaaaggtttggaaggagcagaaaac
ccttgggccagaagtaccagactagatggacctgcctgcataggagtttggaggaagttg
gagttttgtttcctctgttcaaagctgcctgtccctaccccatggtgctaggaagaggag
tggggtggtgtcagaccctggaggccccaaccctgtcctcccgagctcctcttccatgct
gtgcgcccagggctgggaggaaggacttccctgtgtagtttgtgctgtaaagagttgctt
tttgtttatttaatgctgtggcatgggtgaagaggaggggaagaggcctgtttggcctct
ctgtcctctcttcctcttcccccaagattgagctctctgcccttgatcagccccaccctg


  [Part of this file has been deleted for brevity]

ccttgtcaggcggaagggcatcaacggcgggcttctcccgctgggcctgagcccgttgat
ctccccaagctgcaagcgaaccttgcgggtcaaggtcgagggcaatcacggattcccctg
cctctgtggccgcgacggcaatggcagcagcgagggtagtttttcccgcgccgcccttct
gcgtgaccagagcaattgtcttcatgcctgcactatagcattaaggcactaaagcgtcaa
agcgccatagcggcatagcggcatagcggcatagcgctaaaatgctatagcattattaaa
tacagcgctacagcgctataatgctgcaacggttaggaccgcaatttgcgccccgggccg
gttgcgctatcgaccagctcaattaactgctcgggctcggacgcgaaccacgcgaagctg
ccccaagccaaggagtcgagggagccacggttgatgagagctttgttgtaggtggaccag
ttggtgattttgaacttttgctttgccacggaacggtctgcgttgtcgggaagatgcgtg
atctgatccttcaactcagcaaaagttcgatttattcaacaaagccacgttgtgtctcaa
aatctctgatgttacattgcacaagataaaaatatatcatcatgaacaataaaactgtct
gcttacataaacagtaatacaaggggtgttatgagccatattcaacgggaaacgtcttgc
tcgaagccgcgattaaattccaacatggatgctgatttatatgggtataaatgggctcgc
gataatgtcgggcaatcaggtgcgacaatctatcgattgtatgggaagcccgatgcgcca
gagttgtttctgaaacatggcaaaggtagcgttgccaatgatgttacagatgagatggtc
agactaaactggctgacggaatttatgcctcttccgaccatcaagcattttatccgtact
cctgatgatgcatggttactcaccactgcgatccccgggaaaacagcattccaggtatta
gaagaatatcctgattcaggtgaaaatattgttgatgcgctggcagtgttcctgcgccgg
ttgcattcgattcctgtttgtaattgtccttttaacagcgatcgcgtatttcgtctcgct
caggcgcaatcacgaatgaataacggtttggttgatgcgagtgattttgatgacgagcgt
aatggctggcctgttgaacaagtctggaaagaaatgcataagcttttgccattctcaccg
gattcagtcgtcactcatggtgatttctcacttgataaccttatttttgacgaggggaaa
ttaataggttgtattgatgttggacgagtcggaatcgcagaccgataccaggatcttgcc
atcctatggaactgcctcggtgagttttctccttcattacagaaacggctttttcaaaaa
tatggtattgataatcctgatatgaataaattgcagtttcatttgatgctcgatgagttt
ttctaatcagaattggttaattggttgtaacactggcagagcattacgctgacttgacgg
gacggcggctttgttgaataaatcgcattcgccattcaggctgcgcaactgttgggaagg
gcgatcggtgcgggcctcttcgctattacgccagctggcgaaagggggatgtgctgcaag
gcgattaagttgggtaacgccagggttttcccagtcacgacgttgtaaaacgacggccag
tgccaagcttgcatgcctgcaggtcgactctagaggatccccgggtaccgagctcgaatt
cgtaatcatggtcatagctgtttcctgtgtgaaattgttatccgctcacaattccacaca
acatacgagccggaagcataaagtgtaaagcctggggtgcctaatgagtgagctaactca
cattaattgcgttgcgctcactgcccgctttccagtcgggaaacctgtcgtgccagctgc
attaatgaatcggccaacgcgcggggagaggcggtttgcgtattggcgaacttttgctga
gttgaaggatcagatcacgcatcttcccgacaacgcagaccgttccgtggcaaagcaaaa
gttcaaaatcagtaaccgtcagtgccgataagttcaaagttaaacctggtgttgatacca
acattgaaacgctgatcgaaaacgcgctgaaaaacgctgctgaatgtgcgagcttcttcc
gcttcctcgctcactgactcgctgcgctcggtcgttcggctgcggcgagcggtatcagct
cactcaaaggcggtaatacggttatccacagaatcaggggataacgcaggaaagaacatg
tgagcaaaaggccagcaaaaggccaggaaccgtaaaaaggccgcgttgctggcgtttttc
cataggctccgcccccctgacgagcatcacaaaaatcgacgctcaagtcagaggtggcga
aacccgacaggactataaagataccaggcgtttccccctggaagctccctcgtgcgctct
cctgttccgaccctgccgcttaccggatacctgtccgcctttctcccttcgggaagcgtg
gcgctttctcaatgctcacgctgtaggtatctcagttcggtgtaggtcgttcgctccaag
ctgggctgtgtgcacgaaccccccgttcagcccgaccgctgcgccttatccggtaactat
cgtcttgagtccaacccggtaagacacgacttatcgccactggcagcagccactggtaac
aggattagcagagcgaggtatgtaggcggtgctacagagttcttgaagtggtggcctaac
tacggctacactagaaggacagtatttggtatctgcgctctgctgaagccagttaccttc
ggaaaaagagttggtagctcttgatccggcaaacaaaccaccgctggtagcggtggtttt
tttgtttgcaagcagcagattacgcgcagaaaaaaaggatctcaagaagatcctttgatc
ttttctacggggtctgacgctcagtggaacgatccgtcga

Output files for usage example 3

File: x65923.embl

ID   X65923; SV 1; linear; mRNA; STD; HUM; 518 BP.
XX
AC   X65923;
XX
DT   13-MAY-1992 (Rel. 31, Created)
DT   18-APR-2005 (Rel. 83, Last updated, Version 11)
XX
DE   H.sapiens fau mRNA
XX
KW   fau gene.
XX
OS   Homo sapiens (human)
OC   Eukaryota; Metazoa; Chordata; Craniata; Vertebrata; Euteleostomi; Mammalia;
OC   Eutheria; Euarchontoglires; Primates; Haplorrhini; Catarrhini; Hominidae;
OC   Homo.
XX
RN   [1]
RP   1-518
RA   Michiels L.M.R.;
RT   ;
RL   Submitted (29-APR-1992) to the INSDC.
RL   L.M.R. Michiels, University of Antwerp, Dept of Biochemistry,
RL   Universiteisplein 1, 2610 Wilrijk, BELGIUM.
XX
RN   [2]
RP   1-518
RX   PUBMED; 8395683.
RA   Michiels L., Van der Rauwelaert E., Van Hasselt F., Kas K., Merregaert J.;
RT   "fau cDNA encodes a ubiquitin-like-S30 fusion protein and is expressed as
RT   an antisense sequence in the Finkel-Biskis-Reilly murine sarcoma virus";
RL   Oncogene 8(9):2537-2546(1993).
XX
DR   Ensembl-Gn; ENSG00000149806; Homo_sapiens.
DR   Ensembl-Tr; ENST00000279259; Homo_sapiens.
DR   Ensembl-Tr; ENST00000434372; Homo_sapiens.
DR   Ensembl-Tr; ENST00000525297; Homo_sapiens.
DR   Ensembl-Tr; ENST00000526555; Homo_sapiens.
DR   Ensembl-Tr; ENST00000527548; Homo_sapiens.
DR   Ensembl-Tr; ENST00000529259; Homo_sapiens.
DR   Ensembl-Tr; ENST00000529639; Homo_sapiens.
DR   Ensembl-Tr; ENST00000531743; Homo_sapiens.
XX
FH   Key             Location/Qualifiers
FH
FT   source          1..518
FT                   /organism="Homo sapiens"
FT                   /chromosome="11q"
FT                   /map="13"
FT                   /mol_type="mRNA"
FT                   /clone_lib="cDNA"
FT                   /clone="pUIA 631"
FT                   /tissue_type="placenta"
FT                   /db_xref="taxon:9606"
FT   misc_feature    57..278
FT                   /note="ubiquitin like part"
FT   CDS             57..458
FT                   /gene="fau"
FT                   /db_xref="GDB:135476"
FT                   /db_xref="GOA:P35544"
FT                   /db_xref="GOA:P62861"
FT                   /db_xref="H-InvDB:HIT000322806.14"
FT                   /db_xref="HGNC:3597"
FT                   /db_xref="InterPro:IPR000626"
FT                   /db_xref="InterPro:IPR006846"
FT                   /db_xref="InterPro:IPR019954"
FT                   /db_xref="InterPro:IPR019955"
FT                   /db_xref="InterPro:IPR019956"
FT                   /db_xref="PDB:2L7R"
FT                   /db_xref="UniProtKB/Swiss-Prot:P35544"
FT                   /db_xref="UniProtKB/Swiss-Prot:P62861"
FT                   /protein_id="CAA46716.1"
FT                   /translation="MQLFVRAQELHTFEVTGQETVAQIKAHVASLEGIAPEDQVVLLAG
FT                   APLEDEATLGQCGVEALTTLEVAGRMLGGKVHGSLARAGKVRGQTPKVAKQEKKKKKTG
FT                   RAKRRMQYNRRFVNVVPTFGKKKGPNANS"
FT   misc_feature    98..102
FT                   /note="nucleolar localization signal"
FT   misc_feature    279..458
FT                   /note="S30 part"
FT   polyA_signal    484..489
FT   polyA_site      509
XX
SQ   Sequence 518 BP; 125 A; 139 C; 148 G; 106 T; 0 other;
     ttcctctttc tcgactccat cttcgcggta gctgggaccg ccgttcagtc gccaatatgc        60
     agctctttgt ccgcgcccag gagctacaca ccttcgaggt gaccggccag gaaacggtcg       120
     cccagatcaa ggctcatgta gcctcactgg agggcattgc cccggaagat caagtcgtgc       180
     tcctggcagg cgcgcccctg gaggatgagg ccactctggg ccagtgcggg gtggaggccc       240
     tgactaccct ggaagtagca ggccgcatgc ttggaggtaa agttcatggt tccctggccc       300
     gtgctggaaa agtgagaggt cagactccta aggtggccaa acaggagaag aagaagaaga       360
     agacaggtcg ggctaagcgg cggatgcagt acaaccggcg ctttgtcaac gttgtgccca       420
     cctttggcaa gaagaagggc cccaatgcca actcttaagt cttttgtaat tctggctttc       480
     tctaataaaa aagccactta gttcagtcaa aaaaaaaa                               518
//

Output files for usage example 5

File: x65923.gcg

!!NA_SEQUENCE 1.0

H.sapiens fau mRNA

X65923  Length: 518  Type: N  Check: 2981 ..

   1 ttcctctttc tcgactccat cttcgcggta gctgggaccg ccgttcagtc

  51 gccaatatgc agctctttgt ccgcgcccag gagctacaca ccttcgaggt

 101 gaccggccag gaaacggtcg cccagatcaa ggctcatgta gcctcactgg

 151 agggcattgc cccggaagat caagtcgtgc tcctggcagg cgcgcccctg

 201 gaggatgagg ccactctggg ccagtgcggg gtggaggccc tgactaccct

 251 ggaagtagca ggccgcatgc ttggaggtaa agttcatggt tccctggccc

 301 gtgctggaaa agtgagaggt cagactccta aggtggccaa acaggagaag

 351 aagaagaaga agacaggtcg ggctaagcgg cggatgcagt acaaccggcg

 401 ctttgtcaac gttgtgccca cctttggcaa gaagaagggc cccaatgcca

 451 actcttaagt cttttgtaat tctggctttc tctaataaaa aagccactta

 501 gttcagtcaa aaaaaaaa

Output files for usage example 8

File: x65923.fasta

>X65923 X65923.1 H.sapiens fau mRNA
ttttttttttgactgaactaagtggcttttttattagagaaagccagaattacaaaagac
ttaagagttggcattggggcccttcttcttgccaaaggtgggcacaacgttgacaaagcg
ccggttgtactgcatccgccgcttagcccgacctgtcttcttcttcttcttctcctgttt
ggccaccttaggagtctgacctctcacttttccagcacgggccagggaaccatgaacttt
acctccaagcatgcggcctgctacttccagggtagtcagggcctccaccccgcactggcc
cagagtggcctcatcctccaggggcgcgcctgccaggagcacgacttgatcttccggggc
aatgccctccagtgaggctacatgagccttgatctgggcgaccgtttcctggccggtcac
ctcgaaggtgtgtagctcctgggcgcggacaaagagctgcatattggcgactgaacggcg
gtcccagctaccgcgaagatggagtcgagaaagaggaa

Output files for usage example 9

File: x65923.fasta

>X65923 X65923.1 H.sapiens fau mRNA
tctttctcgactccatcttcg

Output files for usage example 10

File: x65923.fasta

>X65923 X65923.1 H.sapiens fau mRNA
tctttctcgactccatcttcgcggtagctgggaccgccgttcagtcgccaatatgcagct
ctttgtccgcgcccaggagctacacaccttcgaggtgaccggccaggaaacggtcgccca
gatcaaggctcatgtagcctcactggagggcattgccccggaagatcaagtcgtgctcct
ggcaggcgcgcccctggaggatgaggccactctgggccagtgcggggtggaggccctgac
taccctggaagtagcaggccgcatgcttggaggtaaagttcatggttccctggcccgtgc
tggaaaagtgagaggtcagactcctaaggtggccaaacaggagaagaagaagaagaagac
aggtcgggctaagcggcggatgcagtacaaccggcgctttgtcaacgttgtgcccacctt
tggcaagaagaagggccccaatgccaactcttaagtcttttgtaattctggctttctcta
ataaaaaagccacttagttcagtcaaaaaa

Output files for usage example 11

File: hall.seq

>H45989 H45989.1 yo13c02.s1 Soares adult brain N2b5HB55Y Homo sapiens cDNA clone IMAGE:177794 3', mRNA sequence.
ccggnaagctcancttggaccaccgactctcgantgnntcgccgcgggagccggntggan
aacctgagcgggactggnagaaggagcagagggaggcagcacccggcgtgacggnagtgt
gtggggcactcaggccttccgcagtgtcatctgccacacggaaggcacggccacgggcag
gggggtctatgatcttctgcatgcccagctggcatggccccacgtagagtggnntggcgt
ctcggtgctggtcagcgacacgttgtcctggctgggcaggtccagctcccggaggacctg
gggcttcagcttcccgtagcgctggctgcagtgacggatgctcttgcgctgccatttctg
ggtgctgtcactgtccttgctcactccaaaccagttcggcggtccccctgcggatggtct
gtgttgatggacgtttgggctttgcagcaccggccgccgagttcatggtngggtnaagag
atttgggttttttcn

Data files

None.

Notes

This description of what you can do when reading or writing files is not specific to the program seqret. All EMBOSS programs that read or write sequences can do the same.

seqret is often one of the first programs taught in EMBOSS training courses. This is because it is versatile, it is extremely powerful for its size (17 lines of code) it illustrates many aspects of EMBOSS programs and it was one of the first EMBOSS programs to be written, so it has a special place in the hearts of EMBOSS developers.

The name 'seqret' derives both from its function ("sequence return") and from the fact that immense amounts of functionality can come from so few lines of source code - most of the work is done by the EMBOSS libraries which the program calls and whose complexity is hidden, or "secret".

The simplicity of the above description of this program greatly understates the rich functionality of this program.

Because EMBOSS programs can take a wide range of qualifiers that slightly change the behaviour of the program when reading or writing a sequence, this program can do many more things than simply "read and write a sequence".

seqret can read a sequence or many sequences from databases, files, files of sequence names, the command-line or the output of other programs and then can write them to files, the screen or pass them to other programs. Because it can read in a sequence from a database and write it to a file, seqret is a program for extracting sequences from databases. Because it can write the sequence to the screen, seqret is a program for displaying sequences.

seqret can read sequences in any of a wide range of standard sequence formats. You can specify the input and output formats being used. If you don't specify the input format, seqret will try a set of possible formats until it reads it in successfully. Because you can specify the output 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 a sequence.

seqret can read in a sequence whose begin and end positions you have specified and write out that fragment. It is therefore a utility for doing simple extraction of a region of a sequence.

seqret can change the case of the sequence being read in to upper or to lower 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 other EMBOSS programs) is described as being a Uniform Sequence Address.

The Uniform Sequence Address, or USA, is a somewhat tongue-in-cheek reference to a URL-style sequence naming used by all EMBOSS applications.

The USA is a very flexible way of specifying one or more sequences from a variety of sources and includes sequence files, database queries and external applications.

See the full specification of USA syntax at:
http://emboss.sourceforge.net/docs/themes/UniformSequenceAddress.html

The basic USA syntax is one of:

Note that ':' separates the name of a file containing many possible entries from the specific name of a sequence entry in that file. It also separates the name of a database from an entry in that database

Note also that '::' separates the specified format of a file from the name of the file. Normally the format can be omitted, in which case the program will attempt to identify the correct format when reading the sequence in and will default to using FASTA format when writing the sequence out.

Valid names of the databases set up in your local implementation of EMBOSS can be seen by using the program 'showdb'.

Database queries, and individual entries in files that have more than one sequence entry, use wildcards of "?" for any character and "*" for any string of characters. There are some problems with the Unix shell catching these characters so they do need to be hidden in quotes or preceded by a backslash on the Unix command line, (for example "embl:hs\*")

The output USA name 'stdout' is special. It makes the output go to the device 'standard output'. This is the screen, by default.

Example USAs

The following are valid USAs for sequences:

USA Description
xxx.seq A sequence file "xxx.seq" in any format
fasta::xxx.seq A sequence file "xxx.seq" in fasta format
gcg::egmsmg.gcg A sequence file "egmsmg.gcg" in GCG 9 format
egmsmg.gcg -sformat=gcg A sequence file "egmsmg.gcg" in GCG 9 format
embl::x13776.em A sequence file "x13776.em" in EMBL format
embl:x13776 EMBL entry X13776, using whatever access method is defined locally for the EMBL database
embl:K01793 EMBL entry K01793, using whatever access method is defined locally for the EMBL database and searching by accession number and entry name (K01793 is a secondary accession number in this case for entry J01636)
embl-acc:K01793 EMBL entry X13776, using whatever access method is defined locally for the EMBL database and searching by accession number only
embl-id:x13776 EMBL entry x13776, using whatever access method is defined locally for the EMBL database, and searching by ID only
embl:v0029* EMBL entries V00290, V00291, and so on, usually in alphabetical order, using whatever access method is defined locally for the EMBL database
embl or EMBL:* All sequences in the EMBL database
@mylist Reads file mylist and uses each line as a separate USA. This is standard VMS list file syntax, also used in SRS 4.0 but missing in SRS 5.0 onwards. The list file is a list of USAs (one per line). List files can contain references to other lists files or any other standard USA.
list::mylist Same as "@mylist" above
'getz -e [embl-id:x13776] |' The pipe character "|" causes EMBOSS to fire up getz (SRS) to extract entry x13776 from EMBL in EMBL format. Any application or script which writes one or more sequences to stdout can be used in this way.
asis::atacgcagttatctgaccat So far the shortest USA we could invent. In 'asis' format the name is the sequence so no file needs to be opened. This is a special case. It was intended as a joke, but has proved quite useful for generating command lines when testing.

Input sequence formats

The input is a standard EMBOSS sequence query (also known as a 'USA').

Major sequence database sources defined as standard in EMBOSS installations include srs:embl, srs:uniprot and ensembl

Data can also be read from sequence output in any supported format written by an EMBOSS or third-party application.

The input format can be specified by using the command-line qualifier -sformat xxx, where 'xxx' is replaced by the name of the required format. The available format names are: gff (gff3), gff2, embl (em), genbank (gb, refseq), ddbj, refseqp, pir (nbrf), swissprot (swiss, sw), dasgff and debug.

See: http://emboss.sf.net/docs/themes/SequenceFormats.html for further information on sequence formats.

Output sequence formats

The output is a standard EMBOSS sequence file.

The results can be output in one of several styles by using the command-line qualifier -osformat xxx, where 'xxx' is replaced by the name of the required format. The available format names are: embl, genbank, gff, pir, swiss, dasgff, debug, listfile, dbmotif, diffseq, excel, feattable, motif, nametable, regions, seqtable, simple, srs, table, tagseq.

See: http://emboss.sf.net/docs/themes/SequenceFormats.html for further information on sequence formats.

Future directions

More formats, both for input and for output, can be easily added, so suggestions are always welcome.

Associated qualifiers

As noted previously there are many 'associated' qualifiers that alter the behaviour of seqret when it reads in or writes out a sequence. As these are used in all EMBOSS programs that read in or write out sequences, they are not reported by the '-help' qualifier. They are however reported by the pair of qualifiers: '-help -verbose':

Some of the more useful associated qualifiers are:

Qualifier Description
-sbeginThe first position to be used in the sequence
-sendThe last position to be used in the sequence
-sreverseUse the reverse complement of a nucleic acid sequence
-saskAsk the user for begin/end/reverse information
-slowerConvert the sequence to lower case
-supperConvert the sequence to upper case
-sformatSpecify the input sequence format
-osformatSpecify the output sequence format
-ossingleWrite each entry into a separate file

The set of associated qualifiers for sequences behave in different ways depending on where they appear.

If these qualifiers immediately follow a parameter they apply only to that parameter and not to all cases. If they occur before any parameters, they apply to all following sequence parameters.

If there are no two parameters of equal type, the order of parameters and their qualifiers is irrelevant.

Where a qualifier is defined more than once, for example "-sformat" for 2 input sequences to be aligned, the qualifier name can have a number to indicate which sequence is meant. "-sbegin2=25" will apply only to the second sequence, no matter where it appears on the command line.

The -sbegin and -send qualifiers take an integer number specifying the position to begin or end reading a sequence. If the number is positive, the number is the position counting from the first base or residue of the sequence. If the number is negative the position is counted from the end of the sequence, so position -1 is the last base or residue of the 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 also invoke the -auto qualifier, so the user is never prompted for any missing values.

Example:


% cat sequence.seq | seqret -filter | lpr

The example shows the application seqret being run with the -filter qualifier. The input file is 'piped' into the program using the unix command 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 given on the command line, it will query the user for those parameters. It will not only query the user for the required parameters as it would do without the -options qualifier, but it will also query the user for the optional parameters.

When the -stdout qualifier is used, the user will still be prompted for all the info that is required, but will write to standard output by default. The user will also still be prompted for an output filename, in case the user wants to save the output to a file.

References

None.

Warnings

None.

Diagnostic Error Messages

None.

Exit status

It always exits with a status of 0.

Known bugs

None.

See also

Program name Description
aligncopy Read and write alignments
aligncopypair Read and write pairs from alignments
biosed Replace or delete sequence sections
codcopy Copy and reformat a codon usage table
cutseq Remove a section from a sequence
degapseq Remove non-alphabetic (e.g. gap) characters from sequences
descseq Alter the name or description of a sequence
entret Retrieve sequence entries from flatfile databases and files
extractalign Extract regions from a sequence alignment
extractfeat Extract features from sequence(s)
extractseq Extract regions from a sequence
featcopy Read and write a feature table
featmerge Merge two overlapping feature tables
featreport Read and write a feature table
feattext Return a feature table original text
listor Write a list file of the logical OR of two sets of sequences
makenucseq Create random nucleotide sequences
makeprotseq Create random protein sequences
maskambignuc Mask all ambiguity characters in nucleotide sequences with N
maskambigprot Mask all ambiguity characters in protein sequences with X
maskfeat Write a sequence with masked features
maskseq Write a sequence with masked regions
newseq Create a sequence file from a typed-in sequence
nohtml Remove mark-up (e.g. HTML tags) from an ASCII text file
noreturn Remove carriage return from ASCII files
nospace Remove whitespace from an ASCII text file
notab Replace tabs with spaces in an ASCII text file
notseq Write to file a subset of an input stream of sequences
nthseq Write to file a single sequence from an input stream of sequences
nthseqset Read and write (return) one set of sequences from many
pasteseq Insert one sequence into another
revseq Reverse and complement a nucleotide sequence
seqcount Read and count sequences
seqretsetall Read and write (return) many sets of sequences
seqretsplit Read sequences and write them to individual files
sizeseq Sort sequences by size
skipredundant Remove redundant sequences from an input set
skipseq Read and write (return) sequences, skipping first few
splitsource Split sequence(s) into original source sequences
splitter Split sequence(s) into smaller sequences
trimest Remove poly-A tails from nucleotide sequences
trimseq Remove unwanted characters from start and end of sequence(s)
trimspace Remove extra whitespace from an ASCII text file
union Concatenate multiple sequences into a single sequence
vectorstrip Remove vectors from the ends of nucleotide sequence(s)
yank Add a sequence reference (a full USA) to a list file

Valid names of the databases set up in your local implementation of EMBOSS can be seen by using the program 'showdb'.

Author(s)

Peter Rice
European Bioinformatics Institute, Wellcome Trust Genome Campus, Hinxton, Cambridge CB10 1SD, UK

Please report all bugs to the EMBOSS bug team (emboss-bug © emboss.open-bio.org) not to the original author.

History

1999 - Written by Peter Rice
Feb 2002 - '-feature' qualifier added by Peter Rice

Target users

This program is intended to be used by everyone and everything, from naive users to embedded scripts.

Comments

Fasta output format

Question

When i tried to convert the EMBL format file into fasta format using the program "seqret", I found that the Access.no appears twice...

>AF102796 AF102796 Homo sapiens alphaE-catenin (CTNNA1) gene, exon 11.

Answer

"It is not a bug ... it is a feature"

There are many "FASTA formats". EMBOSS uses the format that ACEDB and the EBI genome projects use. The first field after the ID is the accession number, so that accession numbers can be kept when sequences are converted to FASTA format, without using the NCBI format (with '|' characters in the IDs).

Your EMBL format file has IDs that look like accession numbers, so EMBOSS fills in the accession number for each sequence, and reports it in the FASTA format.