NCBI C++ ToolKit
gap_trim.cpp
Go to the documentation of this file.

Go to the SVN repository for this file.

1 /* $Id: gap_trim.cpp 95788 2021-12-23 13:29:04Z stakhovv $
2  * ===========================================================================
3  *
4  * PUBLIC DOMAIN NOTICE
5  * National Center for Biotechnology Information
6  *
7  * This software/database is a "United States Government Work" under the
8  * terms of the United States Copyright Act. It was written as part of
9  * the author's official duties as a United States Government employee and
10  * thus cannot be copyrighted. This software/database is freely available
11  * to the public for use. The National Library of Medicine and the U.S.
12  * Government have not placed any restriction on its use or reproduction.
13  *
14  * Although all reasonable efforts have been taken to ensure the accuracy
15  * and reliability of the software and data, the NLM and the U.S.
16  * Government do not and cannot warrant the performance or results that
17  * may be obtained by using this software or data. The NLM and the U.S.
18  * Government disclaim all warranties, express or implied, including
19  * warranties of performance, merchantability or fitness for any particular
20  * purpose.
21  *
22  * Please cite the author in any work or product based on this material.
23  *
24  * ===========================================================================
25  *
26  * Author: Colleen Bollin
27  *
28  * File Description:
29  * For adjusting features for gaps
30  *
31  * ===========================================================================
32  */
33 #include <ncbi_pch.hpp>
34 #include <corelib/ncbistd.hpp>
38 #include <objmgr/util/feature.hpp>
39 #include <objmgr/seq_map.hpp>
40 #include <objmgr/seq_map_ci.hpp>
41 #include <objmgr/seq_vector.hpp>
42 
44 #include <objmgr/util/sequence.hpp>
53 #include <objects/seq/Seqdesc.hpp>
55 
59 
61 {
62  m_Feature = sf;
63  CollectGaps(sf.GetLocation(), sf.GetScope());
64 }
65 
66 
67 void CFeatGapInfo::CollectGaps(const CSeq_loc& feat_loc, CScope& scope)
68 {
69  m_Gaps.clear();
70  m_Unknown = false;
71  m_Known = false;
72  m_Ns = false;
73 
77  if (total_loc->IsSetStrand()) total_loc->ResetStrand();
78  CConstRef<CSeqMap> seq_map = CSeqMap::GetSeqMapForSeq_loc(*total_loc, &scope);
79 
80  // use CSeqVector for finding Ns
81  CSeqVector vec(*seq_map, scope, CBioseq_Handle::eCoding_Iupac);
82 
83  CSeqMap_CI seq_map_ci = seq_map->ResolvedRangeIterator(&scope,
84  0,
85  m_Stop - m_Start + 1,
86  eNa_strand_plus, //feat_loc.GetStrand(),
87  size_t(-1),
89 
90  for (; seq_map_ci; ++seq_map_ci)
91  {
92 
93  if (seq_map_ci.GetType() == CSeqMap::eSeqGap)
94  {
95  TSeqPos gap_start = m_Start + seq_map_ci.GetPosition();
96  TSeqPos gap_stop = gap_start + seq_map_ci.GetLength() - 1;
97  bool is_unknown = seq_map_ci.IsUnknownLength();
98  if (is_unknown) {
99  m_Unknown = true;
100  } else {
101  m_Known = true;
102  }
103  m_Gaps.push_back(TGapInterval(is_unknown ? eGapIntervalType_unknown : eGapIntervalType_known, pair<size_t, size_t>(gap_start, gap_stop)));
104  } else {
105  // look for Ns
106  TSeqPos map_start = seq_map_ci.GetPosition();
107  TSeqPos map_stop = map_start + seq_map_ci.GetLength() - 1;
108  bool in_ns = false;
109  TSeqPos gap_start;
110  for (TSeqPos i = map_start; i <= map_stop; ++i) {
111  char letter = vec[i];
112  if (letter == 'N') {
113  if (!in_ns) {
114  // start new gap
115  gap_start = m_Start + i;
116  in_ns = true;
117  }
118  } else if (in_ns) {
119  // end previous gap
120  TSeqPos gap_stop = m_Start + i - 1;
121  m_Gaps.push_back(TGapInterval(eGapIntervalType_n, pair<size_t, size_t>(gap_start, gap_stop)));
122  m_Ns = true;
123  in_ns = false;
124  }
125  }
126  if (in_ns) {
127  TSeqPos gap_stop = m_Start + map_stop;
128  m_Gaps.push_back(TGapInterval(eGapIntervalType_n, pair<size_t, size_t>(gap_start, gap_stop)));
129  m_Ns = true;
130  }
131  }
132  }
133 }
134 
135 
136 bool CFeatGapInfo::x_UsableInterval(const TGapInterval& interval, bool unknown_length, bool known_length, bool ns)
137 {
138  if (interval.first == eGapIntervalType_unknown && !unknown_length) {
139  return false;
140  } else if (interval.first == eGapIntervalType_known && !known_length) {
141  return false;
142  } else if (interval.first == eGapIntervalType_n && !ns) {
143  return false;
144  } else {
145  return true;
146  }
147 }
148 
149 
150 void CFeatGapInfo::CalculateRelevantIntervals(bool unknown_length, bool known_length, bool ns)
151 {
152  m_InsideGaps.clear();
153  m_LeftGaps.clear();
154  m_RightGaps.clear();
155 
156  if (!m_Gaps.empty()) {
157  // find left offset
158  size_t skip_left = 0;
159  TGapIntervalList::iterator it = m_Gaps.begin();
160  while (it != m_Gaps.end()) {
161  if (!x_UsableInterval(*it, unknown_length, known_length, ns)) {
162  break;
163  }
164 
165  if (m_LeftGaps.empty()) {
166  if (it->second.first <= m_Start && it->second.second >= m_Start) {
167  m_LeftGaps.push_back(it->second);
168  skip_left++;
169  } else {
170  break;
171  }
172  } else if (it->second.first <= m_LeftGaps.front().second + 1 && it->second.second >= m_LeftGaps.front().second) {
173  m_LeftGaps.front().second = it->second.second;
174  skip_left++;
175  } else {
176  break;
177  }
178  ++it;
179  }
180  TGapIntervalList::reverse_iterator rit = m_Gaps.rbegin();
181  size_t skip_right = 0;
182  while (rit != m_Gaps.rend()) {
183  if (!x_UsableInterval(*rit, unknown_length, known_length, ns)) {
184  break;
185  }
186  if (m_RightGaps.empty()) {
187  if (rit->second.first <= m_Stop && rit->second.second >= m_Stop) {
188  m_RightGaps.push_back(rit->second);
189  skip_right++;
190  } else {
191  break;
192  }
193  } else if (rit->second.first <= m_RightGaps.front().first - 1 && rit->second.second >= m_RightGaps.front().second) {
194  m_RightGaps.front().first = rit->second.first;
195  skip_right++;
196  } else {
197  break;
198  }
199  ++rit;
200  }
201  for (size_t offset = skip_left; offset < m_Gaps.size() - skip_right; offset++) {
202  if (x_UsableInterval(m_Gaps[offset], unknown_length, known_length, ns)) {
203  m_InsideGaps.push_back(m_Gaps[offset].second);
204  }
205  }
206  }
207 }
208 
209 
211 {
212  if (ShouldRemove()) {
213  return false;
214  } else if (!m_LeftGaps.empty() || !m_RightGaps.empty()) {
215  return true;
216  } else {
217  return false;
218  }
219 }
220 
221 
223 {
224  if (!m_InsideGaps.empty()) {
225  return true;
226  } else {
227  return false;
228  }
229 }
230 
231 
233 {
234  if (!m_LeftGaps.empty() && m_LeftGaps.front().second >= m_Stop) {
235  return true;
236  } else {
237  return false;
238  }
239 }
240 
241 
242 void CFeatGapInfo::Trim(CSeq_loc& loc, bool make_partial, CScope& scope)
243 {
244  CRef<CSeq_id> seqid(new CSeq_id);
245  seqid->Assign(*loc.GetId());
246  for (vector<pair<size_t, size_t> >::reverse_iterator b = m_LeftGaps.rbegin(); b != m_LeftGaps.rend(); ++b)
247  {
248  size_t start = b->first;
249  size_t stop = b->second;
250  CRef<CSeq_loc> loc2(new CSeq_loc());
252  if (make_partial)
254  edit::SplitLocationForGap(loc, *loc2, start, stop, seqid.GetPointer(), options);
255  if (loc2->Which() != CSeq_loc::e_not_set)
256  {
257  loc.Assign(*loc2);
258  }
259  }
260  for (vector<pair<size_t, size_t> >::reverse_iterator b = m_RightGaps.rbegin(); b != m_RightGaps.rend(); ++b)
261  {
262  size_t start = b->first;
263  size_t stop = b->second;
264  CRef<CSeq_loc> loc2(new CSeq_loc());
266  if (make_partial)
268  edit::SplitLocationForGap(loc, *loc2, start, stop, seqid.GetPointer(), options);
269  }
270 }
271 
272 
273 CFeatGapInfo::TLocList CFeatGapInfo::Split(const CSeq_loc& orig, bool in_intron, bool make_partial)
274 {
275  TLocList locs;
276  CRef<CSeq_loc> left_loc(new CSeq_loc());
277  left_loc->Assign(orig);
278  CRef<CSeq_id> seqid(new CSeq_id);
279  seqid->Assign(*orig.GetId());
280  for (vector<pair<size_t, size_t> >::reverse_iterator b = m_InsideGaps.rbegin(); b != m_InsideGaps.rend(); ++b)
281  {
282  size_t start = b->first;
283  size_t stop = b->second;
284  CRef<CSeq_loc> loc2(new CSeq_loc());
286  if (in_intron)
288  edit::SplitLocationForGap(*left_loc, *loc2, start, stop, seqid.GetPointer(), options);
289  if (loc2->GetId())
290  {
291  if (make_partial)
292  {
294  if (left_loc->Which() != CSeq_loc::e_not_set)
295  {
296  left_loc->SetPartialStop(true, eExtreme_Positional);
297  }
298  }
299  locs.push_back(loc2);
300  }
301  }
302  if (locs.size() > 0) {
303  if (left_loc->Which() != CSeq_loc::e_not_set)
304  {
305  locs.push_back(left_loc);
306  }
307  reverse(locs.begin(), locs.end());
308  }
309  return locs;
310 }
311 
312 
313 void CFeatGapInfo::x_AdjustOrigLabel(CSeq_feat& feat, size_t& id_offset, string& id_label, const string& qual)
314 {
315  if (!feat.IsSetQual()) {
316  return;
317  }
319  if ((*it)->IsSetQual() && (*it)->IsSetVal() &&
320  !NStr::IsBlank((*it)->GetVal()) &&
321  NStr::EqualNocase((*it)->GetQual(), qual) &&
322  (id_label.empty() || NStr::Equal((*it)->GetVal(), id_label) || NStr::Equal((*it)->GetVal(), id_label + "_1"))) {
323  if (id_label.empty()) {
324  id_label = (*it)->GetVal();
325  }
326  if (id_offset != 0)
327  (*it)->SetVal(id_label + "_" + NStr::NumericToString(id_offset));
328  id_offset++;
329  }
330  }
331 }
332 
333 CRef<CBioseq> CFeatGapInfo::AdjustProteinSeq(const CBioseq& seq, const CSeq_feat& feat, const CSeq_feat& orig_cds, CScope& scope)
334 {
335  if (!feat.IsSetProduct() || !feat.GetProduct().IsWhole() || !seq.IsAa()) {
336  return CRef<CBioseq>();
337  }
338 
339  TSeqPos orig_len = seq.GetInst().GetLength();
340 
341  string prot;
342  CSeqTranslator::Translate(feat, scope, prot);
343  if (prot.empty()) {
344  return CRef<CBioseq>();
345  }
346 
347  CRef<CBioseq> prot_seq(new CBioseq);
348  prot_seq->Assign(seq);
349  prot_seq->SetInst().ResetExt();
350  prot_seq->SetInst().SetRepr(CSeq_inst::eRepr_raw);
351  prot_seq->SetInst().SetSeq_data().SetIupacaa().Set(prot);
352  prot_seq->SetInst().SetLength(TSeqPos(prot.length()));
353  prot_seq->SetInst().SetMol(CSeq_inst::eMol_aa);
354  // fix sequence ID
355  const CSeq_id& feat_prod = feat.GetProduct().GetWhole();
356  if (!feat_prod.Equals(orig_cds.GetProduct().GetWhole())) {
357  NON_CONST_ITERATE(CBioseq::TId, id, prot_seq->SetId()) {
358  if ((*id)->Which() == feat_prod.Which()) {
359  bool do_replace = false;
360  if ((*id)->IsGeneral()) {
361  if ((*id)->GetGeneral().IsSetDb()) {
362  if (feat_prod.GetGeneral().IsSetDb() &&
363  NStr::Equal(feat_prod.GetGeneral().GetDb(), (*id)->GetGeneral().GetDb())) {
364  do_replace = true;
365  }
366  } else if (!feat_prod.GetGeneral().IsSetDb()) {
367  do_replace = true;
368  }
369  } else {
370  do_replace = true;
371  }
372  if (do_replace) {
373  (*id)->Assign(feat.GetProduct().GetWhole());
374  }
375  }
376  }
377  }
378  // fix molinfo
379  if (prot_seq->IsSetDescr()) {
380  NON_CONST_ITERATE(CBioseq::TDescr::Tdata, mi, prot_seq->SetDescr().Set()) {
381  if ((*mi)->IsMolinfo()) {
382  feature::AdjustProteinMolInfoToMatchCDS((*mi)->SetMolinfo(), feat);
383  }
384  }
385  }
386 
387  // also fix protein feature locations
388  if (prot_seq->IsSetAnnot()) {
389  CRef<CSeq_loc_Mapper> nuc2prot_mapper(
391  CRef<CSeq_loc> prot_shadow = nuc2prot_mapper->Map(feat.GetLocation());
392  TSeqPos start = prot_shadow->GetStart(eExtreme_Positional);
393  TSeqPos stop = prot_shadow->GetStop(eExtreme_Positional);
394  NON_CONST_ITERATE(CBioseq::TAnnot, ait, prot_seq->SetAnnot()) {
395  if ((*ait)->IsFtable()) {
396  CSeq_annot::TData::TFtable::iterator fit = (*ait)->SetData().SetFtable().begin();
397  while (fit != (*ait)->SetData().SetFtable().end()) {
398  CRef<CSeq_loc> new_prot_loc(new CSeq_loc());
399  new_prot_loc->Assign((*fit)->GetLocation());
400  bool complete_cut = false;
401  bool adjusted = false;
402  TSeqPos removed = 0;
403  if (start > 0) {
404  SeqLocAdjustForTrim(*new_prot_loc, 0, start - 1, orig_cds.GetProduct().GetId(), complete_cut, removed, adjusted);
405  }
406  if (!complete_cut && stop < orig_len - 1) {
407  SeqLocAdjustForTrim(*new_prot_loc, stop + 1, orig_len - 1, orig_cds.GetProduct().GetId(), complete_cut, removed, adjusted);
408  }
409  if (complete_cut) {
410  // out of range, drop this one
411  fit = (*ait)->SetData().SetFtable().erase(fit);
412  } else {
413  new_prot_loc->SetId(feat_prod);
415  if (!feat_prod.Equals(orig_cds.GetProduct().GetWhole())) {
416  // fix sequence ID
417  (*fit)->SetLocation().Assign(*new_prot_loc);
418  }
419  }
420  ++fit;
421  }
422  }
423  }
424  }
425 
426  return prot_seq;
427 }
428 
429 
431 {
432  if (!feat.IsSetData() || !feat.GetData().IsCdregion() ||
433  !feat.GetData().GetCdregion().IsSetCode_break()) {
434  return;
435  }
436  CCdregion& cdr = feat.SetData().SetCdregion();
437  CCdregion::TCode_break::iterator cit = cdr.SetCode_break().begin();
438  while (cit != cdr.SetCode_break().end()) {
439  bool do_remove = false;
440  if ((*cit)->IsSetLoc()) {
441  CRef<CSeq_loc> new_loc = feat.GetLocation().Intersect((*cit)->GetLoc(), 0, nullptr);
442  if (new_loc && !new_loc->IsEmpty() && !new_loc->IsNull()) {
443  (*cit)->SetLoc().Assign(*new_loc);
444  } else {
445  do_remove = true;
446  }
447  }
448  if (do_remove) {
449  cit = cdr.SetCode_break().erase(cit);
450  } else {
451  ++cit;
452  }
453  }
454  if (cdr.GetCode_break().empty()) {
455  cdr.ResetCode_break();
456  }
457 }
458 
459 
461 {
462  if (!feat.IsSetData() || !feat.GetData().IsRna() ||
463  !feat.GetData().GetRna().IsSetExt() ||
464  !feat.GetData().GetRna().GetExt().IsTRNA()) {
465  return;
466  }
467  CTrna_ext& trna = feat.SetData().SetRna().SetExt().SetTRNA();
468  if (!trna.IsSetAnticodon()) {
469  return;
470  }
471  CRef<CSeq_loc> new_loc = feat.GetLocation().Intersect(trna.GetAnticodon(), 0, nullptr);
472  if (new_loc && !new_loc->IsEmpty() && !new_loc->IsNull()) {
473  trna.SetAnticodon().Assign(*new_loc);
474  } else {
475  trna.ResetAnticodon();
476  }
477 }
478 
479 
481 {
484  feat.SetPartial(true);
485  }
486 }
487 
488 
489 // returns a list of features to replace the original
490 // if list is empty, feature should be removed
491 // list should only contain one element if split is not specified
492 // coding regions should be retranslated after split
493 vector<CRef<CSeq_feat> > CFeatGapInfo::AdjustForRelevantGapIntervals(bool make_partial, bool trim, bool split, bool in_intron, bool create_general_only)
494 {
495  CRef<CSeq_feat> new_feat(new CSeq_feat);
496  new_feat->Assign(*m_Feature.GetOriginalSeq_feat());
497  vector<CRef<CSeq_feat> > rval;
498 
499  if (!trim && !split) {
500  rval.push_back(new_feat);
501  return rval;
502  } else if (ShouldRemove()) {
503  return rval;
504  }
505 
506  if (trim && Trimmable()) {
507  Trim(new_feat->SetLocation(), make_partial, m_Feature.GetScope());
509  if (new_feat->GetData().IsCdregion()) {
510  // adjust frame
511  TSeqPos frame_adjust = sequence::LocationOffset(m_Feature.GetLocation(), new_feat->GetLocation(),
513  x_AdjustFrame(new_feat->SetData().SetCdregion(), frame_adjust);
514  }
515  }
516 
517  if (split) {
518  const string cds_gap_comment = "coding region disrupted by sequencing gap";
519 
520  vector<CRef<CSeq_loc> > locs = Split(new_feat->GetLocation(), in_intron, make_partial);
521  if (locs.size() > 0) {
522  // set comment
523  if (!new_feat->IsSetComment())
524  {
525  new_feat->SetComment(cds_gap_comment);
526  } else if (new_feat->IsSetComment() && new_feat->GetComment().find(cds_gap_comment) == string::npos)
527  {
528  string comment = new_feat->GetComment();
529  comment = comment + "; " + cds_gap_comment;
530  new_feat->SetComment(comment);
531  }
532 
533  // adjust transcript id if splitting
534  size_t transcript_id_offset = 0;
535  string transcript_id_label;
536  size_t protein_id_offset = 0;
537  string protein_id_label;
538  int protein_seqid_offset = 0;
539  string protein_seqid_label;
540 
541 
542  ITERATE(vector<CRef<CSeq_loc> >, lit, locs) {
543  CRef<CSeq_feat> split_feat(new CSeq_feat());
544  // copy from original
545  split_feat->Assign(*new_feat);
546  // with new location
547  split_feat->SetLocation().Assign(**lit);
549  //adjust transcript id
550  x_AdjustOrigLabel(*split_feat, transcript_id_offset, transcript_id_label, "orig_transcript_id");
551  x_AdjustOrigLabel(*split_feat, protein_id_offset, protein_id_label, "orig_protein_id");
552  if (split_feat->GetData().IsCdregion()) {
553  // adjust frame
554  TSeqPos frame_adjust = sequence::LocationOffset(new_feat->GetLocation(), split_feat->GetLocation(),
556  x_AdjustFrame(split_feat->SetData().SetCdregion(), frame_adjust);
557  // adjust product ID
558  if (split_feat->IsSetProduct() && split_feat->GetProduct().IsWhole() && protein_seqid_offset > 0) {
559  CBioseq_Handle product = m_Feature.GetScope().GetBioseqHandle(split_feat->GetProduct());
560  CRef<CSeq_id> new_id;
561  if (product)
562  {
563  vector<CRef<CSeq_id> > new_ids = GetNewProtIdFromExistingProt(product, protein_seqid_offset, protein_seqid_label);
564  new_id = FindBestChoice(new_ids, CSeq_id::Score);
565  }
566  else
567  {
569  new_id = GetNewProtId(bsh, protein_seqid_offset, protein_seqid_label, create_general_only);
570  }
571  split_feat->SetProduct().SetWhole().Assign(*new_id);
572  }
573  protein_seqid_offset++;
574  }
575  rval.push_back(split_feat);
576  }
577 
578  } else {
579  rval.push_back(new_feat);
580  }
581  } else {
582  rval.push_back(new_feat);
583  }
584  NON_CONST_ITERATE(vector<CRef<CSeq_feat> >, it, rval) {
585  x_AdjustCodebreaks(**it);
586  x_AdjustAnticodons(**it);
587  s_FixPartial(**it);
588  }
589  return rval;
590 }
591 
592 
593 void CFeatGapInfo::x_AdjustFrame(CCdregion& cdregion, TSeqPos frame_adjust)
594 {
595  frame_adjust = frame_adjust % 3;
596  if (frame_adjust == 0) {
597  return;
598  }
599 
600  CCdregion::TFrame orig_frame = cdregion.SetFrame();
601  if (orig_frame == CCdregion::eFrame_not_set) {
602  orig_frame = CCdregion::eFrame_one;
603  }
604 
605  if (frame_adjust == 1) {
606  if (orig_frame == CCdregion::eFrame_one) {
607  cdregion.SetFrame(CCdregion::eFrame_three); //
608  } else if (orig_frame == CCdregion::eFrame_two) {
609  cdregion.SetFrame(CCdregion::eFrame_one); //
610  } else if (orig_frame == CCdregion::eFrame_three) {
612  }
613  } else if (frame_adjust == 2) {
614  if (orig_frame == CCdregion::eFrame_one) {
616  } else if (orig_frame == CCdregion::eFrame_two) {
618  } else if (orig_frame == CCdregion::eFrame_three) {
619  cdregion.SetFrame(CCdregion::eFrame_one); //
620  }
621  }
622 }
623 
624 
626 {
627  TGappedFeatList gapped_feats;
628  while (feat_it) {
629  if (!feat_it->GetData().IsProt()) {
630  CRef<CFeatGapInfo> fgap(new CFeatGapInfo(*feat_it));
631  if (fgap->HasKnown() || fgap->HasUnknown() || fgap->HasNs()) {
632  gapped_feats.push_back(fgap);
633  }
634  }
635  ++feat_it;
636  }
637  return gapped_feats;
638 }
639 
640 
642 {
643  CBioseq_Handle orig_prot_handle = cds.GetScope().GetBioseqHandle(cds.GetProduct());
644  CConstRef<CBioseq> orig_prot = orig_prot_handle.GetCompleteBioseq();
645  CBioseq_set_Handle nph = orig_prot_handle.GetParentBioseq_set();
646  CBioseq_set_EditHandle npeh(nph);
647  // need to remove original first if not changing sequence IDs
648  CBioseq_EditHandle beh(orig_prot_handle);
649  beh.Remove();
650  ITERATE(vector<CRef<CSeq_feat> >, it, updates) {
651  CRef<CBioseq> new_prot = CFeatGapInfo::AdjustProteinSeq(*orig_prot, **it, *(cds.GetSeq_feat()), cds.GetScope());
652  if (new_prot) {
653  npeh.AttachBioseq(*new_prot);
654  }
655  }
656 
657  CSeq_annot_Handle sah = cds.GetAnnot();
659  CSeq_feat_EditHandle feh(cds);
660  if (updates.size() == 0) {
661  feh.Remove();
662  } else {
663  feh.Replace(*(updates[0]));
664  for (size_t i = 1; i < updates.size(); i++) {
665  saeh.AddFeat(*(updates[i]));
666  }
667  }
668 }
669 
670 
671 
672 // for fixing feature IDs and feature ID xrefs
674 {
675  if (feat.IsSetId() && feat.GetId().IsLocal() &&
676  feat.GetId().GetLocal().IsId()) {
677  feat.SetId().SetLocal().SetId(next_id);
678  ++next_id;
679  }
680 
681 }
682 
683 
685 {
686  for (size_t i = 1; i < updates.size(); i++) {
687  FixFeatureIdsForUpdates(*(updates[i]), next_id);
688  }
689 }
690 
691 
692 bool s_IsRelated(const CSeq_feat& f1, CObject_id::TId search)
693 {
694  if (!f1.IsSetXref()) {
695  return false;
696  }
697  ITERATE(CSeq_feat::TXref, xit, f1.GetXref()) {
698  if ((*xit)->IsSetId() && (*xit)->GetId().IsLocal() &&
699  (*xit)->GetId().GetLocal().IsId() &&
700  (*xit)->GetId().GetLocal().GetId() == search) {
701  return true;
702  }
703  }
704  return false;
705 }
706 
707 
708 bool s_IsRelated(const CSeq_feat& f1, const CSeq_feat& f2)
709 {
710  if (f1.IsSetId() && f1.GetId().IsLocal() && f1.GetId().GetLocal().IsId() &&
711  s_IsRelated(f2, f1.GetId().GetLocal().GetId())) {
712  return true;
713  } else if (f2.IsSetId() && f2.GetId().IsLocal() && f2.GetId().GetLocal().IsId() &&
714  s_IsRelated(f1, f2.GetId().GetLocal().GetId())) {
715  return true;
716  } else {
717  return false;
718  }
719 }
720 
721 
723 {
724  return s_IsRelated(*(GetFeature().GetSeq_feat()), *(other.GetFeature().GetSeq_feat()));
725 }
726 
727 
728 
730 {
731  if (orig_id > 0 && new_id > 0 && f.IsSetXref()) {
732  NON_CONST_ITERATE(CSeq_feat::TXref, xit, f.SetXref()) {
733  if ((*xit)->IsSetId() && (*xit)->GetId().IsLocal() &&
734  (*xit)->GetId().GetLocal().IsId() &&
735  (*xit)->GetId().GetLocal().GetId() == orig_id) {
736  (*xit)->SetId().SetLocal().SetId(new_id);
737  }
738  }
739  }
740 }
741 
742 
743 void FixFeatureIdsForUpdatePair(vector<CRef<CSeq_feat> >& updates1, vector<CRef<CSeq_feat> >& updates2)
744 {
745  if (updates1.size() != updates2.size()) {
746  // can't fix if lists are different lengths
747  return;
748  }
749  if (updates1.size() < 2) {
750  // nothing to fix if there's only one object
751  }
752  vector<CRef<CSeq_feat> >::iterator u1 = updates1.begin();
753  vector<CRef<CSeq_feat> >::iterator u2 = updates2.begin();
754 
755  CObject_id::TId orig_id_1 = 0;
756  if ((*u1)->IsSetId() && (*u1)->GetId().IsLocal() && (*u1)->GetId().GetLocal().IsId()) {
757  orig_id_1 = (*u1)->GetId().GetLocal().GetId();
758  }
759  CObject_id::TId orig_id_2 = 0;
760  if ((*u2)->IsSetId() && (*u2)->GetId().IsLocal() && (*u2)->GetId().GetLocal().IsId()) {
761  orig_id_2 = (*u2)->GetId().GetLocal().GetId();
762  }
763  u1++;
764  u2++;
765 
766  while (u1 != updates1.end() && u2 != updates2.end()) {
767  CObject_id::TId new_id_1 = 0;
768  if ((*u1)->IsSetId() && (*u1)->GetId().IsLocal() && (*u1)->GetId().GetLocal().IsId()) {
769  new_id_1 = (*u1)->GetId().GetLocal().GetId();
770  }
771  CObject_id::TId new_id_2 = 0;
772  if ((*u2)->IsSetId() && (*u2)->GetId().IsLocal() && (*u2)->GetId().GetLocal().IsId()) {
773  new_id_2 = (*u2)->GetId().GetLocal().GetId();
774  }
775  s_ReplaceFeatureIdXref(**u1, orig_id_2, new_id_2);
776  s_ReplaceFeatureIdXref(**u2, orig_id_1, new_id_1);
777  ++u1;
778  ++u2;
779  }
780 }
781 
782 
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Positional
numerical value
Definition: Na_strand.hpp:63
@ eExtreme_Biological
5' and 3'
Definition: Na_strand.hpp:62
User-defined methods of the data storage class.
bool AdjustProteinFeaturePartialsToMatchCDS(CSeq_feat &new_prot, const CSeq_feat &cds)
AdjustProteinFeaturePartialsToMatchCDS A function to change an existing MolInfo to match a coding reg...
Definition: cds_fix.cpp:398
CRef< objects::CSeq_id > GetNewProtId(objects::CBioseq_Handle bsh, int &offset, string &id_label, bool general_only)
vector< CRef< objects::CSeq_id > > GetNewProtIdFromExistingProt(objects::CBioseq_Handle bsh, int &offset, string &id_label)
CBioseq_EditHandle –.
CBioseq_Handle –.
CBioseq_set_EditHandle –.
CBioseq_set_Handle –.
bool IsAa(void) const
Definition: Bioseq.cpp:350
CCdregion –.
Definition: Cdregion.hpp:66
pair< EGapIntervalType, pair< size_t, size_t > > TGapInterval
Definition: gap_trim.hpp:99
CSeq_feat_Handle m_Feature
Definition: gap_trim.hpp:115
bool m_Unknown
Definition: gap_trim.hpp:112
static void x_AdjustFrame(CCdregion &cdregion, TSeqPos frame_adjust)
Definition: gap_trim.cpp:593
bool Splittable() const
Definition: gap_trim.cpp:222
bool x_UsableInterval(const TGapInterval &interval, bool unknown_length, bool known_length, bool ns)
Definition: gap_trim.cpp:136
TIntervalList m_InsideGaps
Definition: gap_trim.hpp:104
void CalculateRelevantIntervals(bool unknown_length, bool known_length, bool ns=false)
Definition: gap_trim.cpp:150
bool IsRelatedByCrossRef(const CFeatGapInfo &other) const
Definition: gap_trim.cpp:722
void x_AdjustCodebreaks(CSeq_feat &feat)
Definition: gap_trim.cpp:430
@ eGapIntervalType_unknown
Definition: gap_trim.hpp:94
@ eGapIntervalType_known
Definition: gap_trim.hpp:95
@ eGapIntervalType_n
Definition: gap_trim.hpp:96
vector< CRef< CSeq_feat > > AdjustForRelevantGapIntervals(bool make_partial, bool trim, bool split, bool in_intron, bool create_general_only=false)
Definition: gap_trim.cpp:493
void x_AdjustOrigLabel(CSeq_feat &feat, size_t &id_offset, string &id_label, const string &qual)
Definition: gap_trim.cpp:313
void CollectGaps(const CSeq_loc &feat_loc, CScope &scope)
Definition: gap_trim.cpp:67
TSeqPos m_Stop
Definition: gap_trim.hpp:109
void x_AdjustAnticodons(CSeq_feat &feat)
Definition: gap_trim.cpp:460
bool ShouldRemove() const
Definition: gap_trim.cpp:232
TIntervalList m_LeftGaps
Definition: gap_trim.hpp:105
void Trim(CSeq_loc &loc, bool make_partial, CScope &scope)
Definition: gap_trim.cpp:242
bool Trimmable() const
Definition: gap_trim.cpp:210
TIntervalList m_RightGaps
Definition: gap_trim.hpp:106
vector< CRef< CSeq_loc > > TLocList
Definition: gap_trim.hpp:82
TGapIntervalList m_Gaps
Definition: gap_trim.hpp:101
TSeqPos m_Start
Definition: gap_trim.hpp:108
CSeq_feat_Handle GetFeature() const
Definition: gap_trim.hpp:86
static CRef< CBioseq > AdjustProteinSeq(const CBioseq &seq, const CSeq_feat &feat, const CSeq_feat &orig_cds, CScope &scope)
Definition: gap_trim.cpp:333
TLocList Split(const CSeq_loc &orig, bool in_intron, bool make_partial)
Definition: gap_trim.cpp:273
CFeat_CI –.
Definition: feat_ci.hpp:64
CScope –.
Definition: scope.hpp:92
Iterator over CSeqMap.
Definition: seq_map_ci.hpp:252
CSeqVector –.
Definition: seq_vector.hpp:65
CSeq_annot_Handle –.
CSeq_feat_EditHandle –.
CSeq_feat_Handle –.
namespace ncbi::objects::
Definition: Seq_feat.hpp:58
CSeq_loc_Mapper –.
Include a standard set of the NCBI C++ Toolkit most basic headers.
int offset
Definition: replacements.h:160
bool s_IsRelated(const CSeq_feat &f1, CObject_id::TId search)
Definition: gap_trim.cpp:692
TGappedFeatList ListGappedFeatures(CFeat_CI &feat_it, CScope &scope)
Definition: gap_trim.cpp:625
void s_ReplaceFeatureIdXref(CSeq_feat &f, CObject_id::TId orig_id, CObject_id::TId new_id)
Definition: gap_trim.cpp:729
void s_FixPartial(CSeq_feat &feat)
Definition: gap_trim.cpp:480
void ProcessForTrimAndSplitUpdates(CSeq_feat_Handle cds, vector< CRef< CSeq_feat > > updates)
Definition: gap_trim.cpp:641
void FixFeatureIdsForUpdatePair(vector< CRef< CSeq_feat > > &updates1, vector< CRef< CSeq_feat > > &updates2)
Definition: gap_trim.cpp:743
void FixFeatureIdsForUpdates(CSeq_feat &feat, CObject_id::TId &next_id)
Definition: gap_trim.cpp:673
vector< CRef< CFeatGapInfo > > TGappedFeatList
Definition: gap_trim.hpp:124
unsigned int TSeqPos
Type for sequence locations and lengths.
Definition: ncbimisc.hpp:875
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
Definition: ncbimisc.hpp:815
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
Definition: ncbimisc.hpp:822
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Set object to copy of another one.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
Definition: Seq_id.cpp:318
static int Score(const CRef< CSeq_id > &id)
Wrappers for use with FindBestChoice from <corelib/ncbiutil.hpp>
Definition: Seq_id.hpp:772
bool IsPartialStart(ESeqLocExtremes ext) const
check start or stop of location for e_Lim fuzz
Definition: Seq_loc.cpp:3222
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
Definition: Seq_loc.cpp:337
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
Definition: Seq_loc.cpp:3474
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
Definition: Seq_loc.cpp:915
bool IsSetStrand(EIsSetStrand flag=eIsSetStrand_Any) const
Check if strand is set for any/all part(s) of the seq-loc depending on the flag.
Definition: Seq_loc.cpp:858
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
Definition: Seq_loc.hpp:941
void ResetStrand(void)
Reset the strand on this location.
Definition: Seq_loc.cpp:5221
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
Definition: Seq_loc.cpp:3280
CRef< CSeq_loc > Intersect(const CSeq_loc &other, TOpFlags flags, ISynonymMapper *syn_mapper) const
Find the intersection with the seq-loc, merge/sort resulting ranges depending on flags.
Definition: Seq_loc.cpp:5183
void SetPartialStop(bool val, ESeqLocExtremes ext)
Definition: Seq_loc.cpp:3313
bool IsPartialStop(ESeqLocExtremes ext) const
Definition: Seq_loc.cpp:3251
TSeqPos GetStop(ESeqLocExtremes ext) const
Definition: Seq_loc.cpp:963
@ fMerge_SingleRange
Definition: Seq_loc.hpp:332
bool AdjustProteinMolInfoToMatchCDS(CMolInfo &molinfo, const CSeq_feat &cds)
AdjustProteinMolInfoToMatchCDS A function to change an existing MolInfo to match a coding region.
Definition: feature.cpp:4024
TSeqPos LocationOffset(const CSeq_loc &outer, const CSeq_loc &inner, EOffsetType how=eOffset_FromStart, CScope *scope=0)
returns (TSeqPos)-1 if the locations don't overlap
CRef< CSeq_loc > Seq_loc_Merge(const CSeq_loc &loc, CSeq_loc::TOpFlags flags, CScope *scope)
Merge ranges in the seq-loc.
@ eOffset_FromStart
For positive-orientation strands, start = left and end = right; for reverse-orientation strands,...
static void Translate(const string &seq, string &prot, const CGenetic_code *code, bool include_stop=true, bool remove_trailing_X=false, bool *alt_start=NULL, bool is_5prime_complete=true, bool is_3prime_complete=true)
Translate a string using a specified genetic code.
Definition: sequence.cpp:4095
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
Definition: scope.cpp:95
@ eLocationToProduct
Map from the feature's location to product.
CConstRef< CBioseq > GetCompleteBioseq(void) const
Get the complete bioseq.
const CSeq_annot_Handle & GetAnnot(void) const
Get handle to seq-annot for this feature.
CBioseq_set_Handle GetParentBioseq_set(void) const
Return a handle for the parent Bioseq-set, or null handle.
virtual CConstRef< CSeq_feat > GetSeq_feat(void) const
CBioseq_EditHandle AttachBioseq(CBioseq &seq, int index=-1) const
Attach a bioseq.
const CSeqFeatData & GetData(void) const
void Remove(void) const
Remove the feature from Seq-annot.
CSeq_feat_EditHandle AddFeat(const CSeq_feat &new_obj) const
virtual const CSeq_loc & GetProduct(void) const
virtual const CSeq_loc & GetLocation(void) const
void Remove(ERemoveMode mode=eRemoveSeq_entry) const
CSeq_annot_EditHandle GetEditHandle(void) const
Get 'edit' version of handle.
CScope & GetScope(void) const
Get scope this handle belongs to.
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
void Replace(const CSeq_feat &new_feat) const
Replace the feature with new Seq-feat object.
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
CSeqMap::ESegmentType GetType(void) const
Definition: seq_map_ci.hpp:651
bool IsUnknownLength(void) const
return true if current segment is a gap of unknown length
Definition: seq_map_ci.cpp:302
TSeqPos GetPosition(void) const
return position of current segment in sequence
Definition: seq_map_ci.hpp:665
TSeqPos GetLength(void) const
return length of current segment
Definition: seq_map_ci.hpp:672
static CConstRef< CSeqMap > GetSeqMapForSeq_loc(const CSeq_loc &loc, CScope *scope)
Definition: seq_map.cpp:1162
CSeqMap_CI ResolvedRangeIterator(CScope *scope, TSeqPos from, TSeqPos length, ENa_strand strand=eNa_strand_plus, size_t maxResolve=size_t(-1), TFlags flags=fDefaultFlags) const
Iterate segments in the range with specified strand coordinates.
Definition: seq_map.cpp:868
@ fFindGap
Definition: seq_map.hpp:130
@ fFindData
Definition: seq_map.hpp:129
@ eSeqGap
gap
Definition: seq_map.hpp:97
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
Definition: ncbiobj.hpp:998
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define END_SCOPE(ns)
End the previously defined scope.
Definition: ncbistl.hpp:75
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
#define BEGIN_SCOPE(ns)
Define a new scope.
Definition: ncbistl.hpp:72
static bool IsBlank(const CTempString str, SIZE_TYPE pos=0)
Check if a string is blank (has no text).
Definition: ncbistr.cpp:106
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Definition: ncbistr.hpp:5353
static enable_if< is_arithmetic< TNumeric >::value||is_convertible< TNumeric, Int8 >::value, string >::type NumericToString(TNumeric value, TNumToStringFlags flags=0, int base=10)
Convert numeric value to string.
Definition: ncbistr.hpp:673
static bool Equal(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2, ECase use_case=eCase)
Test for equality of a substring with another string.
Definition: ncbistr.hpp:5384
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
Definition: ncbiutil.hpp:250
bool IsSetDb(void) const
name of database or system Check if a value has been assigned to Db data member.
Definition: Dbtag_.hpp:208
bool IsId(void) const
Check if variant Id is selected.
Definition: Object_id_.hpp:264
const TDb & GetDb(void) const
Get the Db member data.
Definition: Dbtag_.hpp:220
TId GetId(void) const
Get the variant data.
Definition: Object_id_.hpp:270
const TAnticodon & GetAnticodon(void) const
Get the Anticodon member data.
Definition: Trna_ext_.hpp:649
bool IsTRNA(void) const
Check if variant TRNA is selected.
Definition: RNA_ref_.hpp:498
bool IsSetAnticodon(void) const
location of anticodon Check if a value has been assigned to Anticodon data member.
Definition: Trna_ext_.hpp:637
void SetAnticodon(TAnticodon &value)
Assign a value to Anticodon data member.
Definition: Trna_ext_.cpp:158
bool IsSetExt(void) const
generic fields for ncRNA, tmRNA, miscRNA Check if a value has been assigned to Ext data member.
Definition: RNA_ref_.hpp:604
void ResetAnticodon(void)
Reset Anticodon data member.
Definition: Trna_ext_.cpp:153
const TExt & GetExt(void) const
Get the Ext member data.
Definition: RNA_ref_.hpp:616
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
Definition: Seq_feat_.hpp:1037
bool IsSetData(void) const
the specific data Check if a value has been assigned to Data data member.
Definition: Seq_feat_.hpp:913
bool IsSetQual(void) const
qualifiers Check if a value has been assigned to Qual data member.
Definition: Seq_feat_.hpp:1135
bool IsProt(void) const
Check if variant Prot is selected.
void SetLocation(TLocation &value)
Assign a value to Location data member.
Definition: Seq_feat_.cpp:131
bool IsCdregion(void) const
Check if variant Cdregion is selected.
void SetComment(const TComment &value)
Assign a value to Comment data member.
Definition: Seq_feat_.hpp:1058
void ResetCode_break(void)
Reset Code_break data member.
Definition: Cdregion_.cpp:80
void SetPartial(TPartial value)
Assign a value to Partial data member.
Definition: Seq_feat_.hpp:971
void SetProduct(TProduct &value)
Assign a value to Product data member.
Definition: Seq_feat_.cpp:110
const TId & GetId(void) const
Get the Id member data.
Definition: Seq_feat_.hpp:904
const TLocal & GetLocal(void) const
Get the variant data.
Definition: Feat_id_.cpp:134
bool IsSetXref(void) const
cite other relevant features Check if a value has been assigned to Xref data member.
Definition: Seq_feat_.hpp:1296
const TLocation & GetLocation(void) const
Get the Location member data.
Definition: Seq_feat_.hpp:1117
bool IsLocal(void) const
Check if variant Local is selected.
Definition: Feat_id_.hpp:353
const TData & GetData(void) const
Get the Data member data.
Definition: Seq_feat_.hpp:925
void SetId(TId &value)
Assign a value to Id data member.
Definition: Seq_feat_.cpp:73
void SetData(TData &value)
Assign a value to Data data member.
Definition: Seq_feat_.cpp:94
TCode_break & SetCode_break(void)
Assign a value to Code_break data member.
Definition: Cdregion_.hpp:739
const TCdregion & GetCdregion(void) const
Get the variant data.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
Definition: Seq_feat_.hpp:892
const TProduct & GetProduct(void) const
Get the Product member data.
Definition: Seq_feat_.hpp:1096
const TComment & GetComment(void) const
Get the Comment member data.
Definition: Seq_feat_.hpp:1049
const TXref & GetXref(void) const
Get the Xref member data.
Definition: Seq_feat_.hpp:1308
vector< CRef< CSeqFeatXref > > TXref
Definition: Seq_feat_.hpp:122
vector< CRef< CGb_qual > > TQual
Definition: Seq_feat_.hpp:117
const TRna & GetRna(void) const
Get the variant data.
TQual & SetQual(void)
Assign a value to Qual data member.
Definition: Seq_feat_.hpp:1153
const TCode_break & GetCode_break(void) const
Get the Code_break member data.
Definition: Cdregion_.hpp:733
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
Definition: Seq_feat_.hpp:1084
bool IsRna(void) const
Check if variant Rna is selected.
void SetFrame(TFrame value)
Assign a value to Frame data member.
Definition: Cdregion_.hpp:540
bool IsSetCode_break(void) const
individual exceptions Check if a value has been assigned to Code_break data member.
Definition: Cdregion_.hpp:721
@ eFrame_not_set
not set, code uses one
Definition: Cdregion_.hpp:95
@ eFrame_three
reading frame
Definition: Cdregion_.hpp:98
bool IsEmpty(void) const
Check if variant Empty is selected.
Definition: Seq_loc_.hpp:516
const TWhole & GetWhole(void) const
Get the variant data.
Definition: Seq_loc_.cpp:172
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_loc_.hpp:475
E_Choice Which(void) const
Which variant is currently selected.
Definition: Seq_id_.hpp:746
const TGeneral & GetGeneral(void) const
Get the variant data.
Definition: Seq_id_.cpp:369
bool IsWhole(void) const
Check if variant Whole is selected.
Definition: Seq_loc_.hpp:522
bool IsNull(void) const
Check if variant Null is selected.
Definition: Seq_loc_.hpp:504
@ eNa_strand_plus
Definition: Na_strand_.hpp:66
@ e_not_set
No variant selected.
Definition: Seq_loc_.hpp:97
list< CRef< CSeqdesc > > Tdata
Definition: Seq_descr_.hpp:91
TId & SetId(void)
Assign a value to Id data member.
Definition: Bioseq_.hpp:296
const TInst & GetInst(void) const
Get the Inst member data.
Definition: Bioseq_.hpp:336
bool IsSetAnnot(void) const
Check if a value has been assigned to Annot data member.
Definition: Bioseq_.hpp:354
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
Definition: Bioseq_.hpp:372
TLength GetLength(void) const
Get the Length member data.
Definition: Seq_inst_.hpp:659
list< CRef< CSeq_id > > TId
Definition: Bioseq_.hpp:94
void SetInst(TInst &value)
Assign a value to Inst data member.
Definition: Bioseq_.cpp:86
bool IsSetDescr(void) const
descriptors Check if a value has been assigned to Descr data member.
Definition: Bioseq_.hpp:303
void SetDescr(TDescr &value)
Assign a value to Descr data member.
Definition: Bioseq_.cpp:65
list< CRef< CSeq_annot > > TAnnot
Definition: Bioseq_.hpp:97
@ eRepr_raw
continuous sequence
Definition: Seq_inst_.hpp:94
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
int i
@ eSplitLocOption_split_in_intron
Definition: loc_edit.hpp:163
@ eSplitLocOption_make_partial
Definition: loc_edit.hpp:161
@ eSplitLocOption_split_in_exon
Definition: loc_edit.hpp:162
void SplitLocationForGap(CSeq_loc &loc1, CSeq_loc &loc2, size_t start, size_t stop, const CSeq_id *seqid, unsigned int options=eSplitLocOption_make_partial|eSplitLocOption_split_in_exon)
Definition: loc_edit.cpp:1833
void SeqLocAdjustForTrim(CSeq_loc &loc, TSeqPos from, TSeqPos to, const CSeq_id *seqid, bool &bCompleteCut, TSeqPos &trim5, bool &bAdjusted)
Definition: loc_edit.cpp:1489
Definition: fix_pub.hpp:45
double f(double x_, const double &y_)
Definition: njn_root.hpp:188
void split(std::vector< std::string > *strVec, const std::string &str_, const std::string &split_)
static Uint4 letter(char c)
Modified on Tue Apr 23 07:37:42 2024 by modify_doxy.py rev. 669887