}
else if(
m_Row== 1) {
87 "only pairwise alignments are supported");
95ostr <<
" Seq-id(s), separated by a ';'";
106CScope::TIds::const_iterator
i= it;
108 if(
i!= ids.end()) {
121, m_GetIdType(id_type)
122, m_TagOnly(tag_only)
132ostr <<
" accession.version";
140ostr <<
" id as it appears in alignment";
147ostr <<
"; tag only for gnl seq-ids";
156}
else if(
m_Row== 0) {
158}
else if(
m_Row== 1) {
162 "only pairwise alignments are supported");
208: m_Row(
row), m_NoMinus(nominus)
214ostr <<
"Start of alignment in ";
217}
else if(
m_Row== 1) {
221 "only pairwise alignments are supported");
229}
else if(
m_Row== 1) {
233 "only pairwise alignments are supported");
249ostr <<
min(
r.GetFrom(),
r.GetTo()) + 1;
272: m_Row(
row), m_NoMinus(nominus)
278ostr <<
"End of alignment in ";
281}
else if(
m_Row== 1) {
285 "only pairwise alignments are supported");
293}
else if(
m_Row== 1) {
297 "only pairwise alignments are supported");
311ostr <<
max(
r.GetFrom(),
r.GetTo()) + 1;
339ostr <<
"Strand of alignment in ";
342}
else if(
m_Row== 1) {
346 "only pairwise alignments are supported");
354}
else if(
m_Row== 1) {
358 "only pairwise alignments are supported");
393ostr <<
"Length of ";
396}
else if(
m_Row== 1) {
400 "only pairwise alignments are supported");
402ostr <<
" sequence";
409}
else if(
m_Row== 1) {
413 "only pairwise alignments are supported");
422 m_Row== 0 ?
"query_length":
"subject_length");
423 if(score == numeric_limits<double>::quiet_NaN()) {
426ostr << (
int) score;
434ostr <<
"Alignment length";
445ostr << (
int)
m_Scores->GetScore(align,
"align_length");
452ostr <<
"Alignment length not counting gaps";
457ostr <<
"length_ungap";
463ostr << (
int)
m_Scores->GetScore(align,
"align_length_ungap");
475ostr <<
"Percentage of identical matches";
477ostr <<
" excluding gaps on either row";
487ostr <<
"(ungapped)";
494 doublepct_id =
m_Scores->GetScore(align,
496:
"pct_identity_ungap");
498pct_id =
min(pct_id, 99.99);
507ostr << (
m_Row== 0 ?
"Percent coverage of query in subject" 508:
"Percent coverage of subject in query");
520?
"pct_coverage":
"subject_coverage");
521 if(pct_cov != 100) {
522pct_cov =
min(pct_cov, 99.99);
531ostr <<
"Number of gap openings";
548ostr <<
"Number of identical matches";
552ostr <<
"identities";
557ostr << (
int)
m_Scores->GetScore(align,
"num_ident");
564ostr <<
"Number of mismatches";
573ostr << (
int)
m_Scores->GetScore(align,
"num_mismatch");
586 boolis_gapped =
false;
599ranges.push_back(range);
614 "smismatchpos and qmismatchpos currently do not handle " 615 "this type of alignment.");
626ostr <<
"Positions of aligned mismatches, comma seperated";
631ostr <<
"qmismatchpos";
632}
else if(
m_Row== 1) {
633ostr <<
"smismatchpos";
636 "only pairwise alignments are supported");
644vector<TSeqPos> mm_pos;
653 "supported for protein alignments");
657 if(!exon->IsSetParts()) {
660 ENa_strandexon_qstrand = exon->IsSetProduct_strand()
661? exon->GetProduct_strand() : QStrand;
662 ENa_strandexon_sstrand = exon->IsSetGenomic_strand()
663? exon->GetGenomic_strand() : SStrand;
666: exon->GetProduct_end().GetNucpos();
668: exon->GetGenomic_end();
672 switch(part->Which()) {
674pos += direction * part->GetMatch();
678 for(
unsigned i= 0;
i< part->GetMismatch(); ++
i) {
679mm_pos.push_back(pos);
686pos += direction * part->GetProduct_ins();
692pos += direction * part->GetGenomic_ins();
698 "supported for alignments with diag");
708 stringQueryStr, SubjtStr;
721QueryVec.
size()-QAlignRange.
GetFrom(), QueryStr);
727SubjtVec.
size()-SAlignRange.
GetFrom(), SubjtStr);
729 stringQS = QueryStr.substr(0,50);
730 stringSS = SubjtStr.substr(0,50);
733list<TSeqRange> QSegRanges, SSegRanges;
739list<TSeqRange>::const_iterator SSegIter = SSegRanges.begin();
740 ITERATE(list<TSeqRange>, QSegIter, QSegRanges) {
748 size_tQOffset, SOffset;
751 size_tQMOffset = QAlignRange.
GetTo()-QuerySeg.
GetTo();
755 size_tSMOffset = SAlignRange.
GetTo()-SubjtSeg.
GetTo();
760 for(
unsignedLoop = 0; Loop < QuerySeg.
GetLength(); Loop++) {
761 size_tQLoop = QOffset+Loop;
762 size_tSLoop = SOffset+Loop;
769 if(QueryStr[QLoop] == SubjtStr[SLoop]) {
775 else if(
m_Row== 1)
785 sort(mm_pos.begin(), mm_pos.end());
786 ITERATE(vector<TSeqPos>, it, mm_pos) {
787 if(it != mm_pos.begin()) {
803ostr <<
"Positions of gapped, unaligned, segments, comma seperated";
808ostr <<
"qgapranges";
809}
else if(
m_Row== 1) {
810ostr <<
"sgapranges";
813 "only pairwise alignments are supported");
822GappedRC -= AlignedRC;
827 if(it != GappedRC.
begin()) {
830ostr << it->GetFrom()+1 <<
"-"<< it->GetTo()+1;
838ostr <<
"Total number of gaps";
854ostr <<
"Expect value";
863 doublescore =
m_Scores->GetScore(align,
"e_value");
865score == numeric_limits<double>::quiet_NaN()) {
876ios_base::fmtflags cur_flags=ostr.flags();
879ostr << scientific << score;
882ostr.unsetf(ios_base::scientific);
885ostr << setiosflags(cur_flags);
893ostr <<
"Expect value in mantissa format";
897ostr <<
"evalue_mantissa";
904score =
m_Scores->GetScore(align,
"e_value");
907score == numeric_limits<double>::quiet_NaN()) {
917 doublemantissa = score;
920 while(mantissa >= 10.0) {
923 while(mantissa < 1.0) {
926}
else if(score < 0.0) {
927 while(mantissa <= -10.0) {
930 while(mantissa > -1.0) {
943ostr <<
"Expect value in exponent format";
947ostr <<
"evalue_exponent";
954score =
m_Scores->GetScore(align,
"e_value");
957score == numeric_limits<double>::quiet_NaN()) {
967 doublemantissa = score;
972 while(mantissa >= 10.0) {
976 while(mantissa < 1.0) {
980}
else if(score < 0.0) {
981 while(mantissa <= -10.0) {
985 while(mantissa > -1.0) {
1002ostr <<
"Bit score";
1006ostr <<
"bitscore";
1011 doublescore =
m_Scores->GetScore(align,
"bit_score");
1019ostr <<
"Raw score";
1028 doublescore =
m_Scores->GetScore(align,
"score");
1036 const string& col_name)
1037: m_ScoreName(score_name)
1038, m_ColName(col_name)
1080ostr <<
"Entropy value for the " 1081<< (
m_Row== 0 ?
"query ":
"subject ")
1089<< (
m_Row== 0 ?
"query_":
"subject_")
1095 constobjects::CSeq_align& align)
1098(
m_Row== 0 ?
"query_":
"subject_") +
1099 string(
"entropy");
1112ostr <<
"Entropy value for the " 1113<< (
m_Row== 0 ?
"query ":
"subject ")
1121<< (
m_Row== 0 ?
"query_":
"subject_")
1127 constobjects::CSeq_align& align)
1130(
m_Row== 0 ?
"query_":
"subject_") +
1131 string(
"seg_pct");
1150ostr <<
"Defline of the ";
1153}
else if(
m_Row== 1) {
1157 "only pairwise alignments are supported");
1159ostr <<
" sequence";
1166ostr <<
"qdefline";
1167}
else if(
m_Row== 1) {
1168ostr <<
"sdefline";
1171 "only pairwise alignments are supported");
1181 "indexing past the end of available " 1182 "sequences in an alignment");
1188ostr <<
generator.GenerateDefline(bsh);
1196ostr <<
"Alignment ids";
1202ostr <<
"align_ids";
1215 if((*it)->IsId()) {
1216ostr << (*it)->GetId();
1218 else if((*it)->IsStr()) {
1219ostr << (*it)->GetStr();
1229ostr <<
"best_placement group id";
1234ostr <<
"best_placement_group";
1251ostr <<
f->GetData().GetStr();
1268ostr <<
"Prot-ref of the ";
1271}
else if(
m_Row== 1) {
1275 "only pairwise alignments are supported");
1277ostr <<
" sequence";
1284ostr <<
"qprotref";
1285}
else if(
m_Row== 1) {
1286ostr <<
"sprotref";
1289 "only pairwise alignments are supported");
1299 "indexing past the end of available " 1300 "sequences in an alignment");
1310 if(feat_iter.
GetSize() == 1) {
1324ostr <<
"Dump the ";
1331ostr << (
m_Sequence== 0 ?
"unaligned segment":
"intron");
1337ostr <<
" structure";
1341ostr <<
" lengths";
1346ostr <<
" for the query sequence";
1349ostr <<
" of a Spliced-seg alignment";
1365ostr <<
"exon_len";
1373ostr << (
m_Sequence== 0 ?
"unaligned":
"introns");
1377ostr << (
m_Sequence== 0 ?
"unaligned_len":
"intron_len");
1397+
" not supported for protein alignments");
1400 typedefpair<const CProt_pos*, const CProt_pos*> TProteinExon;
1401vector<TProteinExon> protein_exons;
1402vector<TSeqRange> nuc_exons;
1408align_range.
SetTo(align_range.
GetTo()+1);
1409intron_ranges += align_range;
1417protein_exons.push_back(
1430nuc_exons.push_back(exon_range);
1434intron_ranges -= exon_range;
1438list<TSeqRange> range_list;
1439 if(!nuc_exons.empty()) {
1440range_list.insert(range_list.end(), nuc_exons.begin(),
1442}
else if(!intron_ranges.
Empty()) {
1443range_list.insert(range_list.end(), intron_ranges.
begin(),
1444intron_ranges.
end());
1449range_list.reverse();
1454 ITERATE(vector<TProteinExon>, it, protein_exons) {
1455 if(it != protein_exons.begin()) {
1459ostr <<
'('<< it->first->GetAmin()+1
1460<<
'/'<< it->first->GetFrame()
1461<<
".."<< it->second->GetAmin()+1
1462<<
'/'<< it->second->GetFrame() <<
')';
1465 ITERATE(list<TSeqRange>, it, range_list) {
1466 if(it != range_list.begin()) {
1480ostr << it->GetLength();
1499ostr <<
"Taxid of the ";
1502}
else if(
m_Row== 1) {
1506 "only pairwise alignments are supported");
1508ostr <<
" sequence";
1515}
else if(
m_Row== 1) {
1519 "only pairwise alignments are supported");
1528 "indexing past the end of available " 1529 "sequences in an alignment");
1533:
"subject_taxid");
1551}
else if(
m_Row== 1) {
1555 "only pairwise alignments are supported");
1557ostr <<
" sequence";
1564}
else if(
m_Row== 1) {
1565ostr <<
"subject ";
1568 "only pairwise alignments are supported");
1578 "indexing past the end of available " 1579 "sequences in an alignment");
1589desc_iter; ++desc_iter)
1594ostr << desc_iter->GetComment().substr(
m_Prefix.size() + 2);
1620ostr <<
"Full taxname of the ";
1624ostr <<
"Species name of the ";
1628ostr <<
"Genus name of the ";
1632ostr <<
"Kingdom name of the ";
1637 case0: ostr <<
"query";
break;
1638 case1: ostr <<
"subject";
break;
1641 "only pairwise alignments are supported");
1643ostr <<
" sequence";
1649 case0: ostr <<
"q";
break;
1650 case1: ostr <<
"s";
break;
1653 "only pairwise alignments are supported");
1658 case eSpecies: ostr <<
"species";
break;
1659 case eGenus: ostr <<
"genus";
break;
1660 case eKingdom: ostr <<
"kingdom";
break;
1669 "indexing past the end of available " 1670 "sequences in an alignment");
1680 m_Row== 0 ?
"query_taxid" 1681:
"subject_taxid"));
1685taxid =
m_Taxon1->GetSpecies(taxid);
1689taxid =
m_Taxon1->GetGenus(taxid);
1693taxid =
m_Taxon1->GetSuperkingdom(taxid);
1700 boolis_species =
false;
1701 boolis_uncultured =
false;
1704 m_Taxon1->GetOrgRef(taxid, is_species, is_uncultured, blast_name);
1707org->GetLabel(&
label);
1724ostr <<
"size of biggest gap";
1729ostr <<
"biggestgap";
1730}
else if(
m_Row== 0) {
1731ostr <<
"qbiggestgap";
1732}
else if(
m_Row== 1) {
1733ostr <<
"sbiggestgap";
1736 "only pairwise alignments are supported");
1756 for(
intIndex = 0; Index < Denseg.
GetNumseg(); Index++) {
1757 boolQGap = (Denseg.
GetStarts()[2*Index] == -1);
1761}
else if(
m_Row== 0 && QGap) {
1770 "biggestgap is only supported for Dense-sef and Disc alignments");
1785}
else if(
m_Row== 1) {
1789 "only pairwise alignments are supported");
1791ostr <<
" has a chromosome, its name";
1798}
else if(
m_Row== 1) {
1802 "only pairwise alignments are supported");
1818 if( (*SubIter)->CanGetSubtype() &&
1820(*SubIter)->CanGetName() ) {
1821Chrom = (*SubIter)->GetName();
1842}
else if(
m_Row== 1) {
1846 "only pairwise alignments are supported");
1848ostr <<
" has a clone, its name";
1855}
else if(
m_Row== 1) {
1859 "only pairwise alignments are supported");
1875 if( (*SubIter)->CanGetSubtype() &&
1877(*SubIter)->CanGetName() ) {
1878Clone = (*SubIter)->GetName();
1902}
else if(
m_Row== 1) {
1906 "only pairwise alignments are supported");
1908ostr <<
" sequence tech type";
1915}
else if(
m_Row== 1) {
1919 "only pairwise alignments are supported");
1928 stringTechStr =
"(none)";
1951ostr <<
"Strand of alignment in ";
1954}
else if(
m_Row== 1) {
1958 "only pairwise alignments are supported");
1960ostr <<
", 'b' if both in a Disc-seg alignment";
1966ostr <<
"qdiscstrand";
1967}
else if(
m_Row== 1) {
1968ostr <<
"sdiscstrand";
1971 "only pairwise alignments are supported");
1978 boolPlus=
false, Minus=
false;
1982 else if(Minus && !Plus)
1984 else if(Plus && Minus)
1989 bool& Plus,
bool& Minus)
2008 const string&
text)
2009: m_ColName(col_name)
2016ostr <<
"'"<<
m_Text<<
"' as fixed text";
2035ostr <<
"length_ungap / size of aligned query sequence range";
2040ostr <<
"align_len_ratio";
2050ostr << double(align_length) / double(align_range);
2063ostr <<
"Alignment CIGAR string";
2078 "cigar format only supports denseg alignments.");
2086 for(
intLoop = 0; Loop < NumSeg; Loop++) {
2087 intLength = Lens[Loop];
2090 if( Starts[ (Loop*2) ] == -1)
2092 else if( Starts[ (Loop*2)+1 ] == -1)
2097ostr << Length <<
Code;
2121ostr <<
"Name of ";
2124ostr <<
"Accession of ";
2127ostr <<
"Chain id of ";
2130ostr <<
"Chromosome containing ";
2134ostr << (
m_Type==
eFull?
"full assembly":
"assembly unit") <<
" of ";
2138}
else if(
m_Row== 1) {
2142 "only pairwise alignments are supported");
2144ostr <<
" sequence";
2151}
else if(
m_Row== 1) {
2155 "only pairwise alignments are supported");
2158ostr << (
m_Type==
eFull?
"fullasm":
"asmunit");
2170ostr <<
"chromosome";
2192?
"Assembly Name":
"Assembly Unit Name")
2197 if(obj.
HasField(
"Assembly Accession")) {
2199?
"Assembly Accession":
"Assembly Unit Accession")
2208 if(obj.
HasField(
"GenColl Chain")) {
2218 if(obj.
HasField(
"Chromosome")) {
2242Assm = Seq->GetFullAssembly();
2248Assm.
Reset(unit_assm);
2268 size_tchain_start = accession.find_first_of(
"123456789");
2269 size_tchain_end = accession.find(
'.');
2270ostr << accession.substr(chain_start, chain_end-chain_start);
2275ostr << Seq->GetChrName();
2283: m_Row(
row), m_Gencoll(gencoll)
2289ostr <<
"Patch type, if any, of ";
2292}
else if(
m_Row== 1) {
2293ostr <<
"sequence";
2296 "only pairwise alignments are supported");
2298ostr <<
" sequence";
2304ostr <<
"qpatchtype";
2305}
else if(
m_Row== 1) {
2306ostr <<
"spatchtype";
2309 "only pairwise alignments are supported");
2324 if(Seq->CanGetPatch_type()) {
2335: m_Row(
row), m_Gencoll(gencoll)
2341ostr <<
"Nearest Gap, if any, or edge, of ";
2344}
else if(
m_Row== 1) {
2348 "only pairwise alignments are supported");
2350ostr <<
" sequence";
2356ostr <<
"qnearestgap";
2357}
else if(
m_Row== 1) {
2358ostr <<
"snearestgap";
2361 "only pairwise alignments are supported");
2368list<TSeqRange>& Gaps)
2375 if(!Seq->CanGetStructure())
2380 if( (*DeltaIter)->IsLiteral()) {
2381 if(!(*DeltaIter)->GetLiteral().CanGetSeq_data() ||
2382(*DeltaIter)->GetLiteral().GetSeq_data().IsGap()) {
2384GapRange.
SetFrom(CurrStart);
2385GapRange.
SetLength((*DeltaIter)->GetLiteral().GetLength());
2386Gaps.push_back(GapRange);
2388CurrStart += (*DeltaIter)->GetLiteral().
GetLength();
2389}
else if( (*DeltaIter)->IsLoc()) {
2390 s_FindGaps(Assembly, *(*DeltaIter)->GetLoc().GetId(), CurrStart, Gaps);
2391CurrStart += (*DeltaIter)->GetLoc().GetTotalRange().GetLength();
2406list<TSeqRange> Gaps;
2409 if(SeqLength == 0) {
2420 ITERATE(list<TSeqRange>, GapIter, Gaps) {
2438ostr <<
"Blast Traceback string";
2452 "btop format only supports denseg alignments.");
2463: m_IndelType(indel_type)
2464, m_CoordinateRow(coordinate_row)
2473ostr <<
"List of frameshift indels";
2477ostr <<
"List of non-frameshifting indels";
2481ostr <<
"List of all indels wihin CDS";
2485ostr <<
", coordinates on query sequence";
2493ostr <<
"frameshifts";
2497ostr <<
"non-frameshift indels";
2501ostr <<
"indels in cds";
2505ostr <<
" on query";
2516 "failed to retrieve sequence for "+
2531vector<CSeq_align::SIndel> indels;
2567ostr <<
"Gene symbol for "<< (
m_Row== 0 ?
"query":
"subject");
2572ostr << (
m_Row== 0 ?
"query":
"subject") <<
"_gene_symbol";
2619 unsignedsnp_count = 0, snp_pos = 0;
2622 for(
unsigneddeletion_pos = 0; deletion_pos <
subject.size();
2625 stringsubject_with_del =
subject;
2626subject_with_del.insert(deletion_pos, 1,
query[deletion_pos]);
2627 if(
query== subject_with_del) {
2628 subject.insert(deletion_pos, 1,
'-');
2634 for(
unsignedindex = 0; index <
query.size(); ++index) {
2641 if(snp_count == 1) {
2653: m_CoordinateRow(
row)
2660ostr <<
"Mismatches or indels within start codon";
2662ostr <<
", coordinates on query sequence";
2668ostr <<
"Start codon changes";
2670ostr <<
" on query";
2681 "failed to retrieve sequence for "+
2704: m_CoordinateRow(
row)
2711ostr <<
"Mismatches or indels within stop codon";
2713ostr <<
", coordinates on query sequence";
2719ostr <<
"Stop codon changes";
2721ostr <<
" on query";
2747-> GetSeq().GetAnnot().front()
2748-> GetData().GetFtable().front();
2749cds->
SetData().SetCdregion().ResetCode_break();
2752 boolmissing_stop =
false;
2755trans.resize(trans.size() - 1);
2757missing_stop =
true;
2761 for(
size_tchanged_codons_count = 0, internal_stop_pos = trans.find(
'*');
2762internal_stop_pos != string::npos || missing_stop;
2763internal_stop_pos = trans.find(
'*', internal_stop_pos+1))
2765 if(internal_stop_pos == string::npos) {
2767internal_stop_pos = trans.size() - 1;
2768missing_stop =
false;
2776 if(changed_codons_count++) {
2788 const string&unavailable_string)
2789: m_Scores(&scores), m_Ostr(ostr), m_UnavailableString(unavailable_string)
3070formatter_it->second->SetGencoll(gencoll);
3080 const string&separators,
3081vector<string> &toks)
3083 unsigned intparen_level = 0;
3086 if(!paren_level && separators.find(*char_it) != string::npos) {
3087 if(!next_tok.empty()) {
3088toks.push_back(next_tok);
3093 if(*char_it ==
'(') {
3095}
else if(*char_it ==
')') {
3098 "Unbalanced parentheses: "+
format);
3102next_tok += *char_it;
3104 if(!next_tok.empty()) {
3105toks.push_back(next_tok);
3109 "Unbalanced parentheses: "+
format);
3115 CRegexpre1(
"score\\(([^,]*),([^)]*)\\)");
3116 CRegexpre2(
"score\\(([^)]*)\\)");
3118 CRegexptext_re1(
"text\\(([^,]*),([^)]*)\\)");
3119 CRegexptext_re2(
"text\\(([^)]*)\\)");
3121vector<string> toks;
3124 ITERATE(vector<string>, it, toks) {
3129}
else if(re1.
IsMatch(s)) {
3130 stringscore_name = re1.
GetSub(*it, 1);
3131 stringcol_name = re1.
GetSub(*it, 2);
3134}
else if(re2.
IsMatch(s)) {
3135 stringscore_name = re2.
GetSub(*it, 1);
3138}
else if(text_re1.
IsMatch(s)) {
3139 stringscore_name = text_re1.
GetSub(*it, 1);
3140 stringcol_name = text_re1.
GetSub(*it, 2);
3143}
else if(text_re2.
IsMatch(s)) {
3144 stringscore_name = text_re2.
GetSub(*it, 1);
3162(*it)->PrintHeader(
m_Ostr);
3164list< CIRef<IFormatter> >::const_iterator
i= it;
3179(*it)->Print(
m_Ostr, align);
3189list< CIRef<IFormatter> >::const_iterator
i= it;
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.
size_t GetSize(void) const
CRef< objects::CSeq_feat > ConvertAlignToAnnot(const objects::CSeq_align &align, objects::CSeq_annot &annot, objects::CBioseq_set &seqs, Int8 gene_id=0, const objects::CSeq_feat *cdregion_on_mrna=NULL)
Convert an alignment to an annotation.
void SetFlags(TFeatureGeneratorFlags)
void SetAllowedUnaligned(TSeqPos)
CConstRef< objects::CSeq_align > CleanAlignment(const objects::CSeq_align &align)
Clean an alignment according to our best guess of its biological representation.
string GetAccession() const
Retrieve the accession for this assembly.
string GetName() const
Retrieve the name of this assembly.
void Find(const CSeq_id_Handle &id, TSequenceList &sequences) const
Find all references to a given sequence within an assembly.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
ostream & AsString(ostream &s) const
void GetLabel(string *label) const
const_iterator end() const
const_iterator begin() const
TSeqPos GetTotalGapCount(TDim row=-1) const
Retrieves the total number of gaps in the given row an alignment; all gaps by default.
CRangeCollection< TSeqPos > GetAlignedBases(TDim row) const
Retrieves the locations of aligned bases in the given row, excluding gaps and incontinuities.
vector< SIndel > GetNonFrameshiftsWithinRange(const TSeqRange &range, TDim row=-1) const
CRange< TSeqPos > GetSeqRange(TDim row) const
GetSeqRange NB: On a Spliced-seg, in case the product-type is protein, these only return the amin par...
TSeqPos GetSeqStop(TDim row) const
TDim CheckNumRows(void) const
Validatiors.
const CSeq_id & GetSeq_id(TDim row) const
Get seq-id (the first one if segments have different ids).
bool GetNamedScore(const string &id, int &score) const
Get score.
vector< SIndel > GetFrameshiftsWithinRange(const TSeqRange &range, TDim row=-1) const
vector< SIndel > GetIndelsWithinRange(const TSeqRange &range, TDim row=-1) const
TSeqPos GetSeqStart(TDim row) const
ENa_strand GetSeqStrand(TDim row) const
Get strand (the first one if segments have different strands).
TSeqPos GetAlignLength(bool include_gaps=true) const
Get the length of this alignment.
TSeqPos GetNumGapOpenings(TDim row=-1) const
Retrieves the number of gap openings in a given row in an alignment (ignoring how many gaps are in th...
objects::CScoreLookup * m_Scores
CTabularFormatter_AlignEnd(int row, bool nominus=false)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
formatter for dumping alignment identifiers
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_AlignStart(int row, bool nominus=false)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_AlignStrand(int row)
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_AllSeqIds(int row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
formatter for dumping any score in an alignment
CTabularFormatter_AnyScore(const string &score_name, const string &col_name)
formatter for dumping any score in an alignment
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_AssemblyInfo(int row, EAssemblyType type, EInfo info)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
CConstRef< objects::CGC_Assembly > m_Gencoll
virtual void SetGencoll(CConstRef< objects::CGC_Assembly > gencoll)
formatter for dumping alignment identifiers
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
TSeqPos x_CalcBiggestGap(const objects::CSeq_align &align)
CTabularFormatter_BiggestGapBases(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping cigar of alignments
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_Cigar()
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
formatter for dumping sequence deflines
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_Defline(int row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
objects::sequence::CDeflineGenerator generator
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void x_RecurseStrands(const objects::CSeq_align &align, bool &Plus, bool &Minus)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_DiscStrand(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
formatter for Shannon's entropy
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping exons
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_FixedText(const string &col_name, const string &text)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_GapRanges(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_GeneSymbol(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_Indels(EIndelType indel_type, int coordinate_row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_MismatchPositions(int row)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CConstRef< objects::CGC_Assembly > m_Gencoll
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_NearestGap(int row, CConstRef< objects::CGC_Assembly > gencoll)
formatter for dumping organism names
std::unique_ptr< objects::CTaxon1 > m_Taxon1
~CTabularFormatter_OrgName()
CTabularFormatter_OrgName(int row, EField field=eFullTaxName)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CConstRef< objects::CGC_Assembly > m_Gencoll
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_PatchType(int row, CConstRef< objects::CGC_Assembly > gencoll)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_PercentId(bool gapped=false)
void PrintHeader(CNcbiOstream &ostr) const
formatter for dumping sequence Prot-refs (protein only)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_ProtRef(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
formatter for BLAST seg %
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
CTabularFormatter_SeqChrom(int row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_SeqClone(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_SeqId(int row, objects::sequence::EGetIdType id_type, bool tag_only=false, bool protein=false)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
objects::sequence::EGetIdType m_GetIdType
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_SeqLength(int row)
CTabularFormatter_StartCodonChanges(int row)
void PrintHelpText(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHeader(CNcbiOstream &ostr) const
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_StopCodonChanges(int row)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
formatter for dumping tax-ids
void PrintHelpText(CNcbiOstream &ostr) const
CTabularFormatter_TaxId(int row)
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_Tech(int row)
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
void Print(CNcbiOstream &ostr, const objects::CSeq_align &align)
CTabularFormatter_Traceback()
void PrintHelpText(CNcbiOstream &ostr) const
void PrintHeader(CNcbiOstream &ostr) const
Simple tabular alignment formatter This is a replacement for the BLAST tabular formatter that support...
void SetGencoll(CConstRef< objects::CGC_Assembly > gencoll)
void RegisterField(const string &field_name, IFormatter *field_formatter)
objects::CScoreLookup * m_Scores
void Format(const objects::CSeq_align &align)
static void s_RegisterStandardFields(CTabularFormatter &formatter)
void SetFormat(const string &format)
string m_UnavailableString
CTabularFormatter(CNcbiOstream &ostr, objects::CScoreLookup &scores, const string &unavailable_string="")
list< CIRef< IFormatter > > m_Formatters
TFormatterMap m_FormatterMap
CConstRef< CUser_field > GetFieldRef(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
bool HasField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Verify that a named field exists.
const CUser_field & GetField(const string &str, const string &delim=".", NStr::ECase use_case=NStr::eCase) const
Access a named field in this user object.
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
int TSignedSeqPos
Type for signed sequence position.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
SStrictId_Tax::TId TTaxId
Taxon id type.
#define TAX_ID_FROM(T, value)
void swap(NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair1, NCBI_NS_NCBI::pair_base_member< T1, T2 > &pair2)
#define ERR_POST(message)
Error posting with file, line number information but without error codes.
void Error(CExceptionArgs_Base &args)
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
const string & FindName(TEnumValueType value, bool allowBadValue) const
Find name of the enum by its numeric value.
const string AsFastaString(void) const
virtual void Assign(const CSerialObject &source, ESerialRecursionMode how=eRecursive)
Optimized implementation of CSerialObject::Assign, which is not so efficient.
void GetLabel(string *label, ELabelType type=eDefault, TLabelFlags flags=fLabel_Default) const
Append a label for this Seq-id to the supplied string.
CConstRef< CSeq_id > GetSeqId(void) const
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
@ eContent
Untagged human-readable accession or the like.
ENa_strand GetStrand(void) const
Get the location's strand.
TSeqPos GetStart(ESeqLocExtremes ext) const
Return start and stop positions of the seq-loc.
const CSeq_id * GetId(void) const
Get the id of the location return NULL if has multiple ids or no id at all.
bool IsPartialStop(ESeqLocExtremes ext) const
const CSeq_id & GetId(const CSeq_loc &loc, CScope *scope)
If all CSeq_ids embedded in CSeq_loc refer to the same CBioseq, returns the first CSeq_id found,...
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.
@ eGetId_Best
return the "best" gi (uses FindBestScore(), with CSeq_id::CalculateScore() as the score function
@ eGetId_ForceGi
return only a gi-based seq-id
@ eGetId_HandleDefault
returns the ID associated with a bioseq-handle
CRef< CSeq_loc > Map(const CSeq_loc &src_loc)
Map seq-loc.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
vector< CSeq_id_Handle > TIds
const CSeqFeatData & GetData(void) const
TMol GetBioseqMolType(void) const
Get some values from core:
@ eCoding_Iupac
Set coding to printable coding (Iupacna or Iupacaa)
SAnnotSelector & SetResolveTSE(void)
SetResolveTSE() is equivalent to SetResolveMethod(eResolve_TSE).
SAnnotSelector & IncludeFeatType(TFeatType type)
Include feature type in the search.
const CSeq_loc & GetProduct(void) const
TRange GetRange(void) const
Get range for mapped seq-feat's location.
void GetSeqData(TSeqPos start, TSeqPos stop, string &buffer) const
Fill the buffer string with the sequence data for the interval [start, stop).
void Reset(void)
Reset reference object.
position_type GetLength(void) const
TThisType & SetLength(position_type length)
bool IsMatch(CTempString str, TMatch flags=fMatch_default)
Check existence substring which match a specified pattern.
CTempString GetSub(CTempString str, size_t idx=0) const
Get pattern/subpattern from previous GetMatch().
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
static bool EndsWith(const CTempString str, const CTempString end, ECase use_case=eCase)
Check if a string ends with a specified suffix value.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
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.
static string & ToLower(string &str)
Convert string to lower case â string& version.
@ eNocase
Case insensitive compare.
static const char label[]
const TSubtype & GetSubtype(void) const
Get the Subtype member data.
bool CanGetSubtype(void) const
Check if it is safe to call GetSubtype method.
list< CRef< CSubSource > > TSubtype
void SetFrom(TFrom value)
Assign a value to From data member.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
void SetTo(TTo value)
Assign a value to To data member.
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
const TLocus & GetLocus(void) const
Get the Locus member data.
const TStr & GetStr(void) const
Get the variant data.
bool IsStr(void) const
Check if variant Str is selected.
const TTag & GetTag(void) const
Get the Tag member data.
const TData & GetData(void) const
Get the Data member data.
const TStr & GetStr(void) const
Get the variant data.
TInt GetInt(void) const
Get the variant data.
const TType & GetType(void) const
Get the Type member data.
TUnit & SetUnit(void)
Select the variant.
const TProtpos & GetProtpos(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
const TDenseg & GetDenseg(void) const
Get the variant data.
E_Choice Which(void) const
Which variant is currently selected.
bool IsSetId(void) const
alignment id Check if a value has been assigned to Id data member.
bool IsSetExt(void) const
extra info Check if a value has been assigned to Ext data member.
const TStarts & GetStarts(void) const
Get the Starts member data.
TGenomic_start GetGenomic_start(void) const
Get the Genomic_start member data.
const TLens & GetLens(void) const
Get the Lens member data.
vector< TSignedSeqPos > TStarts
TProduct_type GetProduct_type(void) const
Get the Product_type member data.
list< CRef< CObject_id > > TId
list< CRef< CUser_object > > TExt
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.
bool CanGetSegs(void) const
Check if it is safe to call GetSegs method.
TDim GetDim(void) const
Get the Dim member data.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
bool IsDisc(void) const
Check if variant Disc is selected.
const TExt & GetExt(void) const
Get the Ext member data.
TGenomic_end GetGenomic_end(void) const
Get the Genomic_end member data.
bool IsSpliced(void) const
Check if variant Spliced is selected.
TNumseg GetNumseg(void) const
Get the Numseg member data.
list< CRef< CSeq_align > > Tdata
const TDisc & GetDisc(void) const
Get the variant data.
TNucpos GetNucpos(void) const
Get the variant data.
const Tdata & Get(void) const
Get the member data.
const TSegs & GetSegs(void) const
Get the Segs member data.
bool IsDenseg(void) const
Check if variant Denseg is selected.
@ e_Product_ins
insertion in product sequence (i.e. gap in the genomic sequence)
@ e_Genomic_ins
insertion in genomic sequence (i.e. gap in the product sequence)
@ e_Match
both sequences represented, product and genomic sequences match
@ e_Mismatch
both sequences represented, product and genomic sequences do not match
const TLocation & GetLocation(void) const
Get the Location member data.
void SetData(TData &value)
Assign a value to Data data member.
const TGene & GetGene(void) const
Get the variant data.
const TProt & GetProt(void) const
Get the variant data.
ENa_strand
strand of nucleic acid
bool IsGeneral(void) const
Check if variant General is selected.
const TGeneral & GetGeneral(void) const
Get the variant data.
@ eNa_strand_both
in forward orientation
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
const TSource & GetSource(void) const
Get the variant data.
TTech GetTech(void) const
Get the Tech member data.
bool IsSetTech(void) const
Check if a value has been assigned to Tech data member.
bool CanGetTech(void) const
Check if it is safe to call GetTech method.
list< CRef< CDelta_seq > > Tdata
const TMolinfo & GetMolinfo(void) const
Get the variant data.
@ e_Comment
a more extensive comment
@ e_Molinfo
info on the molecule and techniques
@ e_Source
source of materials, includes Org-ref
unsigned int
A callback function used to compare two keys in a database.
The blob sat and sat key Both must be positive integers</td > n< td > Non empty string The interpretation of the blob id depends on a processor Cassandra n processor expects the following format
static void text(MDB_val *v)
constexpr auto sort(_Init &&init)
Magic spell ;-) needed for some weird compilers... very empiric.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
#define row(bind, expected)
static void s_Split(const string &format, const string &separators, vector< string > &toks)
Split a string, but ignore separators within parentheses.
TSeqPos s_FindGaps(const CGC_Assembly &Assembly, const CSeq_id &Id, const TSeqPos Offset, list< TSeqRange > &Gaps)
void s_AlignToSeqRanges(const CSeq_align &align, int row, list< TSeqRange > &ranges)
static string s_CodonVariation(const CSeq_align &align, TSeqPos pos, CScope &scope, int row)
C++ wrappers for the Perl-compatible regular expression (PCRE) library.
const value_slice::CValueConvert< value_slice::SRunTimeCP, FROM > Convert(const FROM &value)
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