A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/classCAlignFormatUtil.html below:

NCBI C++ ToolKit: CAlignFormatUtil Class Reference

Search Toolkit Book for CAlignFormatUtil

This class contains misc functions for displaying BLAST results. More...

#include <objtools/align_format/align_format_util.hpp>

enum   EMapConstString { eMapToURL , eMapToHTML , eMapToString }   enum   DbSortOrder { eNonGenomicFirst = 1 , eGenomicFirst }   enum   HitOrder {
  eEvalue = 0 , eHighestScore , eTotalScore , ePercentIdentity ,
  eQueryCoverage
}   enum   HspOrder {
  eHspEvalue = 0 , eScore , eQueryStart , eHspPercentIdentity ,
  eSubjectStart
}   enum   CustomLinkType {
  eLinkTypeDefault = 0 , eLinkTypeMapViewer = (1 << 0) , eLinkTypeSeqViewer = (1 << 1) , eDownLoadSeq = (1 << 2) ,
  eLinkTypeGenLinks = (1 << 3) , eLinkTypeTraceLinks = (1 << 4) , eLinkTypeSRALinks = (1 << 5) , eLinkTypeSNPLinks = (1 << 6) ,
  eLinkTypeGSFastaLinks = (1 << 7)
}   enum   DbType { eDbGi = 0 , eDbGeneral , eDbTypeNotSet }   db type More...
  enum   SpacesFormatingFlag {
  eSpacePosToCenter = (1 << 0) , eSpacePosAtLineStart = (1 << 1) , eSpacePosAtLineEnd = (1 << 2) , eAddEOLAtLineStart = (1 << 3) ,
  eAddEOLAtLineEnd = (1 << 4)
}   static void  BlastPrintError (list< SBlastError > &error_return, bool error_post, CNcbiOstream &out)   Output blast errors. More...
  static void  PrintTildeSepLines (string str, size_t line_len, CNcbiOstream &out)   Print out misc information separated by "~". More...
  static void  FillScanModeBlastDbInfo (vector< SDbInfo > &retval, bool is_protein, int numSeqs, Int8 numLetters, string &tag)   Fills one BLAST dbinfo structure. More...
  static void  GetBlastDbInfo (vector< SDbInfo > &retval, const string &blastdb_names, bool is_protein, int dbfilt_algorithm, bool is_remote=false)   Retrieve BLAST database information for presentation in BLAST report. More...
  static void  PrintDbReport (const vector< SDbInfo > &dbinfo_list, size_t line_length, CNcbiOstream &out, bool top=false)   Print out blast database information. More...
  static void  PrintKAParameters (double lambda, double k, double h, size_t line_len, CNcbiOstream &out, bool gapped, const Blast_GumbelBlk *gbp=NULL)   Print out kappa, lamda blast parameters. More...
  static string  GetSeqIdString (const objects::CBioseq &cbs, bool believe_local_id=true)   Returns a full '|'-delimited Seq-id string for a Bioseq. More...
  static string  GetSeqIdString (const list< CRef< objects::CSeq_id > > &ids, bool believe_local_id)   Returns a full '|'-delimited Seq-id string for a a list of seq-ids. More...
  static string  GetSeqDescrString (const objects::CBioseq &cbs)   Returns a full description for a Bioseq, concatenating all available titles. More...
  static void  AcknowledgeBlastQuery (const objects::CBioseq &cbs, size_t line_len, CNcbiOstream &out, bool believe_query, bool html, bool tabular=false, const string &rid=kEmptyStr)   Print out blast query info. More...
  static void  AcknowledgeBlastSubject (const objects::CBioseq &cbs, size_t line_len, CNcbiOstream &out, bool believe_query, bool html, bool tabular=false)   Print out blast subject info. More...
  static void  GetAsciiProteinMatrix (const char *matrix_name, CNcbiMatrix< int > &retval)   Retrieve a scoring matrix for the provided matrix name. More...
  static void  PrintPhiInfo (int num_patterns, const string &pattern, double prob, vector< int > &offsets, CNcbiOstream &out)   Prints out PHI-BLAST info for header (or footer) More...
  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. More...
  static void  GetAlnScores (const objects::CSeq_align &aln, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< string > &use_this_seq)   Extract score info from blast alingment. More...
  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, int &comp_adj_method)   Extract score info from blast alingment Second version that fetches compositional adjustment integer. More...
  static void  GetAlnScores (const objects::CSeq_align &aln, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< string > &use_this_seq, int &comp_adj_method)   Extract score info from blast alingment Second version that fetches compositional adjustment integer. More...
  static void  GetUseThisSequence (const objects::CSeq_align &aln, list< TGi > &use_this_gi)   Extract use_this_gi info from blast alingment. More...
  static void  GetUseThisSequence (const objects::CSeq_align &aln, list< string > &use_this_seq)   Extract use_this_seq info from blast alingment. More...
  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. More...
  static bool  MatchSeqInSeqList (CConstRef< objects::CSeq_id > &alnSeqID, list< string > &use_this_seq, vector< string > &seqList)   Matches string of seqIDs (gis or text seqID) More...
  static bool  MatchSeqInUseThisSeqList (list< string > &use_this_seq, string textSeqIDToMatch)   static bool  IsGiList (list< string > &use_this_seq)   Check if use_this_seq conatins gi list. More...
  static list< TGiStringGiToNumGiList (list< string > &use_this_seq)   Convert if string gi list to TGi list. More...
  static void  AddSpace (CNcbiOstream &out, size_t number)   Add the specified white space. More...
  static string  GetGnlID (const objects::CDbtag &dtg)   Return ID for GNL label. More...
  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|" to trace IDs. More...
  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 More...
  static void  PruneSeqalign (const objects::CSeq_align_set &source_aln, objects::CSeq_align_set &new_aln, unsigned int num=static_cast< unsigned int >(kDfltArgNumAlignments))   Fill new alignset containing the specified number of alignments with unique slave seqids. More...
  static unsigned int  GetSubjectsNumber (const objects::CSeq_align_set &source_aln, unsigned int num)   Calculate number of subject sequnces in alignment limitted by num. More...
  static void  PruneSeqalignAll (const objects::CSeq_align_set &source_aln, objects::CSeq_align_set &new_aln, unsigned int number)   Fill new alignset containing the specified number of alignments plus the rest of alignments for the last subget seq unique slave seqids. More...
  static void  GetAlignLengths (objects::CAlnVec &salv, int &align_length, int &num_gaps, int &num_gap_opens)   Count alignment length, number of gap openings and total number of gaps in a single alignment. More...
  static void  ExtractSeqalignSetFromDiscSegs (objects::CSeq_align_set &target, const objects::CSeq_align_set &source)   If a Seq-align-set contains Seq-aligns with discontinuous type segments, extract the underlying Seq-aligns and put them all in a flat Seq-align-set. More...
  static CRef< objects::CSeq_align >  CreateDensegFromDendiag (const objects::CSeq_align &aln)   Create denseseg representation for densediag seqalign. More...
  static TTaxId  GetTaxidForSeqid (const objects::CSeq_id &id, objects::CScope &scope)   return the tax id for a seqid More...
  static int  GetFrame (int start, objects::ENa_strand strand, const objects::CBioseq_Handle &handle)   return the frame for a given strand Note that start is zero bases. More...
  static bool  SortHitByTotalScoreDescending (CRef< objects::CSeq_align_set > const &info1, CRef< objects::CSeq_align_set > const &info2)   return the comparison result: 1st >= 2nd => true, false otherwise More...
  static bool  SortHitByMasterCoverageDescending (CRef< objects::CSeq_align_set > const &info1, CRef< objects::CSeq_align_set > const &info2)   static void  HspListToHitList (list< CRef< objects::CSeq_align_set > > &target, const objects::CSeq_align_set &source)   group hsp's with the same id togeter More...
  static CRef< objects::CSeq_align_set >  HitListToHspList (list< CRef< objects::CSeq_align_set > > &source)   extract all nested hsp's into a list More...
  static void  ExtractSeqAlignForSeqList (CRef< objects::CSeq_align_set > &all_aln_set, string alignSeqList)   extract seq_align_set coreesponding to seqid list More...
  static string  BuildUserUrl (const objects::CBioseq::TId &ids, TTaxId taxid, string user_url, string database, bool db_is_na, string rid, int query_number, bool for_alignment)   return the custom url (such as mapview) More...
  static string  BuildSRAUrl (const objects::CBioseq::TId &ids, string user_url)   return the SRA (Short Read Archive) URL More...
  static double  GetPercentIdentity (const objects::CSeq_align &aln, objects::CScope &scope, bool do_translation)   calculate the percent identity for a seqalign More...
  static int  GetAlignmentLength (const objects::CSeq_align &aln, bool do_translation)   get the alignment length More...
  static void  SortHitByPercentIdentityDescending (list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, bool do_translation)   sort a list of seqalign set by alignment identity More...
  static bool  SortHitByPercentIdentityDescendingEx (const CRef< objects::CSeq_align_set > &info1, const CRef< objects::CSeq_align_set > &info2)   sorting function for sorting a list of seqalign set by descending identity More...
  static bool  SortHspByPercentIdentityDescending (const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)   sorting function for sorting a list of seqalign by descending identity More...
  static bool  SortHspByMasterStartAscending (const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)   sorting function for sorting a list of seqalign by ascending mater start position More...
  static bool  SortHspBySubjectStartAscending (const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)   static bool  SortHitByScoreDescending (const CRef< objects::CSeq_align_set > &info1, const CRef< objects::CSeq_align_set > &info2)   static bool  SortHspByScoreDescending (const CRef< objects::CSeq_align > &info1, const CRef< objects::CSeq_align > &info2)   static bool  SortHitByMasterStartAscending (CRef< objects::CSeq_align_set > &info1, CRef< objects::CSeq_align_set > &info2)   sorting function for sorting a list of seqalign set by ascending mater start position More...
  static void  SortHitByMolecularType (list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)   sort a list of seqalign set by molecular type More...
  static void  SortHit (list< CRef< objects::CSeq_align_set > > &seqalign_hit_list, bool do_translation, objects::CScope &scope, int sort_method, ILinkoutDB *linkoutdb, const string &mv_build_name)   actual sorting function for SortHitByMolecularType More...
  static void  SplitSeqalignByMolecularType (vector< CRef< objects::CSeq_align_set > > &target, int sort_method, const objects::CSeq_align_set &source, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)   static CRef< objects::CSeq_align_set >  SortSeqalignForSortableFormat (CCgiContext &ctx, objects::CScope &scope, objects::CSeq_align_set &aln_set, bool nuc_to_nuc_translation, int db_order, int hit_order, int hsp_order, ILinkoutDB *linkoutdb, const string &mv_build_name)   static CRef< objects::CSeq_align_set >  SortSeqalignForSortableFormat (objects::CSeq_align_set &aln_set, bool nuc_to_nuc_translation, int hit_order, int hsp_order)   static list< CRef< objects::CSeq_align_set > >  SortOneSeqalignForSortableFormat (const objects::CSeq_align_set &source, bool nuc_to_nuc_translation, int hit_sort, int hsp_sort)   static int  GetPercentMatch (int numerator, int denominator)   function for calculating percent match for an alignment. More...
  static double  GetPercentIdentity (int numerator, int denominator)   static CRef< objects::CSeq_align_set >  FilterSeqalignByEval (objects::CSeq_align_set &source_aln, double evalueLow, double evalueHigh)   function for Filtering seqalign by expect value More...
  static CRef< objects::CSeq_align_set >  FilterSeqalignByPercentIdent (objects::CSeq_align_set &source_aln, double percentIdentLow, double percentIdentHigh)   function for Filtering seqalign by percent identity More...
  static CRef< objects::CSeq_align_set >  FilterSeqalignByScoreParams (objects::CSeq_align_set &source_aln, double evalueLow, double evalueHigh, double percentIdentLow, double percentIdentHigh)   function for Filtering seqalign by expect value and percent identity More...
  static CRef< objects::CSeq_align_set >  FilterSeqalignByScoreParams (objects::CSeq_align_set &source_aln, double evalueLow, double evalueHigh, double percentIdentLow, double percentIdentHigh, int queryCoverageLow, int queryCoverageHigh)   static CRef< objects::CSeq_align_set >  FilterSeqalignBySeqList (objects::CSeq_align_set &source_aln, vector< string > &seqList)   function for Filtering seqalign by specific subjects More...
  static bool  RemoveSeqsOfAccessionTypeFromSeqInUse (list< string > &use_this_seq, objects::CSeq_id::EAccessionInfo accesionType)   function to remove sequences of accesionType from use_this_seq list More...
  static CRef< objects::CSeq_align_set >  LimitSeqalignByHsps (objects::CSeq_align_set &source_aln, int maxAligns, int maxHsps)   function for Limitting seqalign by hsps number (by default results are not cut off within the query) More...
  static CRef< objects::CSeq_align_set >  ExtractQuerySeqAlign (CRef< objects::CSeq_align_set > &source_aln, int queryNumber)   function for extracting seqalign for the query More...
  static void  BuildFormatQueryString (CCgiContext &ctx, string &cgi_query)   static void  BuildFormatQueryString (CCgiContext &ctx, map< string, string > &parameters_to_change, string &cgi_query)   static bool  IsMixedDatabase (const objects::CSeq_align_set &alnset, objects::CScope &scope, ILinkoutDB *linkoutdb, const string &mv_build_name)   static bool  IsMixedDatabase (CCgiContext &ctx)   static list< stringGetLinkoutUrl (int linkout, const objects::CBioseq::TId &ids, const string &rid, const string &cdd_rid, const string &entrez_term, bool is_na, TGi first_gi, bool structure_linkout_as_group, bool for_alignment, int cur_align, string preComputedResID)   Get the list of urls for linkouts. More...
  static void  GetBdlLinkoutInfo (const list< CRef< objects::CBlast_def_line > > &bdl, map< int, vector< objects::CBioseq::TId > > &linkout_map, ILinkoutDB *linkoutdb, const string &mv_build_name)   Create map that holds all linkouts for the list of blast deflines and corresponding seqIDs. More...
  static void  GetBdlLinkoutInfo (objects::CBioseq::TId &cur_id, map< int, vector< objects::CBioseq::TId > > &linkout_map, ILinkoutDB *linkoutdb, const string &mv_build_name)   Create map that holds all linkouts for one seqID. More...
  static list< stringGetFullLinkoutUrl (const list< CRef< objects::CBlast_def_line > > &bdl, const string &rid, const string &cdd_rid, const string &entrez_term, bool is_na, bool structure_linkout_as_group, bool for_alignment, int cur_align, string &linkoutOrder, TTaxId taxid, string &database, int query_number, string &user_url, string &preComputedResID, ILinkoutDB *linkoutdb, const string &mv_build_name)   Get linkout membership for for the list of blast deflines. More...
  static list< stringGetFullLinkoutUrl (objects::CBioseq::TId &cur_id, const string &rid, const string &cdd_rid, const string &entrez_term, bool is_na, bool structure_linkout_as_group, bool for_alignment, int cur_align, string &linkoutOrder, TTaxId taxid, string &database, int query_number, string &user_url, string &preComputedResID, ILinkoutDB *linkoutdb, const string &mv_build_name, bool getIdentProteins)   Get linkout membership for one seqID. More...
  static list< stringGetFullLinkoutUrl (const list< CRef< objects::CBlast_def_line > > &bdl, SLinkoutInfo &linkoutInfo)   static list< stringGetFullLinkoutUrl (objects::CBioseq::TId &cur_id, SLinkoutInfo &linkoutInfo, bool getIdentProteins)   static int  GetSeqLinkoutInfo (objects::CBioseq::TId &cur_id, ILinkoutDB **linkoutdb, const string &mv_build_name, TGi gi=INVALID_GI)   static int  GetMasterCoverage (const objects::CSeq_align_set &alnset)   static CRange< TSeqPosGetSeqAlignCoverageParams (const objects::CSeq_align_set &alnset, int *masterCoverage, bool *flip)   static string  GetURLFromRegistry (const string url_name, int index=-1)   retrieve URL from .ncbirc file combining host/port and format strings values. More...
  static string  GetURLDefault (const string url_name, int index=-1)   settings are not complete. More...
  static string  MapTemplate (string inpString, string tmplParamName, Int8 templParamVal)   Replace template tags by real data. More...
  static string  MapTemplate (string inpString, string tmplParamName, string templParamVal)   Replace template tags by real data. More...
  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 spacesFormatFlag. More...
  static string  MapTagToHTML (const string tag_name)   static string  MapTagToConstString (const string tag_name, EMapConstString flag=eMapToURL)   static string  AddSpaces (string paramVal, size_t maxParamLength, int spacesFormatFlag=eSpacePosToCenter)   Calculate the number of spaces and add them to paramVal. More...
  static string  GetProtocol (void)   static void  InitConfig ()   static string  MapProtocol (string url_link)   static string  GetIDUrl (SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)   Create URL for seqid. More...
  static string  GetIDUrl (SSeqURLInfo *seqUrlInfo, const objects::CBioseq::TId *ids)   Create URL for seqid. More...
  static string  GetFullIDLink (SSeqURLInfo *seqUrlInfo, const objects::CBioseq::TId *ids)   static string  GetIDUrlGen (SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)   Create URL for seqid that goes to entrez or trace. More...
  static string  GetIDUrlGen (SSeqURLInfo *seqUrlInfo, const objects::CBioseq::TId *ids)   Create URL for seqid that goes to entrez or trace. More...
  static int  SetCustomLinksTypes (SSeqURLInfo *seqUrlInfo, int customLinkTypesInp)   Create info indicating what kind of links to display. More...
  static list< stringGetCustomLinksList (SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope, int customLinkTypes=eLinkTypeDefault)   Create the list of string links for seqid that go. More...
  static list< stringGetGiLinksList (SSeqURLInfo *seqUrlInfo, bool hspRange=false)   static string  GetGraphiscLink (SSeqURLInfo *seqUrlInfo, bool hspRange=false)   static list< stringGetSeqLinksList (SSeqURLInfo *seqUrlInfo, bool hspRange=false)   static string  GetFASTALinkURL (SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)   Create URL showing aligned regions info. More...
  static string  GetAlignedRegionsURL (SSeqURLInfo *seqUrlInfo, const objects::CSeq_id &id, objects::CScope &scope)   Create URL to FASTA info. More...
  static CAlignFormatUtil::DbType  GetDbType (const objects::CSeq_align_set &actual_aln_list, objects::CScope &scope)   Set the database as gi type. More...
  static CAlignFormatUtil::SSeqAlignSetCalcParamsGetSeqAlignCalcParams (const objects::CSeq_align &aln)   static CAlignFormatUtil::SSeqAlignSetCalcParamsGetSeqAlignSetCalcParams (const objects::CSeq_align_set &aln, int queryLength, bool do_translation)   static CAlignFormatUtil::SSeqAlignSetCalcParamsGetSeqAlignSetCalcParamsFromASN (const objects::CSeq_align_set &alnSet)   static double  GetSeqAlignSetCalcPercentIdent (const objects::CSeq_align_set &aln, bool do_translation)   static map< string, CRef< objects::CSeq_align_set > >  HspListToHitMap (vector< string > seqIdList, const objects::CSeq_align_set &source)   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. More...
  static CRef< objects::CSeq_id >  GetDisplayIds (const objects::CBioseq_Handle &handle, const objects::CSeq_id &aln_id, list< TGi > &use_this_gi, TGi &gi)   Scan the the list of blast deflines and find seqID to be use in display. More...
  static TGi  GetDisplayIds (const list< CRef< objects::CBlast_def_line > > &bdl, const objects::CSeq_id &aln_id, list< TGi > &use_this_gi)   static bool  GetTextSeqID (const list< CRef< objects::CSeq_id > > &ids, string *textSeqID=NULL)   static bool  GetTextSeqID (CConstRef< objects::CSeq_id > seqID, string *textSeqID=NULL)   static CRef< objects::CSeq_id >  GetDisplayIds (const objects::CBioseq_Handle &handle, const objects::CSeq_id &aln_id, list< string > &use_this_seq, TGi *gi=NULL, TTaxId *taxid=NULL, string *textSeqID=NULL)   Scan the the list of blast deflines and find seqID to be use in display. More...
  static bool  IsWGSAccession (string &accession, string &wgsProj)   Check if accession is WGS. More...
  static bool  IsWGSPattern (string &wgsAccession)   Check if accession is WGS. More...
  static int  GetUniqSeqCoverage (objects::CSeq_align_set &alnset)   Calculate the uniq subject query coverage range (blastn only) More...
  static TGi  GetGiForSeqIdList (const list< CRef< objects::CSeq_id > > &ids)   return gi from id list More...
  static string  GetTitle (const objects::CBioseq_Handle &bh)   static string  GetBareId (const objects::CSeq_id &id)   Get sequence id with no database source (bare accession) More...
 

This class contains misc functions for displaying BLAST results.

Definition at line 77 of file align_format_util.hpp.

◆ CustomLinkType Enumerator eLinkTypeDefault  eLinkTypeMapViewer  eLinkTypeSeqViewer  eDownLoadSeq  eLinkTypeGenLinks  eLinkTypeTraceLinks  eLinkTypeSRALinks  eLinkTypeSNPLinks  eLinkTypeGSFastaLinks 

Definition at line 275 of file align_format_util.hpp.

◆ DbSortOrder ◆ DbType ◆ EMapConstString ◆ HitOrder Enumerator eEvalue  eHighestScore  eTotalScore  ePercentIdentity  eQueryCoverage 

Definition at line 259 of file align_format_util.hpp.

◆ HspOrder Enumerator eHspEvalue  eScore  eQueryStart  eHspPercentIdentity  eSubjectStart 

Definition at line 267 of file align_format_util.hpp.

◆ SpacesFormatingFlag Enumerator eSpacePosToCenter  eSpacePosAtLineStart 

place the param in the center of the string

eSpacePosAtLineEnd 

add spaces at the begining of the string

eAddEOLAtLineStart 

add spaces at the end of the string

eAddEOLAtLineEnd 

add EOL at the beginning of the string

Definition at line 295 of file align_format_util.hpp.

◆ AcknowledgeBlastQuery() ◆ AcknowledgeBlastSubject() ◆ AddSpace() void CAlignFormatUtil::AddSpace ( CNcbiOstreamout, size_t  number  ) static

Add the specified white space.

Parameters
out ostream to add white space number the number of white spaces desired

Definition at line 932 of file align_format_util.cpp.

References i, number, and out().

Referenced by PrintDbReport(), s_DisplayDescrColumnHeader(), CDisplaySeqalign::x_DisplayAlignSortInfo(), CShowBlastDefline::x_DisplayDefline(), CShowBlastDefline::x_DisplayDeflineTableBody(), CDisplaySeqalign::x_DisplayInsertsForQueryAnchored(), CDisplaySeqalign::x_DisplayMiddLine(), CDisplaySeqalign::x_DisplaySequenceIDForQueryAnchored(), CDisplaySeqalign::x_DisplaySequenceLine(), and CDisplaySeqalign::x_PrintFeatures().

◆ AddSpaces() ◆ BlastPrintError() ◆ BuildFormatQueryString() [1/2] ◆ BuildFormatQueryString() [2/2] void CAlignFormatUtil::BuildFormatQueryString ( CCgiContextctx, stringcgi_query  ) static ◆ BuildSRAUrl() string CAlignFormatUtil::BuildSRAUrl ( const objects::CBioseq::TId &  ids, string  user_url  ) static ◆ BuildUserUrl()

return the custom url (such as mapview)

Parameters
ids the id list taxid user_url the custom url database db_is_na is db nucleotide? rid blast rid query_number the blast query number. for_alignment is the URL generated for an alignment or a top defline?

Definition at line 1931 of file align_format_util.cpp.

References CSeq_id::AsFastaString(), database, dbname(), CSeq_id_Base::e_General, CConstRef< C, Locker >::Empty(), FindGi(), GetSeq_idByType(), i, int, NStr::IntToString(), isspace(), NcbiEmptyString, NULL, NStr::NumericToString(), s_GetBestIDForURL(), str(), strcat, NStr::URLEncode(), ZERO_GI, and ZERO_TAX_ID.

Referenced by GetAlignedRegionsURL(), and CDisplaySeqalign::x_GetDumpgnlLink().

◆ CreateDensegFromDendiag() CRef< CSeq_align > CAlignFormatUtil::CreateDensegFromDendiag ( const objects::CSeq_align &  aln ) static

Create denseseg representation for densediag seqalign.

Parameters
aln the input densediag seqalign
Returns
: the new denseseg seqalign

Definition at line 1150 of file align_format_util.cpp.

References eUnknown, CSeq_align_Base::GetBounds(), CSeq_align_Base::C_Segs::GetDendiag(), CSeq_align_Base::GetDim(), CSeq_align_Base::GetScore(), CSeq_align_Base::GetSegs(), CSeq_align_Base::GetType(), CSeq_align_Base::C_Segs::IsDendiag(), CSeq_align_Base::IsSetBounds(), CSeq_align_Base::IsSetDim(), CSeq_align_Base::IsSetScore(), CSeq_align_Base::IsSetType(), ITERATE, NCBI_THROW, CSeq_align_Base::SetBounds(), CDense_seg_Base::SetDim(), CSeq_align_Base::SetDim(), CDense_seg_Base::SetIds(), CDense_seg_Base::SetLens(), CDense_seg_Base::SetNumseg(), CSeq_align_Base::SetScore(), CDense_seg_Base::SetScores(), CSeq_align_Base::SetSegs(), CDense_seg_Base::SetStarts(), CDense_seg_Base::SetStrands(), and CSeq_align_Base::SetType().

Referenced by CDisplaySeqalign::DisplaySeqalign(), GetAlignmentLength(), GetUniqSeqCoverage(), CBlastTabularInfo::SetFields(), and CDisplaySeqalign::x_GetAlnVecForSeqalign().

◆ ExtractQuerySeqAlign() CRef< CSeq_align_set > CAlignFormatUtil::ExtractQuerySeqAlign ( CRef< objects::CSeq_align_set > &  source_aln, int  queryNumber  ) static

function for extracting seqalign for the query

Parameters
source_aln CSeq_align_set original seqalign queryNumber int query number ,starts from 1, 0 means return all queries
Returns
CRef<CSeq_align_set> - seq align set for queryNumber, if invalid queryNumber return empty CSeq_align_set

Definition at line 3351 of file align_format_util.cpp.

References CRef< C, Locker >::Empty(), CConstRef< C, Locker >::Empty(), CSeq_align_set_Base::Get(), ITERATE, CSeq_id::Match(), CRef< C, Locker >::Reset(), and CSeq_align_set_Base::Set().

◆ ExtractSeqAlignForSeqList() void CAlignFormatUtil::ExtractSeqAlignForSeqList ( CRef< objects::CSeq_align_set > &  all_aln_set, string  alignSeqList  ) static ◆ ExtractSeqalignSetFromDiscSegs() void CAlignFormatUtil::ExtractSeqalignSetFromDiscSegs ( objects::CSeq_align_set &  target, const objects::CSeq_align_set &  source  ) static

If a Seq-align-set contains Seq-aligns with discontinuous type segments, extract the underlying Seq-aligns and put them all in a flat Seq-align-set.

Parameters
source Original Seq-align-set target Resulting Seq-align-set

Definition at line 1125 of file align_format_util.cpp.

References set< Key, Compare >::begin(), set< Key, Compare >::end(), CSeq_align_Base::C_Segs::GetDisc(), CSeq_align_Base::C_Segs::IsDisc(), CSeq_align_set_Base::Set(), and rapidjson::source.

Referenced by CDisplaySeqalign::DisplaySeqalign(), CVecscreen::ProcessSeqAlign(), and CVecscreenTest::VecscreenDisplay().

◆ FillScanModeBlastDbInfo() void CAlignFormatUtil::FillScanModeBlastDbInfo ( vector< SDbInfo > &  retval, bool  is_protein, int  numSeqs, Int8  numLetters, stringtag  ) static

Fills one BLAST dbinfo structure.

Intended for use in bl2seq mode with multiple subject sequences. database title set to "User specified sequence set"

Parameters
retval return vector [in/out] is_protein are these databases protein? [in] numSeqs number of sequecnes in set [in] numLetters size of the set [in] tag Hint to user about subject sequences [in]

Definition at line 412 of file align_format_util.cpp.

References info, string, and tag.

◆ FilterSeqalignByEval() CRef< CSeq_align_set > CAlignFormatUtil::FilterSeqalignByEval ( objects::CSeq_align_set &  source_aln, double  evalueLow, double  evalueHigh  ) static ◆ FilterSeqalignByPercentIdent() CRef< CSeq_align_set > CAlignFormatUtil::FilterSeqalignByPercentIdent ( objects::CSeq_align_set &  source_aln, double  percentIdentLow, double  percentIdentHigh  ) static ◆ FilterSeqalignByScoreParams() [1/2] static CRef<objects::CSeq_align_set> CAlignFormatUtil::FilterSeqalignByScoreParams ( objects::CSeq_align_set &  source_aln, double  evalueLow, double  evalueHigh, double  percentIdentLow, double  percentIdentHigh  ) static

function for Filtering seqalign by expect value and percent identity

Parameters
source_aln CSeq_align_set original seqalign evalueLow double min expect value evalueHigh double max expect value percentIdentLow double min percent identity percentIdentHigh double max percent identity
Returns
CRef<CSeq_align_set> - filtered seq align
◆ FilterSeqalignByScoreParams() [2/2] static CRef<objects::CSeq_align_set> CAlignFormatUtil::FilterSeqalignByScoreParams ( objects::CSeq_align_set &  source_aln, double  evalueLow, double  evalueHigh, double  percentIdentLow, double  percentIdentHigh, int  queryCoverageLow, int  queryCoverageHigh  ) static ◆ FilterSeqalignBySeqList() CRef< CSeq_align_set > CAlignFormatUtil::FilterSeqalignBySeqList ( objects::CSeq_align_set &  source_aln, vector< string > &  seqList  ) static ◆ GetAlignedRegionsURL() string CAlignFormatUtil::GetAlignedRegionsURL ( SSeqURLInfoseqUrlInfo, const objects::CSeq_id &  id, objects::CScope &  scope  ) static ◆ GetAlignLengths() void CAlignFormatUtil::GetAlignLengths ( objects::CAlnVec &  salv, intalign_length, intnum_gaps, intnum_gap_opens  ) static ◆ GetAlignmentLength() int CAlignFormatUtil::GetAlignmentLength ( const objects::CSeq_align &  aln, bool  do_translation  ) static

get the alignment length

Parameters
aln" the seqalign @do_translation: is this a translated nuc to nuc alignment?
Returns
: the alignment length

Definition at line 1462 of file align_format_util.cpp.

References CreateDensegFromDendiag(), CSeq_align::CreateDensegFromStdseg(), CSeq_align::CreateTranslatedDensegFromNADenseg(), CAlnMap::GetAlnStop(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetSegs(), CSeq_align_Base::C_Segs::IsDendiag(), and CSeq_align_Base::C_Segs::IsStd().

Referenced by FilterSeqalignByPercentIdent(), GetSeqAlignSetCalcParams(), GetSeqAlignSetCalcPercentIdent(), and SortHspByPercentIdentityDescending().

◆ GetAlnScores() [1/4] static void CAlignFormatUtil::GetAlnScores ( const objects::CSeq_align &  aln, intscore, double &  bits, double &  evalue, intsum_n, intnum_ident, list< string > &  use_this_seq  ) static

Extract score info from blast alingment.

Parameters
aln alignment to extract score info from score place to extract the raw score to bits place to extract the bit score to evalue place to extract the e value to sum_n place to extract the sum_n to num_ident place to extract the num_ident to use_this_seqid place to extract use_this_seqid to
◆ GetAlnScores() [2/4] static void CAlignFormatUtil::GetAlnScores ( const objects::CSeq_align &  aln, intscore, double &  bits, double &  evalue, intsum_n, intnum_ident, list< string > &  use_this_seq, intcomp_adj_method  ) static

Extract score info from blast alingment Second version that fetches compositional adjustment integer.

Parameters
aln alignment to extract score info from score place to extract the raw score to bits place to extract the bit score to evalue place to extract the e value to sum_n place to extract the sum_n to num_ident place to extract the num_ident to use_this_seq place to extract use_this_seq to comp_adj_method composition based statistics method [out]
◆ GetAlnScores() [3/4] static void CAlignFormatUtil::GetAlnScores ( const objects::CSeq_align &  aln, intscore, double &  bits, double &  evalue, intsum_n, intnum_ident, list< TGi > &  use_this_gi  ) static

Extract score info from blast alingment.

Parameters
aln alignment to extract score info from score place to extract the raw score to bits place to extract the bit score to evalue place to extract the e value to sum_n place to extract the sum_n to num_ident place to extract the num_ident to use_this_gi place to extract use_this_gi to

Referenced by AlnFromRangeAscendingSort(), AlnScoreDescendingSort(), CDisplaySeqalign::DisplaySeqalign(), FilterSeqalignByEval(), FilterSeqalignByPercentIdent(), GetSeqAlignCalcParams(), GetSeqAlignSetCalcParams(), GetSeqAlignSetCalcPercentIdent(), CBlastTabularInfo::SetFields(), SortHitByMasterCoverageDescending(), SortHitByMasterStartAscending(), SortHitByScoreDescending(), SortHitByTotalScoreDescending(), SortHspByMasterStartAscending(), SortHspByPercentIdentityDescending(), SortHspByScoreDescending(), SortHspBySubjectStartAscending(), CVecscreen::x_GetEdgeRanges(), CVecscreen::x_GetMatchType(), CShowBlastDefline::x_GetScoreInfo(), and CTaxFormat::x_InitTaxInfoMap().

◆ GetAlnScores() [4/4] static void CAlignFormatUtil::GetAlnScores ( const objects::CSeq_align &  aln, intscore, double &  bits, double &  evalue, intsum_n, intnum_ident, list< TGi > &  use_this_gi, intcomp_adj_method  ) static

Extract score info from blast alingment Second version that fetches compositional adjustment integer.

Parameters
aln alignment to extract score info from score place to extract the raw score to bits place to extract the bit score to evalue place to extract the e value to sum_n place to extract the sum_n to num_ident place to extract the num_ident to use_this_gi place to extract use_this_gi to comp_adj_method composition based statistics method [out]
◆ GetAsciiProteinMatrix() void CAlignFormatUtil::GetAsciiProteinMatrix ( const char *  matrix_name, CNcbiMatrix< int > &  retval  ) static

Retrieve a scoring matrix for the provided matrix name.

Returns
the requested matrix (indexed using ASCII characters) or an empty matrix if matrix_name is invalid or can't be found.

Definition at line 3549 of file align_format_util.cpp.

References ctll::empty(), ePMatrixSize, i, k_NumAsciiChar, k_PSymbol, mtx, NCBISM_GetStandardMatrix(), NCBISM_Unpack(), NULL, CNcbiMatrix< T >::Resize(), and NStr::TruncateSpaces().

Referenced by CBlastFormat::CBlastFormat().

◆ GetBareId() string CAlignFormatUtil::GetBareId ( const objects::CSeq_id &  id ) static ◆ GetBdlLinkoutInfo() [1/2] static void CAlignFormatUtil::GetBdlLinkoutInfo ( const list< CRef< objects::CBlast_def_line > > &  bdl, map< int, vector< objects::CBioseq::TId > > &  linkout_map, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static

Create map that holds all linkouts for the list of blast deflines and corresponding seqIDs.

Parameters
bdl list of CRef<CBlast_def_line> linkout_map map that holds linkouts and corresponding CBioseq::TId for the whole list of blast deflines
◆ GetBdlLinkoutInfo() [2/2] static void CAlignFormatUtil::GetBdlLinkoutInfo ( objects::CBioseq::TId &  cur_id, map< int, vector< objects::CBioseq::TId > > &  linkout_map, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static

Create map that holds all linkouts for one seqID.

Parameters
cur_id CBioseq::TId linkout_map map that holds linkouts and corresponding CBioseq::TId for the whole list of blast deflines
◆ GetBlastDbInfo()

Retrieve BLAST database information for presentation in BLAST report.

Parameters
dbname space-separated list of BLAST database names [in] is_protein are these databases protein? [in] dbfilt_algorithm BLAST database filtering algorithm ID (if applicable), use -1 if not applicable [in] is_remote is this a remote BLAST search? [in]

Definition at line 431 of file align_format_util.cpp.

References CTime::AsString(), CTimeFormat::fFormat_Simple, CBlastServices::GetDatabaseInfo(), i, info, ITERATE, msg(), NCBI_THROW, s_FillDbInfoLocally(), SeqDB_SplitQuoted(), string, NStr::TruncateSpaces(), and NStr::TruncateSpaces_Unsafe().

Referenced by CMagicBlastApp::x_LogBlastSearchInfo().

◆ GetCustomLinksList()

Create the list of string links for seqid that go.

Definition at line 4070 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqURLInfo::accession, eLinkTypeGSFastaLinks, eLinkTypeSNPLinks, eLinkTypeSRALinks, eLinkTypeTraceLinks, GetSeqLinksList(), NStr::Replace(), CAlignFormatUtil::SSeqURLInfo::resourcesUrl, CAlignFormatUtil::SSeqURLInfo::rid, s_MapCustomLink(), CAlignFormatUtil::SSeqURLInfo::seqUrl, and SetCustomLinksTypes().

Referenced by CDisplaySeqalign::x_InitAlignLinks().

◆ GetDbType()

Set the database as gi type.

Parameters
actual_aln_list the alignment scope scope to fetch sequences

Definition at line 4188 of file align_format_util.cpp.

References NStr::CompareNocase(), CSeq_id_Base::e_General, CSeq_id_Base::e_Local, eDbGeneral, eDbGi, eDbTypeNotSet, FindGi(), CSeq_align_set_Base::Get(), CBioseq_Handle::GetBioseqCore(), CScope::GetBioseqHandle(), CDbtag_Base::GetDb(), CBioseq_Base::GetId(), CSeq_align::GetSeq_id(), GetTextSeqID(), type, CSeq_id_Base::Which(), and ZERO_GI.

Referenced by CDisplaySeqalign::x_InitAlignParams().

◆ GetDisplayIds() [1/4] static TGi CAlignFormatUtil::GetDisplayIds ( const list< CRef< objects::CBlast_def_line > > &  bdl, const objects::CSeq_id &  aln_id, list< TGi > &  use_this_gi  ) static ◆ GetDisplayIds() [2/4]

Scan the the list of blast deflines and find seqID to be use in display.

Parameters
handle CBioseq_Handle [in] aln_id CSeq_id object for alignment seq [in] use_this_seq list<string> list of seqids to use (gi:ssssss or seqid:sssss) [in] gi pointer to gi to be used for display if exists taxid pointer to taxid to be used for display if exists textSeqID pointer to textSeqID to be used for display if exists
Returns
: CSeq_id object to be used for display
◆ GetDisplayIds() [3/4] static CRef<objects::CSeq_id> CAlignFormatUtil::GetDisplayIds ( const objects::CBioseq_Handle &  handle, const objects::CSeq_id &  aln_id, list< TGi > &  use_this_gi, TGigi  ) static

Scan the the list of blast deflines and find seqID to be use in display.

Parameters
handle CBioseq_Handle [in] aln_id CSeq_id object for alignment seq [in] use_this_gi list<int> list of gis to use [in] gi gi to be used for display if exists or 0
Returns
: CSeq_id object to be used for display
◆ GetDisplayIds() [4/4] static CRef<objects::CSeq_id> CAlignFormatUtil::GetDisplayIds ( const objects::CBioseq_Handle &  handle, const objects::CSeq_id &  aln_id, list< TGi > &  use_this_gi, TGigi, TTaxIdtaxid  ) static ◆ GetFASTALinkURL() string CAlignFormatUtil::GetFASTALinkURL ( SSeqURLInfoseqUrlInfo, const objects::CSeq_id &  id, objects::CScope &  scope  ) static

Create URL showing aligned regions info.

Parameters
seqUrlInfo struct SSeqURLInfo containing data for URL construction id CSeq_id object scope scope to fetch this sequence
Returns
: string containing URL

Definition at line 4160 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqURLInfo::accession, eLinkTypeDefault, eLinkTypeGenLinks, eLinkTypeSNPLinks, eLinkTypeTraceLinks, NStr::fSplit_MergeDelimiters, NStr::Replace(), CAlignFormatUtil::SSeqURLInfo::resourcesUrl, CAlignFormatUtil::SSeqURLInfo::seqUrl, SetCustomLinksTypes(), and NStr::Split().

Referenced by CDisplaySeqalign::x_InitAlignLinks().

◆ GetFrame() ◆ GetFullIDLink() ◆ GetFullLinkoutUrl() [1/4] static list<string> CAlignFormatUtil::GetFullLinkoutUrl ( const list< CRef< objects::CBlast_def_line > > &  bdl, const stringrid, const stringcdd_rid, const stringentrez_term, bool  is_na, bool  structure_linkout_as_group, bool  for_alignment, int  cur_align, stringlinkoutOrder, TTaxId  taxid, stringdatabase, int  query_number, stringuser_url, stringpreComputedResID, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static

Get linkout membership for for the list of blast deflines.

Parameters
bdl list of CRef<CBlast_def_line> rid blast rid cdd_rid blast cdd_rid entrez_term entrez_term for building url is_na bool indication if query is nucleotide first_gi first gi in the list (used to contsruct structure url) structure_linkout_as_group bool used to contsruct structure url for_alignment bool indicating tif link is locted in alignment section int cur_align: int current alignment/description number linkoutOrder string of letters separated by comma specifing linkout order like "G,U,M,E,S,B" taxid int taxid database database name query_number query_number user_url url defined as TOOL_URL for blast_type in .ncbirc
Returns
list of string containing all linkout urls for all of the seqs in the list of blast deflines

Referenced by CDisplaySeqalign::x_InitAlignLinks(), and CShowBlastDefline::x_InitLinkOutInfo().

◆ GetFullLinkoutUrl() [2/4] ◆ GetFullLinkoutUrl() [3/4] static list<string> CAlignFormatUtil::GetFullLinkoutUrl ( objects::CBioseq::TId &  cur_id, const stringrid, const stringcdd_rid, const stringentrez_term, bool  is_na, bool  structure_linkout_as_group, bool  for_alignment, int  cur_align, stringlinkoutOrder, TTaxId  taxid, stringdatabase, int  query_number, stringuser_url, stringpreComputedResID, ILinkoutDBlinkoutdb, const stringmv_build_name, bool  getIdentProteins  ) static

Get linkout membership for one seqID.

Parameters
cur_id CBioseq::TId seqID rid blast rid cdd_rid blast cdd_rid entrez_term entrez_term for building url is_na bool indication if query is nucleotide first_gi first gi in the list (used to contsruct structure url) structure_linkout_as_group bool used to contsruct structure url for_alignment bool indicating tif link is locted in alignment section int cur_align: int current alignment/description number linkoutOrder string of letters separated by comma specifing linkout order like "G,U,M,E,S,B" taxid int taxid database database name query_number query_number user_url url defined as TOOL_URL for blast_type in .ncbirc
Returns
list of string containing all linkout urls for all of the seqs in the list of blast deflines
◆ GetFullLinkoutUrl() [4/4] static list<string> CAlignFormatUtil::GetFullLinkoutUrl ( objects::CBioseq::TId &  cur_id, SLinkoutInfolinkoutInfo, bool  getIdentProteins  ) static ◆ GetGiForSeqIdList() TGi CAlignFormatUtil::GetGiForSeqIdList ( const list< CRef< objects::CSeq_id > > &  ids ) static ◆ GetGiLinksList()

Definition at line 3963 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqURLInfo::accession, NStr::Find(), GetURLFromRegistry(), CAlignFormatUtil::SSeqURLInfo::hasTextSeqID, CAlignFormatUtil::SSeqURLInfo::isDbNa, MapTagToHTML(), NPOS, CAlignFormatUtil::SSeqURLInfo::rid, s_MapCommonUrlParams(), s_MapCustomLink(), and CAlignFormatUtil::SSeqURLInfo::seqUrl.

Referenced by GetSeqLinksList().

◆ GetGnlID() string CAlignFormatUtil::GetGnlID ( const objects::CDbtag &  dtg ) static ◆ GetGraphiscLink()

Definition at line 3988 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqURLInfo::accession, CAlignFormatUtil::SSeqURLInfo::blastType, eMapToString, CRange_Base::GetFrom(), CRange_Base::GetTo(), CAlignFormatUtil::SSeqURLInfo::gi, GI_TO, int, CAlignFormatUtil::SSeqURLInfo::isDbNa, m_Reg, MapTagToConstString(), MapTemplate(), max(), CAlignFormatUtil::SSeqURLInfo::rid, s_MapCustomLink(), CAlignFormatUtil::SSeqURLInfo::seqRange, and ZERO_GI.

Referenced by GetSeqLinksList().

◆ GetIDUrl() [1/2]

Create URL for seqid.

Parameters
◆ GetIDUrl() [2/2] ◆ GetIDUrlGen() [1/2]

Create URL for seqid that goes to entrez or trace.

Parameters
◆ GetIDUrlGen() [2/2]

Create URL for seqid that goes to entrez or trace.

Parameters
seqUrlInfo struct SSeqURLInfo containing data for URL construction id seqid CSeq_id scopeRef:scope to fetch sequence
◆ GetLabel() ◆ GetLinkoutUrl() list< string > CAlignFormatUtil::GetLinkoutUrl ( int  linkout, const objects::CBioseq::TId &  ids, const stringrid, const stringcdd_rid, const stringentrez_term, bool  is_na, TGi  first_gi, bool  structure_linkout_as_group, bool  for_alignment, int  cur_align, string  preComputedResID  ) static

Get the list of urls for linkouts.

Get list of linkouts for one sequence.

Parameters
linkout the membership value ids CBioseq::TId object rid RID cdd_rid CDD RID entrez_term entrez query term is_na is this sequence nucleotide or not first_gi first gi in the list (used to contsruct structure url) structure_linkout_as_group bool used to contsruct structure url for_alignment bool indicating if link is located in alignment section int cur_align: int current alignment/description number bool textLink: bool indicating that if true link will be presented as text, otherwise as image
Returns
list of string containing all linkout urls for one seq

Definition at line 2457 of file align_format_util.cpp.

References CAlignFormatUtil::SLinkoutInfo::cur_align, CSeq_id::eContent, FindBestChoice(), FindGi(), CSeq_id::GetLabel(), CAlignFormatUtil::SLinkoutInfo::Init(), label, NStr::NumericToString(), s_GetLinkoutUrl(), CAlignFormatUtil::SLinkoutInfo::taxid, CSeq_id::WorstRank(), ZERO_GI, and ZERO_TAX_ID.

Referenced by CShowBlastDefline::x_InitLinkOutInfo().

◆ GetMasterCoverage() int CAlignFormatUtil::GetMasterCoverage ( const objects::CSeq_align_set &  alnset ) static ◆ GetPercentIdentity() [1/2] static double CAlignFormatUtil::GetPercentIdentity ( const objects::CSeq_align &  aln, objects::CScope &  scope, bool  do_translation  ) static ◆ GetPercentIdentity() [2/2] ◆ GetPercentMatch() int CAlignFormatUtil::GetPercentMatch ( int  numerator, int  denominator  ) static ◆ GetProtocol() string CAlignFormatUtil::GetProtocol ( void  ) static ◆ GetScoreString() void CAlignFormatUtil::GetScoreString ( double  evalue, double  bit_score, double  total_bit_score, int  raw_score, stringevalue_str, stringbit_score_str, stringtotal_bit_score_str, stringraw_score_str  ) static ◆ GetSeqAlignCalcParams() ◆ GetSeqAlignCoverageParams() CRange< TSeqPos > CAlignFormatUtil::GetSeqAlignCoverageParams ( const objects::CSeq_align_set &  alnset, intmasterCoverage, boolflip  ) static ◆ GetSeqAlignSetCalcParams()

Definition at line 4247 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqAlignSetCalcParams::align_length, CAlignFormatUtil::SSeqAlignSetCalcParams::bit_score, CAlignFormatUtil::SSeqAlignSetCalcParams::evalue, CAlignFormatUtil::SSeqAlignSetCalcParams::flip, CSeq_align_set_Base::Get(), GetAlignmentLength(), GetAlnScores(), GetPercentIdentity(), GetSeqAlignCalcParams(), GetSeqAlignCoverageParams(), CAlignFormatUtil::SSeqAlignSetCalcParams::hspNum, int, ITERATE, CAlignFormatUtil::SSeqAlignSetCalcParams::master_covered_length, CAlignFormatUtil::SSeqAlignSetCalcParams::match, min(), NULL, CAlignFormatUtil::SSeqAlignSetCalcParams::percent_coverage, CAlignFormatUtil::SSeqAlignSetCalcParams::percent_identity, CSeq_align_set::Size(), CAlignFormatUtil::SSeqAlignSetCalcParams::subjRange, CAlignFormatUtil::SSeqAlignSetCalcParams::total_bit_score, and CAlignFormatUtil::SSeqAlignSetCalcParams::totalLen.

Referenced by CShowBlastDefline::x_GetScoreInfoForTable().

◆ GetSeqAlignSetCalcParamsFromASN()

Definition at line 4471 of file align_format_util.cpp.

References CSeq_align_Base::C_Segs::e_Dendiag, CSeq_align_Base::C_Segs::e_Denseg, CSeq_align_Base::C_Segs::e_Std, CSeq_align_set_Base::Get(), CSeq_align_Base::C_Segs::GetDendiag(), CSeq_align_Base::C_Segs::GetDenseg(), CSeq_align_Base::GetScore(), CDense_seg_Base::GetScores(), CSeq_align_Base::GetSegs(), CSeq_align::GetSeq_id(), CSeq_align_Base::C_Segs::GetStd(), GetUseThisSequence(), s_GetBlastScore(), s_NumGiToStringGiList(), StringGiToNumGiList(), and CSeq_align_Base::C_Segs::Which().

Referenced by SortHitByPercentIdentityDescendingEx(), and CShowBlastDefline::x_GetScoreInfoForTable().

◆ GetSeqAlignSetCalcPercentIdent() double CAlignFormatUtil::GetSeqAlignSetCalcPercentIdent ( const objects::CSeq_align_set &  aln, bool  do_translation  ) static ◆ GetSeqDescrString() string CAlignFormatUtil::GetSeqDescrString ( const objects::CBioseq &  cbs ) static ◆ GetSeqIdString() [1/2]

Returns a full '|'-delimited Seq-id string for a a list of seq-ids.

Parameters
ids lsit of seq-ids [in] believe_local_id Should local ids be parsed? [in]
◆ GetSeqIdString() [2/2] ◆ GetSeqLinkoutInfo()

Definition at line 2554 of file align_format_util.cpp.

References ERR_POST, eStructure, FindBestChoice(), FindGi(), CException::GetMsg(), CSeq_id::GetSeqIdString(), GetTextSeqID(), INVALID_GI, NULL, CSeq_id::WorstRank(), and ZERO_GI.

Referenced by CShowBlastDefline::x_InitLinkOutInfo().

◆ GetSeqLinksList() ◆ GetSubjectsNumber() unsigned int CAlignFormatUtil::GetSubjectsNumber ( const objects::CSeq_align_set &  source_aln, unsigned int  num  ) static ◆ GetTaxidForSeqid() TTaxId CAlignFormatUtil::GetTaxidForSeqid ( const objects::CSeq_id &  id, objects::CScope &  scope  ) static ◆ GetTextSeqID() [1/2] ◆ GetTextSeqID() [2/2] ◆ GetTitle() string CAlignFormatUtil::GetTitle ( const objects::CBioseq_Handle &  bh ) static ◆ GetUniqSeqCoverage() int CAlignFormatUtil::GetUniqSeqCoverage ( objects::CSeq_align_set &  alnset ) static

Calculate the uniq subject query coverage range (blastn only)

Definition at line 4838 of file align_format_util.cpp.

References ASSERT, CreateDensegFromDendiag(), CSeq_align_Base::C_Segs::e_Dendiag, CRangeCollection< Position >::empty(), CSeq_align_set_Base::Get(), CRangeCollection< Position >::GetCoveredLength(), CSeq_align_Base::C_Segs::GetDenseg(), CRange_Base::GetFrom(), CSeq_align_Base::GetSegs(), CRange_Base::GetTo(), CSeq_align_set::IsEmpty(), ITERATE, s_FixMinusStrandRange(), CSeq_align_set_Base::Set(), CRange_Base::SetFrom(), CRange_Base::SetTo(), and CRangeCollection< Position >::Subtract().

◆ GetURLDefault() ◆ GetURLFromRegistry()

retrieve URL from .ncbirc file combining host/port and format strings values.

consult blastfmtutil.hpp

Parameters
url_name url name to retrieve index name index ( default: -1: )
Returns
: URL format string from .ncbirc file or default as kNAME

Definition at line 3432 of file align_format_util.cpp.

References CT_POS_TYPE, CFile::Exists(), GetURLDefault(), in(), InitConfig(), NStr::IntToString(), m_Reg, and NStr::Replace().

Referenced by GetGiLinksList(), CDisplaySeqalign::x_FormatDynamicFeaturesInfo(), CDisplaySeqalign::x_GetGeneLinkUrl(), and CDisplaySeqalign::x_PrintDynamicFeatures().

◆ GetUseThisSequence() [1/2] static void CAlignFormatUtil::GetUseThisSequence ( const objects::CSeq_align &  aln, list< string > &  use_this_seq  ) static

Extract use_this_seq info from blast alingment.

Parameters
aln alignment to extract score info from use_this_seq place to extract use_this_seq to
◆ GetUseThisSequence() [2/2] static void CAlignFormatUtil::GetUseThisSequence ( const objects::CSeq_align &  aln, list< TGi > &  use_this_gi  ) static ◆ HitListToHspList() CRef< CSeq_align_set > CAlignFormatUtil::HitListToHspList ( list< CRef< objects::CSeq_align_set > > &  source ) static ◆ HspListToHitList() void CAlignFormatUtil::HspListToHitList ( list< CRef< objects::CSeq_align_set > > &  target, const objects::CSeq_align_set &  source  ) static ◆ HspListToHitMap()

Definition at line 1784 of file align_format_util.cpp.

References CSeq_id::AsFastaString(), count, CRef< C, Locker >::Empty(), CConstRef< C, Locker >::Empty(), map_checker< Container >::end(), map_checker< Container >::find(), i, map_checker< Container >::insert(), ITERATE, CSeq_id::Match(), CRef< C, Locker >::Reset(), CSeq_align_set_Base::Set(), rapidjson::source, and NStr::TruncateSpaces().

Referenced by ExtractSeqAlignForSeqList().

◆ InitConfig() void CAlignFormatUtil::InitConfig ( ) static ◆ IsGiList() bool CAlignFormatUtil::IsGiList ( list< string > &  use_this_seq ) static ◆ IsMixedDatabase() [1/2] ◆ IsMixedDatabase() [2/2] ◆ IsWGSAccession()

Check if accession is WGS.

Parameters
accession string accession [in] wgsProj string wgsProj [out]
Returns
: bool indicating if accession is WGS

Definition at line 3755 of file align_format_util.cpp.

References IsWGSPattern().

◆ IsWGSPattern() bool CAlignFormatUtil::IsWGSPattern ( stringwgsAccession ) static ◆ LimitSeqalignByHsps() CRef< CSeq_align_set > CAlignFormatUtil::LimitSeqalignByHsps ( objects::CSeq_align_set &  source_aln, int  maxAligns, int  maxHsps  ) static ◆ MapProtocol() ◆ MapSpaceTemplate() ◆ MapTagToConstString() ◆ MapTagToHTML() ◆ MapTemplate() [1/2]

Replace template tags by real data.

Parameters
inpString string containing template data tmplParamName:string with template tag name templParamVal int value that replaces template
Returns
:string containing template data replaced by real data

@tmplParamName> is replaced by templParamVal

Definition at line 3585 of file align_format_util.cpp.

References NStr::NumericToString(), and NStr::Replace().

Referenced by CTaxFormat::DisplayLineageReport(), CShowBlastDefline::DisplayOneDefline(), CTaxFormat::DisplayOrgReport(), CTaxFormat::DisplayTaxonomyReport(), GetFullIDLink(), GetGraphiscLink(), MapProtocol(), MapSpaceTemplate(), s_AddOtherRelatedInfoLinks(), s_GetLinkoutUrl(), s_MapBarTemplate(), s_MapCommonUrlParams(), s_MapCustomLink(), s_MapFeatureURL(), s_MapLinkoutGenParam(), s_MapSeqInfoTemplate(), s_MapURLLink(), s_ProcessStyledContent(), CDisplaySeqalign::x_DisplayBl2SeqLink(), CShowBlastDefline::x_DisplayDeflineTableTemplate(), CDisplaySeqalign::x_DisplayInsertsForQueryAnchored(), CDisplaySeqalign::x_DisplayRowData(), CDisplaySeqalign::x_DisplaySequenceIDForPairwise(), CDisplaySeqalign::x_DisplaySequenceIDForQueryAnchored(), CDisplaySeqalign::x_FormatAlignSortInfo(), CDisplaySeqalign::x_FormatAlnBlastInfo(), CDisplaySeqalign::x_FormatAlnHSPLinks(), CShowBlastDefline::x_FormatClusterMemData(), CShowBlastDefline::x_FormatClusterMemDataTxt(), CDisplaySeqalign::x_FormatDefLinesHeader(), CShowBlastDefline::x_FormatDeflineTableLine(), CShowBlastDefline::x_FormatDeflineTableLineCSV(), CShowBlastDefline::x_FormatDeflineTableLineText(), CDisplaySeqalign::x_FormatDynamicFeaturesInfo(), CAlnGraphic::x_FormatGraphOverview(), CDisplaySeqalign::x_FormatIdentityInfo(), CDisplaySeqalign::x_FormatOneDynamicFeature(), CShowBlastDefline::x_FormatPsi(), CAlnGraphic::x_FormatScale(), CAlnGraphic::x_FormatScaleDigit(), CShowBlastDefline::x_FormatSeqSetHeaders(), CDisplaySeqalign::x_FormatSingleAlign(), CDisplaySeqalign::x_GetDumpgnlLink(), CBlastFormat::x_InitAlignTemplates(), CDisplaySeqalign::x_InitDefLinesHeader(), CTaxFormat::x_InitTaxFormat(), CTaxFormat::x_InitTaxIdToSeqsMap(), CDisplaySeqalign::x_MapDefLine(), CTaxFormat::x_MapSeqTemplate(), CTaxFormat::x_MapTaxInfoTemplate(), CDisplaySeqalign::x_OutputSeq(), CDisplaySeqalign::x_PrintDefLine(), and CDisplaySeqalign::x_PrintFeatures().

◆ MapTemplate() [2/2]

Replace template tags by real data.

Parameters
inpString string containing template data tmplParamName:string with template tag name templParamVal string value that replaces template
Returns
:string containing template data replaced by real data

@tmplParamName> is replaced by templParamVal

Definition at line 3593 of file align_format_util.cpp.

References NStr::Replace().

◆ MatchSeqInSeqList() [1/2]

Matches string of seqIDs (gis or text seqID)

Parameters
alnSeqID CSeq_id to extract label info to match use_this_seq list<string> containg gi:sssssss or seqid:sssssssss seqList string contaning comma separated seqIds @ret: bool=true if the match is found
◆ MatchSeqInSeqList() [2/2]

Matches text seqID or gi with the list of seqIds or gis.

Parameters
cur_gi gi to match seqID CSeq_id to extract label info to match use_this_seq list<string> containg gi:sssssss or seqid:sssssssss isGiList bool= true if use_this_seq conatins gi list @ret: bool=true if the match is found

Referenced by FilterSeqalignBySeqList(), and CShowBlastDefline::x_FillDeflineAndId().

◆ MatchSeqInUseThisSeqList() bool CAlignFormatUtil::MatchSeqInUseThisSeqList ( list< string > &  use_this_seq, string  textSeqIDToMatch  ) static ◆ PrintDbReport()

Print out blast database information.

Parameters
dbinfo_list database info list line_length length of each line desired out stream to ouput top Is this top or bottom part of the BLAST report?

Definition at line 506 of file align_format_util.cpp.

References AddSpace(), CAlignFormatUtil::SDbInfo::definition, CAlignFormatUtil::SDbInfo::filt_algorithm_name, CAlignFormatUtil::SDbInfo::filt_algorithm_options, NStr::fWithCommas, i, NStr::Int8ToString(), NStr::IntToString(), ITERATE, CAlignFormatUtil::SDbInfo::number_seqs, out(), CAlignFormatUtil::SDbInfo::total_length, and x_WrapOutputLine().

◆ PrintKAParameters() ◆ PrintPhiInfo()

Prints out PHI-BLAST info for header (or footer)

Parameters
num_patterns number of times pattern appears in query [in] pattern the pattern used [in] prob probability of pattern [in] offsets vector of pattern offsets in query [in] out stream to ouput [in]

Definition at line 757 of file align_format_util.cpp.

References first(), offsets, out(), and prob().

◆ PrintTildeSepLines() void CAlignFormatUtil::PrintTildeSepLines ( string  str, size_t  line_len, CNcbiOstreamout  ) static ◆ PruneSeqalign() void CAlignFormatUtil::PruneSeqalign ( const objects::CSeq_align_set &  source_aln, objects::CSeq_align_set &  new_aln, unsigned int  num = static_cast<unsigned int>(kDfltArgNumAlignments)  ) static ◆ PruneSeqalignAll() void CAlignFormatUtil::PruneSeqalignAll ( const objects::CSeq_align_set &  source_aln, objects::CSeq_align_set &  new_aln, unsigned int  number  ) static ◆ RemoveSeqsOfAccessionTypeFromSeqInUse() bool CAlignFormatUtil::RemoveSeqsOfAccessionTypeFromSeqInUse ( list< string > &  use_this_seq, objects::CSeq_id::EAccessionInfo  accesionType  ) static ◆ SetCustomLinksTypes() int CAlignFormatUtil::SetCustomLinksTypes ( SSeqURLInfoseqUrlInfo, int  customLinkTypesInp  ) static

Create info indicating what kind of links to display.

Parameters
seqUrlInfo struct SSeqURLInfo containing data for URL construction customLinkTypesInp original types of links to be included in the list
Returns
: int containing customLinkTypes with the bits set to indicate what kind of links to display for the sequence

examples:(Mapviewer,Download,GenBank,FASTA,Seqviewer, Trace, SRA, SNP, GSFASTA)

Definition at line 4045 of file align_format_util.cpp.

References CAlignFormatUtil::SSeqURLInfo::blastType, eLinkTypeGenLinks, eLinkTypeGSFastaLinks, eLinkTypeSNPLinks, eLinkTypeSRALinks, eLinkTypeTraceLinks, NStr::Find(), CAlignFormatUtil::SSeqURLInfo::gi, NPOS, CAlignFormatUtil::SSeqURLInfo::seqUrl, and ZERO_GI.

Referenced by GetCustomLinksList(), and GetFASTALinkURL().

◆ SortHit() void CAlignFormatUtil::SortHit ( list< CRef< objects::CSeq_align_set > > &  seqalign_hit_list, bool  do_translation, objects::CScope &  scope, int  sort_method, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static ◆ SortHitByMasterCoverageDescending() bool CAlignFormatUtil::SortHitByMasterCoverageDescending ( CRef< objects::CSeq_align_set > constinfo1, CRef< objects::CSeq_align_set > constinfo2  ) static ◆ SortHitByMasterStartAscending() bool CAlignFormatUtil::SortHitByMasterStartAscending ( CRef< objects::CSeq_align_set > &  info1, CRef< objects::CSeq_align_set > &  info2  ) static ◆ SortHitByMolecularType() void CAlignFormatUtil::SortHitByMolecularType ( list< CRef< objects::CSeq_align_set > > &  seqalign_hit_list, objects::CScope &  scope, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static

sort a list of seqalign set by molecular type

Parameters
seqalign_hit_list list to be sorted. scope scope to fetch sequence

Definition at line 1656 of file align_format_util.cpp.

References kScope.

◆ SortHitByPercentIdentityDescending() void CAlignFormatUtil::SortHitByPercentIdentityDescending ( list< CRef< objects::CSeq_align_set > > &  seqalign_hit_list, bool  do_translation  ) static ◆ SortHitByPercentIdentityDescendingEx() bool CAlignFormatUtil::SortHitByPercentIdentityDescendingEx ( const CRef< objects::CSeq_align_set > &  info1, const CRef< objects::CSeq_align_set > &  info2  ) static ◆ SortHitByScoreDescending() bool CAlignFormatUtil::SortHitByScoreDescending ( const CRef< objects::CSeq_align_set > &  info1, const CRef< objects::CSeq_align_set > &  info2  ) static ◆ SortHitByTotalScoreDescending() bool CAlignFormatUtil::SortHitByTotalScoreDescending ( CRef< objects::CSeq_align_set > constinfo1, CRef< objects::CSeq_align_set > constinfo2  ) static ◆ SortHspByMasterStartAscending() bool CAlignFormatUtil::SortHspByMasterStartAscending ( const CRef< objects::CSeq_align > &  info1, const CRef< objects::CSeq_align > &  info2  ) static ◆ SortHspByPercentIdentityDescending() bool CAlignFormatUtil::SortHspByPercentIdentityDescending ( const CRef< objects::CSeq_align > &  info1, const CRef< objects::CSeq_align > &  info2  ) static ◆ SortHspByScoreDescending() bool CAlignFormatUtil::SortHspByScoreDescending ( const CRef< objects::CSeq_align > &  info1, const CRef< objects::CSeq_align > &  info2  ) static ◆ SortHspBySubjectStartAscending() bool CAlignFormatUtil::SortHspBySubjectStartAscending ( const CRef< objects::CSeq_align > &  info1, const CRef< objects::CSeq_align > &  info2  ) static ◆ SortOneSeqalignForSortableFormat() list< CRef< CSeq_align_set > > CAlignFormatUtil::SortOneSeqalignForSortableFormat ( const objects::CSeq_align_set &  source, bool  nuc_to_nuc_translation, int  hit_sort, int  hsp_sort  ) static

Definition at line 3065 of file align_format_util.cpp.

References eHighestScore, eHspPercentIdentity, ePercentIdentity, eQueryCoverage, eQueryStart, eScore, eSubjectStart, eTotalScore, HspListToHitList(), ITERATE, CSeq_align_set_Base::Set(), SortHitByMasterCoverageDescending(), SortHitByPercentIdentityDescending(), SortHitByScoreDescending(), SortHitByTotalScoreDescending(), SortHspByMasterStartAscending(), SortHspByPercentIdentityDescending(), SortHspByScoreDescending(), SortHspBySubjectStartAscending(), and rapidjson::source.

◆ SortSeqalignForSortableFormat() [1/2] static CRef<objects::CSeq_align_set> CAlignFormatUtil::SortSeqalignForSortableFormat ( CCgiContextctx, objects::CScope &  scope, objects::CSeq_align_set &  aln_set, bool  nuc_to_nuc_translation, int  db_order, int  hit_order, int  hsp_order, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static ◆ SortSeqalignForSortableFormat() [2/2] static CRef<objects::CSeq_align_set> CAlignFormatUtil::SortSeqalignForSortableFormat ( objects::CSeq_align_set &  aln_set, bool  nuc_to_nuc_translation, int  hit_order, int  hsp_order  ) static ◆ SplitSeqalignByMolecularType() void CAlignFormatUtil::SplitSeqalignByMolecularType ( vector< CRef< objects::CSeq_align_set > > &  target, int  sort_method, const objects::CSeq_align_set &  source, objects::CScope &  scope, ILinkoutDBlinkoutdb, const stringmv_build_name  ) static ◆ StringGiToNumGiList() list< TGi > CAlignFormatUtil::StringGiToNumGiList ( list< string > &  use_this_seq ) static ◆ x_AcknowledgeBlastSequence()

Definition at line 714 of file align_format_util.cpp.

References CSeq_inst_Base::CanGetLength(), CBioseq_Base::GetInst(), CSeq_inst_Base::GetLength(), GetSeqDescrString(), GetSeqIdString(), CBioseq_Base::IsSetInst(), kEmptyStr, label, out(), NStr::TruncateSpaces(), and x_WrapOutputLine().

Referenced by AcknowledgeBlastQuery(), and AcknowledgeBlastSubject().

◆ x_WrapOutputLine()

Wrap a string to specified length.

If break happens to be in a word, it will extend the line length until the end of the word

Parameters
str input string line_len length of each line desired out stream to ouput html Is this HTML output? [in]

If break happens to be in a word, it will extend the line length until the end of the word

Parameters
str input string line_len length of each line desired out stream to ouput

Definition at line 279 of file align_format_util.cpp.

References flags, NStr::fWrap_FlatFile, NStr::fWrap_HTMLPre, CHTMLHelper::HTMLEncode(), out(), str(), and NStr::Wrap().

Referenced by PrintDbReport(), PrintTildeSepLines(), and x_AcknowledgeBlastSequence().

◆ kNoHitsFound const char * CAlignFormatUtil::kNoHitsFound = "No hits found" static ◆ m_geturl_debug_flag bool CAlignFormatUtil::m_geturl_debug_flag = false static ◆ m_Protocol string CAlignFormatUtil::m_Protocol = "" static ◆ m_Reg

The documentation for this class was generated from the following files:


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