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

Go to the SVN repository for this file.

1 #ifndef GPIPE_APP_BGPIPE_ALIGN_UTIL_HPP
2 #define GPIPE_APP_BGPIPE_ALIGN_UTIL_HPP
3 /* $Id: internal_stops.hpp 93111 2021-03-05 15:18:46Z chetvern $
4  * ===========================================================================
5  *
6  * PUBLIC DOMAIN NOTICE
7  * National Center for Biotechnology Information
8  *
9  * This software/database is a "United States Government Work" under the
10  * terms of the United States Copyright Act. It was written as part of
11  * the author's official duties as a United States Government employee and
12  * thus cannot be copyrighted. This software/database is freely available
13  * to the public for use. The National Library of Medicine and the U.S.
14  * Government have not placed any restriction on its use or reproduction.
15  *
16  * Although all reasonable efforts have been taken to ensure the accuracy
17  * and reliability of the software and data, the NLM and the U.S.
18  * Government do not and cannot warrant the performance or results that
19  * may be obtained by using this software or data. The NLM and the U.S.
20  * Government disclaim all warranties, express or implied, including
21  * warranties of performance, merchantability or fitness for any particular
22  * purpose.
23  *
24  * Please cite the author in any work or product based on this material.
25  *
26  * ===========================================================================
27  *
28  * Authors: Vyacheslav Chetvernin
29  *
30  * File Description:
31  */
32 #include <corelib/ncbistl.hpp>
34 
35 #include <set>
36 
39  class CScope;
40  class CSeq_align;
41  class CSpliced_exon_chunk;
44 
48 public:
50  set<TSeqPos> FindStops(const CSeq_align& align);
51 
52  bool HasInternalStops(const CSeq_align& align);
53 
54  pair<set<TSeqPos>, set<TSeqPos> > FindStartsStops(const CSeq_align& align, int padding=0);
55 
56  //ranges are biological, i.e. inverted if minus strand or cross-origin.
57  //starts returned as a map from range to its sequence, i.e. the actual codon (ATG, GTG,...)
58  //
59  // Does not look inside introns or large insertions -
60  // clean alignment with fMaximizeTranslation first if you want to.
61  //
62  // in presence of frameshifts start and stops not always are triplets.
63  //
64  // (gaps parameter if provided will be filled with runs of Ns found,
65  // fake gaps beyond contig ends if within padding will be added too)
66  //
67  pair<map<TSeqRange, string>, set<TSeqRange> > FindStartStopRanges(const CSeq_align& align, int padding=0,
68  set<TSignedSeqRange>* gaps = nullptr);
69 
70 private:
71  string GetCDSNucleotideSequence(const CSeq_align& align);
72 };
73 
74 // pair(genomic, product)
75 pair<int, int> NCBI_XALGOSEQ_EXPORT ChunkSize(const CSpliced_exon_chunk& chunk);
76 
78 
79 #endif // GPIPE_APP_BGPIPE_ALIGN_UTIL_HPP
CFeatureGenerator generator
CScope –.
Definition: scope.hpp:92
CSpliced_exon_chunk –.
Definition: set.hpp:45
void FindStartsStops(const CGeneModel &model, const CEResidueVec &contig_seq, const CEResidueVec &mrna, const CAlignMap &mrnamap, TIVec starts[3], TIVec stops[3], int &frame, bool obeystart)
Definition: gnomon_seq.cpp:183
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
#define NCBI_XALGOSEQ_EXPORT
Definition: ncbi_export.h:1017
USING_SCOPE(objects)
pair< int, int > ChunkSize(const CSpliced_exon_chunk &chunk)
n padding
The NCBI C++/STL use hints.
Modified on Wed Jun 19 17:03:23 2024 by modify_doxy.py rev. 669887