NCBI C++ ToolKit
sequtil_manip.hpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 #ifndef UTIL_SEQUTIL___SEQUTIL_MANIP__HPP
2 #define UTIL_SEQUTIL___SEQUTIL_MANIP__HPP
3 
4 /* $Id: sequtil_manip.hpp 33815 2007-05-04 17:18:18Z kazimird $
5  * ===========================================================================
6  *
7  * PUBLIC DOMAIN NOTICE
8  * National Center for Biotechnology Information
9  *
10  * This software/database is a "United States Government Work" under the
11  * terms of the United States Copyright Act. It was written as part of
12  * the author's official duties as a United States Government employee and
13  * thus cannot be copyrighted. This software/database is freely available
14  * to the public for use. The National Library of Medicine and the U.S.
15  * Government have not placed any restriction on its use or reproduction.
16  *
17  * Although all reasonable efforts have been taken to ensure the accuracy
18  * and reliability of the software and data, the NLM and the U.S.
19  * Government do not and cannot warrant the performance or results that
20  * may be obtained by using this software or data. The NLM and the U.S.
21  * Government disclaim all warranties, express or implied, including
22  * warranties of performance, merchantability or fitness for any particular
23  * purpose.
24  *
25  * Please cite the author in any work or product based on this material.
26  *
27  * ===========================================================================
28  *
29  * Author: Mati Shomrat
30  *
31  * File Description:
32  * Various sequnce manipulations
33  */
34 #include <corelib/ncbistd.hpp>
35 #include <corelib/ncbistr.hpp>
36 #include <vector>
37 
38 #include <util/sequtil/sequtil.hpp>
39 
40 
42 
43 
44 /////////////////////////////////////////////////////////////////////////////
45 //
46 // Sequence Manipulations
47 //
48 
49 
51 {
52 public:
53 
54  // types
56 
57  // Reverse
58  static SIZE_TYPE Reverse(const string& src, TCoding src_coding,
59  TSeqPos pos, TSeqPos length,
60  string& dst);
61  static SIZE_TYPE Reverse(const vector<char>& src, TCoding src_coding,
62  TSeqPos pos, TSeqPos length,
63  vector<char>& dst);
64  static SIZE_TYPE Reverse(const char* src, TCoding src_coding,
65  TSeqPos pos, TSeqPos length,
66  char* dst);
67 
68  // Complement
69  static SIZE_TYPE Complement(const string& src, TCoding src_coding,
70  TSeqPos pos, TSeqPos length,
71  string& dst);
72  static SIZE_TYPE Complement(const vector<char>& src, TCoding src_coding,
73  TSeqPos pos, TSeqPos length,
74  vector<char>& dst);
75  static SIZE_TYPE Complement(const char* src, TCoding src_coding,
76  TSeqPos pos, TSeqPos length,
77  char* dst);
78 
79  // Reverse + Complement
80 
81  // place result in an auxiliary container
82  static SIZE_TYPE ReverseComplement(const string& src, TCoding src_coding,
83  TSeqPos pos, TSeqPos length,
84  string& dst);
85  static SIZE_TYPE ReverseComplement(const vector<char>& src, TCoding src_coding,
86  TSeqPos pos, TSeqPos length,
87  vector<char>& dst);
88  static SIZE_TYPE ReverseComplement(const char* src, TCoding src_coding,
89  TSeqPos pos, TSeqPos length,
90  char* dst);
91 
92  // in place operation
93  static SIZE_TYPE ReverseComplement(string& src, TCoding src_coding,
94  TSeqPos pos, TSeqPos length);
95  static SIZE_TYPE ReverseComplement(vector<char>& src, TCoding src_coding,
96  TSeqPos pos, TSeqPos length);
97  static SIZE_TYPE ReverseComplement(char* src, TCoding src_coding,
98  TSeqPos pos, TSeqPos length);
99 };
100 
101 
103 
104 
105 #endif /* UTIL_SEQUTIL___SEQUTIL_MANIP__HPP */
ENa_strand Reverse(ENa_strand s)
Definition: Na_strand.hpp:90
CSeqUtil::TCoding TCoding
Include a standard set of the NCBI C++ Toolkit most basic headers.
The NCBI C++ standard methods for dealing with std::string.
TResidue Complement(TResidue c)
void ReverseComplement(const BidirectionalIterator &first, const BidirectionalIterator &last)
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
NCBI_XUTIL_EXPORT
Parameter to control printing diagnostic message about conversion of static array data from a differe...
Definition: static_set.hpp:72
Modified on Sat Apr 13 11:46:01 2024 by modify_doxy.py rev. 669887