boost::test_tools::output_test_stream;
61GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
72OrigLoc->
SetWhole().SetLocal().SetStr(
"chr1");
79OrigLoc->
SetWhole().SetLocal().SetStr(
"chr8_gl000196_random");
82Result = Mapper.
Map(*OrigLoc, PrimarySpec);
92GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
103OrigLoc->
SetWhole().SetLocal().SetStr(
"chr1");
112Mapper.
Guess(*OrigLoc, GuessSpec);
118BOOST_CHECK(RoundTripped->
Equals(*OrigLoc));
127GCService.
GetAssembly(
"GCF_000003205.2",
"SequenceNames")
138OrigLoc->
SetWhole().SetLocal().SetStr(
"chrUn.004.10843");
152GCService.
GetAssembly(
"GCF_000001405.12",
"SequenceNames")
164OrigLoc->
SetInt().SetId().SetLocal().SetStr(
"chr1_random");
165OrigLoc->
SetInt().SetFrom(500000);
166OrigLoc->
SetInt().SetTo(510000);
169BOOST_CHECK(Result.
NotNull());
172Expected->
SetInt().SetId().Set(
"NT_113872.1");
173Expected->
SetInt().SetFrom(57066);
174Expected->
SetInt().SetTo(67066);
178BOOST_CHECK(Result->
Equals(*Expected));
182OrigLoc->
SetInt().SetId().SetLocal().SetStr(
"chr6_random");
183OrigLoc->
SetInt().SetFrom(65878);
184OrigLoc->
SetInt().SetTo(67000);
188Mapper.
Guess(*OrigLoc, GuessSpec);
190Result = Mapper.
Map(*OrigLoc, MapSpec);
191BOOST_CHECK(Result.
NotNull());
194Expected->
SetInt().SetId().Set(
"NT_113898.1");
195Expected->
SetInt().SetFrom(65878);
196Expected->
SetInt().SetTo(67000);
199BOOST_CHECK(Result->
Equals(*Expected));
200Result = Mapper.
Map(*Result, GuessSpec);
201BOOST_CHECK(Result.
NotNull());
202BOOST_CHECK(OrigLoc->
Equals(*Result));
206OrigLoc->
SetInt().SetId().SetLocal().SetStr(
"chr5_random");
207OrigLoc->
SetInt().SetFrom(113060);
208OrigLoc->
SetInt().SetTo(114325);
211Mapper.
Guess(*OrigLoc, GuessSpec);
213Result = Mapper.
Map(*OrigLoc, MapSpec);
214BOOST_CHECK(Result.
NotNull());
217Expected->
SetInt().SetId().Set(
"NT_113890.1");
218Expected->
SetInt().SetFrom(113060);
219Expected->
SetInt().SetTo(114325);
222BOOST_CHECK(Result->
Equals(*Expected));
223Result = Mapper.
Map(*Result, GuessSpec);
224BOOST_CHECK(Result.
NotNull());
225BOOST_CHECK(OrigLoc->
Equals(*Result));
235GCService.
GetAssembly(
"GCF_000001405.12",
"SequenceNames")
247OrigLoc->
SetInt().SetId().SetLocal().SetStr(
"chr1_random");
248OrigLoc->
SetInt().SetFrom(500000);
249OrigLoc->
SetInt().SetTo(510000);
254Expected->
SetInt().SetId().Set(
"NT_113872.1");
255Expected->
SetInt().SetFrom(57066);
256Expected->
SetInt().SetTo(67066);
260BOOST_CHECK(Result->
Equals(*Expected));
270GCService.
GetAssembly(
"GCF_000001405.13",
"AllSequences")
282OrigLoc.
SetInt().SetId().Set(
"NC_000001.10");
283OrigLoc.
SetInt().SetFrom(50000000);
284OrigLoc.
SetInt().SetTo(50000001);
290Expected.
SetInt().SetId().Set(
"AL356789.16");
291Expected.
SetInt().SetFrom(56981);
292Expected.
SetInt().SetTo(56982);
296BOOST_CHECK(Result->
Equals(Expected));
306GCService.
GetAssembly(
"GCF_000001405.13",
"AllSequences")
318OrigLoc.
SetInt().SetId().Set(
"NC_000001.10");
319OrigLoc.
SetInt().SetFrom(50000000);
320OrigLoc.
SetInt().SetTo(50000001);
326Expected.
SetInt().SetId().Set(
"GL000006.1");
327Expected.
SetInt().SetFrom(19971918);
328Expected.
SetInt().SetTo(19971919);
332BOOST_CHECK(Result->
Equals(Expected));
341GCService.
GetAssembly(
"GCF_000001405.13",
"AllSequences")
356orig_ival.
SetTo(5001);
363exp_ival.
SetId().Set(
"CM000663.1");
365exp_ival.
SetTo(100236284);
368BOOST_CHECK(Result->
Equals(Expected));
378GCService.
GetAssembly(
"GCA_000001405.1",
"AllSequences")
393orig_ival.
SetTo(5001);
400exp_ival.
SetId().Set(
"CM000663.1");
402exp_ival.
SetTo(100236284);
405BOOST_CHECK(Result->
Equals(Expected));
415GCService.
GetAssembly(
"GCF_000001405.13",
"AllSequences")
427OrigLoc.
SetInt().SetId().Set(
"AL451051.6");
428OrigLoc.
SetInt().SetFrom(5000);
429OrigLoc.
SetInt().SetTo(5001);
435Expected.
SetInt().SetId().Set(
"GL000006.1");
436Expected.
SetInt().SetFrom(70208201);
437Expected.
SetInt().SetTo(70208202);
441BOOST_CHECK(Result->
Equals(Expected));
451GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
462OrigLoc->
SetWhole().SetLocal().SetStr(
"1");
468OrigLoc->
SetWhole().SetLocal().SetStr(
"C1");
469Result = Mapper.
Map(*OrigLoc, MapSpec);
473OrigLoc->
SetWhole().SetLocal().SetStr(
"LG1");
474Result = Mapper.
Map(*OrigLoc, MapSpec);
478OrigLoc->
SetWhole().SetLocal().SetStr(
"WAKKAWAKKA1");
479Result = Mapper.
Map(*OrigLoc, MapSpec);
482OrigLoc->
SetWhole().SetLocal().SetStr(
"chrUn_KN707606v1_decoy");
483Result = Mapper.
Map(*OrigLoc, MapSpec);
484BOOST_CHECK_EQUAL(Result.
IsNull(),
true);
494GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
506OrigLoc->
SetInt().SetId().SetLocal().SetStr(
"LG2");
507OrigLoc->
SetInt().SetFrom(123456789);
508OrigLoc->
SetInt().SetTo(123456798);
514Expected->
SetInt().SetId().Set(
"NT_022135.16");
515Expected->
SetInt().SetFrom(13205452);
516Expected->
SetInt().SetTo(13205461);
520BOOST_CHECK(Result->
Equals(*Expected));
523Mapper.
Guess(*OrigLoc, GuessSpec);
524BOOST_CHECK_EQUAL(GuessSpec.
ToString(),
"NotPrim:Private:NotSet::LG%s:CHRO:TOP");
529BOOST_CHECK(RoundTrip->
Equals(*OrigLoc));
542OrigLoc->
SetWhole().SetLocal().SetStr(
"1");
550GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
563GCService.
GetAssembly(
"GCA_000001405.1",
"SequenceNames")
589GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
595 boolResult = Mapper.
Guess(*OrigLoc, GuessSpec);
597BOOST_CHECK_EQUAL(Result,
true);
598BOOST_CHECK_EQUAL(GuessSpec.
ToString(),
"Prim:RefSeq:Gi:::CHRO:TOP");
604GCService.
GetAssembly(
"GCA_000001405.1",
"SequenceNames")
610 boolResult = Mapper.
Guess(*OrigLoc, GuessSpec);
612BOOST_CHECK_EQUAL(Result,
true);
613BOOST_CHECK_EQUAL(GuessSpec.
ToString(),
"NotPrim:RefSeq:Gi:::CHRO:TOP");
624GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
633list<CConstRef<CSeq_id> > Synonyms;
638BOOST_CHECK_EQUAL(Synonyms.size(), (
size_t)5);
644BOOST_CHECK_EQUAL(Synonyms.size(), (
size_t)7);
654GCService.
GetAssembly(
"GCF_000001405.25",
"AllSequences")
667orig_ival.
SetId().Set(
"gi|224515577");
669orig_ival.
SetTo(3478538);
676expect_ival.
SetId().Set(
"NT_113891.2");
677expect_ival.
SetFrom(3478538);
678expect_ival.
SetTo(3478538);
682BOOST_CHECK(Result->
Equals(ExpectLoc));
691GCService.
GetAssembly(
"GCF_000001405.11",
"AllSequences")
695GCService.
GetAssembly(
"GCF_000001405.25",
"AllSequences")
705orig_ival.
SetId().Set(
"NT_078074.1");
707orig_ival.
SetTo(146371);
711OldMapper.
Guess(OrigLoc, GuessSpec);
715remap_ival.
SetId().Set(
"gi|224589821");
716remap_ival.
SetFrom(40301888);
717remap_ival.
SetTo(40507252);
727expect_ival.
SetId().Set(
"NC_000009.11");
728expect_ival.
SetFrom(40301888);
729expect_ival.
SetTo(40507252);
733BOOST_CHECK(Result->
Equals(ExpectLoc));
744GCService.
GetAssembly(
"GCF_000001405.13",
"SequenceNames")
757OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"23-499");
758OrigLoc.
SetInt().SetFrom(50000000);
759OrigLoc.
SetInt().SetTo(50000001);
762BOOST_CHECK(Result.
IsNull());
764OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"333");
765Result = Mapper.
Map(OrigLoc, MapSpec);
766BOOST_CHECK(Result.
IsNull());
768OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"425");
769Result = Mapper.
Map(OrigLoc, MapSpec);
770BOOST_CHECK(Result.
IsNull());
782GCService.
GetAssembly(
"GCF_001858045.2",
"Scaffolds")
795OrigLoc.
SetWhole().SetGenbank().SetAccession(
"MT");
799BOOST_CHECK(Result.
IsNull());
808GCService.
GetAssembly(
"GCF_001858045.2",
"Scaffolds")
821OrigLoc.
SetWhole().SetGenbank().SetAccession(
"MT");
826BOOST_CHECK(Result.
NotNull());
829ExpectLoc.
SetWhole().SetGenbank().SetAccession(
"GU238433");
830ExpectLoc.
SetWhole().SetGenbank().SetVersion(1);
831BOOST_CHECK(Result->
Equals(ExpectLoc));
845GCService.
GetAssembly(
"GCF_000001215.2",
"SequenceNames"));
859OrigLoc.
SetInt().SetId().SetPdb().SetMol().Set(
"2LHe");
860OrigLoc.
SetInt().SetId().SetPdb().SetChain(116);
861OrigLoc.
SetInt().SetFrom(1322833);
862OrigLoc.
SetInt().SetTo(1322945);
865BOOST_CHECK(Result.
NotNull());
877GCService.
GetAssembly(
"GCF_000307585.1",
"SequenceNames"));
878BOOST_CHECK(GenColl.
NotNull());
892OrigLoc.
SetInt().SetFrom(1);
893OrigLoc.
SetInt().SetTo(41937);
896BOOST_CHECK(Result.
NotNull());
908GCService.
GetAssembly(
"GCA_000001215.4",
"SequenceNames"));
909BOOST_CHECK(GenColl.
NotNull());
922OrigLoc.
SetInt().SetId().Set(
"211000022278760");
924OrigLoc.
SetInt().SetFrom(1);
925OrigLoc.
SetInt().SetTo(41937);
929BOOST_CHECK(Result.
NotNull());
932OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"211000022278760");
934Result = Mapper.
Map(OrigLoc, MapSpec);
935BOOST_CHECK(Result.
NotNull());
1005GCService.
GetAssembly(
"GCF_000069185.1",
"SequenceNames"));
1019OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"1");
1020OrigLoc.
SetInt().SetFrom(1);
1021OrigLoc.
SetInt().SetTo(2);
1024BOOST_CHECK(Result.
NotNull());
1027OrigLoc.
SetInt().SetId().SetLocal().SetId(1);
1028Result = Mapper.
Map(OrigLoc, MapSpec);
1029BOOST_CHECK(Result.
NotNull());
1042GCService.
GetAssembly(
"GCF_000001405.39",
"SequenceNames"));
1056OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"chrUn_KI270752v1");
1057OrigLoc.
SetInt().SetFrom(1);
1058OrigLoc.
SetInt().SetTo(2);
1061BOOST_CHECK(Result.
IsNull());
1066OrigLoc.
SetInt().SetId().SetLocal().SetStr(
"Contig_2_5.15315");
1067OrigLoc.
SetInt().SetFrom(1);
1068OrigLoc.
SetInt().SetTo(2);
1070Result = Mapper.
Map(OrigLoc, MapSpec);
1071BOOST_CHECK(Result.
IsNull());
bool Guess(const objects::CSeq_loc &Loc, SIdSpec &Spec) const
CRef< objects::CSeq_loc > Map(const objects::CSeq_loc &Loc, const SIdSpec &Spec) const
void GetSynonyms(const objects::CSeq_id &BaseId, list< CConstRef< objects::CSeq_id > > &Synonyms, bool NcbiOnly=true) const
CRef< CGC_Assembly > GetAssembly(const string &acc, const string &mode)
User-defined methods of the data storage class.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
string GetSeqIdString(bool with_version=false) const
Return seqid string with optional version for text seqid type.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
bool NotNull(void) const THROWS_NONE
Check if pointer is not null â same effect as NotEmpty().
void Reset(void)
Reset reference object.
bool NotNull(void) const THROWS_NONE
Check if pointer is not null â same effect as NotEmpty().
bool IsNull(void) const THROWS_NONE
Check if pointer is null â same effect as Empty().
TStr & SetStr(void)
Select the variant.
@ eGC_SequenceRole_top_level
@ eGC_SequenceRole_component
@ eGC_SequenceRole_scaffold
void SetTo(TTo value)
Assign a value to To data member.
const TId & GetId(void) const
Get the Id member data.
void SetId(TId &value)
Assign a value to Id data member.
void SetFrom(TFrom value)
Assign a value to From data member.
TGi GetGi(void) const
Get the variant data.
TLocal & SetLocal(void)
Select the variant.
const TInt & GetInt(void) const
Get the variant data.
void SetStrand(TStrand value)
Assign a value to Strand data member.
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
string ToString(void) const
Utility stuff for more convenient using of Boost.Test library.
BOOST_AUTO_TEST_CASE(TestCaseUcscToRefSeqMapping)
BOOST_AUTO_TEST_SUITE_END()
Auxiliary class to convert a string into an argument count and vector.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4