NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
output_types.h
Go to the documentation of this file.
1 /*
2  * nvbio
3  * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the NVIDIA CORPORATION nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  */
27 
28 #pragma once
29 
30 #include <nvbio/basic/types.h>
31 #include <nvbio/io/alignments.h>
32 
35 
36 #include <thrust/host_vector.h>
37 #include <thrust/device_vector.h>
38 
40 
41 namespace nvbio {
42 namespace io {
43 
64 // this was used by mapq.h in bowtie2, but seems to no longer be used anywhere
65 //struct MapQInfo
66 //{
67 // int32 best;
68 // int32 second_best;
69 //};
70 
73 struct BNT
74 {
76  const char* names;
79 
80  BNT(const io::ConstSequenceDataView& reference)
81  : n_seqs( reference.size() ),
82  names( reference.name_stream() ),
83  names_index( reference.name_index() ),
84  sequence_index( reference.sequence_index() )
85  {}
86 };
87 
90 typedef enum {
94 
97 typedef enum {
98  MATE_1 = 0,
99  MATE_2 = 1,
100 } AlignmentMate;
101 
104 typedef enum {
108 
112 {
114  thrust::device_vector<uint2>& coords;
115 
117  thrust::device_vector<uint2>& coords)
118  : array(array),
119  coords(coords)
120  {}
121 };
122 
126 {
128  thrust::host_vector<uint2> coords;
129 };
130 
134 
140 } // namespace io
141 } // namespace nvbio