home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / blast2 / client / netblap2.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-05  |  6.6 KB  |  152 lines  |  [TEXT/R*ch]

  1. /*
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE                          
  5. *               National Center for Biotechnology Information
  6. *                                                                          
  7. *  This software/database is a "United States Government Work" under the   
  8. *  terms of the United States Copyright Act.  It was written as part of    
  9. *  the author's official duties as a United States Government employee and 
  10. *  thus cannot be copyrighted.  This software/database is freely available 
  11. *  to the public for use. The National Library of Medicine and the U.S.    
  12. *  Government have not placed any restriction on its use or reproduction.  
  13. *                                                                          
  14. *  Although all reasonable efforts have been taken to ensure the accuracy  
  15. *  and reliability of the software and data, the NLM and the U.S.          
  16. *  Government do not and cannot warrant the performance or results that    
  17. *  may be obtained by using this software or data. The NLM and the U.S.    
  18. *  Government disclaim all warranties, express or implied, including       
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.                                                                
  21. *                                                                          
  22. *  Please cite the author in any work or product based on this material.   
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name: netblap2.h
  27. *
  28. * Author:  Jonathan Epstein, Tom Madden
  29. *
  30. * Version Creation Date:   06/16/95
  31. *
  32. * $Revision: 4.1 $
  33. *
  34. * File Description: 
  35. *       Application Programming Interface (API) for BLAST network server
  36. *
  37. * Modifications:  
  38. * --------------------------------------------------------------------------
  39. * Date     Name        Description of modification
  40. * -------  ----------  -----------------------------------------------------
  41. *
  42. * ==========================================================================
  43. *
  44. *
  45. * RCS Modification History:
  46. * $Log: netblap2.h,v $
  47.  * Revision 4.1  1995/07/26  22:29:03  kans
  48.  * added prototype for print_usage
  49.  *
  50.  * Revision 4.0  1995/07/26  13:55:34  ostell
  51.  * force revision to 4.0
  52.  *
  53.  * Revision 1.9  1995/07/24  16:34:49  madden
  54.  * removed define for NETBLAP1_BUFFER_SIZE.
  55.  *
  56.  * Revision 1.8  1995/07/18  20:05:36  madden
  57.  * Added "start" (for start of SeqLoc) to PrepRequestInfoPtr.
  58.  *
  59.  * Revision 1.7  1995/07/12  17:44:32  madden
  60.  * Changed prototypes to allow SeqLocPtr for masking of sequence.
  61.  *
  62.  * Revision 1.6  1995/06/28  18:28:07  madden
  63.  * Changed BlastBioseq2 and BlastSeqLoc2 to take an additional argument:
  64.  * a "BLAST0ResponsePtr PNTR".
  65.  *
  66.  * Revision 1.5  1995/06/23  21:39:51  madden
  67.  * Add defines BLAST_SERVER_OMIT_MATRIX, BLAST_SERVER_OMIT_QUERY etc.
  68.  *
  69.  * Revision 1.4  1995/06/22  16:08:08  madden
  70.  * Added prototypes for SubmitResultBlastRequest and SubmitSeqAlignBlastRequest.
  71.  *
  72.  * Revision 1.3  1995/06/22  13:19:01  madden
  73.  * Added five Booleans to PrepRequestInfoPtr that control the amount of
  74.  * output, these correspond to the five Uint1's on BLAST0SearchPtr that
  75.  * determine whether a matrix, query seq, db seq, etc is returned.
  76.  *
  77.  * Revision 1.2  1995/06/22  12:54:45  madden
  78.  * Changed HitDataPtr to BLAST0ResultPtr.
  79.  *
  80.  * Revision 1.1  1995/06/16  11:27:08  epstein
  81.  * Initial revision
  82.  *
  83.  * Revision 1.15  95/05/17  17:59:30  epstein
  84.  * add RCS log revision history
  85.  * 
  86. */
  87.  
  88. #include <objblst2.h>
  89. #include <objseq.h>
  90. #include <seqport.h>
  91. #include <prtutil.h>
  92.  
  93. #define BLAST_SERVER_OMIT_MATRIX 1
  94. #define BLAST_SERVER_OMIT_QUERY 2
  95. #define BLAST_SERVER_OMIT_QUERY_SEQ_IN_SEG 4
  96. #define BLAST_SERVER_OMIT_DB_SEQ_IN_SEG 8
  97.  
  98. /*------------the structure for the function PrepareRequest (netblap2.c)---*/
  99.  
  100. typedef struct preprequestinfo {
  101.         Boolean is_na;    /* Is this a nucleic acid? */
  102.     CharPtr defline, /* The fasta definition line. */
  103.         options, /* BLAST command line options */
  104.         dbname, /* name of the database */
  105.         textid, /* textid of the entry */
  106.         progname; /* BLAST program name (e.g., blastn, blastp...) */
  107.     Int4     gi,    /* gi number */
  108.         length, /* number of residues in entry */
  109.         start;    /* BLAST run starts at this residue */ 
  110.     SeqPortPtr spp; /* SeqPort to get sequence data from. */
  111. /* These Booleans determine the amount of output */
  112.     Boolean return_matrix,        /* Should matrix be returned? */
  113.         return_query,         /* Should query be sent back? */
  114.         return_BLAST0result,    /* Should Blast0ResultPtr be returned;
  115.                     if not, then a Seq-align is returned */
  116.         return_query_seq_in_seg, /* Should the query sequence for a hit
  117.                     be returned? */ 
  118.         return_db_seq_in_seg;    /* Should the db sequence for a hit be
  119.                     returned? */
  120.     SeqLocPtr mask;    /* which positions should be masked */
  121. } PrepRequestInfo, PNTR PrepRequestInfoPtr;
  122.  
  123.  
  124. /* the following are for backwards-compatability */
  125. #define HitDataPtr BLAST0ResultPtr
  126. #define HitDataFree BLAST0ResultFree
  127.  
  128. typedef Boolean (LIBCALLBACK *ProgressCallback) PROTO((BLAST0ResponsePtr));
  129.  
  130. Boolean LIBCALL BlastInit PROTO((CharPtr clientId, Boolean ignoreErrs));
  131. Boolean LIBCALL BlastFini PROTO((void));
  132. BLAST0ResultPtr LIBCALL BlastBioseq PROTO((BioseqPtr bsp, CharPtr progname, CharPtr dbname, CharPtr cmdLineOptions, BLAST0ResponsePtr PNTR blrespPtr, SeqLocPtr mask_seqloc, Uint4 output, ProgressCallback progCallback));
  133. BLAST0ResultPtr LIBCALL SimpleBlastBioseq PROTO((BioseqPtr bsp, CharPtr progname, CharPtr dbname, CharPtr cmdLineOptions, Boolean useMonitors));
  134. SeqAnnotPtr LIBCALL BlastBioseq2 PROTO ((BioseqPtr bsp, CharPtr progname, CharPtr dbname, CharPtr blast_params, BLAST0ResponsePtr PNTR blrespPtr, SeqLocPtr mask_seqloc, Boolean useMonitors));
  135. SeqAnnotPtr LIBCALL BlastSeqLoc2 PROTO ((SeqLocPtr slp, CharPtr progname, CharPtr dbname, CharPtr blast_params, BLAST0ResponsePtr PNTR blrespPtr, SeqLocPtr mask_seqloc, Boolean useMonitors));
  136.  
  137.  
  138. SeqAnnotPtr LIBCALL HitDataToSeqAnnot PROTO((BLAST0ResultPtr, SeqIdPtr));
  139. SeqAnnotPtr LIBCALL HitDataToSeqAnnotAlignment PROTO((BLAST0ResultPtr, SeqIdPtr));
  140.  
  141. Boolean LIBCALL TraditionalBlastOutput PROTO((BLAST0ResultPtr hdp, BLAST0ResponsePtr blresp, CharPtr program, FILE *fp));
  142. CharPtr FormatResultWithTemplate PROTO ((BLAST0ResultPtr blresp, StdPrintOptionsPtr Spop));
  143.  
  144. BLAST0ResponsePtr SubmitInfoRequest PROTO ((BLAST0RequestPtr blreqp));
  145.  
  146. BLAST0ResultPtr SubmitResultBlastRequest PROTO ((BLAST0RequestPtr blreqp, BLAST0ResponsePtr PNTR blrespPtr, ProgressCallback progCallback));
  147.  
  148. SeqAlignPtr SubmitSeqAlignBlastRequest PROTO ((BLAST0RequestPtr blreqp, BLAST0ResponsePtr PNTR blrespPtr, ProgressCallback progCallback));
  149.  
  150. int print_usage(FILE *fp, ValNodePtr vnp);
  151.  
  152.