114 #define NCBI_USE_ERRCODE_X Objtools_Fmt_Gather
130 if( subtypevalue1 != subtypevalue2 ) {
136 if( name1 != name2 ) {
152 return obj1->
Match( *obj2 );
166 return obj1->
Equals( *obj2 );
200 "This format is currently not supported");
249 x_GatherSeqEntry(
ctx, entry, bsh, useSeqEntryIndexing, topLevelSeqEntryContext, doNuc, doProt);
267 bool useSeqEntryIndexing,
269 bool doNuc,
bool doProt)
const
278 if (( bsh.
IsNa() && doNuc ) || ( bsh.
IsAa() && doProt )) {
322 bool doNuc,
bool doProt)
const
337 for ( ; seq_iter; ++seq_iter ) {
340 x_GatherBioseq(prev_seq, this_seq, next_seq, topLevelSeqEntryContext);
346 next_seq = *seq_iter;
351 x_GatherBioseq(prev_seq, this_seq, next_seq, topLevelSeqEntryContext);
394 if (it->IsSet() && it->GetSet().IsSetClass() &&
427 "Release mode failure: Given sequence is not contig" );
433 "FlatFileGeneration canceled by ICancel callback");
449 (topLevelSeqEntryContext ? &*topLevelSeqEntryContext :
nullptr)));
521 if (!
ctx.IsCrossKingdom())
break;
522 if (!
ctx.IsRSUniqueProt())
break;
529 src->
SetOrg().SetTaxname(
"Unknown.");
530 src->
SetOrg().SetOrgname().SetLineage(
"Unclassified.");
547 switch( (*it)->Which() ) {
568 if ( ( !
ctx.CanGetTLSeqEntryCtx() ||
ctx.GetTLSeqEntryCtx().GetCanSourcePubsBeFused() ) &&
s_IsJustUids(pubdesc) ) {
633 if( ! it.GetSeq_entry_Handle().HasParentEntry() ) {
654 annot_it; ++annot_it) {
655 if ( !annot_it->Seq_annot_IsSetDesc() ) {
659 annot_it->Seq_annot_GetDesc().Get()) {
660 if ( !(*it)->IsPub() ) {
690 for (
CSeqMap_CI smit(seqmap, &scope, mapsel); smit; ++smit) {
725 for ( ; fci; ++fci) {
762 const CPubdesc& pubdesc = sd.GetPub();
763 if ( s_FilterPubdesc(pubdesc, *m_Current) ) {
779 annot_it; ++annot_it) {
780 if ( !annot_it->Seq_annot_IsSetDesc() ) {
784 annot_it->Seq_annot_GetDesc().Get()) {
785 if ( !(*it)->IsPub() ) {
798 desc->SetPub(
const_cast<CPubdesc&
>((*it)->GetPub()));
807 for ( ; fci; ++fci) {
808 const CSeq_feat& sf = fci->GetOriginalFeature();
836 if (m_Current->GetSubmitBlock()) {
868 if( primary_seq_id ) {
870 if( potential_cds_seq ) {
871 cds_seq = potential_cds_seq;
881 if( (*coreSeqSet_iter)->IsSeq() ) {
882 const CSeq_id* coreSeqId = (*coreSeqSet_iter)->GetSeq().GetFirstId();
885 if( potential_cds_seq ) {
886 cds_seq = potential_cds_seq;
896 const CSeq_feat& feat = it->GetOriginalFeature();
915 if( ! it.GetSeq_entry_Handle().HasParentEntry() ) {
941 if (
ctx.UsingSeqEntryIndex() ) {
1026 if (
ctx.ShowGBBSource() ) {
1036 if(
ctx.ShowAnnotCommentAsCOMMENT() ) {
1053 if ( !com->Skip() ) {
1064 if ( !gsdb_comment->Skip() ) {
1079 if( setCommentsSeen.
find((*com_iter)->GetCommentList()) == setCommentsSeen.
end() ) {
1081 setCommentsSeen.
insert((*com_iter)->GetCommentList());
1082 newComments.push_back(*com_iter);
1099 for(
size_t idx = 0; idx < (
m_Comments.size() - 1); ++idx ) {
1121 (*it)->RemovePeriodAfterURL();
1131 if (gsdb && it !=
last) {
1162 static const TUnverifiedElem sc_unverified_map[] = {
1164 "source organism" },
1166 "sequence and/or annotation" },
1168 "sequence assembly" }
1173 vector<string> arr_type_string;
1174 ITERATE( TUnverifiedMap, map_iter, sc_UnverifiedMap ) {
1175 if( (
ctx.GetUnverifiedType() & map_iter->first) != 0 ) {
1176 arr_type_string.push_back(map_iter->second);
1181 if (arr_type_string.empty() && !is_contaminated) {
1186 if (!arr_type_string.empty()) {
1187 type_string +=
"GenBank staff is unable to verify ";
1188 for(
size_t ii = 0; ii < arr_type_string.size(); ++ii ) {
1191 }
else if( ii == (arr_type_string.size() - 1) ) {
1200 if (is_contaminated) {
1201 if (arr_type_string.size() > 0) {
1204 type_string +=
"GenBank staff has noted that the sequence(s) may be contaminated.";
1222 if (!is_unannotated) {
1226 string type_string =
"GenBank staff has not reviewed this submission because annotation was not provided.";
1245 item->SetNeedPeriod(
false);
1255 item->SetNeedPeriod(
false);
1263 string sAuthorizedAccess =
1276 string genome_build_number =
1282 const CSeq_id&
id = **id_iter;
1284 switch (
id.Which() ) {
1287 if (
ctx.IsRSCompleteGenomic() ) {
1288 if ( !genome_build_number.empty() &&
1289 !has_ref_track_status
1298 else if (
ctx.IsRSContig() ||
ctx.IsRSIntermedWGS() ) {
1299 if (
ctx.IsEncode() ) {
1304 }
else if ( !has_ref_track_status ) {
1312 if (
ctx.IsRSPredictedProtein() ||
1313 ctx.IsRSPredictedMRna() ||
1314 ctx.IsRSPredictedNCRna() ||
1320 if ( !
str.empty() ) {
1322 item->SetNeedPeriod(
false);
1327 if(
ctx.IsRSUniqueProt() ) {
1329 if( !
str.empty() ) {
1337 const CDbtag& dbtag =
id.GetGeneral();
1344 file_id = &(
id.GetGeneral().GetTag());
1350 local_id = &(
id.GetLocal());
1358 if (
ctx.IsTPA() ||
ctx.IsGED() ) {
1359 if (
ctx.Config().IsModeGBench() ||
ctx.Config().IsModeDump() ) {
1374 bool did_tpa =
false, did_ref_track =
false, did_genome =
false;
1384 if ( !
str.empty() ) {
1393 if ( !
ctx.Config().HideBankItComment() ) {
1396 if ( !
str.empty() ) {
1404 if ( !did_ref_track ) {
1409 if ( !
str.empty() ) {
1411 did_ref_track =
true;
1418 if ( !did_genome ) {
1429 if( (*hist_iter) && (*hist_iter)->IsGi() && (*hist_iter)->GetGi() == gi ) {
1447 if (
r.CanGetDate() && !
r.GetIds().empty() &&
1457 if (
r.CanGetDate() && !
r.GetIds().empty() &&
1473 if ( !
str.empty() ) {
1484 if ( !
ctx.IsWGSMaster() ||
ctx.GetWGSMasterName().empty() ) {
1490 if ( !
str.empty() ) {
1508 if ( !
str.empty() ) {
1525 if ( !
str.empty() ) {
1533 if (!
ctx.ShowGBBSource()) {
1538 const CGB_block& gbb = it->GetGenbank();
1540 string comment =
"Original source text: " + gbb.
GetSource();
1550 if (
ctx.UsePDBCompoundForComment()) {
1551 for (
auto id_handle :
ctx.GetHandle().GetId()) {
1610 chs1 = desc1->
Which();
1611 chs2 = desc2->
Which();
1619 const string& str1 = typ1.
GetStr();
1620 const string& str2 = typ2.
GetStr();
1621 bool issc1 = (
bool) (str1 ==
"StructuredComment");
1622 bool issc2 = (
bool) (str2 ==
"StructuredComment");
1623 if (issc1 && issc2) {
1632 return (val1 < val2);
1651 vector<CConstRef<CSeqdesc> > vdesc;
1656 vdesc.push_back(dsc);
1660 for (
size_t ii = 0; ii < vdesc.size(); ii++) {
1683 const list<string>* keywords =
nullptr;
1688 ITERATE (list<string>, kwd, *keywords) {
1707 if (
ctx.IsRefSeq() &&
1710 if ( !
str.empty() ) {
1735 for( ; annot_ci; ++annot_ci ) {
1741 if( ! descr.
IsSet() ) {
1762 if( ! firstGenAnnotSCAD &&
ctx.IsNcbiGenomes() &&
1765 ctx.GetHandle().IsSetInst_Ext() &&
1766 ctx.GetHandle().GetInst_Ext().IsDelta() &&
1767 ctx.GetHandle().GetInst_Ext().GetDelta().IsSet() )
1771 if( ! (*ext_iter)->IsLoc() ) {
1775 const CSeq_loc & loc = (*ext_iter)->GetLoc();
1787 if( firstGenAnnotSCAD ) {
1788 return firstGenAnnotSCAD;
1793 return firstGenAnnotSCAD;
1800 for( ; curr_entry_h ; curr_entry_h = curr_entry_h.
GetParentEntry() ) {
1804 for( ; annot_ci; ++annot_ci ) {
1810 if( ! annot_descr.
IsSet() ) {
1816 if( ! (*descr_iter)->IsUser() ) {
1820 const CUser_object & descr_user = (*descr_iter)->GetUser();
1891 from = ( from >= 1 ? from : 1 );
1923 bool loop = (
bool) (
ctx.IsSP() || (
ctx.IsCrossKingdom() &&
ctx.IsRSUniqueProt()));
1931 sf->SetObject(*dit);
1944 for (; smit; ++smit) {
1953 for (; src_it; ++src_it) {
2015 if (
ctx.IsProt() ) {
2037 if ( !
ctx.IsProt() ) {
2053 ctx.GetLocation().GetTotalRange(),
2085 bool need_to_normalize =
false;
2086 if( force_adding_nulls ) {
2088 need_to_normalize =
true;
2092 bool saw_multiple_non_nulls_in_a_row =
false;
2093 bool last_was_null =
true;
2094 bool any_null_seen =
false;
2095 for ( ; loc_ci ; ++loc_ci ) {
2097 last_was_null =
true;
2098 any_null_seen =
true;
2100 if( last_was_null ) {
2101 last_was_null =
false;
2104 saw_multiple_non_nulls_in_a_row =
true;
2109 need_to_normalize = ( any_null_seen && saw_multiple_non_nulls_in_a_row );
2112 if( ! need_to_normalize ) {
2124 for( ; loc_ci ; ++loc_ci ) {
2125 if( ! mix_data.empty() ) {
2126 mix_data.push_back( null_loc );
2130 mix_data.push_back( loc_piece );
2139 if ( srcs.size() < 2 ) {
2145 const CSeq_loc & focus_seq_loc = focus->GetLoc();
2147 unique_ptr<CSeq_loc> copyOfOriginalSeqLocOfFocus(
new CSeq_loc() );
2148 copyOfOriginalSeqLocOfFocus->Assign( focus_seq_loc );
2164 if (it != srcs.begin()) {
2170 if( focus->GetLoc().GetTotalRange().GetLength() == 0 ) {
2171 focus->SetLoc( *copyOfOriginalSeqLocOfFocus );
2172 copyOfOriginalSeqLocOfFocus.release();
2177 CSeq_loc_CI focus_loc_iter = focus->GetLoc().begin();
2178 if( focus_loc_iter != focus->GetLoc().end() ) {
2180 if( focus_loc_iter != focus->GetLoc().end() ) {
2183 focus->SetLoc( *new_focus );
2195 if (sfp1->WasDesc() && !sfp2->WasDesc()) {
2197 }
else if (!sfp1->WasDesc() && sfp2->WasDesc()) {
2223 if ( srcs.empty() ) {
2236 if (srcs.front()->IsFocus() && !srcs.front()->IsSynthetic()) {
2241 if ( srcs.front()->GetLoc().GetTotalRange().GetLength() == 0 &&
2257 if ( srcs.size() < 2 ) {
2265 bool sourcePubFuse =
false;
2271 switch( seqId->
Which() ) {
2285 sourcePubFuse =
true;
2292 sourcePubFuse =
true;
2310 if( ! sourcePubFuse ) {
2322 TSourceFeatSet::iterator item_outer = srcs.begin();
2323 for( ; item_outer != srcs.end(); ++item_outer ) {
2324 if( item_outer->IsNull() ) {
2327 TSourceFeatSet::iterator item_inner = item_outer;
2329 while ( item_inner != srcs.end() ) {
2330 if( item_inner->IsNull() ) {
2336 Seq_loc_Add((*item_outer)->GetLoc(), (*item_inner)->GetLoc(),
2339 (*item_outer)->SetLoc(*merged_loc);
2340 item_inner->Release();
2349 TSourceFeatSet::iterator copy_iter = srcs.begin();
2350 for( ; copy_iter != srcs.end(); ++copy_iter ) {
2351 if( ! copy_iter->IsNull() ) {
2352 newSrcs.push_back( *copy_iter );
2355 srcs.swap( newSrcs );
2378 if( taxname1 != taxname2 ) {
2385 if( comment1 != comment2 ) {
2412 if( orgmod1.size() != orgmod2.size() ) {
2416 if( ! equal( orgmod1.begin(), orgmod1.end(),
2431 if( db1.size() != db2.size() ) {
2435 if( ! equal( db1.begin(), db1.end(),
2450 if( subtype1.size() != subtype2.size() ) {
2454 if( ! equal( subtype1.begin(), subtype1.end(),
2462 const bool locations_overlap_or_touch =
2465 if( ! locations_overlap_or_touch ) {
2527 if (!
ctx.GetAnnotSelector()) {
2559 const bool showOutOfBoundsFeats =
ctx.Config().ShowOutOfBoundsFeats();
2560 const bool is_part =
ctx.IsPart();
2568 const bool is_small_genome_set =
ctx.GetSGS();
2571 if( showOutOfBoundsFeats && ! is_part && ! is_small_genome_set ) {
2582 bool any_piece_is_on_bioseq =
false;
2584 if( ! any_piece_is_on_bioseq ) {
2586 any_piece_is_on_bioseq =
true;
2598 if(
ctx.IsSeqIdInSameTopLevelSeqEntry(it.GetSeq_id()) ) {
2599 if( ! first_non_far ) {
2605 if( ! first_non_far || ! any_piece_is_on_bioseq ) {
2614 if( is_small_genome_set ) {
2616 const bool first_is_on_bioseq = (
2617 first == first_non_far &&
2620 if( first_is_on_bioseq ) {
2627 ctx.IsSeqIdInSameTopLevelSeqEntry(
first.GetSeq_id()) )
2634 if(
first != first_non_far &&
2655 CSeq_loc_CI part_to_check = ( bMinus ? first_non_far : last_non_far );
2657 const bool endsOnThisBioseq = ( part_to_check &&
2660 return endsOnThisBioseq;
2662 if( endsOnThisBioseq ) {
2704 return ctx.IsInGPS() && !
ctx.IsInNucProt() &&
ctx.Config().CopyCDSFromCDNA();
2711 if ( !
ctx.IsDelta() ) {
2715 if (
ctx.Config().HideGapFeatures()) {
2721 ERR_POST_X(1,
"Failed to create CSeqMap for gap iteration");
2725 int gapDepth =
ctx.Config().GetGapDepth();
2741 const static string kRegularGap =
"gap";
2742 const static string kAssemblyGap =
"assembly_gap";
2753 if( pSeqLiteral && pSeqLiteral->IsSetSeq_data() )
2755 const CSeq_data & seq_data = pSeqLiteral->GetSeq_data();
2756 if( seq_data.
IsGap() ) {
2757 pGap = &seq_data.
GetGap();
2767 const string & sType = gap_mod_text.
gap_type;
2771 const bool bIsAssemblyGap = ( ! sType.empty() || ! sEvidence.empty() );
2772 const string & sFeatName = ( bIsAssemblyGap ? kAssemblyGap : kRegularGap );
2775 new CGapItem(pos, end_pos,
ctx, sFeatName, sType, sEvidence) :
2776 new CGapItem(pos, end_pos,
ctx, sFeatName, sType, sEvidence,
2784 const vector<string>& evidence,
2785 bool isUnknownLength,
bool isAssemblyGap,
2788 const static string kRegularGap =
"gap";
2789 const static string kAssemblyGap =
"assembly_gap";
2792 const bool bIsAssemblyGap = ( ! gap_type.empty() || ! evidence.empty() );
2793 const string & sFeatName = ( bIsAssemblyGap ? kAssemblyGap : kRegularGap );
2796 new CGapItem(gap_start, gap_end,
ctx, sFeatName, gap_type, evidence) :
2797 new CGapItem(gap_start, gap_end,
ctx, sFeatName, gap_type, evidence,
2807 const bool feats_have_same_structure =
2812 if( ! feats_have_same_structure ) {
2819 if( f1_annot && f2_annot ) {
2820 if( (f1_annot == f2_annot) ||
2841 if (loc_label.size() > 100) {
2842 loc_label.replace(97,
NPOS,
"...");
2845 return desc.c_str();
2858 if (feat.
GetComment().find_last_not_of(
" ") !=
2862 const string& comment =
2865 typedef pair<const char*, CSeqFeatData::ESite>
TPair;
2891 static const size_t kMaxPair =
sizeof(
sc_Pairs) /
sizeof(
TPair);
2892 for (
size_t i = 0;
i < kMaxPair; ++
i) {
2918 f.SetData().SetRegion(x);
2945 if( featIsGap && (feat_start == gap_start) && (feat_end == gap_end) ) {
2950 if( feat_start > gap_start ) {
2962 temp_annot->
SetData().SetFtable().push_back(feat);
2982 return (name ==
"Annot:CDD" || name ==
"CDDSearch" || name ==
"CDD");
3055 gap_data.next_gap = 0;
3057 if (gap_data.num_gaps > 0 && !
ctx.Config().HideGapFeatures()) {
3063 bool load_cdd =
false;
3064 if (!
ctx.Config().HideCDDFeatures()) {
3065 switch (
ctx.Config().GetPolicy()) {
3070 load_cdd =
ctx.Config().ShowCDDFeatures();
3084 for (
CFeat_CI cds_it(hdl, sel); cds_it; ++cds_it) {
3085 cdd_ids.push_back(cds_it->GetProductId());
3092 gaps, &gap_data, showGapsOfSizeZero, bsx](
CFeatureIndex& sfx) {
3120 CSeq_id_Handle rna =
3121 sequence::GetIdHandle(original_feat.GetProduct(), &scope);
3122 CSeq_id_Handle prot =
3123 sequence::GetIdHandle(children.front().GetProduct(),
3126 CBioseq_Handle rna_bsh;
3127 CBioseq_Handle prot_bsh;
3128 GetResolveOrder(scope,
3149 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3159 if( feat_start > feat_end ) {
3160 feat_start -= loc_len;
3165 bool has_gap = gap_data.has_gap;
3166 int gap_start = gap_data.gap_start;
3167 int gap_end = gap_data.gap_end - 1;
3171 while (has_gap && gap_start < feat_start) {
3172 const bool noGapSizeProblem = ( showGapsOfSizeZero || (gap_start <= gap_end + 1) );
3174 if ( noGapSizeProblem && ! gapMatch ) {
3175 item.
Reset(
s_NewGapItem(gap_data.gap_start, gap_data.gap_end, gap_data.gap_length, gap_data.gap_type,
3176 gap_data.gap_evidence, gap_data.is_unknown_length, gap_data.is_assembly_gap,
ctx) );
3179 if (gap_data.next_gap < gap_data.num_gaps) {
3181 has_gap = gap_data.has_gap;
3182 gap_start = gap_data.gap_start;
3183 gap_end = gap_data.gap_end;
3185 gap_data.has_gap =
false;
3192 if (gap_end > feat_end) {
3194 }
else if (gap_data.next_gap < gap_data.num_gaps) {
3196 has_gap = gap_data.has_gap;
3197 gap_start = gap_data.gap_start;
3198 gap_end = gap_data.gap_end;
3200 gap_data.has_gap =
false;
3225 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3244 <<
" [" << e <<
"]; flatfile may be truncated");
3256 <<
" [" << e <<
"]");
3261 while (gap_data.has_gap) {
3262 const bool noGapSizeProblem = ( showGapsOfSizeZero || (gap_data.gap_start <= gap_data.gap_end) );
3263 if( noGapSizeProblem ) {
3264 item.
Reset(
s_NewGapItem(gap_data.gap_start, gap_data.gap_end, gap_data.gap_length, gap_data.gap_type,
3265 gap_data.gap_evidence, gap_data.is_unknown_length, gap_data.is_assembly_gap,
ctx) );
3268 if (gap_data.next_gap < gap_data.num_gaps) {
3271 gap_data.has_gap =
false;
3300 ctx.GetFeatTree().AddFeatures(it);
3321 vector<CMappedFeat> children =
3322 ctx.GetFeatTree().GetChildren(*it);
3323 if (children.size() == 1 &&
3324 children.front().IsSetProduct()) {
3355 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3365 if( feat_start > feat_end ) {
3366 feat_start -= loc_len;
3378 if ( feat_start >= gap_start ) {
3381 const bool noGapSizeProblem = ( showGapsOfSizeZero || (gap_start <= gap_end) );
3409 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3427 <<
" [" << e <<
"]; flatfile may be truncated");
3439 <<
" [" << e <<
"]");
3458 static size_t s_UniqueIdOffset = 0;
3483 seq->SetId().push_back(s_MakeUniqueId(scope));
3484 seq->SetInst().Assign(bsh.
GetInst());
3485 seq->SetInst().ResetSeq_data();
3486 seq->SetInst().ResetExt();
3489 element->SetLoc().Assign(loc);
3490 seq->SetInst().SetExt().SetDelta().Set().push_back(element);
3498 bool any_change =
false;
3500 new_loc->Assign(loc);
3503 const CSeq_id&
id = it.GetSeq_id();
3504 if (
id.
Equals(temporary)) {
3510 new_loc->
Assign(*it.MakeSeq_loc());
3520 seq_id.
Assign( *
ctx.GetHandle().GetSeqId() );
3525 old_loc.
SetInt().SetId( seq_id );
3526 old_loc.
SetInt().SetFrom( 0 );
3527 old_loc.
SetInt().SetTo( new_len - 1 );
3532 return slice_mapper;
3549 bool isWhole =
ctx.GetLocation().IsWhole();
3552 if (
ctx.GetMasterLocation()) {
3555 loc.
Assign(*
ctx.GetHandle().GetRangeSeq_loc(0, 0));
3561 TSeqPos start = fi->GetLocation().GetTotalRange().GetFrom();
3562 TSeqPos stop = fi->GetLocation().GetTotalRange().GetTo();
3565 if ( to >= start && from <= stop ) {
3574 const CSeq_feat& ft = fi->GetMappedFeature();
3622 ctx.GetFeatTree().AddFeatures(it);
3652 vector<CMappedFeat> children =
3653 ctx.GetFeatTree().GetChildren(*it);
3654 if (children.size() == 1 &&
3655 children.front().IsSetProduct()) {
3692 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3706 if( feat_start > feat_end ) {
3707 feat_start -= loc_len;
3719 if ( feat_start >= gap_start ) {
3722 const bool noGapSizeProblem = ( showGapsOfSizeZero || (gap_start <= gap_end) );
3723 if( noGapSizeProblem ) {
3764 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3782 <<
" [" << e <<
"]; flatfile may be truncated");
3794 <<
" [" << e <<
"]");
3840 ctx.GetFeatTree().AddFeatures(it);
3868 vector<CMappedFeat> children =
3869 ctx.GetFeatTree().GetChildren(*it);
3870 if (children.size() == 1 &&
3871 children.front().IsSetProduct()) {
3898 feat_loc = s_FixId(*feat_loc, *(
ctx.GetBioseqIds().front()), *(
delta->GetId().front()));
3912 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3936 if (( !
ctx.Config().IsFormatFTable() ||
ctx.Config().ShowFtablePeptides() )) {
3954 <<
" [" << e <<
"]; flatfile may be truncated");
3972 <<
" [" << e <<
"]");
3987 if(
ctx.GetLocation().IsWhole() ) {
3988 if (
ctx.UsingSeqEntryIndex() ) {
3994 if (
ctx.UsingSeqEntryIndex() ) {
4081 if (
ctx.GetAnnotSelector()) {
4082 selp = &
ctx.SetAnnotSelector();
4104 if (
ctx.GetMasterLocation()) {
4107 loc.
Assign(*
ctx.GetHandle().GetRangeSeq_loc(0, 0));
4111 if (
ctx.GetLocation().IsWhole()) {
4117 if (
ctx.IsProt() ) {
4150 if (cds_prod_seq_id) {
4151 CBioseq_Handle prod_bioseq_handle =
ctx.GetScope().GetBioseqHandle( *cds_prod_seq_id );
4152 if( prod_bioseq_handle ) {
4155 cds_prod->
SetInt().SetTo( bioseq_len - 1 );
4189 ctx.GetFeatTree().AddFeatures(it);
4217 if (
ctx.GetAnnotSelector()) {
4218 selp = &
ctx.SetAnnotSelector();
4240 if (
ctx.GetMasterLocation()) {
4243 loc.
Assign(*
ctx.GetHandle().GetRangeSeq_loc(0, 0));
4249 if (
ctx.IsProt() ) {
4282 if (cds_prod_seq_id) {
4283 CBioseq_Handle prod_bioseq_handle =
ctx.GetScope().GetBioseqHandle( *cds_prod_seq_id );
4284 if( prod_bioseq_handle ) {
4287 cds_prod->
SetInt().SetTo( bioseq_len - 1 );
4321 ctx.GetFeatTree().AddFeatures(it);
4357 if ( ! pDestLoc->
IsInt() ) {
4362 if ( ! srcLoc.
IsInt() ) {
4372 if ( ! featLoc.
IsInt() ) {
4418 if ( 3 + featInt.
GetTo() - destInt.
GetTo() < 6 ) {
4442 if (!feat.GetData().IsCdregion() || !feat.CanGetProduct()) {
4470 ctx.GetFeatTree().AddFeatures( it );
4477 for ( ; it; ++it ) {
4516 x_GiveOneResidueIntervalsBogusFuzz(*loc);
4520 x_RemoveBogusFuzzFromIntervals(*loc);
4523 if (!loc || loc->
IsNull()) {
4533 if( slice_mapper && loc ) {
4536 if( mapped_loc->
IsNull() ) {
4571 if (!feat.GetData().IsCdregion() || !feat.CanGetProduct()) {
4596 ctx.GetFeatTree().AddFeatures( it );
4603 for ( ; it; ++it ) {
4629 x_GiveOneResidueIntervalsBogusFuzz(*loc);
4633 x_RemoveBogusFuzzFromIntervals(*loc);
4636 if (!loc || loc->
IsNull()) {
4646 if( slice_mapper && loc ) {
4649 if( mapped_loc->
IsNull() ) {
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Seq-loc and seq-align mapper exceptions.
const string & GetTaxname(void) const
bool IsSetTaxname(void) const
CBioseq_Handle & GetHandle(void)
CScope & GetScope(void) const
@ fUnreviewed_Unannotated
SAnnotSelector & SetAnnotSelector(void)
const CFlatFileConfig & Config(void) const
const CSubmit_block * GetSubmitBlock(void) const
CSeq_inst::TRepr GetRepr(void) const
CSeq_id * GetPrimaryId(void)
const CSeq_entry_Handle & GetTopLevelEntry(void) const
TReferences & SetReferences(void)
void SetRefCache(vector< string > *rc)
const CSeq_loc & GetLocation(void) const
@ fUnverified_Contaminant
@ fUnverified_SequenceOrAnnotation
@ fUnverified_Misassembled
const vector< CRef< CGapIndex > > & GetGapIndices(void)
void GetSelector(SAnnotSelector &sel)
size_t IterateDescriptors(Fnc m)
size_t IterateFeatures(Fnc m)
const CSeq_loc & GetLoc(void) const
bool operator()(const CRef< CDbtag > &obj1, const CRef< CDbtag > &obj2)
bool Match(const CDbtag &dbt2) const
CSeqdesc::E_Choice GetType(void) const
const CSeqdesc & GetSeqDesc(void) const
static CRef< CSeq_feat > Apply(const CSeq_feat &feat, const CRange< TSeqPos > &range)
CSeq_feat_Handle GetSeqFeatHandle(void) const
const CMappedFeat GetMappedFeat(void) const
CConstRef< CSeq_loc > GetMappedLocation(void) const
const CMappedFeat & GetFeat(void) const
const CSeq_loc & GetLoc(void) const
bool IsPolicyInternal(void) const
bool IsStyleSegment(void) const
bool CopyGeneToCDNA(void) const
bool HideRemoteImpFeatures(void) const
bool HideGapFeatures(void) const
bool HideImpFeatures(void) const
bool DisableReferenceCache(void) const
bool ShowCDDFeatures(void) const
bool IsPolicyFtp(void) const
bool UseSeqEntryIndexer(void) const
bool ShowContigFeatures(void) const
bool HideEmptySource(void) const
bool ShowContigSources(void) const
bool ForGBRelease(void) const
bool IsPolicyGenomes(void) const
bool LatestGeneRIFs(void) const
bool IsFormatFTable(void) const
bool OnlyGeneRIFs(void) const
bool HideCDSProdFeatures(void) const
bool HideSNPFeatures(void) const
bool HideMiscFeatures(void) const
bool HideCDDFeatures(void) const
bool ShowFtablePeptides(void) const
bool IsModeRelease(void) const
bool IsModeDump(void) const
bool DisableAnnotRefs(void) const
bool HideExonFeatures(void) const
bool IsShownGenbankBlock(FGenbankBlocks fTGenbankBlocksMask) const
bool IsStyleNormal(void) const
bool IsStyleContig(void) const
bool HideGeneRIFs(void) const
bool HideIntronFeatures(void) const
const CRef< CSeqEntryIndex > GetSeqEntryIndex(void) const
bool UsingSeqEntryIndex(void) const
const CSeq_loc * GetLocation(void) const
void AddSection(TSection §ion)
void x_WGSComment(CBioseqContext &ctx) const
void x_RegionComments(CBioseqContext &ctx) const
virtual void Gather(CFlatFileContext &ctx, CFlatItemOStream &os, bool doNuc=true, bool doProt=true) const
void x_GatherFeatures(void) const
void x_GatherFeaturesOnWholeLocationIdx(const CSeq_loc &loc, SAnnotSelector &sel, CBioseqContext &ctx) const
void x_TSAComment(CBioseqContext &ctx) const
void x_GBBSourceComment(CBioseqContext &ctx) const
void x_FlushComments(void) const
void x_GatherComments(void) const
CRef< CFlatItemOStream > m_ItemOS
void x_NameComments(CBioseqContext &ctx) const
CRef< CBioseqContext > m_Current
virtual void x_GatherFeaturesOnLocation(const CSeq_loc &loc, SAnnotSelector &sel, CBioseqContext &ctx) const
void x_FeatComments(CBioseqContext &ctx) const
const ICanceled * m_pCanceledCallback
void x_GatherReferences(void) const
void x_MaplocComments(CBioseqContext &ctx) const
void x_GetFeatsOnCdsProductIdx(const CSeq_feat &feat, CBioseqContext &ctx, CRef< CSeq_loc_Mapper > slice_mapper, CConstRef< CFeatureItem > cdsFeatureItem=CConstRef< CFeatureItem >()) const
CBioseqContext::TReferences TReferences