NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
alignment.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>
32 
229 
230 namespace nvbio {
231 
234 namespace aln {
236 
244 
257 template <
258  uint32 BAND_LEN,
259  typename aligner_type,
260  typename pattern_string,
261  typename qual_string,
262  typename text_string,
263  typename sink_type>
266  const aligner_type aligner,
267  const pattern_string pattern,
268  const qual_string quals,
269  const text_string text,
270  const int32 min_score,
271  sink_type& sink);
272 
284 template <
285  uint32 BAND_LEN,
286  typename aligner_type,
287  typename pattern_string,
288  typename qual_string,
289  typename text_string,
290  typename sink_type>
293  const aligner_type aligner,
294  const pattern_string pattern,
295  const text_string text,
296  const int32 min_score,
297  sink_type& sink);
298 
312 template <
313  uint32 BAND_LEN,
314  typename aligner_type,
315  typename pattern_string,
316  typename qual_string,
317  typename text_string,
318  typename sink_type>
321  const aligner_type aligner,
322  const pattern_string pattern,
323  const qual_string quals,
324  const text_string text,
325  const int32 min_score);
326 
339 template <
340  uint32 BAND_LEN,
341  typename aligner_type,
342  typename pattern_string,
343  typename qual_string,
344  typename text_string,
345  typename sink_type>
348  const aligner_type aligner,
349  const pattern_string pattern,
350  const text_string text,
351  const int32 min_score);
352 
383 template <
384  uint32 BAND_LEN,
385  uint32 CHECKPOINTS,
386  typename aligner_type,
387  typename pattern_string,
388  typename qual_string,
389  typename text_string,
390  typename backtracer_type,
391  typename checkpoints_type,
392  typename submatrix_type>
395  const aligner_type aligner,
396  const pattern_string pattern,
397  const qual_string quals,
398  const text_string text,
399  const int32 min_score,
400  backtracer_type& backtracer,
401  checkpoints_type checkpoints,
402  submatrix_type submatrix);
403 
404 
456 template <
457  typename aligner_type,
458  typename pattern_string,
459  typename qual_string,
460  typename text_string,
461  typename sink_type,
462  typename column_type>
464 bool alignment_score(
465  const aligner_type aligner,
466  const pattern_string pattern,
467  const qual_string quals,
468  const text_string text,
469  const int32 min_score,
470  sink_type& sink,
472 
511 template <
512  uint32 MAX_TEXT_LEN,
513  typename aligner_type,
514  typename pattern_string,
515  typename qual_string,
516  typename text_string,
517  typename sink_type>
519 bool alignment_score(
520  const aligner_type aligner,
521  const pattern_string pattern,
522  const qual_string quals,
523  const text_string text,
524  const int32 min_score,
525  sink_type& sink);
526 
608 template <
609  uint32 CHECKPOINTS,
610  typename aligner_type,
611  typename pattern_string,
612  typename qual_string,
613  typename text_string,
614  typename backtracer_type,
615  typename checkpoints_type,
616  typename submatrix_type,
617  typename column_type>
620  const aligner_type aligner,
621  const pattern_string pattern,
622  const qual_string quals,
623  const text_string text,
624  const int32 min_score,
625  backtracer_type& backtracer,
626  checkpoints_type checkpoints,
627  submatrix_type submatrix,
628  column_type column);
629 
655 template <
656  uint32 MAX_PATTERN_LEN,
657  uint32 MAX_TEXT_LEN,
658  uint32 CHECKPOINTS,
659  typename aligner_type,
660  typename pattern_string,
661  typename qual_string,
662  typename text_string,
663  typename backtracer_type>
666  const aligner_type aligner,
667  const pattern_string pattern,
668  const qual_string quals,
669  const text_string text,
670  const int32 min_score,
671  backtracer_type& backtracer);
672 
673 #if defined(__CUDACC__)
674 namespace warp {
675 
698 template <
700  typename aligner_type,
701  typename pattern_string,
702  typename qual_string,
703  typename text_string,
704  typename column_type>
707  const aligner_type aligner,
708  const pattern_string pattern,
709  const qual_string quals,
710  const text_string text,
711  const int32 min_score,
712  uint2* sink,
713  column_type column);
714 
715 } // namespace warp
716 #endif
717 
719 
720 } // namespace aln
721 } // namespace nvbio
722 
725 #include <nvbio/alignment/utils.h>