src/objtools/align_format/align_format_util.cpp File Reference

#include <ncbi_pch.hpp>
#include <objtools/align_format/align_format_util.hpp>
#include <corelib/ncbireg.hpp>
#include <corelib/ncbidiag.hpp>
#include <corelib/ncbistre.hpp>
#include <corelib/ncbiutil.hpp>
#include <corelib/ncbiobj.hpp>
#include <corelib/ncbifile.hpp>
#include <html/htmlhelper.hpp>
#include <serial/objistr.hpp>
#include <serial/objostr.hpp>
#include <serial/serial.hpp>
#include <serial/objostrasnb.hpp>
#include <serial/objistrasnb.hpp>
#include <connect/ncbi_conn_stream.hpp>
#include <util/tables/raw_scoremat.h>
#include <objects/seqalign/Seq_align.hpp>
#include <objects/seqalign/Score.hpp>
#include <objects/seqalign/Std_seg.hpp>
#include <objects/seqalign/Dense_diag.hpp>
#include <objects/seqalign/Dense_seg.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/Seq_loc.hpp>
#include <objects/seq/Seq_inst.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/blastdb/defline_extra.hpp>
#include <objects/general/Object_id.hpp>
#include <objects/general/User_object.hpp>
#include <objects/general/User_field.hpp>
#include <objects/general/Dbtag.hpp>
#include <objtools/blast/services/blast_services.hpp>
#include <objtools/blast/seqdb_reader/seqdb.hpp>
#include <objtools/blast/seqdb_reader/seqdbcommon.hpp>
#include <objects/seq/seqport_util.hpp>
#include <objects/blastdb/Blast_def_line.hpp>
#include <objects/blastdb/Blast_def_line_set.hpp>
#include <stdio.h>
#include <sstream>
#include <iomanip>

Include dependency graph for align_format_util.cpp:

Go to the source code of this file.

Functions

 USING_SCOPE (ncbi)
 USING_SCOPE (objects)
template<class container>
bool s_GetBlastScore (const container &scoreList, int &score, double &bits, double &evalue, int &sum_n, int &num_ident, list< int > &use_this_gi, int &comp_adj_method)
 Get blast score information.
static bool s_FillDbInfoRemotely (const string &dbname, CAlignFormatUtil::SDbInfo &info)
 Initialize database statistics with data from BLAST servers.
static bool s_FillDbInfoLocally (const string &dbname, CAlignFormatUtil::SDbInfo &info, int dbfilt_algorithm)
 Initialize database statistics with data obtained from local BLAST databases.
static void s_OssToDefline (const CUser_field::TData::TOss &oss, CBlast_def_line_set &bdls)
 Efficiently decode a Blast-def-line-set from binary ASN.1.
static bool FromRangeAscendingSort (CRange< TSeqPos > const &info1, CRange< TSeqPos > const &info2)

Variables

static char const rcsid [] = "$Id: align_format_util.cpp 177433 2009-12-01 15:16:11Z camacho $"
bool kTranslation
CRef< CScopekScope
const char k_PSymbol [ePMatrixSize+1]
 Residues.


Function Documentation

static bool FromRangeAscendingSort CRange< TSeqPos > const &  info1,
CRange< TSeqPos > const &  info2
[static]
 

Definition at line 1937 of file align_format_util.cpp.

References COpenRange< Position >::GetFrom().

static bool s_FillDbInfoLocally const string &  dbname,
CAlignFormatUtil::SDbInfo info,
int  dbfilt_algorithm
[static]
 

Initialize database statistics with data obtained from local BLAST databases.

Parameters:
dbname name of a single BLAST database [in]
info structure to fill [in|out]
dbfilt_algorithm filtering algorithm ID used for this search [in]
Returns:
true if successfully filled, false otherwise (and a warning is printed out)

Definition at line 246 of file align_format_util.cpp.

References CAlignFormatUtil::SDbInfo::date, CAlignFormatUtil::SDbInfo::definition, CSeqDB::eNucleotide, CSeqDB::eProtein, CAlignFormatUtil::SDbInfo::filt_algorithm_name, CAlignFormatUtil::SDbInfo::filt_algorithm_options, CAlignFormatUtil::SDbInfo::is_protein, CAlignFormatUtil::SDbInfo::name, CAlignFormatUtil::SDbInfo::number_seqs, and CAlignFormatUtil::SDbInfo::total_length.

static bool s_FillDbInfoRemotely const string &  dbname,
CAlignFormatUtil::SDbInfo info
[static]
 

Initialize database statistics with data from BLAST servers.

Parameters:
dbname name of a single BLAST database [in]
info structure to fill [in|out]
Returns:
true if successfully filled, false otherwise (and a warning is printed out)

Definition at line 212 of file align_format_util.cpp.

References CAlignFormatUtil::SDbInfo::date, CAlignFormatUtil::SDbInfo::definition, eBlast4_residue_type_nucleotide, eBlast4_residue_type_protein, CTimeFormat::fFormat_Simple, CBlastServices::GetDatabaseInfo(), CAlignFormatUtil::SDbInfo::is_protein, CAlignFormatUtil::SDbInfo::name, CAlignFormatUtil::SDbInfo::number_seqs, and CAlignFormatUtil::SDbInfo::total_length.

template<class container>
bool s_GetBlastScore const container &  scoreList,
int &  score,
double &  bits,
double &  evalue,
int &  sum_n,
int &  num_ident,
list< int > &  use_this_gi,
int &  comp_adj_method
 

Get blast score information.

Parameters:
scoreList,: score container 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
Returns:
true if found score, false otherwise

Definition at line 111 of file align_format_util.cpp.

References ITERATE.

static void s_OssToDefline const CUser_field::TData::TOss &  oss,
CBlast_def_line_set bdls
[static]
 

Efficiently decode a Blast-def-line-set from binary ASN.1.

Parameters:
oss Octet string sequence of binary ASN.1 data.
bdls Blast def line set decoded from oss.

Definition at line 568 of file align_format_util.cpp.

References size.

USING_SCOPE objects   ) 
 

USING_SCOPE ncbi   ) 
 


Variable Documentation

const char k_PSymbol[ePMatrixSize+1]
 

Initial value:

"ARNDCQEGHILKMFPSTWYVBZX"
Residues.

Definition at line 95 of file align_format_util.cpp.

Referenced by CAlignFormatUtil::GetAsciiProteinMatrix().

CRef<CScope> kScope
 

Definition at line 93 of file align_format_util.cpp.

bool kTranslation
 

Definition at line 92 of file align_format_util.cpp.

char const rcsid[] = "$Id: align_format_util.cpp 177433 2009-12-01 15:16:11Z camacho $" [static]
 

Definition at line 34 of file align_format_util.cpp.


Generated on Mon Dec 7 09:23:22 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:22:06 2009 by modify_doxy.py rev. 173732