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

Go to the SVN repository for this file.

1 /*
2 * $Id: alntext.cpp 100759 2023-09-07 19:18:41Z mozese2 $
3 *
4 * =========================================================================
5 *
6 * PUBLIC DOMAIN NOTICE
7 * National Center for Biotechnology Information
8 *
9 * This software/database is a "United States Government Work" under the
10 * terms of the United States Copyright Act. It was written as part of
11 * the author's official duties as a United States Government employee and
12 * thus cannot be copyrighted. This software/database is freely available
13 * to the public for use. The National Library of Medicine and the U.S.
14 * Government have not placed any restriction on its use or reproduction.
15 *
16 * Although all reasonable efforts have been taken to ensure the accuracy
17 * and reliability of the software and data, the NLM and the U.S.
18 * Government do not and cannt warrant the performance or results that
19 * may be obtained by using this software or data. The NLM and the U.S.
20 * Government disclaim all warranties, express or implied, including
21 * warranties of performance, merchantability or fitness for any particular
22 * purpose.
23 *
24 * Please cite the author in any work or product based on this material.
25 *
26 * =========================================================================
27 *
28 * Author: Eyal Mozes
29 *
30 * =========================================================================
31 */
32 
33 #include <ncbi_pch.hpp>
34 #include <corelib/ncbistd.hpp>
35 
41 #include <objmgr/util/sequence.hpp>
42 #include <objmgr/seq_vector.hpp>
44 
47 
48 const char CProteinAlignText::GAP_CHAR='-'; // used in dna and protein text
49 const char CProteinAlignText::SPACE_CHAR=' '; // translation and protein
50 const char CProteinAlignText::INTRON_CHAR='.'; // protein
53 
54 // used in match text
59 const char CProteinAlignText::MATCH_CHAR='|';
60 const char CProteinAlignText::POSIT_CHAR='+';
61 
62 
63 void CProteinAlignText::AddSpliceText(CSeqVector_CI& genomic_ci, int& nuc_prev, char match)
64 {
65  AddDNAText(genomic_ci,nuc_prev,2);
67  m_match.append((SIZE_TYPE)2,match);
68  m_protein.append((SIZE_TYPE)2,INTRON_CHAR);
69 }
70 
71 void CProteinAlignText::AddDNAText(CSeqVector_CI& genomic_ci, int& nuc_prev, int len)
72 {
73  string buf;
74  genomic_ci.GetSeqData(buf,len);
75  nuc_prev +=len;
76  m_dna.append(buf);
77 }
78 
79 void CProteinAlignText::AddProtText(CSeqVector_CI& protein_ci, int& prot_prev, int len)
80 {
81  m_protein.reserve(m_protein.size()+len);
82 
83  int phase = (prot_prev+1)%3;
84 
85  if (phase!=0) {
86  size_t prev_not_intron_pos = m_protein.find_last_not_of(INTRON_OR_GAP,m_protein.size()-1);
87  char aa = m_protein[prev_not_intron_pos];
88  _ASSERT( aa != SPACE_CHAR );
89  int added_len = min(3-phase,len);
90  if (prev_not_intron_pos == m_protein.size()-1 && phase+added_len==3 && (phase==1 || m_protein[prev_not_intron_pos-1]==aa)) {
91  m_protein.append(added_len,SPACE_CHAR);
92  m_protein[m_protein.size()-3] = SPACE_CHAR;
93  m_protein[m_protein.size()-2] = toupper(aa);
94  } else {
95  m_protein.append(added_len,aa);
96  }
97  len -= added_len;
98  prot_prev += added_len;
99  }
100 
101  if (len > 0) {
102  string buf;
103  protein_ci.GetSeqData(buf,(len+2)/3);
104  const char* p = buf.c_str();
105 
106  while (len >= 3) {
107  m_protein.push_back(SPACE_CHAR);
108  m_protein.push_back(*p++);
109  m_protein.push_back(SPACE_CHAR);
110  len -=3;
111  prot_prev += 3;
112  }
113  if (len > 0) {
114  m_protein.append(len,tolower(*p));
115  }
116  prot_prev += len;
117  }
118 }
119 
120 // translate last len bases in m_dna
121 // plus spliced codon in prev exon if at the start of exon
122 void CProteinAlignText::TranslateDNA(int phase, size_t len, bool is_insertion)
123 {
124  _ASSERT( m_translation.size()+len ==m_dna.size() );
125  _ASSERT( phase==0 || m_dna.size()>0 );
126 
127  m_translation.reserve(m_translation.size()+len);
128  size_t start_pos = m_dna.size()-len;
129  const char INTRON[] = {INTRON_CHAR,0};
130  if (phase != 0) {
131  size_t prev_exon_pos = 0;
132  if (phase+len >=3 &&
133  ((prev_exon_pos=m_protein.find_last_not_of(is_insertion?INTRON:INTRON_OR_GAP,start_pos-1))!=start_pos-1 ||
134  m_dna[start_pos]==GAP_CHAR) &&
135  m_match[prev_exon_pos]!=BAD_PIECE_CHAR) {
136  string codon = m_dna.substr(prev_exon_pos-phase+1,phase)+m_dna.substr(start_pos,3-phase);
137  char aa = (codon[0]!=GAP_CHAR && codon[1]!=GAP_CHAR) ? TranslateTriplet(*m_trans_table, codon) : SPACE_CHAR;
138  for( size_t i = prev_exon_pos-phase+1; i<=prev_exon_pos;++i) {
139  m_translation[i] = tolower(aa);
140  m_match[i] = MatchChar(i);
141  }
142  m_translation.append((SIZE_TYPE)(3-phase),m_dna[start_pos]!=GAP_CHAR?tolower(aa):SPACE_CHAR);
143  } else {
144  m_translation.append(min(len,(SIZE_TYPE)(3-phase)),SPACE_CHAR);
145  }
146  start_pos += min(len,(SIZE_TYPE)(3-phase));
147  }
148 
149  if (m_dna[start_pos]!=GAP_CHAR) {
150  char aa[] = " ";
151  for ( ; start_pos+3 <= m_dna.size(); start_pos += 3) {
152  aa[1] = TranslateTriplet(*m_trans_table, m_dna.substr(start_pos,3));
153  m_translation += aa;
154  }
155  }
156 
157  if (start_pos < m_dna.size()) {
158  m_translation.append(m_dna.size()-start_pos,SPACE_CHAR);
159  }
160 
161  _ASSERT( m_translation.size()==m_dna.size() );
162 }
163 
165 {
166  char m = SPACE_CHAR;
167  if (m_translation[i] != SPACE_CHAR && m_protein[i] != SPACE_CHAR) {
168  if(toupper(m_protein[i]) != 'X') {
169  if (m_translation[i] == m_protein[i]) {
170  m = MATCH_CHAR;
171  } else if(m_matrix.s[toupper(m_protein[i])]
172  [toupper(m_translation[i])] > 0)
173  {
174  m = POSIT_CHAR;
175  }
176  }
177  }
178  return m;
179 }
180 
181 void CProteinAlignText::MatchText(size_t len, bool is_match)
182 {
183  _ASSERT( m_translation.size() == m_protein.size() );
184  _ASSERT( m_translation.size() == m_match.size()+len );
185 
186  m_match.reserve(m_match.size()+len);
187 
188  for (size_t i = m_translation.size()-len; i < m_translation.size(); ++i) {
189  m_match.push_back((is_match && islower(m_protein[i]))?MATCH_CHAR:MatchChar(i));
190  }
191 }
192 
194  const string& triplet)
195 {
196  return table.GetCodonResidue(
197  table.SetCodonState(triplet[0], triplet[1], triplet[2]));
198 }
199 
201  bool prev_3_prime_splice, bool cur_5_prime_splice,
202  CSeqVector_CI& genomic_ci, CSeqVector_CI& protein_ci,
203  int& nuc_prev, int& prot_prev,
204  int nuc_cur_start, int prot_cur_start)
205 {
206  _ASSERT( m_dna.size() == m_translation.size() );
207  _ASSERT( m_match.size() == m_protein.size() );
208  _ASSERT( m_dna.size() == m_protein.size() );
209 
210  int prot_hole_len = prot_cur_start - prot_prev -1;
211  int nuc_hole_len = nuc_cur_start - nuc_prev -1;
212 
213  bool can_show_splices = prot_hole_len < nuc_hole_len -4;
214  if (can_show_splices && prev_3_prime_splice) {
215  AddSpliceText(genomic_ci,nuc_prev, BAD_PIECE_CHAR);
216  nuc_hole_len = nuc_cur_start - nuc_prev -1;
217  }
218  if (can_show_splices && cur_5_prime_splice) {
219  nuc_cur_start -= 2;
220  nuc_hole_len = nuc_cur_start - nuc_prev -1;
221  }
222 
223  SIZE_TYPE hole_len = max(prot_hole_len,nuc_hole_len);
224  _ASSERT( prot_hole_len>0 || nuc_hole_len>0 );
225  int left_gap = 0;
226 
227  left_gap = (prot_hole_len-nuc_hole_len)/2;
228  if (left_gap>0)
229  m_dna.append((SIZE_TYPE)left_gap,GAP_CHAR);
230  if (nuc_hole_len>0)
231  AddDNAText(genomic_ci,nuc_prev,nuc_hole_len);
232  if (prot_hole_len>nuc_hole_len)
233  m_dna.append((SIZE_TYPE)(prot_hole_len-nuc_hole_len-left_gap),GAP_CHAR);
234 
235  m_translation.append(hole_len,SPACE_CHAR);
236  m_match.append(hole_len,BAD_PIECE_CHAR);
237 
238  left_gap = (nuc_hole_len-prot_hole_len)/2;
239  if (left_gap>0)
240  m_protein.append((SIZE_TYPE)left_gap,GAP_CHAR);
241  if (prot_hole_len>0)
242  AddProtText(protein_ci,prot_prev,prot_hole_len);
243  if (prot_hole_len<nuc_hole_len)
244  m_protein.append((SIZE_TYPE)(nuc_hole_len-prot_hole_len-left_gap),
245  GAP_CHAR);
246 
247  if (can_show_splices && cur_5_prime_splice) {
248  AddSpliceText(genomic_ci,nuc_prev, BAD_PIECE_CHAR);
249  }
250  _ASSERT( m_dna.size() == m_translation.size() );
251  _ASSERT( m_match.size() == m_protein.size() );
252  _ASSERT( m_dna.size() == m_protein.size() );
253 }
254 
256 {
257 }
258 
259 CProteinAlignText::CProteinAlignText(objects::CScope& scope, const objects::CSeq_align& seqalign,
260  const string& matrix_name)
261 {
262  const CSpliced_seg& sps = seqalign.GetSegs().GetSpliced();
263 
264  ENa_strand strand = sps.GetGenomic_strand();
265 
266  const CSeq_id& protid = sps.GetProduct_id();
267  int prot_len = sps.GetProduct_length()*3;
268  CSeqVector protein_seqvec(scope.GetBioseqHandle(protid), CBioseq_Handle::eCoding_Iupac);
269  CSeqVector_CI protein_ci(protein_seqvec);
270 
271  CRef<CSeq_loc> genomic_seqloc = GetGenomicBounds(scope, seqalign);
272  CSeqVector genomic_seqvec(*genomic_seqloc, scope, CBioseq_Handle::eCoding_Iupac);
273  CSeqVector_CI genomic_ci(genomic_seqvec);
274 
275  int gcode = 1;
276  try {
277  const CSeq_id* sid = genomic_seqloc->GetId();
278  CBioseq_Handle hp = scope.GetBioseqHandle(*sid);
279  gcode = sequence::GetOrg_ref(hp).GetGcode();
280  } catch (...) {}
281 
283 
284  const SNCBIPackedScoreMatrix* packed_mtx =
285  NCBISM_GetStandardMatrix(matrix_name.c_str());
286  if (packed_mtx == NULL)
287  NCBI_THROW(CException, eUnknown, "unknown scoring matrix: "+matrix_name);
288  NCBISM_Unpack(packed_mtx, &m_matrix);
289 
290  int nuc_from = genomic_seqloc->GetTotalRange().GetFrom();
291  int nuc_to = genomic_seqloc->GetTotalRange().GetTo();
292  int nuc_prev = -1;
293  int prot_prev = -1;
294  bool prev_3_prime_splice = false;
295  int prev_genomic_ins = 0;
296  ITERATE(CSpliced_seg::TExons, e_it, sps.GetExons()) {
297  const CSpliced_exon& exon = **e_it;
298  int prot_cur_start = exon.GetProduct_start().AsSeqPos();
299 #ifdef _DEBUG
300  int prot_cur_end = exon.GetProduct_end().AsSeqPos();
301 #endif
302  int nuc_cur_start = exon.GetGenomic_start();
303  int nuc_cur_end = exon.GetGenomic_end();
304  if (strand==eNa_strand_plus) {
305  nuc_cur_start -= nuc_from;
306  nuc_cur_end -= nuc_from;
307  } else {
308  swap(nuc_cur_start,nuc_cur_end);
309  nuc_cur_start = nuc_to - nuc_cur_start;
310  nuc_cur_end = nuc_to - nuc_cur_end;
311  }
312  bool cur_5_prime_splice = exon.CanGetAcceptor_before_exon() && exon.GetAcceptor_before_exon().CanGetBases() && exon.GetAcceptor_before_exon().GetBases().size()==2;
313  bool hole_before =
314  prot_prev+1 != prot_cur_start || !( (prev_3_prime_splice && cur_5_prime_splice) || (prot_cur_start==0 && nuc_cur_start==0) );
315 
316  if (hole_before) {
317  AddHoleText(prev_3_prime_splice, cur_5_prime_splice,
318  genomic_ci, protein_ci,
319  nuc_prev, prot_prev,
320  nuc_cur_start, prot_cur_start);
321  prev_genomic_ins = 0;
322  } else { //intron
323  int intron_len = nuc_cur_start - nuc_prev -1;
324  AddDNAText(genomic_ci, nuc_prev, intron_len);
325  m_translation.append(intron_len,SPACE_CHAR);
326  m_match.append(intron_len,MISMATCH_CHAR);
327  m_protein.append(intron_len,INTRON_CHAR);
328  }
329 
330  _ASSERT( m_dna.size() == m_translation.size() );
331  _ASSERT( m_match.size() == m_protein.size() );
332  _ASSERT( m_dna.size() == m_protein.size() );
333 
334  prev_3_prime_splice = exon.CanGetDonor_after_exon() && exon.GetDonor_after_exon().CanGetBases() && exon.GetDonor_after_exon().GetBases().size()==2;
335 
336  ITERATE(CSpliced_exon::TParts, p_it, exon.GetParts()) {
337  const CSpliced_exon_chunk& chunk = **p_it;
338  if (!chunk.IsGenomic_ins())
339  prev_genomic_ins = 0;
340  if (chunk.IsDiag() || chunk.IsMatch() || chunk.IsMismatch()) {
341  int len = 0;
342  if (chunk.IsDiag()) {
343  len = chunk.GetDiag();
344  } else if (chunk.IsMatch()) {
345  len = chunk.GetMatch();
346  } else if (chunk.IsMismatch()) {
347  len = chunk.GetMismatch();
348  }
349  AddDNAText(genomic_ci,nuc_prev,len);
350  TranslateDNA((prot_prev+1)%3,len,false);
351  AddProtText(protein_ci,prot_prev,len);
352  if (chunk.IsMismatch()) {
353  m_match.append(len,MISMATCH_CHAR);
354  } else
355  MatchText(len, chunk.IsMatch());
356  } else if (chunk.IsProduct_ins()) {
357  int len = chunk.GetProduct_ins();
358  m_dna.append(len,GAP_CHAR);
359  TranslateDNA((prot_prev+1)%3,len,false);
360  m_match.append(len,MISMATCH_CHAR);
361  AddProtText(protein_ci,prot_prev,len);
362  } else if (chunk.IsGenomic_ins()) {
363  unsigned len = chunk.GetGenomic_ins();
364  AddDNAText(genomic_ci,nuc_prev,len);
365  if (0<=prot_prev && prot_prev<prot_len-1 && (prot_prev+1)%3==0)
366  TranslateDNA(prev_genomic_ins,len,true);
367  else
368  m_translation.append(len,SPACE_CHAR);
369  prev_genomic_ins = (prev_genomic_ins+len)%3;
370  m_match.append(len,MISMATCH_CHAR);
371  m_protein.append(len,GAP_CHAR);
372  }
373  _ASSERT(prot_prev <= prot_cur_end);
374  }
375  _ASSERT(prot_prev == prot_cur_end);
376  _ASSERT(nuc_prev == nuc_cur_end);
377 
378  _ASSERT( m_dna.size() == m_translation.size() );
379  _ASSERT( m_match.size() == m_protein.size() );
380  _ASSERT( m_dna.size() == m_protein.size() );
381  }
382 
383  int nuc_cur_start = nuc_to - nuc_from +1;
384  int prot_cur_start = prot_len;
385  if (prot_prev+1 != prot_cur_start || nuc_prev+1 != nuc_cur_start) {
386  bool cur_5_prime_splice = false;
387  AddHoleText(prev_3_prime_splice, cur_5_prime_splice,
388  genomic_ci, protein_ci,
389  nuc_prev, prot_prev,
390  nuc_cur_start, prot_cur_start);
391  }
392 }
393 
395  const CSeq_align& seqalign)
396 {
397  CRef<CSeq_loc> genomic(new CSeq_loc);
398 
399  const CSpliced_seg& sps = seqalign.GetSegs().GetSpliced();
400  const CSeq_id& nucid = sps.GetGenomic_id();
401 
402  if (seqalign.CanGetBounds()) {
403  ITERATE(CSeq_align::TBounds, b,seqalign.GetBounds()) {
404  if ((*b)->GetId() != NULL && (*b)->GetId()->Match(nucid)) {
405 
406  TSeqPos len = sequence::GetLength(nucid, &scope);
407 
408  genomic->Assign(**b);
409  if (genomic->IsWhole()) {
410  // change to Interval, because Whole doesn't allow strand change - it's always unknown.
411  genomic->SetInt().SetFrom(0);
412  genomic->SetInt().SetTo(len-1);
413  }
414  genomic->SetStrand(sps.GetGenomic_strand());
415 
416  if (genomic->GetStop(eExtreme_Positional) >= len) {
417  genomic->SetInt().SetFrom(genomic->GetStart(eExtreme_Positional));
418  genomic->SetInt().SetTo(len-1);
419  }
420 
421  return genomic;
422  }
423  }
424  }
425 
426  if (sps.GetExons().empty()) {
427  genomic->SetNull();
428  } else {
429  genomic->SetPacked_int().AddInterval(nucid,sps.GetExons().front()->GetGenomic_start(),sps.GetExons().front()->GetGenomic_end(),sps.GetGenomic_strand());
430  genomic->SetPacked_int().AddInterval(nucid,sps.GetExons().back()->GetGenomic_start(),sps.GetExons().back()->GetGenomic_end(),sps.GetGenomic_strand());
431 
433  }
434 
435  return genomic;
436 }
437 
439 
@ eExtreme_Positional
numerical value
Definition: Na_strand.hpp:63
USING_SCOPE(ncbi::objects)
CBioseq_Handle –.
static const CTrans_table & GetTransTable(int id)
int GetGcode(void) const
Definition: Org_ref.cpp:134
TSeqPos AsSeqPos() const
Definition: Product_pos.cpp:56
SNCBIFullScoreMatrix m_matrix
Definition: alntext.hpp:95
void AddProtText(objects::CSeqVector_CI &protein_ci, int &prot_prev, int len)
Definition: alntext.cpp:79
static const char MATCH_CHAR
Definition: alntext.hpp:71
char MatchChar(size_t i)
Definition: alntext.cpp:164
static const char INTRON_CHAR
Definition: alntext.hpp:64
static char TranslateTriplet(const objects::CTrans_table &table, const string &triplet)
Definition: alntext.cpp:193
static const char INTRON_OR_GAP[]
Definition: alntext.hpp:65
static const char SPACE_CHAR
Definition: alntext.hpp:63
const objects::CTrans_table * m_trans_table
Definition: alntext.hpp:94
static const char BAD_OR_MISMATCH[]
Definition: alntext.hpp:70
static const char MISMATCH_CHAR
Definition: alntext.hpp:69
void AddDNAText(objects::CSeqVector_CI &genomic_ci, int &nuc_prev, int len)
Definition: alntext.cpp:71
CProteinAlignText(objects::CScope &scope, const objects::CSeq_align &seqalign, const string &matrix_name="BLOSUM62")
Definition: alntext.cpp:259
void AddSpliceText(objects::CSeqVector_CI &genomic_ci, int &nuc_prev, char match)
Definition: alntext.cpp:63
void TranslateDNA(int phase, size_t len, bool is_insertion)
Definition: alntext.cpp:122
string m_protein
Definition: alntext.hpp:92
void AddHoleText(bool prev_3_prime_splice, bool cur_5_prime_splice, objects::CSeqVector_CI &genomic_ci, objects::CSeqVector_CI &protein_ci, int &nuc_prev, int &prot_prev, int nuc_cur_start, int prot_cur_start)
Definition: alntext.cpp:200
static CRef< objects::CSeq_loc > GetGenomicBounds(objects::CScope &scope, const objects::CSeq_align &seqalign)
Definition: alntext.cpp:394
void MatchText(size_t len, bool is_match=false)
Definition: alntext.cpp:181
static const char BAD_PIECE_CHAR
Definition: alntext.hpp:68
static const char POSIT_CHAR
Definition: alntext.hpp:72
string m_translation
Definition: alntext.hpp:90
static const char GAP_CHAR
Definition: alntext.hpp:62
CScope –.
Definition: scope.hpp:92
CSeqVector –.
Definition: seq_vector.hpp:65
CSpliced_exon_chunk –.
Include a standard set of the NCBI C++ Toolkit most basic headers.
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
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
Definition: ncbimisc.hpp:1508
#define NULL
Definition: ncbistd.hpp:225
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
Definition: ncbiexpt.hpp:704
void SetPacked_int(TPacked_int &v)
Definition: Seq_loc.hpp:984
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Override Assign() to incorporate cache invalidation.
Definition: Seq_loc.cpp:337
TRange GetTotalRange(void) const
Definition: Seq_loc.hpp:913
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
Definition: Seq_loc.cpp:915
void SetInt(TInt &v)
Definition: Seq_loc.hpp:983
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 SetStrand(ENa_strand strand)
Set the strand for all of the location's ranges.
Definition: Seq_loc.cpp:5196
void SetNull(void)
Override all setters to incorporate cache invalidation.
Definition: Seq_loc.hpp:960
TSeqPos GetStop(ESeqLocExtremes ext) const
Definition: Seq_loc.cpp:963
@ fMerge_SingleRange
Definition: Seq_loc.hpp:332
TSeqPos GetLength(const CSeq_id &id, CScope *scope)
Get sequence length if scope not null, else return max possible TSeqPos.
CRef< CSeq_loc > Seq_loc_Merge(const CSeq_loc &loc, CSeq_loc::TOpFlags flags, CScope *scope)
Merge ranges in the seq-loc.
const COrg_ref & GetOrg_ref(const CBioseq_Handle &handle)
Return the org-ref associated with a given sequence.
Definition: sequence.cpp:264
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer)
Fill the buffer string with the sequence data for the interval [start, stop).
#define END_NCBI_SCOPE
End previously defined NCBI scope.
Definition: ncbistl.hpp:103
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition: ncbistl.hpp:100
NCBI_NS_STD::string::size_type SIZE_TYPE
Definition: ncbistr.hpp:132
TTo GetTo(void) const
Get the To member data.
Definition: Range_.hpp:269
TFrom GetFrom(void) const
Get the From member data.
Definition: Range_.hpp:222
const TDonor_after_exon & GetDonor_after_exon(void) const
Get the Donor_after_exon member data.
const TGenomic_id & GetGenomic_id(void) const
Get the Genomic_id member data.
bool CanGetAcceptor_before_exon(void) const
Check if it is safe to call GetAcceptor_before_exon method.
bool CanGetBases(void) const
Check if it is safe to call GetBases method.
bool CanGetBounds(void) const
Check if it is safe to call GetBounds method.
Definition: Seq_align_.hpp:945
TMatch GetMatch(void) const
Get the variant data.
const TProduct_id & GetProduct_id(void) const
Get the Product_id member data.
TGenomic_start GetGenomic_start(void) const
Get the Genomic_start member data.
const TAcceptor_before_exon & GetAcceptor_before_exon(void) const
Get the Acceptor_before_exon member data.
bool IsMismatch(void) const
Check if variant Mismatch is selected.
TProduct_length GetProduct_length(void) const
Get the Product_length member data.
TDiag GetDiag(void) const
Get the variant data.
TMismatch GetMismatch(void) const
Get the variant data.
TGenomic_strand GetGenomic_strand(void) const
Get the Genomic_strand member data.
const TParts & GetParts(void) const
Get the Parts member data.
const TProduct_start & GetProduct_start(void) const
Get the Product_start member data.
const TProduct_end & GetProduct_end(void) const
Get the Product_end member data.
const TSpliced & GetSpliced(void) const
Get the variant data.
Definition: Seq_align_.cpp:219
list< CRef< CSeq_loc > > TBounds
Definition: Seq_align_.hpp:400
bool IsGenomic_ins(void) const
Check if variant Genomic_ins is selected.
bool IsMatch(void) const
Check if variant Match is selected.
TGenomic_ins GetGenomic_ins(void) const
Get the variant data.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
bool IsDiag(void) const
Check if variant Diag is selected.
const TBases & GetBases(void) const
Get the Bases member data.
list< CRef< CSpliced_exon_chunk > > TParts
bool CanGetDonor_after_exon(void) const
Check if it is safe to call GetDonor_after_exon method.
TGenomic_end GetGenomic_end(void) const
Get the Genomic_end member data.
bool IsProduct_ins(void) const
Check if variant Product_ins is selected.
TProduct_ins GetProduct_ins(void) const
Get the variant data.
const TSegs & GetSegs(void) const
Get the Segs member data.
Definition: Seq_align_.hpp:921
const TBounds & GetBounds(void) const
Get the Bounds member data.
Definition: Seq_align_.hpp:951
ENa_strand
strand of nucleic acid
Definition: Na_strand_.hpp:64
bool IsWhole(void) const
Check if variant Whole is selected.
Definition: Seq_loc_.hpp:522
@ eNa_strand_plus
Definition: Na_strand_.hpp:66
<!DOCTYPE HTML >< html > n< header > n< title > PubSeq Gateway Help Page</title > n< style > n table
char * buf
int i
int len
int tolower(Uchar c)
Definition: ncbictype.hpp:72
int toupper(Uchar c)
Definition: ncbictype.hpp:73
int islower(Uchar c)
Definition: ncbictype.hpp:66
T max(T x_, T y_)
T min(T x_, T y_)
static int match(PCRE2_SPTR start_eptr, PCRE2_SPTR start_ecode, uint16_t top_bracket, PCRE2_SIZE frame_size, pcre2_match_data *match_data, match_block *mb)
Definition: pcre2_match.c:594
const SNCBIPackedScoreMatrix * NCBISM_GetStandardMatrix(const char *name)
Definition: raw_scoremat.c:131
void NCBISM_Unpack(const SNCBIPackedScoreMatrix *psm, SNCBIFullScoreMatrix *fsm)
Expand a packed score matrix into an unpacked one, which callers can proceed to index directly by sta...
Definition: raw_scoremat.c:81
TNCBIScore s[128][128]
Definition: raw_scoremat.h:87
#define _ASSERT
Modified on Fri Sep 20 14:58:09 2024 by modify_doxy.py rev. 669887