Debian Codegraph @

inc/core/AgnInferParentStream.h

raw
1 /**
2
3 Copyright (c) 2010-2015, Daniel S. Standage and CONTRIBUTORS
4
5 The AEGeAn Toolkit is distributed under the ISC License. See
6 the 'LICENSE' file in the AEGeAn source code distribution or
7 online at https://github.com/standage/AEGeAn/blob/master/LICENSE.
8
9 **/
10
11 #ifndef AEGEAN_INFER_PARENT_STREAM
12 #define AEGEAN_INFER_PARENT_STREAM
13
14 #include "extended/node_stream_api.h"
15 #include "core/hashmap_api.h"
16 #include "AgnUnitTest.h"
17
18 /**
19 * @class AgnInferParentStream
20 *
21 * Implements the GenomeTools ``GtNodeStream`` interface. This node stream
22 * creates new features as parents for the specified types. For example, if
23 * ``type_parents`` includes an entry with ``tRNA`` as the key and ``gene`` as
24 * the value, this node stream will create a ``gene`` feature for any ``tRNA``
25 * feature that lacks a gene parent.
26 */
27 typedef struct AgnInferParentStream AgnInferParentStream;
28
29 /**
30 * @function Class constructor. The hashmap contains a list of key-value pairs,
31 * both strings. Any time the stream encounters a top-level (parentless) feature
32 * whose type is a key in the hashmap, a parent will be created for this feature
33 * of the type associated with the key.
34 */
35 GtNodeStream* agn_infer_parent_stream_new(GtNodeStream *in_stream,
36 GtHashmap *type_parents);
37
38 /**
39 * @function Set the source (GFF3 2nd column) for all inferred features.
40 */
41 void agn_infer_parent_stream_set_source(AgnInferParentStream *stream,
42 GtStr *source);
43
44 /**
45 * @function Run unit tests for this class. Returns true if all tests passed.
46 */
47 bool agn_infer_parent_stream_unit_test(AgnUnitTest *test);
48
49 #endif