EMBOSS: listor


Program listor

Function

Writes a list file of the logical OR of two sets of sequences

Description

listor reads in two sets of sequences and writes out a list file (file of file names) that result from the logical union of these two sets of sequences. It is a simple way of manipulating and editing lists or sets of sequences to produce a list file.

When comparing sequences to see if they are the same between two sets of sequences, no use is made of the ID name or accession number of the sequences. Only the sequences themselves are compared. The comparison of the sequences is case-independent.

The logical union is an OR operation by default. Other available operations are: AND, XOR and NOT.

The (default) logical OR of the two sets of sequences is simply the result of merging the two sets of sequences, (without listing any shared sequences twice).

A logical AND simply lists those sequences that occur in both sets of sequences.

A logical XOR lists those sequences that ONLY occur in the first set or only occur in the second set - sequences occuring in both sets are ignored (the opposite of an AND).

A logical NOT lists all those sequences in the first set except for those that also occur in the second set.

An example of the four types of logical operation performed with the two sets of sequences comprising these sequences follows. The two sets of sequences are in the files named file1 and file2. There are 2 sequences which are duplicated between these two files ('two' and 'three') and the sequences 'one' and 'four' are unique to the files 'file1' and 'file2' respectively.

file1

>one
tagctagcg
>two
tagctagcggctacgt
>three
tagctattttatgctacgtcagtgac

file2

>two
tagctagcggctacgt
>three
tagctattttatgctacgtcagtgac
>four
gcgcggcgcgcgtgcgtcgttgctggggccc

The results of the four types of logical union follows. Note that the duplicated sequences in these two files have been given the same name. This is not necessary for the operation of listor as it compares the sequences themselves, not the ID names of the sequences.

OR gives:

fasta::file1:one
fasta::file1:two
fasta::file1:three
fasta::file2:four

AND gives:

fasta::file1:two
fasta::file1:three

XOR gives:

fasta::file1:one
fasta::file2:four

NOT gives:

fasta::file1:one

Usage

Here is a sample session with listor:

% listor file1 file1
Writes a list file of the logical OR of two sets of sequences
Output file [outfile.list]:

Command line arguments

   Mandatory qualifiers:
  [-firstset]          seqset     Sequence set USA
  [-secondset]         seqset     Sequence set USA
  [-outlist]           outfile    The list of sequence names will be written
                                  to this list file

   Optional qualifiers:
   -operator           list       The following logical operators combine the
                                  sequences in the following ways:
                                  OR - gives all that occur in one set or the
                                  other
                                  AND - gives only those which occur in both
                                  sets
                                  XOR - gives those which only occur in one
                                  set or the other, but not in both
                                  NOT - gives those which occur in the first
                                  set except for those that also occur in the
                                  second

   Advanced qualifiers: (none)
   General qualifiers:
  -help                bool       report command line options. More
                                  information on associated and general
                                  qualifiers can be found with -help -verbose


Mandatory qualifiers Allowed values Default
[-firstset]
(Parameter 1)
Sequence set USA Readable sequences Required
[-secondset]
(Parameter 2)
Sequence set USA Readable sequences Required
[-outlist]
(Parameter 3)
The list of sequence names will be written to this list file Output file <sequence>.listor
Optional qualifiers Allowed values Default
-operator The following logical operators combine the sequences in the following ways: OR - gives all that occur in one set or the other AND - gives only those which occur in both sets XOR - gives those which only occur in one set or the other, but not in both NOT - gives those which occur in the first set except for those that also occur in the second
O (OR - merger of both sets)
A (AND - only those in both sets)
X (XOR - only those not in both sets)
N (NOT - those of the first set that are not in the second)
OR
Advanced qualifiers Allowed values Default
(none)

Input file format

The input sets of sequences can be of any valid USAs. The program was written to perform logical operations on list files, but in practice, wildcarded database entries and file names are also perfectly legal specifications of the input sequences.

Output file format

The ouput is simply a list of the USAs (format and sequence specification) resulting from the required logical union of the two sets of input sequence.

The order that the USAs are written out is not necessarily the same as the order of either of the input sets of sequences.

Data files

None.

Notes

The program stores all of the input sequences in memory while it is working out the logical unions of the two sets of sequences. This means that it is restricted by the available memory. Doing logical unions involving all of the sequences in large databases, such as EMBL, is probably impractical unless you are lucky enough to have extraordinary amounts of memory on your machine.

References

None.

Warnings

If you try to do a logical union with all of the sequences in EMBL and another sequence set, this program will attempt to read all of the EMBL sequences into memory at once. This will probably not succeed.

Diagnostic Error Messages

None.

Exit status

It always exits with status 0.

Known bugs

None.

See also

Program nameDescription
biosedReplace or delete sequence sections
cutseqRemoves a specified section from a sequence
degapseqRemoves gap characters from sequences
descseqAlter the name or description of a sequence
entretReads and writes (returns) flatfile entries
extractfeatExtract features from a sequence
extractseqExtract regions from a sequence
infoseqDisplays some simple information about sequences
maskfeatMask off features of a sequence
maskseqMask off regions of a sequence
newseqType in a short new sequence
noreturnRemoves carriage return from ASCII files
notseqExcludes a set of sequences and writes out the remaining ones
nthseqWrites one sequence from a multiple set of sequences
pasteseqInsert one sequence into another
revseqReverse and complement a sequence
seqretReads and writes (returns) sequences
seqretallReads and writes (returns) a set of sequences one at a time
seqretsetReads and writes (returns) a set of sequences all at once
seqretsplitReads and writes (returns) sequences in individual files
splitterSplit a sequence into (overlapping) smaller sequences
swissparseRetrieves sequences from swissprot using keyword search
trimestTrim poly-A tails off EST sequences
trimseqTrim ambiguous bits off the ends of sequences
vectorstripStrips out DNA between a pair of vector sequences

Author(s)

This application was written by Gary Williams (gwilliam@hgmp.mrc.ac.uk)

History

Written (1 Aug 2001) - Gary Williams

Target users

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

Comments