SW#
All Files Functions Variables Typedefs Macros
post_proc.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_POST_PROCESH__
28 #define __SW_SHARP_POST_PROCESH__
29 
30 #include "alignment.h"
31 #include "chain.h"
32 #include "db_alignment.h"
33 #include "scorer.h"
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
45 #define SW_OUT_PAIR 0
46 
52 #define SW_OUT_PLOT 1
53 
60 #define SW_OUT_STAT 2
61 
68 #define SW_OUT_STAT_PAIR 3
69 
75 #define SW_OUT_DUMP 4
76 
83 #define SW_OUT_DB_BLASTM0 0
84 
91 #define SW_OUT_DB_BLASTM8 1
92 
99 #define SW_OUT_DB_BLASTM9 2
100 
106 #define SW_OUT_DB_LIGHT 3
107 
115 extern int checkAlignment(Alignment* alignment);
116 
127 extern Alignment* readAlignment(char* path);
128 
137 extern void outputAlignment(Alignment* alignment, char* path, int type);
138 
148 extern void outputScore(int score, Chain* query, Chain* target, Scorer* scorer,
149  char* path);
150 
160 extern void outputDatabase(DbAlignment** dbAlignments, int dbAlignmentsLen,
161  char* path, int type);
162 
173 extern void outputShotgunDatabase(DbAlignment*** dbAlignments,
174  int* dbAlignmentsLens, int dbAlignmentsLen, char* path, int type);
175 
188 extern void dumpFastaChains(Chain** chains, int chainsLen, char* path);
189 
198 extern void deleteFastaChains(Chain** chains, int chainsLen);
199 
209 extern void deleteDatabase(DbAlignment** dbAlignments, int dbAlignmentsLen);
210 
222 extern void deleteShotgunDatabase(DbAlignment*** dbAlignments,
223  int* dbAlignmentsLens, int dbAlignmentsLen);
224 
225 extern void dbAlignmentsMerge(DbAlignment*** dbAlignmentsDst,
226  int* dbAlignmentsDstLens, DbAlignment*** dbAlignmentsSrc,
227  int* dbAlignmentsSrcLens, int dbAlignmentsLen, int maxAlignments);
228 
229 #ifdef __cplusplus
230 }
231 #endif
232 #endif // __SW_SHARP_POST_PROCESH__
void outputShotgunDatabase(DbAlignment ***dbAlignments, int *dbAlignmentsLens, int dbAlignmentsLen, char *path, int type)
Shotgun database alignment output function.
void deleteFastaChains(Chain **chains, int chainsLen)
Chain array delete utility.
void outputScore(int score, Chain *query, Chain *target, Scorer *scorer, char *path)
Score only output function.
void deleteDatabase(DbAlignment **dbAlignments, int dbAlignmentsLen)
Database delete utility.
Provides object used for alignment scoring.
Pairwise sequnce alignment result storage header.
void outputDatabase(DbAlignment **dbAlignments, int dbAlignmentsLen, char *path, int type)
Database alignment output function.
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
Database sequnce alignment result storage header.
struct Alignment Alignment
Pairwise sequnce alignment result storage object.
Definition: alignment.h:79
int checkAlignment(Alignment *alignment)
Checks if the alignment is correct.
void outputAlignment(Alignment *alignment, char *path, int type)
Pairwise alignment output function.
void deleteShotgunDatabase(DbAlignment ***dbAlignments, int *dbAlignmentsLens, int dbAlignmentsLen)
Shotgun database delete utility.
Provides object for storing named sequnces.
void dumpFastaChains(Chain **chains, int chainsLen, char *path)
Database serialization function.
Alignment * readAlignment(char *path)
Reads the alignment object from the binary file.
struct Chain Chain
Chain object used for storing named sequnces.
Definition: chain.h:43