NCBI C++ ToolKit
Functions | Variables
unit_test_cds_fix.cpp File Reference
#include <ncbi_pch.hpp>
#include "unit_test_cds_fix.hpp"
#include <corelib/ncbi_system.hpp>
#include <corelib/test_boost.hpp>
#include <objects/biblio/Id_pat.hpp>
#include <objects/biblio/Title.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/Dbtag.hpp>
#include <objects/general/User_object.hpp>
#include <objects/macro/Simple_replace.hpp>
#include <objects/macro/Replace_func.hpp>
#include <objects/macro/Replace_rule.hpp>
#include <objects/macro/Search_func.hpp>
#include <objects/macro/String_constraint.hpp>
#include <objects/macro/Suspect_rule.hpp>
#include <objects/macro/Word_substitution.hpp>
#include <objects/macro/Word_substitution_set.hpp>
#include <objects/medline/Medline_entry.hpp>
#include <objects/misc/sequence_macros.hpp>
#include <objects/pub/Pub_equiv.hpp>
#include <objects/pub/Pub.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/seq/GIBB_mol.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Ref_ext.hpp>
#include <objects/seq/Map_ext.hpp>
#include <objects/seq/Seg_ext.hpp>
#include <objects/seq/Seq_gap.hpp>
#include <objects/seq/Seq_data.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/MolInfo.hpp>
#include <objects/seq/Pubdesc.hpp>
#include <objects/seq/Seq_hist.hpp>
#include <objects/seq/Seq_hist_rec.hpp>
#include <objects/seq/Seq_annot.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqblock/GB_block.hpp>
#include <objects/seqblock/EMBL_block.hpp>
#include <objects/seqfeat/BioSource.hpp>
#include <objects/seqfeat/Org_ref.hpp>
#include <objects/seqfeat/OrgName.hpp>
#include <objects/seqfeat/SubSource.hpp>
#include <objects/seqfeat/Imp_feat.hpp>
#include <objects/seqfeat/Cdregion.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/PDB_seq_id.hpp>
#include <objects/seqloc/Giimport_id.hpp>
#include <objects/seqloc/Patent_seq_id.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objmgr/object_manager.hpp>
#include <objmgr/scope.hpp>
#include <objmgr/bioseq_ci.hpp>
#include <objmgr/feat_ci.hpp>
#include <objmgr/seq_vector.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/util/feature.hpp>
#include <objmgr/util/seq_loc_util.hpp>
#include <objmgr/seqdesc_ci.hpp>
#include <objmgr/bioseq_set_handle.hpp>
#include <objects/seq/seqport_util.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <objtools/unit_test_util/unit_test_util.hpp>
#include <corelib/ncbiapp.hpp>
#include <objtools/edit/cds_fix.hpp>
#include <common/test_assert.h>
+ Include dependency graph for unit_test_cds_fix.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

 NCBITEST_INIT_TREE ()
 
 NCBITEST_INIT_CMDLINE (arg_desc)
 
 NCBITEST_AUTO_INIT ()
 
void CheckTerminalExceptionResults (CSeq_feat &cds, CScope &scope, bool strict, bool extend, bool expected_rval, bool set_codebreak, bool set_comment, TSeqPos expected_endpoint)
 
void OneTerminalTranslationExceptionTest (bool strict, bool extend, TSeqPos endpoint, const string &seq, bool expected_rval, bool set_codebreak, bool set_comment, TSeqPos expected_endpoint)
 
 BOOST_AUTO_TEST_CASE (Test_AddTerminalTranslationException)
 
 BOOST_AUTO_TEST_CASE (Test_FeaturePartialSynchronization)
 
 BOOST_AUTO_TEST_CASE (Test_MakemRNAforCDS)
 
 BOOST_AUTO_TEST_CASE (Test_MakemRNAforCDS_with_complex_UTR)
 
 BOOST_AUTO_TEST_CASE (Test_MakemRNAforCDS_with_exons)
 
 BOOST_AUTO_TEST_CASE (Test_GetmRNAforCDS)
 
 BOOST_AUTO_TEST_CASE (Test_GetGeneticCodeForBioseq)
 
 BOOST_AUTO_TEST_CASE (Test_TruncateCDSAtStop)
 
 BOOST_AUTO_TEST_CASE (Test_ExtendCDSToStopCodon)
 
 BOOST_AUTO_TEST_CASE (Test_MakemRNAAnnotOnly)
 
 BOOST_AUTO_TEST_CASE (Test_SimpleReplace)
 
 BOOST_AUTO_TEST_CASE (Test_ReplaceFunc)
 
 BOOST_AUTO_TEST_CASE (Test_SuspectRule)
 
 BOOST_AUTO_TEST_CASE (Test_FindMatchingFrame)
 
 BOOST_AUTO_TEST_CASE (Test_PromoteCDSToNucProtSet_And_DemoteCDSToNucSeq)
 
 BOOST_AUTO_TEST_CASE (Test_GetNewProtId)
 
 BOOST_AUTO_TEST_CASE (Test_GetNewProtIdFromExistingProt)
 

Variables

const string sc_TestEntry
 
const string sc_TestEntry2
 
const string sc_TestEntry3 = "cds_fix_test_cases/GB-8277.asn"
 
const string sc_mrna_loc
 
const string sc_mrna1
 
const string sc_mrna2
 
const string sc_mrna3
 
static bool s_debugMode = false
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/17]

BOOST_AUTO_TEST_CASE ( Test_AddTerminalTranslationException  )

Definition at line 224 of file unit_test_cds_fix.cpp.

References OneTerminalTranslationExceptionTest().

◆ BOOST_AUTO_TEST_CASE() [2/17]

BOOST_AUTO_TEST_CASE ( Test_ExtendCDSToStopCodon  )

◆ BOOST_AUTO_TEST_CASE() [3/17]

BOOST_AUTO_TEST_CASE ( Test_FeaturePartialSynchronization  )

◆ BOOST_AUTO_TEST_CASE() [4/17]

BOOST_AUTO_TEST_CASE ( Test_FindMatchingFrame  )

◆ BOOST_AUTO_TEST_CASE() [5/17]

BOOST_AUTO_TEST_CASE ( Test_GetGeneticCodeForBioseq  )

◆ BOOST_AUTO_TEST_CASE() [6/17]

BOOST_AUTO_TEST_CASE ( Test_GetmRNAforCDS  )

◆ BOOST_AUTO_TEST_CASE() [7/17]

BOOST_AUTO_TEST_CASE ( Test_GetNewProtId  )

◆ BOOST_AUTO_TEST_CASE() [8/17]

BOOST_AUTO_TEST_CASE ( Test_GetNewProtIdFromExistingProt  )

◆ BOOST_AUTO_TEST_CASE() [9/17]

BOOST_AUTO_TEST_CASE ( Test_MakemRNAAnnotOnly  )

◆ BOOST_AUTO_TEST_CASE() [10/17]

BOOST_AUTO_TEST_CASE ( Test_MakemRNAforCDS  )

◆ BOOST_AUTO_TEST_CASE() [11/17]

BOOST_AUTO_TEST_CASE ( Test_MakemRNAforCDS_with_complex_UTR  )

◆ BOOST_AUTO_TEST_CASE() [12/17]

BOOST_AUTO_TEST_CASE ( Test_MakemRNAforCDS_with_exons  )

◆ BOOST_AUTO_TEST_CASE() [13/17]

BOOST_AUTO_TEST_CASE ( Test_PromoteCDSToNucProtSet_And_DemoteCDSToNucSeq  )

◆ BOOST_AUTO_TEST_CASE() [14/17]

BOOST_AUTO_TEST_CASE ( Test_ReplaceFunc  )

◆ BOOST_AUTO_TEST_CASE() [15/17]

BOOST_AUTO_TEST_CASE ( Test_SimpleReplace  )

Definition at line 649 of file unit_test_cds_fix.cpp.

References NULL, and test.

◆ BOOST_AUTO_TEST_CASE() [16/17]

BOOST_AUTO_TEST_CASE ( Test_SuspectRule  )

◆ BOOST_AUTO_TEST_CASE() [17/17]

BOOST_AUTO_TEST_CASE ( Test_TruncateCDSAtStop  )

◆ CheckTerminalExceptionResults()

void CheckTerminalExceptionResults ( CSeq_feat cds,
CScope scope,
bool  strict,
bool  extend,
bool  expected_rval,
bool  set_codebreak,
bool  set_comment,
TSeqPos  expected_endpoint 
)

◆ NCBITEST_AUTO_INIT()

NCBITEST_AUTO_INIT ( )

◆ NCBITEST_INIT_CMDLINE()

NCBITEST_INIT_CMDLINE ( arg_desc  )

Definition at line 147 of file unit_test_cds_fix.cpp.

◆ NCBITEST_INIT_TREE()

NCBITEST_INIT_TREE ( )

Definition at line 139 of file unit_test_cds_fix.cpp.

References CNcbiApplication::Instance().

◆ OneTerminalTranslationExceptionTest()

void OneTerminalTranslationExceptionTest ( bool  strict,
bool  extend,
TSeqPos  endpoint,
const string seq,
bool  expected_rval,
bool  set_codebreak,
bool  set_comment,
TSeqPos  expected_endpoint 
)

Variable Documentation

◆ s_debugMode

bool s_debugMode = false
static

Definition at line 145 of file unit_test_cds_fix.cpp.

Referenced by NCBITEST_AUTO_INIT().

◆ sc_mrna1

const string sc_mrna1
Initial value:
= "Seq-feat ::= {\
data rna {\
type mRNA,\
ext name \"F-box protein\"\
},\
partial TRUE,\
location int {\
from 0,\
to 1012,\
strand plus,\
id local str \"S7_haplotype\",\
fuzz-from lim lt\
}\
}"

Definition at line 1697 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_mrna2

const string sc_mrna2
Initial value:
= "Seq-feat ::= {\
data rna {\
type mRNA,\
ext name \"S haplotype-specific F-box7\"\
},\
partial FALSE,\
location mix {\
int {\
from 13002,\
to 13124,\
strand minus,\
id genbank {\
accession \"MH029536\"\
}\
},\
int {\
from 11708,\
to 12916,\
strand minus,\
id genbank {\
accession \"MH029536\"\
}\
}\
}\
}"

Definition at line 1712 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_mrna3

const string sc_mrna3
Initial value:
= "Seq-feat ::= {\
data rna {\
type mRNA,\
ext name \"ribonuclease\"\
},\
partial FALSE,\
location mix {\
int {\
from 7628,\
to 7756,\
strand plus,\
id local str \"S7_haplotype\"\
},\
int {\
from 8032,\
to 8219,\
strand plus,\
id local str \"S7_haplotype\"\
},\
int {\
from 9745,\
to 10179,\
strand plus,\
id local str \"S7_haplotype\"\
}\
}\
}"

Definition at line 1738 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_mrna_loc

const string sc_mrna_loc

Definition at line 1627 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry

const string sc_TestEntry

Definition at line 985 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry2

const string sc_TestEntry2

Definition at line 1089 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry3

const string sc_TestEntry3 = "cds_fix_test_cases/GB-8277.asn"

Definition at line 133 of file unit_test_cds_fix.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

Modified on Sat May 25 14:16:28 2024 by modify_doxy.py rev. 669887