| 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_LOCUS_REFINE_STREAM |
| 12 |
#define AEGEAN_LOCUS_REFINE_STREAM |
| 13 |
|
| 14 |
#include "extended/node_stream_api.h" |
| 15 |
#include "AgnUnitTest.h" |
| 16 |
|
| 17 |
/** |
| 18 |
* @class AgnLocusRefineStream |
| 19 |
* |
| 20 |
* Implements the ``GtNodeStream`` interface. By default the ``AgnLocusStream`` |
| 21 |
* class will group any and all overlapping features of interest together in the |
| 22 |
* same iLocus. The ``AgnLocusRefineStream`` class can be used to post-process |
| 23 |
* ``AgnLocusStream`` output to accommodate a more flexible handling of |
| 24 |
* overlapping features, such as requiring CDS overlap for grouping genes |
| 25 |
* together or creating distinct iLoci for genes within the introns of other |
| 26 |
* genes. |
| 27 |
*/ |
| 28 |
typedef struct AgnLocusRefineStream AgnLocusRefineStream; |
| 29 |
|
| 30 |
/** |
| 31 |
* @function Class constructor. |
| 32 |
*/ |
| 33 |
GtNodeStream *agn_locus_refine_stream_new(GtNodeStream *in_stream, |
| 34 |
GtUword delta, GtUword minoverlap, |
| 35 |
bool by_cds); |
| 36 |
|
| 37 |
/** |
| 38 |
* @function Assign a `Name` attribute with a serial number to each iLocus |
| 39 |
* using the specified printf-style format. |
| 40 |
*/ |
| 41 |
void agn_locus_refine_stream_set_name_format(AgnLocusRefineStream *stream, |
| 42 |
const char *format); |
| 43 |
|
| 44 |
/** |
| 45 |
* @function Set the source value to be used for all iLoci created by this |
| 46 |
* stream. Default value is 'AEGeAn::AgnLocusStream'. |
| 47 |
*/ |
| 48 |
void agn_locus_refine_stream_set_source(AgnLocusRefineStream *stream, |
| 49 |
const char *source); |
| 50 |
|
| 51 |
/** |
| 52 |
* @function Record the length of each intergenic iLocus as loci are being |
| 53 |
* parsed. |
| 54 |
*/ |
| 55 |
void agn_locus_refine_stream_track_ilens(AgnLocusRefineStream *stream, |
| 56 |
FILE *ilenfile); |
| 57 |
|
| 58 |
/** |
| 59 |
* @function Run unit tests for this class. Returns true if all tests passed. |
| 60 |
*/ |
| 61 |
bool agn_locus_refine_stream_unit_test(AgnUnitTest *test); |
| 62 |
|
| 63 |
#endif |