#include <ncbi_pch.hpp>
#include <objtools/align_format/showalign.hpp>
#include <corelib/ncbiexpt.hpp>
#include <corelib/ncbiutil.hpp>
#include <corelib/ncbistre.hpp>
#include <corelib/ncbireg.hpp>
#include <util/range.hpp>
#include <util/md5.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 <serial/iterator.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 <objmgr/scope.hpp>
#include <objmgr/feat_ci.hpp>
#include <objtools/data_loaders/genbank/gbloader.hpp>
#include <objmgr/util/sequence.hpp>
#include <objmgr/util/feature.hpp>
#include <objects/seqfeat/SeqFeatData.hpp>
#include <objects/seqfeat/Cdregion.hpp>
#include <objects/seqfeat/Genetic_code.hpp>
#include <objects/seq/Seq_descr.hpp>
#include <objects/seq/Seqdesc.hpp>
#include <objects/seq/Bioseq.hpp>
#include <objects/seqset/Seq_entry.hpp>
#include <objects/seqloc/Seq_id.hpp>
#include <objects/seqloc/Seq_interval.hpp>
#include <objects/seqalign/Seq_align_set.hpp>
#include <objects/seqalign/Score.hpp>
#include <objects/seqalign/Std_seg.hpp>
#include <objects/seqalign/Dense_diag.hpp>
#include <objtools/alnmgr/alnmix.hpp>
#include <objtools/alnmgr/alnvec.hpp>
#include <objects/blastdb/Blast_def_line.hpp>
#include <objects/blastdb/Blast_def_line_set.hpp>
#include <objects/blastdb/defline_extra.hpp>
#include <stdio.h>
#include <util/tables/raw_scoremat.h>
#include <objtools/readers/getfeature.hpp>
#include <html/htmlhelper.hpp>
Include dependency graph for showalign.cpp:

Go to the source code of this file.
Functions | |
| USING_SCOPE (objects) | |
| USING_SCOPE (sequence) | |
| static void | s_DisplayIdentityInfo (CNcbiOstream &out, int aln_stop, int identity, int positive, int match, int gap, int master_strand, int slave_strand, int master_frame, int slave_frame, bool aln_is_prot) |
| show blast identity, positive etc. | |
| static void | s_WrapOutputLine (CNcbiOstream &out, const string &str) |
| wrap line | |
| static void | s_ColorDifferentBases (string &seq, char identity_char, CNcbiOstream &out) |
| To add color to bases other than identityChar. | |
| static int | s_GetFrame (int start, ENa_strand strand, const CSeq_id &id, CScope &sp) |
| return the frame for a given strand Note that start is zero bases. | |
| static int | s_GetStdsegMasterFrame (const CStd_seg &ss, CScope &scope) |
| reture the frame for master seq in stdseg | |
| static string | s_GetSeqForm (char *form_name, bool db_is_na, int query_number, int db_type, const string &dbName, const char *rid, const char *queryID, bool showTreeButtons) |
| return the get sequence table for html display | |
| static string | s_GetQueryIDFromSeqAlign (const CSeq_align_set &actual_aln_list) |
| Gets Query Seq ID from Seq Align. | |
| static CRef< CSeq_id > | s_GetSeqIdByType (const list< CRef< CSeq_id > > &ids, CSeq_id::E_Choice choice) |
| return id type specified or null ref | |
| static int | s_GetGiForSeqIdList (const list< CRef< CSeq_id > > &ids) |
| return gi from id list | |
| static string | s_GetConcatenatedExon (CFeat_CI &feat, ENa_strand feat_strand, list< CRange< TSeqPos > > &range, TSeqPos total_coding_len, string &raw_cdr_product, TSeqPos frame_adj) |
| return concatenated exon sequence | |
| static void | s_MapSlaveFeatureToMaster (list< CRange< TSeqPos > > &master_feat_range, ENa_strand &master_feat_strand, CFeat_CI &feat, list< CSeq_loc_CI::TRange > &slave_feat_range, ENa_strand slave_feat_strand, CAlnVec *av, int row, TSeqPos frame_adj) |
| map slave feature info to master seq | |
| static string | s_GetCdsSequence (int genetic_code, CFeat_CI &feat, CScope &scope, list< CRange< TSeqPos > > &range, const CBioseq_Handle &handle, ENa_strand feat_strand, string &feat_id, TSeqPos frame_adj, bool mix_loc) |
| return cds coded sequence and fill the id if found | |
| static void | s_FillCdsStartPosition (string &line, string &concat_exon, size_t length_per_line, TSeqPos feat_aln_start_totalexon, ENa_strand seq_strand, ENa_strand feat_strand, list< TSeqPos > &start) |
| fill the cds start positions (1 based) | |
| static CRef< CScope > | s_MakeNewMasterSeq (list< list< CRange< TSeqPos > > > &feat_range, list< ENa_strand > &feat_seq_strand, const CBioseq_Handle &handle) |
| make a new copy of master seq with feature info and return the scope that contains this sequence | |
| static void | s_OutputFeature (string &reference_feat_line, string &feat_line, bool color_feat_mismatch, int start, int len, CNcbiOstream &out) |
| static int | x_AddBar (string &seq, int insert_alnpos, int aln_start) |
| add a "|" to the current insert for insert on next rows and return the insert end position. | |
| static int | s_AdjustInsert (string &cur_insert, string &new_insert, int insert_alnpos, int aln_start) |
| Add new insert seq to the current insert seq and return the end position of the latest insert. | |
Variables | |
| static char const | rcsid [] = "$Id: showalign.cpp 177302 2009-11-30 14:35:11Z camacho $" |
| static const char | k_IdentityChar = '.' |
| static const int | k_NumFrame = 6 |
| static const string | k_FrameConversion [k_NumFrame] |
| static const int | k_GetSubseqThreshhold = 10000 |
| static const int | k_ColorMismatchIdentity = 0 |
| threshhold to color mismatch. 98 means 98% | |
| static const int | k_GetDynamicFeatureSeqLength = 200000 |
| static const string | k_DumpGnlUrl = "/blast/dumpgnl.cgi" |
| static const int | k_FeatureIdLen = 16 |
| const string | color [] = {"#000000", "#808080", "#FF0000"} |
| const string | k_ColorRed = "#FF0000" |
| const string | k_ColorPink = "#F805F5" |
| static const char | k_IntronChar = '~' |
| static const int | k_IdStartMargin = 2 |
| static const int | k_SeqStopMargin = 2 |
| static const int | k_StartSequenceMargin = 2 |
| static const string | k_UncheckabeCheckbox |
| static const string | k_Checkbox |
| static const string | k_CheckboxEx |
| static const int | k_MaxDeflinesToShow = 8 |
| static const int | k_MinDeflinesToShow = 3 |
|
||||||||||||||||||||
|
Add new insert seq to the current insert seq and return the end position of the latest insert.
Definition at line 2528 of file showalign.cpp. References _ASSERT. |
|
||||||||||||||||
|
To add color to bases other than identityChar.
Definition at line 314 of file showalign.cpp. References k_ColorRed. |
|
||||||||||||||||||||||||||||||||||||||||||||||||
|
show blast identity, positive etc.
Definition at line 252 of file showalign.cpp. |
|
||||||||||||||||||||||||||||||||
|
fill the cds start positions (1 based)
Definition at line 739 of file showalign.cpp. References eNa_strand_minus, and pos. |
|
||||||||||||||||||||||||||||||||||||||||
|
return cds coded sequence and fill the id if found
Definition at line 682 of file showalign.cpp. References CBioseq_Handle::eCoding_Iupac, CScope::GetBioseqHandle(), GetTitle(), k_FeatureIdLen, and NcbiEmptyString. |
|
||||||||||||||||||||||||||||
|
return concatenated exon sequence
Definition at line 481 of file showalign.cpp. References CCdregion_Base::GetFrame(), and CCdregion_Base::IsSetFrame(). |
|
||||||||||||||||||||
|
return the frame for a given strand Note that start is zero bases. It returns frame +/-(1-3). 0 indicates error
Definition at line 347 of file showalign.cpp. References eNa_strand_minus, eNa_strand_plus, CScope::GetBioseqHandle(), and CBioseq_Handle::GetBioseqLength(). Referenced by s_GetStdsegMasterFrame(). |
|
|
return gi from id list
Definition at line 461 of file showalign.cpp. References CSeq_id_Base::e_Gi, Empty(), and s_GetSeqIdByType(). Referenced by CDisplaySeqalign::x_FillSeqid(). |
|
|
Gets Query Seq ID from Seq Align.
Definition at line 427 of file showalign.cpp. References CSeq_align_set_Base::Get(), and CSeq_id::GetLabel(). |
|
||||||||||||||||||||||||||||||||||||
|
return the get sequence table for html display
Definition at line 384 of file showalign.cpp. References buf, CAlignFormatUtil::GetURLFromRegistry(), and NcbiEmptyString. |
|
||||||||||||
|
return id type specified or null ref
Definition at line 441 of file showalign.cpp. Referenced by s_GetGiForSeqIdList(). |
|
||||||||||||
|
reture the frame for master seq in stdseg
Definition at line 366 of file showalign.cpp. References eNa_strand_minus, eNa_strand_plus, CStd_seg_Base::GetIds(), CStd_seg_Base::GetLoc(), GetStart(), GetStop(), GetStrand(), and s_GetFrame(). |
|
||||||||||||||||
|
make a new copy of master seq with feature info and return the scope that contains this sequence
Definition at line 821 of file showalign.cpp. References CBioseq_Handle::GetCompleteBioseq(), CObjectManager::GetInstance(), CBioseq_Handle::GetRangeSeq_loc(), NStr::IntToString(), ITERATE, and CGBDataLoader::RegisterInObjectManager(). |
|
||||||||||||||||||||||||||||||||||||
|
map slave feature info to master seq
Definition at line 564 of file showalign.cpp. References CCdregion_Base::GetFrame(), and CCdregion_Base::IsSetFrame(). |
|
||||||||||||||||||||||||||||
|
Definition at line 875 of file showalign.cpp. References NStr::IsBlank(), k_ColorPink, k_IntronChar, and NcbiEmptyString. |
|
||||||||||||
|
wrap line
Definition at line 288 of file showalign.cpp. |
|
|
|
|
|
|
|
||||||||||||||||
|
add a "|" to the current insert for insert on next rows and return the insert end position.
Definition at line 2505 of file showalign.cpp. |
|
|
|
Initial value: "<input type=\"checkbox\" \ name=\"getSeqGi\" value=\"%s\" onClick=\"synchronizeCheck(this.value, \ 'getSeqAlignment%d', 'getSeqGi', this.checked)\">" Definition at line 128 of file showalign.cpp. |
|
|
Initial value: "<input type=\"checkbox\" name=\"getSeqGi\" value=\"%s\" \ checked=\"checked\" onClick=\"synchAl(this);\">" Definition at line 132 of file showalign.cpp. |
|
|
threshhold to color mismatch. 98 means 98%
Definition at line 111 of file showalign.cpp. |
|
|
Definition at line 117 of file showalign.cpp. Referenced by s_OutputFeature(). |
|
|
Definition at line 116 of file showalign.cpp. Referenced by s_ColorDifferentBases(). |
|
|
Definition at line 113 of file showalign.cpp. |
|
|
Definition at line 114 of file showalign.cpp. Referenced by s_GetCdsSequence(). |
|
|
Initial value: {"+1", "+2", "+3", "-1",
"-2", "-3"}
Definition at line 106 of file showalign.cpp. |
|
|
Definition at line 112 of file showalign.cpp. |
|
|
Definition at line 108 of file showalign.cpp. |
|
|
Definition at line 104 of file showalign.cpp. |
|
|
Definition at line 120 of file showalign.cpp. |
|
|
Definition at line 119 of file showalign.cpp. Referenced by s_OutputFeature(). |
|
|
Definition at line 166 of file showalign.cpp. |
|
|
Definition at line 167 of file showalign.cpp. |
|
|
Definition at line 105 of file showalign.cpp. |
|
|
Definition at line 121 of file showalign.cpp. |
|
|
Definition at line 122 of file showalign.cpp. |
|
|
Initial value: "<input type=\"checkbox\" \ name=\"getSeqMaster\" value=\"\" onClick=\"uncheckable('getSeqAlignment%d',\ 'getSeqMaster')\">" Definition at line 124 of file showalign.cpp. |
|
|
Definition at line 34 of file showalign.cpp. |
1.4.6
Modified on Mon Dec 07 16:22:06 2009 by modify_doxy.py rev. 173732