NCBI C++ ToolKit
Functions | Variables
unit_test_seq_translator.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbi_system.hpp>
#include <corelib/test_boost.hpp>
#include <objects/seqset/Seq_entry.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 <objects/seq/seqport_util.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_ext.hpp>
#include <objects/seq/Seq_literal.hpp>
#include <objects/seq/Delta_seq.hpp>
#include <objects/seq/Delta_ext.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/seqfeat/Cdregion.hpp>
#include <objects/misc/sequence_macros.hpp>
+ Include dependency graph for unit_test_seq_translator.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Functions

 USING_SCOPE (objects)
 
static string GetProteinString (CFeat_CI fi, CScope &scope)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_Raw)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeqVector)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_loc_1)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_loc_2)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_code_break)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_alt_frame)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_internal_stop)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_5prime_partial)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_3prime_partial)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_5prime_partial_minus)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_TerminalTranslExcept)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_ShortCDS)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_FirstCodon)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_FirstCodon2)
 
static void CheckTranslatedBioseq (CRef< CBioseq > bioseq, string seg1, bool mid_fuzz, string seg2)
 
static void CheckTranslatedBioseq (CRef< CBioseq > bioseq, string seqdata)
 
static void SetLocationSkipGap (CRef< CSeq_feat > feat, const CBioseq &bioseq)
 
static void TestOneGapSeq (const string &asn, string seg1, string seg2)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_GapInSeq)
 
 BOOST_AUTO_TEST_CASE (Test_Translator_CSeq_feat_ZeroGap)
 
 BOOST_AUTO_TEST_CASE (Test_Translate_CodeBreakForStopCodon)
 
 BOOST_AUTO_TEST_CASE (Test_FindBestFrame)
 
 BOOST_AUTO_TEST_CASE (Test_FindFrame2)
 
 BOOST_AUTO_TEST_CASE (Test_FindFrame3)
 
 BOOST_AUTO_TEST_CASE (Test_SQD_4334)
 
 BOOST_AUTO_TEST_CASE (Test_PickFrameWithEndStopIf3Complete)
 
 BOOST_AUTO_TEST_CASE (Test_FindOverlappingFeatureForMinusStrandCrossingOrigin)
 
 BOOST_AUTO_TEST_CASE (Test_FindOverlappingFeaturesOnMultipleSeqs)
 
 BOOST_AUTO_TEST_CASE (Test_GB_2236)
 

Variables

 USING_NCBI_SCOPE
 
const string sc_TestEntry
 
const string sc_TestEntry_code_break
 
const string sc_TestEntry_alt_frame
 
const string sc_TestEntry_internal_stop
 
const string sc_TestEntry_5prime_partial
 
const string sc_TestEntry_3prime_partial
 
const string sc_TestEntry_5prime_partial_minus
 
const string sc_TestEntry_TerminalTranslExcept
 
const string sc_TestEntry_ShortCDS
 
const string sc_TestEntry_FirstCodon
 
const string sc_TestEntry_FirstCodon2
 
const string sc_TestEntry_GapInSeq1
 
const string sc_TestEntry_GapInSeq2
 
const string sc_TestEntry_GapInSeq3
 
const string sc_TestEntry_GapInSeq4
 
const string sc_TestEntry_GapInSeq5
 
const string sc_TestEntry_CodeBreakForStopCodon
 
const string sc_TestEntry_GB_2236
 
const string sc_TestBestFrameEntry
 
const string sc_TestAmbiguousBestFrameEntry
 
const string sc_TestSQD_4334_1
 
const string sc_TestSQD_4334_2
 
const string sc_PickFrameWithEndStopIf3CompleteEntry
 
const string sc_MinusOrigin
 
const string sc_TooManyOverlap
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/26]

BOOST_AUTO_TEST_CASE ( Test_FindBestFrame  )

◆ BOOST_AUTO_TEST_CASE() [2/26]

BOOST_AUTO_TEST_CASE ( Test_FindFrame2  )

◆ BOOST_AUTO_TEST_CASE() [3/26]

BOOST_AUTO_TEST_CASE ( Test_FindFrame3  )

◆ BOOST_AUTO_TEST_CASE() [4/26]

BOOST_AUTO_TEST_CASE ( Test_FindOverlappingFeatureForMinusStrandCrossingOrigin  )

◆ BOOST_AUTO_TEST_CASE() [5/26]

BOOST_AUTO_TEST_CASE ( Test_FindOverlappingFeaturesOnMultipleSeqs  )

◆ BOOST_AUTO_TEST_CASE() [6/26]

BOOST_AUTO_TEST_CASE ( Test_GB_2236  )

◆ BOOST_AUTO_TEST_CASE() [7/26]

BOOST_AUTO_TEST_CASE ( Test_PickFrameWithEndStopIf3Complete  )

◆ BOOST_AUTO_TEST_CASE() [8/26]

BOOST_AUTO_TEST_CASE ( Test_SQD_4334  )

◆ BOOST_AUTO_TEST_CASE() [9/26]

BOOST_AUTO_TEST_CASE ( Test_Translate_CodeBreakForStopCodon  )

◆ BOOST_AUTO_TEST_CASE() [10/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat  )

◆ BOOST_AUTO_TEST_CASE() [11/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_3prime_partial  )

◆ BOOST_AUTO_TEST_CASE() [12/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_5prime_partial  )

◆ BOOST_AUTO_TEST_CASE() [13/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_5prime_partial_minus  )

◆ BOOST_AUTO_TEST_CASE() [14/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_alt_frame  )

◆ BOOST_AUTO_TEST_CASE() [15/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_code_break  )

◆ BOOST_AUTO_TEST_CASE() [16/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_FirstCodon  )

◆ BOOST_AUTO_TEST_CASE() [17/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_FirstCodon2  )

◆ BOOST_AUTO_TEST_CASE() [18/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_GapInSeq  )

◆ BOOST_AUTO_TEST_CASE() [19/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_internal_stop  )

◆ BOOST_AUTO_TEST_CASE() [20/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_ShortCDS  )

◆ BOOST_AUTO_TEST_CASE() [21/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_TerminalTranslExcept  )

◆ BOOST_AUTO_TEST_CASE() [22/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_feat_ZeroGap  )

◆ BOOST_AUTO_TEST_CASE() [23/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_loc_1  )

◆ BOOST_AUTO_TEST_CASE() [24/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeq_loc_2  )

◆ BOOST_AUTO_TEST_CASE() [25/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_CSeqVector  )

◆ BOOST_AUTO_TEST_CASE() [26/26]

BOOST_AUTO_TEST_CASE ( Test_Translator_Raw  )

◆ CheckTranslatedBioseq() [1/2]

static void CheckTranslatedBioseq ( CRef< CBioseq bioseq,
string  seg1,
bool  mid_fuzz,
string  seg2 
)
static

◆ CheckTranslatedBioseq() [2/2]

static void CheckTranslatedBioseq ( CRef< CBioseq bioseq,
string  seqdata 
)
static

◆ GetProteinString()

static string GetProteinString ( CFeat_CI  fi,
CScope scope 
)
static

◆ SetLocationSkipGap()

static void SetLocationSkipGap ( CRef< CSeq_feat feat,
const CBioseq bioseq 
)
static

◆ TestOneGapSeq()

static void TestOneGapSeq ( const string asn,
string  seg1,
string  seg2 
)
static

◆ USING_SCOPE()

USING_SCOPE ( objects  )

Variable Documentation

◆ sc_MinusOrigin

const string sc_MinusOrigin

Definition at line 1364 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_PickFrameWithEndStopIf3CompleteEntry

const string sc_PickFrameWithEndStopIf3CompleteEntry
Initial value:
= "\
Seq-entry ::= seq {\
id { local str \"nuc1\" } , \
inst { repr raw, mol dna, length 60,\
seq-data iupacna \"cagtttccctcaaatcactctttggcaacgaccccttgtcacagtaaaaataggaggaca\"\
},\
annot { { data ftable {\
{\
data cdregion { frame one, code { id 1 } },\
location int { from 0, to 46, id local str \"nuc1\", fuzz-from lim lt }\
}\
} } }\
}"

Definition at line 1331 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestAmbiguousBestFrameEntry

const string sc_TestAmbiguousBestFrameEntry
Initial value:
="\
Seq-entry ::= seq {\
id { local str \"nuc1\" } , \
inst { repr raw, mol dna, length 45,\
seq-data iupacna \"TTTTTATGGAGAAATCGCAAACTTGAAATGCCCAGGCTGGAGTGC\"\
},\
annot { { data ftable {\
{\
data cdregion { frame one, code { id 1 } },\
location int { from 5, to 43, id local str \"nuc1\" }\
}\
} } }\
}"

Definition at line 1239 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestBestFrameEntry

const string sc_TestBestFrameEntry
Initial value:
="\
Seq-entry ::= seq {\
id { local str \"nuc1\" } , \
inst { repr raw, mol dna, length 45,\
seq-data iupacna \"TTTTTATGGAGTAATCGCTAACTTGTAATGCCCAGGCTGGAGTGC\"\
},\
annot { { data ftable {\
{\
data cdregion { frame one, code { id 1 } },\
location int { from 5, to 43, id local str \"nuc1\" }\
}\
} } }\
}"

Definition at line 1204 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry

const string sc_TestEntry

Definition at line 1599 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_3prime_partial

const string sc_TestEntry_3prime_partial

Definition at line 2122 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_5prime_partial

const string sc_TestEntry_5prime_partial

Definition at line 2019 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_5prime_partial_minus

const string sc_TestEntry_5prime_partial_minus

Definition at line 2225 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_alt_frame

const string sc_TestEntry_alt_frame

Definition at line 1815 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_code_break

const string sc_TestEntry_code_break

Definition at line 1701 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_CodeBreakForStopCodon

const string sc_TestEntry_CodeBreakForStopCodon

Definition at line 2739 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_FirstCodon

const string sc_TestEntry_FirstCodon
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"FirstCodon\" } ,\
descr {\
molinfo {\
biomol mRNA } } ,\
inst {\
repr raw ,\
mol rna ,\
length 39 ,\
seq-data\
iupacna \"AAAATGGGAATGTGCTTTTTGAGAGGATGGAAAGGTGTT\" } }\
"

Definition at line 2573 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_FirstCodon2

const string sc_TestEntry_FirstCodon2
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"FirstCodon2\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr raw ,\
mol dna ,\
length 27 ,\
seq-data\
iupacna \"TTGCCCTAAAAATAAGAGTAAAACTAA\" } }\
"

Definition at line 2589 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GapInSeq1

const string sc_TestEntry_GapInSeq1
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"GapInSeq1\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr delta ,\
mol dna ,\
length 27 ,\
ext \
delta { \
literal { \
length 9 , \
seq-data \
iupacna \"ATGCCCAAA\" } , \
literal { \
length 9 } , \
literal { \
length 9 , \
seq-data \
iupacna \"CCCAAATAA\" } } } } \
"

Definition at line 2606 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GapInSeq2

const string sc_TestEntry_GapInSeq2
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"GapInSeq2\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr delta ,\
mol dna ,\
length 27 ,\
ext \
delta { \
literal { \
length 8 , \
seq-data \
iupacna \"ATGCCCAA\" } , \
literal { \
length 9 } , \
literal { \
length 10 , \
seq-data \
iupacna \"ACCCAAATAA\" } } } } \
"

Definition at line 2633 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GapInSeq3

const string sc_TestEntry_GapInSeq3
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"GapInSeq3\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr delta ,\
mol dna ,\
length 29 ,\
ext \
delta { \
literal { \
length 9 , \
seq-data \
iupacna \"ATGCCCAAA\" } , \
literal { \
length 9 } , \
literal { \
length 11 , \
seq-data \
iupacna \"CCCAAAATAAA\" } } } } \
"

Definition at line 2659 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GapInSeq4

const string sc_TestEntry_GapInSeq4
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"GapInSeq4\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr delta ,\
mol dna ,\
length 27 ,\
ext \
delta { \
literal { \
length 9 , \
seq-data \
iupacna \"ATGCCCAAA\" } , \
literal { \
length 9 } , \
literal { \
length 9 , \
seq-data \
iupacna \"CCCAAATAA\" } } } } \
"

Definition at line 2686 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GapInSeq5

const string sc_TestEntry_GapInSeq5
Initial value:
= "\
Seq-entry ::= seq {\
id {\
local\
str \"GapInSeq5\" } ,\
descr {\
molinfo {\
biomol genomic } } ,\
inst {\
repr delta ,\
mol dna ,\
length 18 ,\
ext \
delta { \
literal { \
length 9 , \
seq-data \
iupacna \"ATGCCCAAA\" } , \
literal { \
length 0 } , \
literal { \
length 9 , \
seq-data \
iupacna \"CCCAAATAA\" } } } } \
"

Definition at line 2713 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_GB_2236

const string sc_TestEntry_GB_2236

Definition at line 2852 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_internal_stop

const string sc_TestEntry_internal_stop

Definition at line 1917 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_ShortCDS

const string sc_TestEntry_ShortCDS

Definition at line 2529 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestEntry_TerminalTranslExcept

const string sc_TestEntry_TerminalTranslExcept

Definition at line 2293 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestSQD_4334_1

const string sc_TestSQD_4334_1
Initial value:
="\
Seq-entry ::= seq {\
id { local str \"nuc1\" } , \
inst { repr raw, mol dna, length 14,\
seq-data iupacna \"ATGGGGTTTATAAA\"\
},\
annot { { data ftable {\
{\
data cdregion { frame two, code { id 1 } },\
location int { from 0, to 14, id local str \"nuc1\" }\
}\
} } }\
}"

Definition at line 1272 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TestSQD_4334_2

const string sc_TestSQD_4334_2
Initial value:
="\
Seq-entry ::= seq {\
id { local str \"nuc1\" } , \
inst { repr raw, mol dna, length 14,\
seq-data iupacna \"ATGGGGTTTATAAA\"\
},\
annot { { data ftable {\
{\
data cdregion { frame two, code { id 1 } },\
location int { from 0, to 13, id local str \"nuc1\" }\
}\
} } }\
}"

Definition at line 1287 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ sc_TooManyOverlap

const string sc_TooManyOverlap

Definition at line 1452 of file unit_test_seq_translator.cpp.

Referenced by BOOST_AUTO_TEST_CASE().

◆ USING_NCBI_SCOPE

USING_NCBI_SCOPE

Definition at line 74 of file unit_test_seq_translator.cpp.

Modified on Fri Apr 12 17:16:01 2024 by modify_doxy.py rev. 669887