~ubuntu-branches/ubuntu/jaunty/ncbi-tools6/jaunty

« back to all changes in this revision

Viewing changes to algo/blast/core/blast_setup.h

  • Committer: Bazaar Package Importer
  • Author(s): Aaron M. Ucko
  • Date: 2008-07-14 19:43:15 UTC
  • mfrom: (2.1.12 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080714194315-ed44u9ek7txva2rz
Tags: 6.1.20080302-3
tools/readdb.c: enable madvise()-based code on all glibc (hence all
Debian) systems, not just Linux.  (Closes: #490437.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: blast_setup.h,v 1.62 2006/07/19 13:19:04 madden Exp $
 
1
/*  $Id: blast_setup.h,v 1.65 2007/12/20 22:55:46 kazimird Exp $
2
2
 * ===========================================================================
3
3
 *
4
4
 *                            PUBLIC DOMAIN NOTICE
34
34
#ifndef __BLAST_SETUP__
35
35
#define __BLAST_SETUP__
36
36
 
 
37
#include <algo/blast/core/ncbi_std.h>
 
38
#include <algo/blast/core/blast_export.h>
37
39
#include <algo/blast/core/blast_def.h>
 
40
#include <algo/blast/core/blast_query_info.h>
 
41
#include <algo/blast/core/blast_options.h>
38
42
#include <algo/blast/core/blast_parameters.h>
 
43
#include <algo/blast/core/blast_message.h>
39
44
#include <algo/blast/core/blast_stat.h>
40
 
#include <algo/blast/core/blast_extend.h>
41
45
#include <algo/blast/core/blast_gapalign.h>
42
46
#include <algo/blast/core/pattern.h>
43
47
 
207
211
 * @param from Starting offset of a sequence interval [in]
208
212
 * @param to Ending offset of a sequence interval [in]
209
213
 */
 
214
NCBI_XBLAST_EXPORT
210
215
void
211
216
BlastSeqLoc_RestrictToInterval(BlastSeqLoc* *mask, Int4 from, Int4 to);
212
217
 
222
227
 * @param blast_message will be filled in if pattern not found on query [in][out]
223
228
 * @return Status, 0 on success, -1 on error.
224
229
 */
 
230
NCBI_XBLAST_EXPORT
225
231
Int2 
226
232
Blast_SetPHIPatternInfo(EBlastProgramType            program,
227
233
                        const SPHIPatternSearchBlk * pattern_blk,
235
241
 * @note In the case of a Blast2Sequences search, this function assumes a
236
242
 * single sequence and returns the length of the first sequence only
237
243
 */
 
244
NCBI_XBLAST_EXPORT
238
245
void
239
246
BLAST_GetSubjectTotals(const BlastSeqSrc* seqsrc,
240
247
                       Int8* total_length,
241
248
                       Int4* num_seqs);
 
249
 
 
250
/** Validation function for the setup of queries for the BLAST search.
 
251
 * @param query_info properly set up BlastQueryInfo structure [in]
 
252
 * @param score_blk optional properly set up BlastScoreBlk structure (may be
 
253
 * NULL)[in]
 
254
 * @return If no valid queries are found, 1 is returned, otherwise 0.
 
255
 */
 
256
NCBI_XBLAST_EXPORT
 
257
Int2
 
258
BlastSetup_Validate(const BlastQueryInfo* query_info, 
 
259
                    const BlastScoreBlk* score_blk);
 
260
 
242
261
#ifdef __cplusplus
243
262
}
244
263
#endif
245
264
#endif /* !__BLAST_SETUP__ */
246
 
 
247
 
/*
248
 
 *
249
 
* $Log: blast_setup.h,v $
250
 
* Revision 1.62  2006/07/19 13:19:04  madden
251
 
* Blast_SetPHIPatternInfo takes a new Blast_Message parameter
252
 
*
253
 
* Revision 1.61  2006/07/12 23:03:24  camacho
254
 
* + BLAST_GetSubjectTotals
255
 
*
256
 
* Revision 1.60  2006/07/11 22:30:59  camacho
257
 
* Add const where possible
258
 
*
259
 
* Revision 1.59  2006/06/06 15:15:05  madden
260
 
* Doxygen fix
261
 
*
262
 
* Revision 1.58  2006/06/05 13:27:11  madden
263
 
* Add support for GET_MATRIX_PATH callback
264
 
*
265
 
* Revision 1.57  2006/05/22 13:21:40  madden
266
 
* Remove prototype for PHIPatternSpaceCalc
267
 
*
268
 
* Revision 1.56  2006/05/18 16:21:50  papadopo
269
 
* add message to BLAST_CalcEffLengths
270
 
*
271
 
* Revision 1.55  2005/08/29 14:32:36  dondosha
272
 
* From Ilya Dondoshansky:
273
 
* Removed BlastMaskInformation wrapper structure, because mask_at_hash can
274
 
* be retrieved from options
275
 
*
276
 
* Revision 1.54  2005/08/15 16:10:21  dondosha
277
 
* Added error return argument to Blast_ScoreBlkKbpGappedCalc
278
 
*
279
 
* Revision 1.53  2005/07/18 19:38:33  bealer
280
 
* - Apply const in several more places.
281
 
*
282
 
* Revision 1.52  2005/07/12 22:57:03  bealer
283
 
* - Change "BlastQueryInfo*" to "const BlastQueryInfo*" in several places.
284
 
*
285
 
* Revision 1.51  2005/04/27 19:49:01  dondosha
286
 
* Added Blast_SetPHIPatternInfo function for PHI BLAST query pattern occurrences calculation, and
287
 
* PHIPatternSpaceCalc for calculation of pattern space after all database occurrences are found.
288
 
*
289
 
* Revision 1.50  2004/12/29 13:32:43  madden
290
 
* Replaced include of blast_options.h with include of blast_parameters.h
291
 
*
292
 
* Revision 1.49  2004/12/09 21:16:26  camacho
293
 
* Removed inaccurate comment for Blast_ScoreBlkMatrixInit
294
 
*
295
 
* Revision 1.48  2004/12/09 15:21:32  dondosha
296
 
* Renamed some functions dealing with BlastScoreBlk and Blast_KarlinBlk structures
297
 
*
298
 
* Revision 1.47  2004/11/30 16:54:43  dondosha
299
 
* Added BlastSeqLoc_RestrictToInterval
300
 
*
301
 
* Revision 1.46  2004/11/23 21:46:05  camacho
302
 
* kbp_ideal field of BlastScoreBlk is initialized unconditionally
303
 
*
304
 
* Revision 1.45  2004/11/02 18:18:20  madden
305
 
* Remove BlastExtensionParameters from BLAST_OneSubjectUpdateParameters prototype
306
 
*
307
 
* Revision 1.44  2004/08/11 11:58:43  ivanov
308
 
* Added more export specifiers NCBI_XBLAST_EXPORT
309
 
*
310
 
* Revision 1.43  2004/08/10 14:52:00  ivanov
311
 
* Added export specifier NCBI_XBLAST_EXPORT
312
 
*
313
 
* Revision 1.42  2004/07/06 15:35:12  dondosha
314
 
* Use EBlastProgramType enumeration type instead of Uint1 for program argument in all functions
315
 
*
316
 
* Revision 1.41  2004/06/28 13:38:30  madden
317
 
* Change BLAST_MainSetUp to use BlastMaskInformation rather than BlastMaskLoc
318
 
*
319
 
* Revision 1.40  2004/06/16 14:53:03  dondosha
320
 
* Moved extern "C" after the #includes
321
 
*
322
 
* Revision 1.39  2004/05/19 14:52:01  camacho
323
 
* 1. Added doxygen tags to enable doxygen processing of algo/blast/core
324
 
* 2. Standardized copyright, CVS $Id string, $Log and rcsid formatting and i
325
 
*    location
326
 
* 3. Added use of @todo doxygen keyword
327
 
*
328
 
* Revision 1.38  2004/05/17 16:38:08  camacho
329
 
* Make function declarations more readable
330
 
*
331
 
* Revision 1.37  2004/05/07 15:36:40  papadopo
332
 
* add scale factor as input argument to BlastMainSetup and GetScoreBlk
333
 
*
334
 
* Revision 1.36  2004/03/30 15:49:07  madden
335
 
* Add prototype for BlastSetup_GetScoreBlock
336
 
*
337
 
* Revision 1.35  2004/03/16 18:55:36  camacho
338
 
* Moved log to end of file
339
 
*
340
 
* Revision 1.34  2004/03/15 19:54:51  dondosha
341
 
* Removed unneeded arguments in BLAST_GapAlignSetUp
342
 
*
343
 
* Revision 1.33  2004/03/11 18:31:06  papadopo
344
 
* fix doxygen warnings
345
 
*
346
 
* Revision 1.32  2004/03/10 18:00:20  camacho
347
 
* Remove outdated references to blastkar
348
 
*
349
 
* Revision 1.31  2004/03/09 22:37:11  dondosha
350
 
* Added const qualifiers to parameter arguments wherever relevant
351
 
*
352
 
* Revision 1.30  2004/03/09 18:39:35  dondosha
353
 
* Pass around effective lengths parameters instead of options; added BLAST_OneSubjectUpdateParameters to recalculate cutoffs and eff. lengths when each subject is an individual sequence
354
 
*
355
 
* Revision 1.29  2004/02/27 15:56:35  papadopo
356
 
* Mike Gertz' modifications to unify handling of gapped Karlin blocks for protein and nucleotide searches. Also modified BLAST_MainSetUp to allocate gapped Karlin blocks last
357
 
*
358
 
* Revision 1.28  2004/02/24 17:59:03  dondosha
359
 
* Moved BLAST_CalcEffLengths from blast_engine.h; Added BLAST_GapAlignSetUp to set up only gapped alignment related structures
360
 
*
361
 
* Revision 1.27  2004/02/10 20:05:14  dondosha
362
 
* Made Blast_ScoreBlkKbpGappedCalc external again: needed in unit test
363
 
*
364
 
* Revision 1.26  2003/12/03 16:31:46  dondosha
365
 
* Renamed BlastMask to BlastMaskLoc, BlastResults to BlastHSPResults, to avoid name conflicts
366
 
*
367
 
* Revision 1.25  2003/09/10 19:43:05  dondosha
368
 
* Changed #includes in accordance with lookup table code reorganization
369
 
*
370
 
* Revision 1.24  2003/09/09 14:21:14  coulouri
371
 
* change blastkar.h to blast_stat.h
372
 
*
373
 
* Revision 1.23  2003/08/11 14:57:16  dondosha
374
 
* Added algo/blast/core path to all #included headers
375
 
*
376
 
* Revision 1.22  2003/08/01 22:33:32  dondosha
377
 
* Made Blast_ScoreBlkKbpGappedCalc static
378
 
*
379
 
* Revision 1.21  2003/08/01 17:20:39  dondosha
380
 
* Renamed BLAST_ScoreBlk to BlastScoreBlk
381
 
*
382
 
* Revision 1.20  2003/07/31 14:31:37  camacho
383
 
* Replaced Char for char
384
 
*
385
 
* Revision 1.19  2003/07/31 00:32:35  camacho
386
 
* Eliminated Ptr notation
387
 
*
388
 
* Revision 1.18  2003/07/24 20:49:36  camacho
389
 
* Remove unnecessary #include
390
 
*
391
 
* Revision 1.17  2003/06/26 21:30:10  dondosha
392
 
* Removed const from an integral type function parameters
393
 
*
394
 
* Revision 1.16  2003/06/19 18:58:21  dondosha
395
 
* Moved all functions dealing with SeqLocs to blast_seq.h
396
 
*
397
 
* Revision 1.15  2003/06/17 21:09:26  dondosha
398
 
* Moved file reading from BLAST_SetUpSubject to Main
399
 
*
400
 
* Revision 1.14  2003/06/11 16:14:02  dondosha
401
 
* Added number of queries argument to BLAST_SetUpQuery
402
 
*
403
 
* Revision 1.13  2003/06/06 20:36:12  dondosha
404
 
* Removed unneeded arguments from BLAST_GetTranslatedSeqLoc
405
 
*
406
 
* Revision 1.12  2003/06/06 17:51:28  dondosha
407
 
* Comments fixes for doxygen
408
 
*
409
 
* Revision 1.11  2003/06/05 18:33:39  dondosha
410
 
* Compiler warnings fixes
411
 
*
412
 
* Revision 1.10  2003/06/05 17:16:04  dondosha
413
 
* SeqLoc is no longer used for query masking/filtering
414
 
*
415
 
* Revision 1.9  2003/05/18 21:56:04  camacho
416
 
* Use Uint1 for program name whenever possible
417
 
*
418
 
* Revision 1.8  2003/05/06 21:28:09  dondosha
419
 
* Added functions previously static in blast_driver.c
420
 
*
421
 
* Revision 1.7  2003/05/01 17:09:07  dondosha
422
 
* BLAST_SetUpAuxStructures made static in blast_engine.c
423
 
*
424
 
* Revision 1.6  2003/05/01 16:57:02  dondosha
425
 
* Fixes for strict compiler warnings
426
 
*
427
 
* Revision 1.5  2003/05/01 15:31:54  dondosha
428
 
* Reorganized the setup of BLAST search
429
 
*
430
 
* Revision 1.4  2003/04/18 22:28:15  dondosha
431
 
* Separated ASN.1 generated structures from those used in the main BLAST engine and traceback
432
 
*
433
 
* Revision 1.3  2003/04/03 14:17:45  coulouri
434
 
* fix warnings, remove unused parameter
435
 
*
436
 
* Revision 1.2  2003/04/02 17:21:23  dondosha
437
 
* Changed functions parameters to accommodate calculation of ungapped cutoff score
438
 
*
439
 
* Revision 1.1  2003/03/31 18:18:31  camacho
440
 
* Moved from parent directory
441
 
*
442
 
* Revision 1.23  2003/03/24 20:39:17  dondosha
443
 
* Added BlastExtensionParameters structure to hold raw gapped X-dropoff values
444
 
*
445
 
* Revision 1.22  2003/03/24 17:27:42  dondosha
446
 
* Improvements and additions for doxygen
447
 
*
448
 
* Revision 1.21  2003/03/14 16:55:09  dondosha
449
 
* Minor corrections to eliminate strict compiler warnings
450
 
*
451
 
* Revision 1.20  2003/03/07 20:42:23  dondosha
452
 
* Added ewp argument to be initialized in BlastSetup_Main
453
 
*
454
 
* Revision 1.19  2003/03/05 21:01:40  dondosha
455
 
* Added query information block to output arguments of BlastSetUp_Main
456
 
*
457
 
* Revision 1.18  2003/02/26 15:42:19  madden
458
 
* const charPtr becomes const char *
459
 
*
460
 
* Revision 1.17  2003/02/25 20:03:02  madden
461
 
* Remove BlastSetUp_Concatenate and BlastSetUp_Standard
462
 
*
463
 
* Revision 1.16  2003/02/14 17:37:24  madden
464
 
* Doxygen compliant comments
465
 
*
466
 
* Revision 1.15  2003/02/13 21:40:40  madden
467
 
* Validate options, send back message if problem
468
 
*
469
 
* Revision 1.14  2003/02/04 14:45:50  camacho
470
 
* Reformatted comments for doxygen
471
 
*
472
 
* Revision 1.13  2003/01/30 20:08:07  dondosha
473
 
* Added a header file for nucleotide lookup tables
474
 
*
475
 
* Revision 1.12  2003/01/28 15:14:21  madden
476
 
* BlastSetUp_Main gets additional args for parameters
477
 
*
478
 
* Revision 1.11  2003/01/10 18:50:11  madden
479
 
* Version of BlastSetUp_Main that does not require num_seqs or dblength
480
 
*
481
 
* Revision 1.10  2002/12/24 16:21:40  madden
482
 
* BlastSetUp_Mega renamed to BlastSetUp_Concatenate, unused arg frame removed
483
 
*
484
 
* Revision 1.9  2002/12/24 14:48:23  madden
485
 
* Create lookup table for proteins
486
 
*
487
 
* Revision 1.8  2002/12/20 20:55:19  dondosha
488
 
* Blast_ScoreBlkKbpGappedCalc made external (probably temporarily)
489
 
*
490
 
* Revision 1.7  2002/12/19 21:22:39  madden
491
 
* Add BlastSetUp_Mega prototype
492
 
*
493
 
* Revision 1.6  2002/12/04 13:53:47  madden
494
 
* Move BLAST_SequenceBlk from blsat_setup.h to blast_def.h
495
 
*
496
 
* Revision 1.5  2002/10/24 14:08:04  madden
497
 
* Add DNA length to call to BlastSetUp_Standard
498
 
*
499
 
* Revision 1.4  2002/10/23 22:42:34  madden
500
 
* Save context and frame information
501
 
*
502
 
* Revision 1.3  2002/10/22 15:50:46  madden
503
 
* fix translating searches
504
 
*
505
 
* Revision 1.2  2002/10/07 21:04:37  madden
506
 
* prototype change
507
 
*
508
 
 
509
 
*/
510