SW#
All Files Functions Variables Typedefs Macros
database.h
Go to the documentation of this file.
1 /*
2 swsharp - CUDA parallelized Smith Waterman with applying Hirschberg's and
3 Ukkonen's algorithm and dynamic cell pruning.
4 Copyright (C) 2013 Matija Korpar, contributor Mile Šikić
5 
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15 
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 Contact the author by mkorpar@gmail.com.
20 */
27 #ifndef __SW_SHARP_DATABASEH__
28 #define __SW_SHARP_DATABASEH__
29 
30 #include "chain.h"
31 #include "db_alignment.h"
32 #include "scorer.h"
33 #include "thread.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
47 
62 typedef void (*ValueFunction)(double* values, int* scores, Chain* query,
63  Chain** database, int databaseLen, void* param);
64 
77 extern ChainDatabase* chainDatabaseCreate(Chain** database, int databaseStart,
78  int databaseLen, int* cards, int cardsLen);
79 
85 extern void chainDatabaseDelete(ChainDatabase* chainDatabase);
86 
117 extern void alignDatabase(DbAlignment*** dbAlignments, int* dbAlignmentsLen,
118  int type, Chain* query, ChainDatabase* chainDatabase, Scorer* scorer,
119  int maxAlignments, ValueFunction valueFunction, void* valueFunctionParam,
120  double valueThreshold, int* indexes, int indexesLen, int* cards,
121  int cardsLen, Thread* thread);
122 
153 extern void shotgunDatabase(DbAlignment**** dbAlignments, int** dbAlignmentsLen,
154  int type, Chain** queries, int queriesLen, ChainDatabase* chainDatabase,
155  Scorer* scorer, int maxAlignments, ValueFunction valueFunction,
156  void* valueFunctionParam, double valueThreshold, int* indexes,
157  int indexesLen, int* cards, int cardsLen, Thread* thread);
158 
159 #ifdef __cplusplus
160 }
161 #endif
162 #endif // __SW_SHARP_DATABASEH__
void chainDatabaseDelete(ChainDatabase *chainDatabase)
ChainDatabase destructor.
void(* ValueFunction)(double *values, int *scores, Chain *query, Chain **database, int databaseLen, void *param)
Definition: database.h:62
struct ChainDatabase ChainDatabase
Ddatabase scoring object.
Definition: database.h:46
void shotgunDatabase(DbAlignment ****dbAlignments, int **dbAlignmentsLen, int type, Chain **queries, int queriesLen, ChainDatabase *chainDatabase, Scorer *scorer, int maxAlignments, ValueFunction valueFunction, void *valueFunctionParam, double valueThreshold, int *indexes, int indexesLen, int *cards, int cardsLen, Thread *thread)
Shotgun aligning function.
Provides object used for alignment scoring.
Multiplatform threading header.
struct DbAlignment DbAlignment
Database sequnce alignment result storage object.
Definition: db_alignment.h:47
struct Scorer Scorer
Scorer object used for alignment scoring.
Definition: scorer.h:42
void alignDatabase(DbAlignment ***dbAlignments, int *dbAlignmentsLen, int type, Chain *query, ChainDatabase *chainDatabase, Scorer *scorer, int maxAlignments, ValueFunction valueFunction, void *valueFunctionParam, double valueThreshold, int *indexes, int indexesLen, int *cards, int cardsLen, Thread *thread)
Database aligning function.
Database sequnce alignment result storage header.
ChainDatabase * chainDatabaseCreate(Chain **database, int databaseStart, int databaseLen, int *cards, int cardsLen)
ChainDatabase constructor.
Provides object for storing named sequnces.
struct Chain Chain
Chain object used for storing named sequnces.
Definition: chain.h:43
pthread_t Thread
Thread type.
Definition: thread.h:70