================================================================================
gbtoolsPfetch

This package provides an object interface to the pfetch server. Two interfaces
are supported:

        - a pipe interface to the pfetch command line client program that
          itself accesses the pfetch server.

        - an http interface to the pfetch server itself

See "Pfetch Server" below for a description of what can be retrieved from the
pfetch server. The Pfetch objects pass through any arguments they are given
for the pfetch server and simply retrieve the resulting text.


Overview
--------

The Pfetch class implements functions common to both pipe and http interfaces
as an abstract base class, PfetchPipe and PfetchHttp then inherit from Pfetch
and augment it with extra functions/data as appropriate.

Class definitions have been kept as simple as possible by hiding details of
either the pipe or http code completely. This has involved passing around a
pointer to the pfetch object as in both cases asynchronous code with callback
routines is used to get the data from the pfetch server.

The application registers callbacks for reading, error and closing of the
pfetch connection and these are in turn called from the objects callbacks
which are themselves registered with Glib or curl code for accessing the
server.





Pfetch Server
-------------

The following "help" description from pfetch shows what can be retrieved:


PFETCH SERVER - retrieve entries from sequence databases.

Usage:
    pfetch [options] <query> [<query2>...]
    pfetch <query:start-end> [<query2:start-end>...]

eg. To retrieve EMBL clone AP000869 and UNIPROT protein DYNA_CHICK:
    pfetch AP000869 DYNA_CHICK

eg. To retrieve the length of AP000869 and DYNA_CHICK:
    pfetch -l AP000869 DYNA_CHICK

Ensembl Usage:
    pfetch [options] [--repeatmask] --asm <asm_name> <chr_name> -s <start_bp> -e <end_bp>
    pfetch --listasm

eg. To retrieve human chromosome 10, bp 50001-60000 for assembly NCBI35:
    pfetch --asm NCBI35 10 -s 50001 -e 60000

Options:
-a <#>        Search EMBL and UniProtKB archive, including current data
              (Release # optional; otherwise returns latest sequence version)
-A            Search EMBL and UniProtKB archive, including current data
              (returns all sequence versions, if no sequence version is given)
-d            Search only one database
-s <#>        Return sequence starting at position <#>
-e <#>        Return sequence ending at position <#>
-l            Return the length of the sequence only
-r            Reverse-complement returned sequence (DNA only)
-F            Return full database entry
-i            Start interactive session
-q            Sequence only output (one line)
-n <name>     Use <name> for output sequence
-C            Return DNA in lower case, protein in upper case
-D            Return description (DE) line only
-Q            Return base quality values (not all databases supported!)
-t            Search only trace repository
-S            Show server status
-v            Show verbose output
-V            Show version
-H|h          Show this help message

--pdb         pdb file retrieval  (old file format, pre 01-Aug-07)
--dssp        dssp calculations   (based on old file format, pre 01-Aug-07)
--old_pdb     pdb file retrieval  (old file format, pre 01-Aug-07)
--old_dssp    dssp calculations   (based on old file format, pre 01-Aug-07)
--new_pdb     pdb file retrieval
--new_dssp    dssp calculations

--md5          Return the MD5 hexdigest of sequence (excludes descr. line)
--ends         Return first and last 500bp of sequence
--head <#>     Return first <#>bp of sequence
--tail <#>     Return last <#>bp of sequence

--listasm      Show available Ensembl assemblies
--repeatmask   Return repeat masked sequence (Ensembl queries only)

use "-t -H" and "-T -H" to see the trace archive and trace internal repository
specific options, respectively.

by Tony Cox (avc@sanger.ac.uk)
Version 5.12, 14-Nov-2007


================================================================================
