(
arr.size() != 9)
64 if(
arr.size() == 1)
65 msg=
"No features found for: "+ line;
66 else if(!
arr.empty())
67 msg=
"Malformed line: "+ line;
70 stringaccession =
arr[0];
72 stringits1 =
arr[3];
73 stringr58S =
arr[4];
74 stringits2 =
arr[5];
77 stringstrand =
arr[8];
82 msg=
"No bioseq found for: "+ accession;
88 if(!
error.empty() &&
error!=
"Broken or partial sequence, no 5.8S!"&&
error!=
"Broken or partial sequence, only partial 5.8S!")
90 msg=
"Error returned for: "+accession+
" "+
error;
119 boolssu_present(
false);
120 boollsu_present(
false);
121 boolssu_too_large(
false);
122 boollsu_too_large(
false);
123 boolr58S_too_large(
false);
124 boolits1_span(
false);
125 boolits2_span(
false);
131 GetSpan(ssu, starts, stops, spans);
132 GetSpan(its1, starts, stops, spans);
133 GetSpan(r58S, starts, stops, spans);
134 GetSpan(its2, starts, stops, spans);
135 GetSpan(lsu, starts, stops, spans);
137its1_span = spans[1];
138its2_span = spans[3];
140vector<string> comments;
141 if(ssu !=
"Not found")
143comments.push_back(
"small subunit ribosomal RNA");
145ssu_too_large =
IsLengthTooLarge(ssu, 2200, 0, starts, stops, spans, bioseq_length);
147 if(its1 !=
"Not found")
149comments.push_back(
"internal transcribed spacer 1");
151 if(r58S !=
"Not found")
153comments.push_back(
"5.8S ribosomal RNA");
154r58S_too_large =
IsLengthTooLarge(r58S, 200, 2, starts, stops, spans, bioseq_length);
156 if(its2 !=
"Not found")
158comments.push_back(
"internal transcribed spacer 2");
160 if(lsu !=
"Not found")
162comments.push_back(
"large subunit ribosomal RNA");
164lsu_too_large =
IsLengthTooLarge(lsu, 5100, 4, starts, stops, spans, bioseq_length);
167 if(its1_span && its2_span && (r58S ==
"Not found"|| r58S ==
"No end"|| r58S ==
"No start"))
169 msg=
"5.8S is not found while ITS1 and ITS2 spans exist in: "+accession;
174 msg=
"SSU too large in: "+accession;
179 msg=
"LSU too large in: "+accession;
184 msg=
"5.8S too large in: "+accession;
189 switch(comments.size())
191 case0 : comment =
"does not contain rna label";
break;
194 if(!ssu_present && !lsu_present)
196comment =
"contains "+comments.front();
200 case2 : comment =
"contains "+ comments[0]+
" and "+comments[1];
break;
201default : comment =
"contains "+comments[0];
for(
unsigned intj=1; j<comments.size()-1;j++) comment +=
", "+comments[j]; comment +=
", and "+comments.back();
break;
204 if(comments.size() == 1 && (ssu_present || lsu_present))
215 if(
arr.size() == 2)
221starts.push_back(start);
222stops.push_back(stop);
223spans.push_back(span);
228 constvector<int>& starts,
229 constvector<int>& stops,
230 constvector<bool>& spans,
235 intstart = starts[
i];
236 intend = stops[
i];
237 intlength = end - start + 1;
238 returnlength > max_length;
240 if(
str==
"No end")
243 for(
intj =
i- 1; j >= 0; j--)
247start = stops[j] + 1;
251 intend = bioseq_length;
252 intlength = end - start + 1;
253 returnlength > max_length;
255 if(
str==
"No start")
258 intend = bioseq_length;
259 for(
intj =
i+ 1; j < spans.size(); j++)
267 intlength = end - start + 1;
268 returnlength > max_length;
280loc->
SetInt().SetFrom(0);
297new_rrna->
SetData().SetRna().SetRnaProductName(comment, remainder);
300loc->
SetInt().SetFrom(0);
318 if(edit::CSeqIdGuesser::DoesSeqMatchConstraint(*bi,constraint))
@ eExtreme_Positional
numerical value
CBioseq_Handle x_GetBioseqHandleFromIdGuesser(const string &id_str, objects::CSeq_entry_Handle tse)
CRef< CSeq_feat > x_CreateMiscRna(const string &comment, CBioseq_Handle bsh)
void GetSpan(const string &str, vector< int > &starts, vector< int > &stops, vector< bool > &spans)
CRef< CSeq_feat > ParseLine()
CRef< CSeq_feat > x_ParseLine(const CTempString &line, CSeq_entry_Handle tse, CBioseq_Handle &bsh, bool &negative, string &msg)
CRef< CSeq_feat > x_CreateRRna(const string &comment, CBioseq_Handle bsh)
bool IsLengthTooLarge(const string &str, int max_length, int i, const vector< int > &starts, const vector< int > &stops, const vector< bool > &spans, int bioseq_length)
namespace ncbi::objects::
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Include a standard set of the NCBI C++ Toolkit most basic headers.
static vector< string > arr
static const char * str(char *buf, int n)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
static CRef< ILineReader > New(const string &filename)
Return a new ILineReader object corresponding to the given filename, taking "-" (but not "....
void SetId(CSeq_id &id)
set the 'id' field in all parts of this location
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
void SetPartialStop(bool val, ESeqLocExtremes ext)
TSeqPos GetBioseqLength(void) const
CConstRef< CSeq_id > GetSeqId(void) const
Get id which can be used to access this bioseq handle Throws an exception if none is available.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static list< string > & Split(const CTempString str, const CTempString delim, list< string > &arr, TSplitFlags flags=0, vector< SIZE_TYPE > *token_pos=NULL)
Split a string using specified delimiters.
static void TruncateSpacesInPlace(string &str, ETrunc where=eTrunc_Both)
Truncate whitespace in a string (in-place)
@ fConvErr_NoThrow
Do not throw an exception on error.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetComment(const TComment &value)
Assign a value to Comment data member.
void SetPartial(TPartial value)
Assign a value to Partial data member.
void SetData(TData &value)
Assign a value to Data data member.
@ eMol_na
just a nucleic acid
static SLJIT_INLINE sljit_ins msg(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
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