-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathpandaseq-set.h
87 lines (76 loc) · 2.32 KB
/
pandaseq-set.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* PANDAseq -- Assemble paired FASTQ Illumina reads and strip the region between amplification primers.
Copyright (C) 2011-2012 Andre Masella
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _PANDASEQ_SET_H
# define _PANDASEQ_SET_H
# ifdef __cplusplus
# define EXTERN_C_BEGIN extern "C" {
# define EXTERN_C_END }
# else
# define EXTERN_C_BEGIN
# define EXTERN_C_END
# endif
# include <stdarg.h>
# include <stdio.h>
# include <stdbool.h>
EXTERN_C_BEGIN
/* === Constructor === */
/**
* Create a new, empty set.
*/
PandaSet panda_idset_new(
void);
/* === Methods === */
/**
* Add a sequence identifier to a set.
*/
void panda_idset_add(
PandaSet set,
const panda_seq_identifier *id);
/**
* Parse a sequence identifier and add it to the set.
* @id: the text id to parse
* @detected_format: (out): What pipeline produced this header
* @end_ptr: (out) (transfer none): The point in the input where parsing stopped. If parsing was successful, this will be the end of the string.
* Returns: true on success
* @see panda_seqid_parse_fail
*/
bool panda_idset_add_str(
PandaSet set,
const char *id,
PandaTagging policy,
PandaIdFmt *detected_format,
const char **end_ptr);
/**
* Check if a sequence identifier has been added to the set.
*/
bool panda_idset_contains(
PandaSet set,
const panda_seq_identifier *id);
/**
* Increase the reference count on a set.
*
* This is thread-safe.
*/
PandaSet panda_idset_ref(
PandaSet set);
/**
* Decrease the reference count on a set.
*
* This is thread-safe.
* @set: (transfer full): the set to be released.
*/
void panda_idset_unref(
PandaSet set);
EXTERN_C_END
#endif