Debian Codegraph @

samtools/samtools.h

raw symbols SCIP
1 /* samtools.h -- utility routines.
2
3 Copyright (C) 2013-2015, 2019, 2023 Genome Research Ltd.
4
5 Author: Petr Danecek <[email protected]>
6
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
16
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 DEALINGS IN THE SOFTWARE. */
24
25 #ifndef SAMTOOLS_H
26 #define SAMTOOLS_H
27
28 #include "htslib/hts_defs.h"
29 #include "htslib/sam.h"
30 #include "sam_utils.h"
31
32 const char *samtools_version(void);
33
34 /* BAM sanitizer options */
35 #define FIX_POS 2
36 #define FIX_MQUAL 4
37 #define FIX_UNMAP 8
38 #define FIX_CIGAR 16
39 #define FIX_AUX 32
40
41 // default for position sorted data
42 #define FIX_ON (FIX_MQUAL|FIX_UNMAP|FIX_CIGAR|FIX_AUX)
43 #define FIX_ALL 255
44
45 // Parses a comma-separated list of "pos", "mqual", "unmap", "cigar", and "aux"
46 // keywords for the bam sanitizer.
47 int bam_sanitize_options(const char *str);
48
49 // Sanitize a BAM record, using FIX_* bit flags as defined above.
50 // Returns 0 on success,
51 // <0 on failure.
52 int bam_sanitize(sam_hdr_t *h, bam1_t *b, int flags);
53
54 #endif