34 #define NCBI_TEST_APPLICATION
57 #define CHECK_GI(id, gi) \
58 BOOST_CHECK_EQUAL((id).Which(), CSeq_id::e_Gi); \
59 BOOST_CHECK_EQUAL((id).GetGi(), gi);
61 #define CHECK_SEQ_INT(loc, gi, from, to, \
62 have_strand, strand, \
64 CHECK_GI((loc).GetId(), gi); \
65 BOOST_CHECK_EQUAL((loc).GetFrom(), from); \
66 BOOST_CHECK_EQUAL((loc).GetTo(), to); \
67 BOOST_CHECK_EQUAL((loc).IsSetStrand(), have_strand); \
69 BOOST_CHECK_EQUAL((loc).GetStrand(), strand); \
71 if (fuzz_from != CInt_fuzz::eLim_unk) { \
72 BOOST_CHECK((loc).IsSetFuzz_from()); \
73 BOOST_CHECK_EQUAL((loc).GetFuzz_from().Which(), CInt_fuzz::e_Lim); \
74 BOOST_CHECK_EQUAL((loc).GetFuzz_from().GetLim(), fuzz_from); \
77 BOOST_CHECK(!(loc).IsSetFuzz_from()); \
79 if (fuzz_to != CInt_fuzz::eLim_unk) { \
80 BOOST_CHECK((loc).IsSetFuzz_to()); \
81 BOOST_CHECK_EQUAL((loc).GetFuzz_to().Which(), CInt_fuzz::e_Lim); \
82 BOOST_CHECK_EQUAL((loc).GetFuzz_to().GetLim(), fuzz_to); \
85 BOOST_CHECK(!(loc).IsSetFuzz_to()); \
90 #if NCBI_COMPILER_MSVC && (_MSC_VER < 1400)
91 # undef kInvalidSeqPos
92 # define kInvalidSeqPos -1
125 bool eq = mapped->
Equals(ref_mapped);
126 BOOST_CHECK(mapped->
Equals(ref_mapped));
128 cout <<
"Expected mapped location:" << endl;
130 cout <<
"Actual mapped location:" << endl;
164 bool eq = mapped->
Equals(ref_mapped);
165 BOOST_CHECK(mapped->
Equals(ref_mapped));
167 cout <<
"Expected mapped alignment:" << endl;
169 cout <<
"Actual mapped alignment:" << endl;
203 bool eq = mapped->
Equals(ref_mapped);
204 BOOST_CHECK(mapped->
Equals(ref_mapped));
206 cout <<
"Expected mapped graph:" << endl;
208 cout <<
"Actual mapped graph:" << endl;
235 cout <<
"Basic mapping and truncaction test" << endl;
247 cout <<
" Simple interval" << endl;
249 cout <<
" Simple interval, reversed strand" << endl;
253 cout <<
" Truncated on the right" << endl;
255 cout <<
" Truncated on the right, reversed strand" << endl;
259 cout <<
" Truncated on the left" << endl;
261 cout <<
" Truncated on the left, reversed strand" << endl;
265 cout <<
" Truncated on both ends" << endl;
267 cout <<
" Truncated on both ends, reversed strand" << endl;
271 cout <<
" Minus strand interval" << endl;
273 cout <<
" Minus strand interval, reversed strand" << endl;
277 cout <<
" Minus strand interval, truncated on the right" << endl;
279 cout <<
" Minus strand interval, truncated on the right, reversed strand" << endl;
283 cout <<
" Minus strand interval, truncated on the left" << endl;
285 cout <<
" Minus strand interval, truncated on the left, reversed strand" << endl;
289 cout <<
" Minus strand interval, truncated on both ends" << endl;
291 cout <<
" Minus strand interval, truncated on both ends, reversed strand" << endl;
294 cout <<
" Null seq-loc" << endl;
297 cout <<
" Empty seq-loc" << endl;
301 cout <<
" Whole seq-loc" << endl;
303 cout <<
" Whole seq-loc, reversed strand" << endl;
307 cout <<
" Point" << endl;
309 cout <<
" Point, reversed strand" << endl;
313 cout <<
" Packed-points" << endl;
315 cout <<
" Packed-points, reversed strand" << endl;
318 cout <<
" Bond" << endl;
320 cout <<
" Bond, reversed strand" << endl;
328 cout <<
"Order of mapped intervals, direct" << endl;
330 cout <<
" Mapping plus to plus strand" << endl;
332 cout <<
" Mapping minus to minus strand" << endl;
335 cout <<
"Order of mapped intervals, plus to minus" << endl;
337 cout <<
" Mapping plus to minus strand (src on plus)" << endl;
339 cout <<
" Mapping minus to plus strand (src on plus)" << endl;
342 cout <<
"Order of mapped intervals, minus to plus" << endl;
344 cout <<
" Mapping plus to minus strand (src on minus)" << endl;
346 cout <<
" Mapping minus to plus strand (src on minus)" << endl;
349 cout <<
"Mapping through a mix, direct" << endl;
351 cout <<
" Mapping through a mix, plus to plus strand" << endl;
353 cout <<
" Mapping through a mix, plus to plus strand, with merge" << endl;
354 mapper->SetMergeAbutting();
356 mapper->SetMergeNone();
357 cout <<
" Mapping through a mix, minus to minus strand" << endl;
359 cout <<
" Mapping through a mix, minus to minus strand, with merge" << endl;
360 mapper->SetMergeAbutting();
362 mapper->SetMergeNone();
364 cout <<
"Mapping through a mix, plus to minus" << endl;
366 cout <<
" Mapping through a mix, plus to minus strand (src on plus)" << endl;
368 cout <<
" Mapping through a mix, plus to minus (src on plus), with merge" << endl;
369 mapper->SetMergeAbutting();
371 mapper->SetMergeNone();
372 cout <<
" Mapping through a mix, minus to plus strand (src on plus)" << endl;
374 cout <<
" Mapping through a mix, minus to plus (src on plus), with merge" << endl;
375 mapper->SetMergeAbutting();
377 mapper->SetMergeNone();
379 cout <<
"Mapping through a mix, minus to plus" << endl;
381 cout <<
" Mapping through a mix, plus to minus strand (src on minus)" << endl;
383 cout <<
" Mapping through a mix, plus to minus strand (src on minus), with merge" << endl;
384 mapper->SetMergeAbutting();
386 mapper->SetMergeNone();
387 cout <<
" Mapping through a mix, minus to plus strand (src on minus)" << endl;
389 cout <<
" Mapping through a mix, minus to plus strand (src on minus), with merge" << endl;
390 mapper->SetMergeAbutting();
392 mapper->SetMergeNone();
399 cout <<
"Merging of mapped intervals" << endl;
410 cout <<
" No merging" << endl;
413 cout <<
" No merging, reverse strand mapping" << endl;
416 cout <<
" Merge abutting" << endl;
419 cout <<
" Merge abutting, reverse strand mapping" << endl;
422 cout <<
" Merge contained" << endl;
425 cout <<
" Merge contained, reverse strand mapping" << endl;
428 cout <<
" Merge all" << endl;
431 cout <<
" Merge all, reverse strand mapping" << endl;
437 cout <<
" Minus strand original, no merging" << endl;
440 cout <<
" Minus strand original, no merging, reverse strand mapping" << endl;
443 cout <<
" Minus strand original, merge abutting" << endl;
446 cout <<
" Minus strand original, merge abutting, reverse strand mapping" << endl;
449 cout <<
" Minus strand original, merge contained" << endl;
452 cout <<
" Minus strand original, merge contained, reverse strand mapping" << endl;
455 cout <<
" Minus strand original, merge all" << endl;
458 cout <<
" Minus strand original, merge all, reverse strand mapping" << endl;
468 cout <<
"Mapping from protein to nucleotide" << endl;
476 cout <<
" Simple interval" << endl;
478 cout <<
" Partial on the right" << endl;
480 cout <<
" Original location on minus strand" << endl;
482 cout <<
" Original location on minus strand, partial" << endl;
485 cout <<
" Simple interval, reversed strand" << endl;
487 cout <<
" Partial on the right, reversed strand" << endl;
489 cout <<
" Original location on minus strand, reversed strand" << endl;
491 cout <<
" Original location on minus strand, partial, reversed strand" << endl;
500 cout <<
"Mapping from nucleotide to protein" << endl;
508 cout <<
" Simple interval" << endl;
510 cout <<
" Partial on the right" << endl;
512 cout <<
" Original location on minus strand" << endl;
514 cout <<
" Original location on minus strand, partial" << endl;
516 cout <<
" Shifted nucleotide positions (incomplete codons)" << endl;
519 cout <<
" Simple interval, reversed strand" << endl;
521 cout <<
" Partial on the right, reversed strand" << endl;
523 cout <<
" Original location on minus strand, reversed strand" << endl;
525 cout <<
" Original location on minus strand, partial, reversed strand" << endl;
527 cout <<
" Shifted nucleotide positions (incomplete codons), reversed strand" << endl;
535 cout <<
"Mapping through mix" << endl;
537 mapper->SetMergeAbutting();
538 cout <<
" Single interval overlapping all source ranges" << endl;
540 cout <<
" Single interval on minus strand, partial overlapping" << endl;
543 cout <<
"Mapping through mix, reversed strand" << endl;
545 cout <<
" Original sec-loc is the same as mapping source" << endl;
547 cout <<
" Mapping a packed-int" << endl;
549 cout <<
" Mapping a multi-level seq-loc" << endl;
557 cout <<
"Mapping dense-diag alignment" << endl;
559 cout <<
" Single segment" << endl;
561 cout <<
" Unsupported mapped alignment - gaps in dense-diag" << endl;
564 cout <<
"Mapping dense-diag alignment, reverse" << endl;
566 cout <<
" Single segment, reversed strand" << endl;
574 cout <<
"Mapping dense-seg alignments" << endl;
576 cout <<
" Nuc to prot, converted to std-seg (mixed types)" << endl;
579 mapper->MixedAlignsAsSpliced(
true);
580 cout <<
" Nuc to prot, converted to spliced-seg (mixed types)" << endl;
583 cout <<
" Unsupported alignment - dense-seg with mixed types" << endl;
587 cout <<
" Setting correct strands in gaps" << endl;
595 cout <<
"Mapping spliced-seg alignments" << endl;
597 cout <<
" Mapping spliced-seg product, nuc to nuc" << endl;
601 cout <<
" Mapping spliced-seg product, nuc to prot" << endl;
605 cout <<
" Mapping spliced-seg product, nuc to prot, reversed strand" << endl;
609 cout <<
" Mapping spliced-seg through multiple ranges" << endl;
615 cout <<
" Trimming indels" << endl;
617 cout <<
" Trimming indels - 2" << endl;
620 cout <<
" Trimming indels - 3" << endl;
623 cout <<
" Trimming indels, minus strand" << endl;
627 cout <<
" Trimming gen-ins - 1" << endl;
630 cout <<
" Trimming gen-ins - 2" << endl;
633 cout <<
" Trimming gen-ins - 3" << endl;
636 cout <<
" Trimming gen-ins - 4" << endl;
639 cout <<
" Trimming gen-ins - 5" << endl;
642 cout <<
" Trimming gen-ins - 6" << endl;
645 cout <<
" Trimming gen-ins - 7" << endl;
648 cout <<
" Trimming gen-ins - 8" << endl;
656 cout <<
"Mapping scores" << endl;
658 cout <<
" Dense-diag - scores are preserved" << endl;
662 cout <<
" Dense-seg, scores are preserved" << endl;
664 cout <<
" Dense-seg - partial mapping, scores are dropped" << endl;
666 cout <<
" Dense-seg - unmapped segment, scores are dropped" << endl;
668 cout <<
" Std-seg, scores are preserved" << endl;
670 cout <<
" Std-seg - partial mapping, scores are dropped" << endl;
672 cout <<
" Std-seg - unmapped segment, scores are dropped" << endl;
674 cout <<
" Packed-seg, scores are preserved" << endl;
676 cout <<
" Packed-seg - partial mapping, scores are dropped" << endl;
678 cout <<
" Packed-seg - unmapped segment, scores are dropped" << endl;
680 cout <<
" Spliced-seg, scores are preserved" << endl;
682 cout <<
" Spliced-seg, partial mapping, scores are dropped" << endl;
684 cout <<
" Spliced-seg, unmapped segment, scores are dropped" << endl;
692 cout <<
"Mapping graphs" << endl;
694 cout <<
" Mapping whole graph" << endl;
696 cout <<
" Partial - skip a range in the middle" << endl;
698 cout <<
" Mapping a graph on minus strand" << endl;
701 cout <<
"Graph mapping, nuc to prot" << endl;
703 cout <<
" Simple graph, using comp=3 to allow mapping" << endl;
706 cout <<
" Unsupported: different original and mapped location lengths" << endl;
708 cout <<
" Unsupported: unknown destination sequence type" << endl;
716 cout <<
"Test mapping alignments to bioseq segments" << endl;
723 cout <<
" Alignment #1, mapping row 1" << endl;
726 cout <<
" Alignment #1, mapping row 2" << endl;
731 cout <<
" Alignment #2, mapping row 1" << endl;
734 cout <<
" Alignment #2, mapping row 2" << endl;
739 cout <<
" Alignment #3, mapping row 1" << endl;
742 cout <<
" Alignment #3, mapping row 2" << endl;
747 cout <<
" Alignment #4, mapping row 1" << endl;
750 cout <<
" Alignment #4, mapping row 2" << endl;
759 cout <<
"Test mapping through alignments" << endl;
762 const char* titles[] = {
763 " Mapping through dense-diag",
764 " Mapping through dense-seg (with some gaps)",
765 " Mapping through packed-seg (with some gaps)",
766 " Mapping through std-seg",
767 " Mapping through disc",
768 " Mapping through spliced-seg",
769 " Mapping through spliced-seg, reversed strand",
770 " Mapping through sparse-seg"
773 for (
size_t i = 0;
i <
sizeof(titles)/
sizeof(titles[0]);
i++) {
774 cout << titles[
i] << endl;
777 cout <<
" Whole sequence" << endl;
779 cout <<
" Interval, complete" << endl;
781 cout <<
" Interval, split" << endl;
830 cout <<
"Test mapping with sequence info provider" << endl;
839 unique_ptr<CSeq_loc_Mapper_Base> mapper(
842 cout <<
" Test mapping whole, nuc to prot" << endl;
844 cout <<
" Test mapping interval, nuc to prot" << endl;
852 cout <<
"Mapping fuzzes" << endl;
865 cout <<
" Fuzz-from lim lt" << endl;
867 cout <<
" Fuzz-from lim lt, reversed strand" << endl;
871 cout <<
" Fuzz-from lim gt" << endl;
873 cout <<
" Fuzz-from lim gt, reversed strand" << endl;
877 cout <<
" Fuzz-from lim tl" << endl;
879 cout <<
" Fuzz-from lim tl, reversed strand" << endl;
883 cout <<
" Fuzz-from lim tr" << endl;
885 cout <<
" Fuzz-from lim tr, reversed strand" << endl;
889 cout <<
" Fuzz-from alt #1" << endl;
891 cout <<
" Fuzz-from alt #1, reversed strand" << endl;
895 cout <<
" Fuzz-from alt #2" << endl;
897 cout <<
" Fuzz-from alt #2, reversed strand" << endl;
901 cout <<
" Fuzz-from range #1" << endl;
903 cout <<
" Fuzz-from range #1, reversed strand" << endl;
907 cout <<
" Fuzz-from range #2" << endl;
909 cout <<
" Fuzz-from range #2, reversed strand" << endl;
913 cout <<
" Fuzz-from range #3" << endl;
915 cout <<
" Fuzz-from range #3, reversed strand" << endl;
919 cout <<
" Fuzz-from range #4" << endl;
921 cout <<
" Fuzz-from range #4, reversed strand" << endl;
926 cout <<
" Fuzz-to lim lt" << endl;
928 cout <<
" Fuzz-to lim lt, reversed strand" << endl;
932 cout <<
" Fuzz-to lim gt" << endl;
934 cout <<
" Fuzz-to lim gt, reversed strand" << endl;
938 cout <<
" Fuzz-to lim tl" << endl;
940 cout <<
" Fuzz-to lim tl, reversed strand" << endl;
944 cout <<
" Fuzz-to lim tr" << endl;
946 cout <<
" Fuzz-to lim tr, reversed strand" << endl;
950 cout <<
" Fuzz-to alt #1" << endl;
952 cout <<
" Fuzz-to alt #1, reversed strand" << endl;
956 cout <<
" Fuzz-to alt #2" << endl;
958 cout <<
" Fuzz-to alt #2, reversed strand" << endl;
962 cout <<
" Fuzz-to range #1" << endl;
964 cout <<
" Fuzz-to range #1, reversed strand" << endl;
968 cout <<
" Fuzz-to range #2" << endl;
970 cout <<
" Fuzz-to range #2, reversed strand" << endl;
974 cout <<
" Fuzz-to range #3" << endl;
976 cout <<
" Fuzz-to range #3, reversed strand" << endl;
980 cout <<
" Fuzz-to range #4" << endl;
982 cout <<
" Fuzz-to range #4, reversed strand" << endl;
990 cout <<
"Testing sort order of mapped exons" << endl;
1002 cout <<
" Both rows on plus, map genomic to plus, no trim" << endl;
1005 cout <<
" Both rows on plus, map genomic to plus, trim" << endl;
1008 cout <<
" Both rows on plus, map genomic to minus, no trim" << endl;
1011 cout <<
" Both rows on plus, map genomic to minus, trim" << endl;
1016 cout <<
" Both rows on plus, map product to plus, no trim" << endl;
1019 cout <<
" Both rows on plus, map product to plus, trim" << endl;
1022 cout <<
" Both rows on plus, map product to minus, no trim" << endl;
1025 cout <<
" Both rows on plus, map product to minus, trim" << endl;
1030 cout <<
" Genomic on minus, map genomic to minus, no trim" << endl;
1033 cout <<
" Genomic on minus, map genomic to minus, trim" << endl;
1036 cout <<
" Genomic on minus, map genomic to plus, no trim" << endl;
1039 cout <<
" Genomic on minus, map genomic to plus, trim" << endl;
1044 cout <<
" Genomic on minus, map product to plus, no trim" << endl;
1047 cout <<
" Genomic on minus, map product to plus, trim" << endl;
1050 cout <<
" Genomic on minus, map product to minus, no trim" << endl;
1053 cout <<
" Genomic on minus, map product to minus, trim" << endl;
1058 cout <<
" Product on minus, map genomic to plus, no trim" << endl;
1061 cout <<
" Product on minus, map genomic to plus, trim" << endl;
1064 cout <<
" Product on minus, map genomic to minus, no trim" << endl;
1067 cout <<
" Product on minus, map genomic to minus, trim" << endl;
1072 cout <<
" Product on minus, map product to minus, no trim" << endl;
1075 cout <<
" Product on minus, map product to minus, trim" << endl;
1078 cout <<
" Product on minus, map product to plus, no trim" << endl;
1081 cout <<
" Product on minus, map product to plus, trim" << endl;
1087 cout <<
"Testing sort order of mapped exons, local strands" << endl;
1092 cout <<
" Both rows on plus, map genomic to plus" << endl;
1094 cout <<
" Both rows on plus, map genomic to minus" << endl;
1098 cout <<
" Both rows on plus, map product to plus" << endl;
1100 cout <<
" Both rows on plus, map product to minus" << endl;
1104 cout <<
" Genomic on minus, map genomic to minus" << endl;
1106 cout <<
" Genomic on minus, map genomic to plus" << endl;
1110 cout <<
" Genomic on minus, map product to plus" << endl;
1112 cout <<
" Genomic on minus, map product to minus" << endl;
1116 cout <<
" Product on minus, map genomic to plus" << endl;
1118 cout <<
" Product on minus, map genomic to minus" << endl;
1122 cout <<
" Product on minus, map product to minus" << endl;
1124 cout <<
" Product on minus, map product to plus" << endl;
1132 cout <<
"Testing truncation of mix parts" << endl;
1144 cout <<
" Plus, direct, unmapped ranges on the left" << endl;
1146 cout <<
" Plus, reversed, unmapped ranges on the left" << endl;
1150 cout <<
" Plus, direct, unmapped ranges on the right" << endl;
1152 cout <<
" Plus, reversed, unmapped ranges on the right" << endl;
1156 cout <<
" Plus, direct, range truncated on the left" << endl;
1158 cout <<
" Plus, reversed, range truncated on the left" << endl;
1162 cout <<
" Plus, direct, range truncated on the right" << endl;
1164 cout <<
" Plus, reversed, range truncated on the right" << endl;
1168 cout <<
" Minus, direct, unmapped ranges on the left" << endl;
1170 cout <<
" Minus, reversed, unmapped ranges on the left" << endl;
1174 cout <<
" Minus, direct, unmapped ranges on the right" << endl;
1176 cout <<
" Minus, reversed, unmapped ranges on the right" << endl;
1180 cout <<
" Minus, direct, range truncated on the left" << endl;
1182 cout <<
" Minus, reversed, range truncated on the left" << endl;
1186 cout <<
" Minus, direct, range truncated on the right" << endl;
1188 cout <<
" Minus, reversed, range truncated on the right" << endl;
1196 cout <<
"Testing trimming of mapped locations" << endl;
1211 cout <<
" Test stop codon mapping: trimming=off" << endl;
1212 unique_ptr<CSeq_loc_Mapper_Base> mapper(
1218 cout <<
" Test stop codon mapping: trimming=on" << endl;
1227 cout <<
" Test stop codon mapping, prot->nuc: trimming=off" << endl;
1234 cout <<
" Test stop codon mapping, prot->nuc: trimming=on" << endl;
1242 cout <<
" Test stop codon trimming on minus strand, nuc->prot" << endl;
1250 cout <<
" Test stop codon trimming on minus strand, prot->nuc" << endl;
1258 cout <<
" Test stop codon non-extension, multi-id destionation" << endl;
1267 cout <<
" Test stop codon non-extension, multi-id source" << endl;
1271 mapper->SetMergeAbutting();
1275 cout <<
" Test trimming while mapping to minus strand, nuc->nuc, #1" << endl;
1284 cout <<
" Test trimming while mapping to minus strand, nuc->nuc, #2" << endl;
1287 cout <<
" Test trimming while mapping to minus strand, nuc->nuc, #3" << endl;
1291 cout <<
" Test trimming while mapping to minus strand, prot->nuc, #1" << endl;
1300 cout <<
" Test trimming while mapping to minus strand, prot->nuc, #2" << endl;
1303 cout <<
" Test trimming while mapping to minus strand, prot->nuc, #3" << endl;
1307 cout <<
" Test trimming while mapping from minus strand, nuc->nuc, #1" << endl;
1316 cout <<
" Test trimming while mapping from minus strand, nuc->nuc, #2" << endl;
1319 cout <<
" Test trimming while mapping from minus strand, nuc->nuc, #3" << endl;
1323 cout <<
" Test trimming while mapping from minus strand, nuc->prot, #1" << endl;
1332 cout <<
" Test trimming while mapping from minus strand, nuc->prot, #2" << endl;
1335 cout <<
" Test trimming while mapping from minus strand, nuc->prot, #3" << endl;
1343 cout <<
"Testing frame and incomplete codon trimming" << endl;
1345 CSeq_loc nuc_orig_long, nuc_orig_short, prot_orig_long, prot_orig_short;
1355 for (
int str_idx = 0; str_idx < 2; ++str_idx) {
1367 for (
TSeqPos extra_bases = 0; extra_bases < 3; ++extra_bases) {
1368 cout <<
" nuc->prot, boundaries, " <<
1369 (str_idx ?
"minus" :
"plus") <<
1370 ", frame=" << frame <<
1371 ", " " extra bases=" << extra_bases << endl;
1377 cout <<
" nuc->prot, position, " <<
1378 (str_idx ?
"minus" :
"plus") <<
1379 ", frame=" << frame <<
1380 ", " " extra bases=" << extra_bases << endl;
1383 cout <<
" prot->nuc, boundaries, " <<
1384 (str_idx ?
"minus" :
"plus") <<
1385 ", frame=" << frame <<
1386 ", " " extra bases=" << extra_bases << endl;
1392 cout <<
" prot->nuc, position, " <<
1393 (str_idx ?
"minus" :
"plus") <<
1394 ", frame=" << frame <<
1395 ", " " extra bases=" << extra_bases << endl;
User-defined methods of the data storage class.
Seq-loc and seq-align mapper exceptions.
namespace ncbi::objects::
CSeq_loc_Mapper_Options –.
virtual TSeqPos GetSequenceLength(const CSeq_id_Handle &idh)
Get sequence length or kInvalidSeqPos.
void AddSeq(TGi gi, TSeqType seqtype, TSeqPos len)
virtual TSeqType GetSequenceType(const CSeq_id_Handle &idh)
Get information about sequence type (nuc or prot).
map< TGi, TSeqPos > TLenMap
map< TGi, TSeqType > TTypeMap
virtual void CollectSynonyms(const CSeq_id_Handle &id, TSynonyms &synonyms)
Collect all synonyms for the id including the id itself.
container_type::const_iterator const_iterator
const_iterator end() const
const_iterator find(const key_type &key) const
iterator_bool insert(const value_type &val)
unsigned int TSeqPos
Type for sequence locations and lengths.
const TSeqPos kInvalidSeqPos
Define special value for invalid sequence position.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
#define MSerial_AsnText
I/O stream manipulators –.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
void ResetStrand(void)
Reset the strand on this location.
void SetStrand(ENa_strand strand)
Set the strand for all of the location's ranges.
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CSeq_loc_Mapper_Options & SetTrimMappedLocation(bool value=true)
CSeq_loc_Mapper_Base & SetMergeNone(void)
Intervals' merging mode MergeNone and MergeAbutting do not change the order of ranges in the destinat...
CSeq_loc_Mapper_Base & SetTrimSplicedSeg(bool trim)
For mapping spliced-segs only: preserve or trim starting/ending indels.
CSeq_loc_Mapper_Base & SetMergeAbutting(void)
Merge only abutting intervals, keep overlapping.
CSeq_loc_Mapper_Base & SetMergeContained(void)
Merge intervals only if one is completely covered by another.
CSeq_loc_Mapper_Base & SetMergeAll(void)
Merge any abutting or overlapping intervals.
@ eProductToLocation
Map from the feature's product to location.
@ eLocationToProduct
Map from the feature's location to product.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetData(TData &value)
Assign a value to Data data member.
void SetFrame(TFrame value)
Assign a value to Frame data member.
@ eFrame_not_set
not set, code uses one
@ eFrame_three
reading frame
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
void TestMapping_ThroughMix()
void TestMapping_Spliced()
void TestMapping_NucToProt()
void TestMapper_Sequence_Info()
void TestMapping_Scores()
void TestMapping_ProtToNuc()
void TestMappingSeq_align(CSeq_loc_Mapper_Base &mapper, const CSeq_align &orig, CNcbiIstream &in)
void TestMapping_Dendiag()
void TestMappingSeq_graph_Exception(CSeq_loc_Mapper_Base &mapper, CNcbiIstream &in)
BOOST_AUTO_TEST_CASE(s_TestMapping)
void TestMapping_Merging()
void TestMapper_TruncatedMix()
void TestMapper_ExonPartsOrder()
void TestMapping_Denseg()
void TestMapping_AlignmentsToParts()
void TestMappingSeq_loc_Exception(CSeq_loc_Mapper_Base &mapper, CNcbiIstream &in)
void TestMappingSeq_loc(CSeq_loc_Mapper_Base &mapper, const CSeq_loc &orig, CNcbiIstream &in)
void TestMapping_ThroughAlignments()
CSeq_loc_Mapper_Base * CreateMapperFromSeq_locs(CNcbiIstream &in)
void TestMapper_Trimming()
void TestMapping_Simple()
void TestMappingSeq_graph(CSeq_loc_Mapper_Base &mapper, const CSeq_graph &orig, CNcbiIstream &in)
void TestMappingSeq_align_Exception(CSeq_loc_Mapper_Base &mapper, CNcbiIstream &in)
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
bool eq(T x_, T y_, T round_)
std::istream & in(std::istream &in_, double &x_)
Utility stuff for more convenient using of Boost.Test library.