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

Go to the SVN repository for this file.

1 #ifndef _GUI_PACKAGES_SEQUPD_HPP_
2 #define _GUI_PACKAGES_SEQUPD_HPP_
3 
4 /* $Id: sequpd.hpp 43730 2019-08-23 20:05:22Z asztalos $
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  * Authors: Andrea Asztalos
30  */
31 
32 #include <corelib/ncbistd.hpp>
33 
34 #include <gui/gui.hpp>
35 
36 #include <util/icanceled.hpp>
37 
40 #include <objects/seq/Seq_inst.hpp>
41 
43 
45 
47 class CBioseq;
48 class CBioseq_Handle;
49 class CSeq_entry_Handle;
51 
53 {
54 public:
56  typedef vector<objects::CSeq_id_Handle> TSeqIdHVector;
57 
58  static objects::CSeq_id_Handle GetGoodSeqIdHandle(const objects::CBioseq_Handle& bsh);
59 
60  static bool HaveIdenticalResidues(const objects::CBioseq_Handle& bsh1, const objects::CBioseq_Handle& bsh2);
61  static void FixCollidingIDs_Bioseq(objects::CBioseq& bseq, const objects::CBioseq::TId& seq_ids);
62 
63  // matches update sequences with old ones
64  // identifies identical pairs
65  // if no error occurs, update sequences are added to the scope
66  static void FindMatches(
67  objects::CSeq_inst::EMol type,
68  objects::CSeq_entry_Handle& oldSeq,
69  objects::CSeq_entry& updEntry,
70  TSeqIdHMap& matches,
71  TSeqIdHVector& unmatched);
72 
73  static vector<CConstRef<objects::CSeq_align> > RunBlast2Seq(
74  const objects::CBioseq_Handle& subject,
75  const objects::CBioseq_Handle& query,
76  bool accept_atleast_one, ICanceled* canceled = nullptr);
77 
78  /// Returns true if the first alignment is 'better' than the second one
79  /// Compares the Blast scores and in the case of a tie, picks the longer alignment
80  static bool CompareAlignments(const objects::CSeq_align& align_first, const objects::CSeq_align& align_sec);
81 };
82 
84 
85 #endif // _GUI_PACKAGES_SEQUPD_HPP_
CBioseq_Handle –.
CSeq_entry_Handle –.
Interface for testing cancellation request in a long lasting operation.
Definition: icanceled.hpp:51
vector< objects::CSeq_id_Handle > TSeqIdHVector
Definition: sequpd.hpp:56
map< objects::CSeq_id_Handle, objects::CSeq_id_Handle > TSeqIdHMap
Definition: sequpd.hpp:55
Include a standard set of the NCBI C++ Toolkit most basic headers.
#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_GUIPKG_SEQUENCE_EDIT_EXPORT
Definition: gui_export.h:515
static string subject
static string query
Definition: type.c:6
Modified on Wed May 15 15:03:23 2024 by modify_doxy.py rev. 669887