libStatGen Software
1
SamHelper.h
1
/*
2
* Copyright (C) 2011 Regents of the University of Michigan
3
*
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License as published by
6
* the Free Software Foundation, either version 3 of the License, or
7
* (at your option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef __SAM_HELPER_H__
19
#define __SAM_HELPER_H__
20
21
#include <stdint.h>
22
23
#ifdef DUPLICATE
24
#undef DUPLICATE
25
#endif
26
27
/// Class for extracting information from a SAM Flag.
28
class
SamHelper
29
{
30
public
:
31
32
/// Helper method that combines the chromosome ID and position into a
33
/// 64bit number by shifting the chromosome ID to the upper bits.
34
static
inline
uint64_t
combineChromPos
(int32_t chromID, int32_t position)
35
{
36
return
(((uint64_t)chromID << 32) | (position & 0xFFFFFFFF));
37
}
38
39
private
:
40
SamHelper
();
41
};
42
43
44
#endif
SamHelper
Class for extracting information from a SAM Flag.
Definition:
SamHelper.h:29
SamHelper::combineChromPos
static uint64_t combineChromPos(int32_t chromID, int32_t position)
Helper method that combines the chromosome ID and position into a 64bit number by shifting the chromo...
Definition:
SamHelper.h:34
bam
SamHelper.h
Generated by
1.8.18