is_rrna = type1 ==
"16S"|| type1 ==
"23S"|| type1 ==
"5S";
44 stringdiag_name_rna = is_rrna ?
"rRNA":
"tRNA";
45 stringdiag_name =
diagName(diag_name_rna, type1);
49 intgleft=0, gright=0;
52 boolmatch_ext=
false;
53 intinput_left, input_right;
62input_range_stream << (input_left + 1) <<
"..."<< (input_right + 1) <<
'\0';
63 stringinput_range = input_range_stream.str();
66 stringtype2 = is_rrna ? ext_rna->type : ext_rna->type3;
74<<
"\t key="<<ext_rna->key<<
"\n" 75<<
"\t locus_tag"<<ext_rna->locus_tag<<
"\n" 76<<
"\t name"<<ext_rna->name<<
"\n" 77<<
"\t description"<<ext_rna->description<<
"\n" 78<<
"\t type"<<ext_rna->type<<
"\n" 79<<
"\t type3"<<ext_rna->type3<<
"\n" 80<<
"\t exons[0].from"<< ext_rna->exons[0].from<<
"\n" 81<<
"\t exons[0].to"<< ext_rna->exons[0].to<<
"\n" 82<<
"\t exons[0].strand"<< ext_rna->exons[0].strand<<
"\n" 87cerr <<
" type mismatch, skipping\n";
95 intoverlap =
match_na(f1, *ext_rna, left, right, strand_match, abs_left);
99cerr <<
" overlap 0, skipping\n";
107cerr <<
" strand mismatch, skipping\n";
112 if(!match_ext ||
abs(left)+
abs(right)<
abs(gleft)+
abs(gright) )
118gabs_left = abs_left;
125 buffer<<
"no external tRNA for this aminoacid: " 126<<type1 <<
"["<< input_range <<
"]"<<
NcbiEndl;
128 buffer<<
"no external rRNA for this rRNA type: " 129<<type1 <<
"["<< input_range <<
"]"<<
NcbiEndl;
135misc_feat <<
buffer.str() <<
'\0';
138 m_diag[diag_name].problems.push_back(problem);
141 if(!match_ext && !absent)
145 buffer<<
"tRNA does not match strand this aminoacid: " 146<<type1 <<
"["<< input_range <<
"]"<<
NcbiEndl;
148 buffer<<
"rRNA does not match strand this rRNA type: " 149<<type1 <<
"["<< input_range <<
"]"<<
NcbiEndl;
155misc_feat <<
buffer.str() <<
'\0';
158 m_diag[diag_name].problems.push_back(problem);
166 buffer<<
"closest "<< diag_name_rna
167<<
"for ("<<type1 <<
"["<< input_range <<
"]" 168<<
") does not even overlap"<<
NcbiEndl;
172misc_feat <<
buffer.str() <<
'\0';
177 m_diag[diag_name].problems.push_back(problem);
183 buffer<<
"closest tRNA for this aminoacid: " 184<<type1 <<
"["<< input_range <<
"]" 185<<
" have mismatched ends:"<<
NcbiEndl;
187 buffer<<
"closest rRNA for this rRNA type: " 188<<type1 <<
"["<< input_range <<
"]" 189<<
" have mismatched ends:"<<
NcbiEndl;
192 buffer<<
"left: "<< gleft <<
", right: "<< gright <<
" bp shifted relative to the calculated ends"<<
NcbiEndl;
195misc_feat <<
buffer.str() <<
'\0';
198 m_diag[diag_name].problems.push_back(problem);
227 intinput_left, input_right, calc_left, calc_right;
230abs_left = input_left;
232calc_left = ext_rna.
exons[0].from;
233calc_right= ext_rna.
exons[0].to;
236left = input_left - calc_left;
237right = input_right - calc_right;
239 intmax_left =
max(input_left, calc_left);
240 intmin_right =
min(input_right, calc_right);
242 result= min_right>max_left ? min_right-max_left : 0;
246<< input_right <<
"," 257strand_match = input_strand == calc_strand;
259<<
int(input_strand) <<
"," 260<<
int(calc_strand) <<
"," 261<< strand_match <<
"," 266strand_match =
true;
static bool PrintDetails(int current_verbosity=m_current_verbosity)
int overlaps(const TSimpleSeqs::iterator &seq1, const TSimpleSeqs::iterator &seq2, int &overlap)
TSimpleSeqs m_extRNAtable2
static void getFromTo(const CSeq_loc &loc, TSeqPos &from, TSeqPos &to, ENa_strand &strand)
bool match_na(const CSeq_feat &f1, const string &type1)
namespace ncbi::objects::
unsigned int TSeqPos
Type for sequence locations and lengths.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
const TLocation & GetLocation(void) const
Get the Location member data.
ENa_strand
strand of nucleic acid
unsigned int
A callback function used to compare two keys in a database.
string diagName(const string &type, const string &value)
list< TSimpleSeq > TSimpleSeqs
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