{
"TAX_BROWSER_URL",
"<@protocol@>//www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi"},
64{
"BLAST_NAME_LINK",
"<a href=\"<@taxBrowserURL@>?id=<@bl_taxid@>\" target=\"lnktx<@rid@>\" title=\"Show taxonomy info for <@blast_name@> (taxid <@bl_taxid@>)\"><@blast_name@></a>"},
66{
"ORG_REPORT_TABLE",
"<table><caption><h2>Organism Report</h2></caption><tr><th>Accession</th><th>Descr</th><th>Score</th><th>E-value</th></tr><@table_rows@></table><@taxidToSeqsMap@>"},
68{
"ORG_REPORT_ORG_HEADER",
"<tr><th colspan=\"4\"><a href=\"<@taxBrowserURL@>?id=<@taxid@>\" name=\"<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@> <@common_name@> [<@blast_name_link@>] taxid <@taxid@></th></tr>"},
70{
"ORG_REPORT_ORG_HEADER_NO_TAX_CON",
"<tr><th colspan=\"4\"><a href=\"<@taxBrowserURL@>?id=<@taxid@>\" name=\"<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@> <@common_name@> [<@blast_name@>]</th></tr>"},
72{
"ORG_REPORT_TABLE_HEADER",
"<tr><th>Accession</th><th>Description</th><th>Score</th><th>E-value</th></tr>"},
74{
"ORG_REPORT_TABLE_ROW",
"<tr><td><a title=\"Show report for <@acc@>\" target=\"lnktx<@rid@>\" href=\"<@protocol@>//www.ncbi.nlm.nih.gov/protein/<@acc@>?report=fwwwtax&log$=taxrep&RID=<@rid@>\"><@acc@></a></td><td><@descr_abbr@></td><td><@score@></td><td><@evalue@></td></tr>"},
76{
"TAXID_TO_SEQ_MAP",
"<input type=\"hidden\" id=\"txForSeq_<@taxid@>\" value=\"<@giList@>\" />"},
78{
"LINAGE_REPORT_TABLE",
"<table><caption><h2>Linage Report</h2><caption><@table_rows@></table>"},
80{
"LINAGE_REPORT_TABLE_HEADER",
"<tr><th>Organism</th><th>Blast Name</th><th>Score</th><th>Number of Hits</th><th>Description</th></tr>"},
82{
"LINAGE_REPORT_ORG_HEADER",
"<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a><td><@blast_name_link@></td><td colspan =\"3\"></td></tr>"},
84{
"LINAGE_REPORT_TABLE_ROW",
"<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@blast_name_link@></td><td><@score@></td><td><a href=\"#<@taxid@>\" title=\"Show organism report for <@scientific_name@>\"><@numhits@></a></td><td><a title=\"Show report for <@acc@> <@descr_abbr@>\" target=\"lnktx<@rid@>\" href=\"<@protocol@>//www.ncbi.nlm.nih.gov/protein/<@acc@>?report=genbank&log$=taxrep&RID=<@rid@>\"><@descr_abbr@></a></td></tr>"},
86{
"TAXONOMY_REPORT_TABLE",
"<table><caption><h2>Taxonomy Report</h2><caption><@table_rows@></table>"},
88{
"TAXONOMY_REPORT_TABLE_HEADER",
"<tr><th>Taxonomy</th><th>Number of hits</th><th>Number of organisms</th><th>Description</th></tr>"},
90{
"TAXONOMY_REPORT_ORG_HEADER",
"<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@numhits@></td><td><@numOrgs@></td><td><@descr_abbr@></td></tr>"},
92{
"TAXONOMY_REPORT_TABLE_ROW",
"<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@numhits@></td><td><@numOrgs@></td><td><@descr_abbr@></td></tr>"},
94{
"ORG_REPORT_TXT_TABLE",
"<@org_report_caption@>\n<@acc_hd@><@descr_hd@><@score_hd@><@evalue_hd@>\n<@table_rows@>"},
96{
"ORG_REPORT_TXT_ORG_HEADER",
"<@scientific_name@> <@common_name@> [<@blast_name_link@>] taxid <@taxid@>"},
98{
"ORG_REPORT_TXT_ORG_HEADER_NO_TAX_CON",
"<@scientific_name@> <@common_name@> [<@blast_name@>]"},
100{
"ORG_REPORT_TXT_TABLE_HEADER",
" <@acc_hd@><@descr_hd@><@score_hd@><@evalue_hd@>\n"},
102{
"ORG_REPORT_TXT_TABLE_ROW",
" <@acc@><@descr_text@><@score@><@evalue@>\n"},
104{
"ORG_REPORT_TXT_TABLE_CAPTION",
"Organism Report"},
106{
"ORG_ACC_TXT_TABLE_HEADER",
"Accession"},
108{
"ORG_DESCR_TXT_TABLE_HEADER",
"Description"},
110{
"ORG_SCORE_TXT_TABLE_HEADER",
"Score"},
112{
"ORG_EVALUE_TXT_TABLE_HEADER",
"E-value"},
119 autocit = kMapTagToString.find(tag_name);
121 if( cit != kMapTagToString.end()) {
122mappedStr = cit->second;
129 unsigned intdisplayOption,
130 boolconnectToTaxServer,
131 unsigned intlineLength)
134: m_SeqalignSetRef(&seqalign),
136m_DisplayOption(displayOption),
137m_ConnectToTaxServer(connectToTaxServer),
138m_LineLength(lineLength)
143 if(m_ConnectToTaxServer) {
205 unsigned intdisplayOption,
206 boolconnectToTaxServer,
207 unsigned intlineLength)
210: m_AccessionTaxidList(accessionTaxidList),
212m_DisplayOption(displayOption),
213m_ConnectToTaxServer(connectToTaxServer),
214m_LineLength(lineLength)
236 for(
size_t i= 0;
i< it->second.seqInfoList.size();
i++) {
237 SSeqInfo* seqInfo = it->second.seqInfoList[
i];
238 if(seqInfo)
deleteseqInfo;
310 booluseTaxid =
false;
311 if(taxid == currTaxid) {
344 if(taxid != currTaxid) {
397 if((*m_TreeTaxInfoMap).count(taxid) != 0 ) {
409 if((*m_TreeTaxInfoMap).count(taxid) != 0 ) {
410(*m_TreeTaxInfoMap)[taxid].depth =
m_Depth;
422 if((*m_TreeTaxInfoMap).count(taxid) != 0 ) {
433 for(
size_tj = 0; j <
m_Lineage.size(); j++) {
434 if(!lineage.empty()) lineage +=
",";
437cerr << header <<
" for taxid: "<< tax_node->
GetTaxId() <<
" "<< tax_node->
GetName() <<
" depth: "<<
m_Depth<<
" lineage: "<< lineage << endl;
452 stringorgReportData;
465 stringprevTaxid,nextTaxid, hidePrevTaxid, hideNextTaxid, hideTop;
466 const stringkDisabled =
"disabled=\"disabled\"";
468hidePrevTaxid = kDisabled;
472hideNextTaxid = kDisabled;
477 if(i < m_BlastResTaxInfo->orderedTaxids.size() - 1) {
488 stringorgReportSeqInfo;
489 for(
size_tj = 0; j < seqsForTaxID.
seqInfoList.size(); j++) {
492orgReportSeqInfo += orgReportTableRow;
495 stringoneOrgInfo = orgHeader + orgReportSeqInfo;
496orgReportData += oneOrgInfo;
500 stringorgReportTxtTableCaption =
s_TagToConstString(
"ORG_REPORT_TXT_TABLE_CAPTION");
509 stringorgEValueTxtTableHeader =
s_TagToConstString(
"ORG_EVALUE_TXT_TABLE_HEADER");
515 out<< orgReportData;
526 stringlngReportTableRow;
527 unsigned int depth= 0;
529 for(
size_t i= 0;
i< alnSeqTaxInfo.
lineage.size();
i++) {
540lngReportRows += lngReportTableRow;
548lngReportRows += lngReportTableRow;
554 out<< lngReportData;
561 stringtaxReportRows;
564 for(
size_t i= 0;
i< taxTreeTaxids.size();
i++) {
565 TTaxIdtaxid = taxTreeTaxids[
i];
567 stringtaxReportTableRow;
579 stringlineage,parentTaxid;
580 for(
size_t i= 0;
i< taxInfo.
lineage.size();
i++) {
581 if(!lineage.empty()) lineage +=
" ";
583 if(
i== taxInfo.
lineage.size() - 1) {
596taxReportRows += taxReportTableRow;
599 out<< taxReportData;
647vector <TTaxId> taxidsToRoot;
650 booltax_load_ok =
false;
656 for(
size_t i= 0;
i< alignTaxids.size();
i++) {
657 TTaxIdtax_id = alignTaxids[
i];
662 if(!tax_load_ok)
break;
664 if(tax_node && tax_node->
GetTaxId() != tax_id) {
667cerr <<
"*******TAXID MISMATCH: changing "<< tax_id <<
" to "<< tax_node->
GetTaxId() <<
"-"<< endl;
670taxInfo.
taxid= newTaxid;
671 for(
size_tj = 0; j < taxInfo.
seqInfoList.size(); j++) {
673seqInfo->
taxid= newTaxid;
682 ITERATE(vector<TTaxId>, it, taxidsToRoot) {
688 if(!tax_load_ok)
break;
720cerr <<
"******"<< title <<
"**********"<< endl;
721 for(
size_t i= 0;
i< taxids.size();
i++) {
725 for(
size_tj = 0; j < taxInfo.
lineage.size(); j++) {
726 if(!lineage.empty()) lineage +=
",";
729cerr <<
"taxid="<< taxid <<
" "<< taxInfo.
scientificName<<
" "<< taxInfo.
blastName<<
" "<<
"depth: "<< taxInfo.
depth<<
" numHits: "<< taxInfo.
numHits<<
" numOrgs: "<< taxInfo.
numOrgs<<
" numChildren: "<< taxInfo.
numChildren<<
" lineage: "<< lineage << endl;
761list< CRef< CTaxon1_name > > nameList;
766 if((*iter)->CanGetTaxid() && (*iter)->IsSetCde() && (*iter)->GetCde() == blastNameCde) {
775vector <TTaxId> lineage =
info.lineage;
776 stringstrTaxidLineage;
777 for(
size_tj = 0; j < lineage.size(); j++) {
778 if(!strTaxidLineage.empty()) strTaxidLineage +=
" ";
781 returnstrTaxidLineage;
790 returnlineage1 > lineage2;
796vector <TTaxId> alignHitLineage;
797 for(
size_t i= 0;
i< bestHitLinage.size();
i++) {
798 if(taxTreeInfo.
lineage.size() - 1 >=
i) {
799 TTaxIdtaxid = bestHitLinage[
i];
800 if(taxTreeInfo.
lineage[
i] == taxid) {
801alignHitLineage.push_back(taxid);
805 returnalignHitLineage;
813cerr <<
"*********Lineage*********"<< endl;
815 TTaxIdtaxid = iter->taxid;
816 stringname = iter->scientificName;
817cerr <<
"taxid"<< taxid <<
" "<< name <<
": ";
818 for(
size_t i= 0;
i< iter->lineage.size();
i++) {
819 TTaxIdlnTaxid = iter->lineage[
i];
833list <STaxInfo> alnTaxInfo;
834 for(
size_t i= 0;
i< alignTaxids.size();
i++) {
837taxInfo.
lineage= alignHitLineage;
843 for(
size_t i= 0;
i< iter->lineage.size();
i++) {
844 TTaxIdlnTaxid = iter->lineage[
i];
863 info->taxid = taxid;
906 stringorgEValueTxtTableHeader =
s_TagToConstString(
"ORG_EVALUE_TXT_TABLE_HEADER");
915SSeqInfo *seqInfo =
newSSeqInfo;
920 stringtotal_bit_score_buf, raw_score_buf;
923seqInfo->displGi = seqInfo->gi;
924seqInfo->dispSeqID = seqInfo->label;
939list<string>& use_this_seqid)
942SSeqInfo *seqInfo =
NULL;
944 constlist<CRef<CSeq_id> > ids = bdl->GetSeqid();
949 if(use_this_seqid.empty() ||
match) {
951seqInfo =
newSSeqInfo();
956 stringtotal_bit_score_buf, raw_score_buf;
961 if(bdl->IsSetTaxid() && bdl->CanGetTaxid()){
962taxid = bdl->GetTaxid();
964seqInfo->taxid = taxid;
967 if(bdl->IsSetTitle()){
968seqInfo->title = bdl->GetTitle();
970 if(seqInfo->title.empty()) {
981 intscore, sum_n, num_ident;
989subid = &((*iter)->GetSeq_id(1));
991 if(!previousId.
Empty() && subid->
Match(*previousId))
continue;
993list<string> use_this_seqid;
995sum_n, num_ident, use_this_seqid);
998 if( !handle )
continue;
1010 if(dispGI ==
ZERO_GI&& dispSeqID.empty()){
1013 if(dispGI ==
ZERO_GI&& !dispSeqID.empty()) {
1014dispSeqID = seqInfo->
label;
1043std::list<std::pair<std::string,TTaxId> >::iterator at_it;
1058seqsForTaxID.
taxid= taxid;
1084 TTaxIdtaxid = accTaxidPair.second;
1085 stringaccession = accTaxidPair.first;
1089seqInfo->
label= accession;
1092seqInfo->
taxid= taxid;
1099seqsForTaxID.
taxid= taxid;
1104seqsForTaxID.
accList= accession;
1127 returnreportTableRow;
1157 returnreportTableRow;
1168 stringtxtOrgValue = reportTableRow;
1177numHits = (numHits > 0) ? numHits : taxInfo.
numHits;
1181 for(
size_t i= 0;
i<
depth;
i++) {
1186 returnreportTableRow;
static CRef< CScope > m_Scope
User-defined methods of the data storage class.
static string GetProtocol(void)
static void GetAlnScores(const objects::CSeq_align &aln, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< TGi > &use_this_gi)
Extract score info from blast alingment.
@ eAddEOLAtLineEnd
add EOL at the beginning of the string
@ eAddEOLAtLineStart
add spaces at the end of the string
static string AddSpaces(string paramVal, size_t maxParamLength, int spacesFormatFlag=eSpacePosToCenter)
Calculate the number of spaces and add them to paramVal.
static void GetScoreString(double evalue, double bit_score, double total_bit_score, int raw_score, string &evalue_str, string &bit_score_str, string &total_bit_score_str, string &raw_score_str)
format evalue and bit_score
static string MapTemplate(string inpString, string tmplParamName, Int8 templParamVal)
Replace template tags by real data.
static bool MatchSeqInSeqList(TGi cur_gi, CRef< objects::CSeq_id > &seqID, list< string > &use_this_seq, bool *isGiList=NULL)
Matches text seqID or gi with the list of seqIds or gis.
static CRef< objects::CSeq_id > GetDisplayIds(const objects::CBioseq_Handle &handle, const objects::CSeq_id &aln_id, list< TGi > &use_this_gi, TGi &gi, TTaxId &taxid)
Scan the the list of blast deflines and find seqID to be use in display.
static TGi GetGiForSeqIdList(const list< CRef< objects::CSeq_id > > &ids)
return gi from id list
static string MapSpaceTemplate(string inpString, string tmplParamName, string templParamVal, unsigned int maxParamLength, int spacesFormatFlag=eSpacePosAtLineEnd)
Replace template tags by real data and calculate and add spaces dependent on maxParamLength and space...
static string GetLabel(CConstRef< objects::CSeq_id > id, bool with_version=false)
Return a label for an ID Tries to recreate behavior of GetLabel before a change that prepends "ti|" t...
Class for computing sequences' titles ("definitions").
ITreeIterator::EAction LevelEnd(const ITaxon1Node *tax_node)
CDownwardTreeFiller(CTaxFormat::TSeqTaxInfoMap *treeTaxInfoMap)
vector< TTaxId > m_Lineage
CTaxFormat::TSeqTaxInfoMap * m_TreeTaxInfoMap
void SetDebugMode(bool debug)
virtual ~CDownwardTreeFiller()
ITreeIterator::EAction LevelBegin(const ITaxon1Node *tax_node)
ITreeIterator::EAction Execute(const ITaxon1Node *tax_node)
void x_PrintTaxInfo(string header, const ITaxon1Node *tax_node)
static void GetTaxInfo(TTaxId taxid, SSeqDBTaxInfo &info)
Get taxonomy information.
static CRef< CBlast_def_line_set > ExtractBlastDefline(const CBioseq &bioseq)
Extract a Blast-def-line-set object from a Bioseq retrieved by CSeqDB.
unsigned int m_MaxScoreLength
void x_InitBlastNameTaxInfo(STaxInfo &taxInfo)
CConstRef< objects::CSeq_align_set > m_SeqalignSetRef
reference to seqalign set
string m_TaxBrowserURL
Taxonomy Browser URL.
SBlastResTaxInfo * m_BlastResTaxInfo
SBlastResTaxInfo structure containing information for taxids in alignment, orderedTaxids are ordered ...
bool m_Debug
String containig map of taxids to corresponding accessions.
SBlastResTaxInfo * m_TaxTreeinfo
SBlastResTaxInfo structure containing information for all taxids in common tree, intermediate nodes w...
struct STaxInfo & GetTaxTreeInfo(TTaxId taxid)
Gets info for sequences in taxonomy tree corresponding to taxid.
unsigned int m_MaxAccLength
CNcbiIfstream * m_ConfigFile
CTaxon1 * m_TaxClient
Taxonomy server client.
list< STaxInfo > m_AlnLineageTaxInfo
STaxInfo structure list contaning info for lineage report ordered by linage display order....
CTaxFormat(const objects::CSeq_align_set &seqalign, objects::CScope &scope, unsigned int displayOption=eHtml, bool connectToTaxServer=true, unsigned int lineLength=100)
Constructors.
objects::CScope & m_Scope
void x_InitTaxInfoMapFromAccList(void)
struct STaxInfo & GetAlignTaxInfo(TTaxId taxid)
Gets info for sequences in alignment corresponding to taxid.
void x_InitBlastDBTaxInfo(SSeqInfo *seqInfo)
void x_InitTaxReport(void)
void x_InitTaxFormat(void)
CTaxFormat::SSeqInfo * x_FillTaxDispParams(const CRef< objects::CBlast_def_line > &bdl, const objects::CBioseq_Handle &bsp_handle, double bits, double evalue, list< string > &use_this_seqid)
void x_InitOrgTaxMetaData(void)
~CTaxFormat()
Destructor.
bool m_ConnectToTaxServer
bool isTaxidInAlign(TTaxId taxid)
Checks if there are sequences in alignment with specified taxid.
unsigned int m_DisplayOption
string x_MapSeqTemplate(string seqTemplate, SSeqInfo *seqInfo)
vector< TTaxId > & GetTaxTreeTaxIDs(void)
Gets taxids for sequences in taxonomy tree.
void x_LoadTaxTree(void)
Initializes CTaxon1 *m_TaxClient.
void x_InitLineageMetaData(void)
unsigned int m_MaxDescrLength
vector< TTaxId > m_BestHitLineage
vector of <int> containing taxids for the best hit linage
void x_PrintLineage(void)
unsigned int m_MaxEvalLength
list< pair< string, TTaxId > > m_AccessionTaxidList
void x_InitTaxIdToSeqsMap(void)
string x_MapTaxInfoTemplate(string tableRowTemplate, STaxInfo &taxInfo, unsigned int depth=0)
void x_InitTextFormatInfo(CTaxFormat::SSeqInfo *seqInfo)
STaxFormatTemplates * m_TaxFormatTemplates
void DisplayTaxonomyReport(CNcbiOstream &out)
Displays Taxonomy Report.
vector< TTaxId > & GetAlignTaxIDs(void)
Gets taxids for sequences in alignment.
void x_InitTaxClient(void)
void DisplayOrgReport(CNcbiOstream &out)
Displays Organism Report.
void x_InitLineageReport(void)
string m_Protocol
protocol, default https otherwise get from .ncbirc
unsigned int m_LineLength
void x_InitTaxInfoMap(void)
void DisplayLineageReport(CNcbiOstream &out)
Displays Linage Report.
void x_PrintTaxInfo(vector< TTaxId > taxids, string title)
CRef< ITreeIterator > m_TreeIterator
const string & GetLastError() const
bool GetPopsetJoin(const TTaxIdList &ids_in, TTaxIdList &ids_out)
TTaxId SearchTaxIdByName(const string &orgname, ESearch mode=eSearch_TokenSet, list< CRef< CTaxon1_name > > *name_list_out=NULL)
bool LoadNode(TTaxId tax_id, const ITaxon1Node **ppNode=NULL)
TTaxNameClass GetNameClassId(const string &class_name)
CRef< ITreeIterator > GetTreeIterator(EIteratorMode mode=eIteratorMode_Default)
bool GetBlastName(TTaxId tax_id, string &blast_name_out)
void x_PrintTaxInfo(string header)
CUpwardTreeFiller(CTaxFormat::TSeqTaxInfoMap &seqAlignTaxInfoMap)
void x_InitTreeTaxInfo(void)
ITreeIterator::EAction LevelEnd(const ITaxon1Node *tax_node)
ITreeIterator::EAction LevelBegin(const ITaxon1Node *tax_node)
stack< CTaxFormat::STaxInfo * > m_Nodes
void x_InitTaxInfo(const ITaxon1Node *tax_node)
CTaxFormat::SBlastResTaxInfo * GetTreeTaxInfo(void)
CTaxFormat::STaxInfo * m_Curr
virtual ~CUpwardTreeFiller()
CTaxFormat::SBlastResTaxInfo * m_TreeTaxInfo
SBlastResTaxInfo Map containing information for all taxids in common tree, intermidiate nodes with no...
ITreeIterator::EAction Execute(const ITaxon1Node *tax_node)
void SetDebugMode(bool debug)
CTaxFormat::TSeqTaxInfoMap m_SeqAlignTaxInfoMap
Map containing information for taxids and corresponding sequnces in alignment.
virtual const string & GetName() const =0
virtual const string & GetBlastName() const =0
virtual TTaxId GetTaxId() const =0
EAction TraverseUpward(I4Each &, unsigned levels=kMax_UInt)
EAction TraverseDownward(I4Each &, unsigned levels=kMax_UInt)
container_type::iterator iterator
const_iterator begin() const
const_iterator end() const
iterator_bool insert(const value_type &val)
container_type::value_type value_type
static unsigned char depth[2 *(256+1+29)+1]
std::ofstream out("events_result.xml")
main entry point for tests
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define TAX_ID_TO(T, tax_id)
SStrictId_Tax::TId TTaxId
Taxon id type.
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
TGi FindGi(const container &ids)
Return gi from id list if exists, return 0 otherwise.
bool Match(const CSeq_id &sid2) const
Match() - TRUE if SeqIds are equivalent.
static int WorstRank(const CRef< CSeq_id > &id)
string GenerateDefline(const CBioseq_Handle &bsh, TUserFlags flags=0)
Main method.
TBioseqCore GetBioseqCore(void) const
Get bioseq core structure.
bool Empty(void) const THROWS_NONE
Check if CConstRef is empty â not pointing to any object which means having a null value.
bool Empty(void) const THROWS_NONE
Check if CRef is empty â not pointing to any object, which means having a null value.
virtual const string & Get(const string §ion, const string &name, TFlags flags=0) const
Get the parameter value.
#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.
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::ifstream CNcbiIfstream
Portable alias for ifstream.
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.
C::value_type FindBestChoice(const C &container, F score_func)
Find the best choice (lowest score) for values in a container.
const Tdata & Get(void) const
Get the member data.
list< CRef< CSeq_align > > Tdata
const TId & GetId(void) const
Get the Id member data.
std::false_type tagStrNocase
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)
Defines BLAST database access classes.
vector< TTaxId > orderedTaxids
taxids ordered by highest score or common tree top to bottom tarveres??
TSeqTaxInfoMap seqTaxInfoMap
Map containing info for orderedTaxids.
CRef< objects::CSeq_id > seqID
seqID used in defline
TGi displGi
gi for seq that is displayed in alignment section
string label
sequence label
string title
sequnce title
string lineageReportTableRow
Template for displaying lineage report table row.
string lineageReportTableHeader
Template for displaying lineage report table header.
string blastNameLink
Template for displaying blast name link.
string taxIdToSeqsMap
Tempalte for mapping taxids to seqlist.
string orgReportTable
Template for displaying organism report table.
string taxonomyReportOrganismHeader
Template for displaying taxonomy report organism header.
string taxonomyReportTableHeader
Template for displaying taxonomy report table header.
string taxonomyReportTable
Template for displaying taxonomy report table.
string taxonomyReportTableRow
Template for displaying taxonomy report table row.
string orgReportOrganismHeader
Template for organism report organism header.
string orgReportTableRow
Tempalte for displaying organism report table row.
string orgReportTableHeader
Template for displaying organism report table header.
string lineageReportOrganismHeader
Template for displaying lineage report organism header.
string lineageReportTable
Template for displaying lineage report table.
string blastName
blastName
unsigned int numChildren
Number of childre for taxid.
string taxidList
string of "children" taxids containing sequences in alignment separated by comma corresponding to tax...
string commonName
commonName
int blNameTaxid
blastName taxid
unsigned int numOrgs
Number of organism in alignmnet corresponding to taxid and it's children.
string accList
string of accessions separated by comma corresponding to taxid
vector< TTaxId > lineage
vector of taxids containg lineage for taxid
string giList
string of gis separated by comma corresponding to taxid
unsigned int numHits
Number of sequences in alignmnet corresponding to taxid and it's children.
vector< SSeqInfo * > seqInfoList
vector of SSeqInfo corresponding to taxid
unsigned int depth
Depth.
string scientificName
scientificName
string common_name
Common name, such as "noisy night monkey".
string blast_name
A simple category name, such as "birds".
string scientific_name
Scientific name, such as "Aotus vociferans".
static string s_TagToConstString(const string tag_name)
static vector< TTaxId > s_InitAlignHitLineage(vector< TTaxId > bestHitLinage, struct CTaxFormat::STaxInfo &taxTreeInfo)
static string s_TaxidLinageToString(CTaxFormat::STaxInfo const &info)
static bool s_SortByLinageToBestHit(CTaxFormat::STaxInfo const &info1, CTaxFormat::STaxInfo const &info2)
MAKE_CONST_MAP(kMapTagToString, ct::tagStrNocase, ct::tagStrNocase, { { "TAX_BROWSER_URL", "<@protocol@>//www.ncbi.nlm.nih.gov/Taxonomy/Browser/wwwtax.cgi"}, {"BLAST_NAME_LINK","<a href=\"<@taxBrowserURL@>?id=<@bl_taxid@>\" target=\"lnktx<@rid@>\" title=\"Show taxonomy info for <@blast_name@> (taxid <@bl_taxid@>)\"><@blast_name@></a>"}, { "ORG_REPORT_TABLE", "<table><caption><h2>Organism Report</h2></caption><tr><th>Accession</th><th>Descr</th><th>Score</th><th>E-value</th></tr><@table_rows@></table><@taxidToSeqsMap@>"}, { "ORG_REPORT_ORG_HEADER", "<tr><th colspan=\"4\"><a href=\"<@taxBrowserURL@>?id=<@taxid@>\" name=\"<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@> <@common_name@> [<@blast_name_link@>] taxid <@taxid@></th></tr>"}, { "ORG_REPORT_ORG_HEADER_NO_TAX_CON", "<tr><th colspan=\"4\"><a href=\"<@taxBrowserURL@>?id=<@taxid@>\" name=\"<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@> <@common_name@> [<@blast_name@>]</th></tr>"}, { "ORG_REPORT_TABLE_HEADER", "<tr><th>Accession</th><th>Description</th><th>Score</th><th>E-value</th></tr>"}, { "ORG_REPORT_TABLE_ROW", "<tr><td><a title=\"Show report for <@acc@>\" target=\"lnktx<@rid@>\" href=\"<@protocol@>//www.ncbi.nlm.nih.gov/protein/<@acc@>?report=fwwwtax&log$=taxrep&RID=<@rid@>\"><@acc@></a></td><td><@descr_abbr@></td><td><@score@></td><td><@evalue@></td></tr>"}, { "TAXID_TO_SEQ_MAP", "<input type=\"hidden\" id=\"txForSeq_<@taxid@>\" value=\"<@giList@>\" />"}, { "LINAGE_REPORT_TABLE", "<table><caption><h2>Linage Report</h2><caption><@table_rows@></table>"}, {"LINAGE_REPORT_TABLE_HEADER", "<tr><th>Organism</th><th>Blast Name</th><th>Score</th><th>Number of Hits</th><th>Description</th></tr>"}, {"LINAGE_REPORT_ORG_HEADER", "<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a><td><@blast_name_link@></td><td colspan =\"3\"></td></tr>"}, {"LINAGE_REPORT_TABLE_ROW", "<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@blast_name_link@></td><td><@score@></td><td><a href=\"#<@taxid@>\" title=\"Show organism report for <@scientific_name@>\"><@numhits@></a></td><td><a title=\"Show report for <@acc@> <@descr_abbr@>\" target=\"lnktx<@rid@>\" href=\"<@protocol@>//www.ncbi.nlm.nih.gov/protein/<@acc@>?report=genbank&log$=taxrep&RID=<@rid@>\"><@descr_abbr@></a></td></tr>"}, { "TAXONOMY_REPORT_TABLE", "<table><caption><h2>Taxonomy Report</h2><caption><@table_rows@></table>"}, { "TAXONOMY_REPORT_TABLE_HEADER", "<tr><th>Taxonomy</th><th>Number of hits</th><th>Number of organisms</th><th>Description</th></tr>"}, {"TAXONOMY_REPORT_ORG_HEADER", "<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@numhits@></td><td><@numOrgs@></td><td><@descr_abbr@></td></tr>"}, { "TAXONOMY_REPORT_TABLE_ROW", "<tr><td><@depth@><a href=\"//<@taxBrowserURL@>?id=<@taxid@>\" title=\"Show taxonomy info for <@scientific_name@> (taxid <@taxid@>)\" target=\"lnktx<@rid@>\"><@scientific_name@></a></td><td><@numhits@></td><td><@numOrgs@></td><td><@descr_abbr@></td></tr>"}, {"ORG_REPORT_TXT_TABLE", "<@org_report_caption@>\n<@acc_hd@><@descr_hd@><@score_hd@><@evalue_hd@>\n<@table_rows@>"}, {"ORG_REPORT_TXT_ORG_HEADER", "<@scientific_name@> <@common_name@> [<@blast_name_link@>] taxid <@taxid@>"}, {"ORG_REPORT_TXT_ORG_HEADER_NO_TAX_CON", "<@scientific_name@> <@common_name@> [<@blast_name@>]"}, {"ORG_REPORT_TXT_TABLE_HEADER", " <@acc_hd@><@descr_hd@><@score_hd@><@evalue_hd@>\n"}, {"ORG_REPORT_TXT_TABLE_ROW", " <@acc@><@descr_text@><@score@><@evalue@>\n"}, {"ORG_REPORT_TXT_TABLE_CAPTION", "Organism Report"}, { "ORG_ACC_TXT_TABLE_HEADER", "Accession"}, { "ORG_DESCR_TXT_TABLE_HEADER", "Description"}, { "ORG_SCORE_TXT_TABLE_HEADER", "Score"}, { "ORG_EVALUE_TXT_TABLE_HEADER", "E-value"}, })
Sequence alignment taxonomy display tool.
const unsigned int kMinLineLength
Example:
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