libuproc  1.2.0
dnaclass.h
Go to the documentation of this file.
1 /* Copyright 2014 Peter Meinicke, Robin Martinjak
2  *
3  * This file is part of libuproc.
4  *
5  * libuproc is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the Free
7  * Software Foundation, either version 3 of the License, or (at your option)
8  * any later version.
9  *
10  * libuproc is distributed in the hope that it will be useful, but WITHOUT ANY
11  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
13  * more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with libuproc. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
57 #ifndef UPROC_DNACLASS_H
58 #define UPROC_DNACLASS_H
59 
60 #include "uproc/orf.h"
61 #include "uproc/protclass.h"
62 #include "uproc/matrix.h"
63 
73 {
76 
78  double score;
79 
81  struct uproc_orf orf;
82 };
83 
85 #define UPROC_DNARESULT_INITIALIZER \
86  { \
87  0, 0, UPROC_ORF_INITIALIZER \
88  }
89 
91 void uproc_dnaresult_init(struct uproc_dnaresult *result);
92 
94 void uproc_dnaresult_free(struct uproc_dnaresult *result);
95 
97 int uproc_dnaresult_copy(struct uproc_dnaresult *dest,
98  const struct uproc_dnaresult *src);
127 typedef struct uproc_dnaclass_s uproc_dnaclass;
128 
136 
139 };
140 
150  const uproc_protclass *pc,
151  const uproc_matrix *codon_scores,
152  uproc_orffilter *orf_filter,
153  void *orf_filter_arg);
154 
157 
171 int uproc_dnaclass_classify(const uproc_dnaclass *dc, const char *seq,
172  uproc_list **results);
179 #endif
uproc_dnaclass * uproc_dnaclass_create(enum uproc_dnaclass_mode mode, const uproc_protclass *pc, const uproc_matrix *codon_scores, uproc_orffilter *orf_filter, void *orf_filter_arg)
Create new DNA classifier.
List of homogenous items (also known as "vector" or "arraylist")
uproc_dnaclass_mode
Classification mode.
Definition: dnaclass.h:133
DNA/RNA sequence classifier.
DNA classification result.
Definition: dnaclass.h:72
Open reading frame.
Definition: orf.h:54
uproc_family family
Predicted family.
Definition: dnaclass.h:75
int uproc_dnaresult_copy(struct uproc_dnaresult *dest, const struct uproc_dnaresult *src)
Deep-copy a uproc_dnaresult struct.
void uproc_dnaresult_init(struct uproc_dnaresult *result)
Initialize a uproc_dnaresult struct.
Module: 2D double matrix.
void uproc_dnaresult_free(struct uproc_dnaresult *result)
Free allocated pointers of uproc_dnaresult struct.
double score
Prediction score.
Definition: dnaclass.h:78
2D matrix
struct uproc_orf orf
ORF from which the prediction was made.
Definition: dnaclass.h:81
int uproc_dnaclass_classify(const uproc_dnaclass *dc, const char *seq, uproc_list **results)
Classify DNA sequence.
bool uproc_orffilter(const struct uproc_orf *, const char *, size_t, double, void *)
ORF filter function.
Definition: orf.h:94
Module: Protein classification.
Only the result with the maximum score.
Definition: dnaclass.h:135
void uproc_dnaclass_destroy(uproc_dnaclass *dc)
Destroy DNA classifier.
Protein sequence classifier.
uint_least16_t uproc_family
Identifier of a protein family.
Definition: common.h:93
All results (unordered)
Definition: dnaclass.h:138
Module: ORF translation.