(base == consensus)
58 returnbase == consensus;
60 returnbase ==
'C'|| base ==
'A';
62 returnbase ==
'G'|| base ==
'A';
64 returnbase ==
'G'|| base ==
'C';
66 returnbase ==
'G'|| base ==
'C'|| base ==
'A';
68 returnbase ==
'T'|| base ==
'A';
70 returnbase ==
'T'|| base ==
'C';
72 returnbase ==
'T'|| base ==
'C'|| base ==
'A';
74 returnbase ==
'T'|| base ==
'G';
76 returnbase ==
'T'|| base ==
'G'|| base ==
'A';
78 returnbase ==
'T'|| base ==
'G'|| base ==
'C';
80 returnbase ==
'T'|| base ==
'G'|| base ==
'C'|| base ==
'A';
82 returnbase == consensus;
89 if(consensus == residue)
93 returnresidue ==
'N'|| residue ==
'D';
95 returnresidue ==
'I'|| residue ==
'L';
97 returnresidue ==
'Q'|| residue ==
'E';
99 returnconsensus == residue;
108 switch(align_type) {
109 caseIAlnExplorer::EAlignType::fDNA:
117 caseIAlnExplorer::EAlignType::fMixed:
133: m_Space(0), m_Gap(0)
148: m_Space(0), m_Gap(0)
167: m_Worst(
orig.m_Worst),
168m_Best(
orig.m_Best),
169m_Space(
orig.m_Space),
210 return "Frequency-Based Difference";
213 #define SIMPLE_DESCR "This is a column-based method that assigns scores \ 214 to residues in a column based on their representation in the column's frequency \ 215 profile. Residues that occur infrequently are highlighted darkly; columns \ 216 that contain any degree of mismatch will alsobe highlighted." 254 size_ttotal =
column.size() - space_n;
258 for(
size_t i= 0;
i<
column.size();
i++ ) {
304 intindex = (
int) floor(score *
size);
338DECLARE_EVENT_TABLE()
344 void OnApply( wxCommandEvent& event );
358m_Method(method), m_GradPanel()
374wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxVERTICAL);
375this->SetSizer(itemBoxSizer1);
385itemBoxSizer1->Add(
m_GradPanel, 1, wxGROW|wxALL, 5);
387wxCheckBox* itemCheckBox1 =
newwxCheckBox(
this,
wxID_ANY,
_(
"Ignore Empty Space"));
388itemCheckBox1->SetValidator(wxGenericValidator(&
m_Space));
389itemBoxSizer1->Add(itemCheckBox1, 0, wxALIGN_LEFT|wxALL, 5);
391wxCheckBox* itemCheckBox2 =
newwxCheckBox(
this,
wxID_ANY,
_(
"Ignore Gaps"));
392itemCheckBox2->SetValidator(wxGenericValidator(&
m_Gap));
393itemBoxSizer1->Add(itemCheckBox2, 0, wxALIGN_LEFT|wxALL, 5);
424m_UndefColor(0.8f, 0.8f, 1.0f),
432m_UndefColor(
orig.m_UndefColor)
445 return "Show Differences";
449 #define SNP_DESCR "This method highlights differences observed from the master \ 450 sequence in an alignment. In order to see any coloration with this scheme, \ 451 you must select a master sequence. You can adjust the master sequence \ 452 on the fly and display differences by selecting a new master from the context menu.";
461 const static float kSNP= 0.0f;
479fill(scores.begin(), scores.end(),
kUndef);
481 for(
size_t i= 0;
i<
column.size();
i++ ) {
548DECLARE_EVENT_TABLE()
554 void OnApply( wxCommandEvent& event );
583wxBoxSizer* itemBoxSizer1 =
newwxBoxSizer(wxVERTICAL);
584this->SetSizer(itemBoxSizer1);
586wxBoxSizer* itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
588wxColourPickerCtrl* itemColorPicker1 =
newwxColourPickerCtrl(
this,
wxID_ANY);
590itemBoxSizer2->Add(itemColorPicker1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
591itemBoxSizer2->Add(
newwxStaticText(
this, wxID_STATIC,
_(
"Neutral (no master specified)")),
5920, wxALIGN_CENTER_VERTICAL|wxALL, 5);
593itemBoxSizer1->Add(itemBoxSizer2, 0, wxALIGN_LEFT|wxALL, 0);
595itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
596wxColourPickerCtrl* itemColorPicker2 =
newwxColourPickerCtrl(
this,
wxID_ANY);
598itemBoxSizer2->Add(itemColorPicker2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
599itemBoxSizer2->Add(
newwxStaticText(
this, wxID_STATIC,
_(
"SNP")),
6000, wxALIGN_CENTER_VERTICAL|wxALL, 5);
601itemBoxSizer1->Add(itemBoxSizer2, 0, wxALIGN_LEFT|wxALL, 0);
603itemBoxSizer2 =
newwxBoxSizer(wxHORIZONTAL);
604wxColourPickerCtrl* itemColorPicker3 =
newwxColourPickerCtrl(
this,
wxID_ANY);
606itemBoxSizer2->Add(itemColorPicker3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
607itemBoxSizer2->Add(
newwxStaticText(
this, wxID_STATIC,
_(
"Normal")),
6080, wxALIGN_CENTER_VERTICAL|wxALL, 5);
609itemBoxSizer1->Add(itemBoxSizer2, 0, wxALIGN_LEFT|wxALL, 0);
611wxCheckBox* itemCheckBox1 =
newwxCheckBox(
this,
wxID_ANY,
_(
"Ignore Empty Space"));
612itemCheckBox1->SetValidator(wxGenericValidator(&
m_Space));
613itemBoxSizer1->Add(itemCheckBox1, 0, wxALIGN_LEFT|wxALL, 5);
615wxCheckBox* itemCheckBox2 =
newwxCheckBox(
this,
wxID_ANY,
_(
"Ignore Gaps"));
616itemCheckBox2->SetValidator(wxGenericValidator(&
m_Gap));
617itemBoxSizer1->Add(itemCheckBox2, 0, wxALIGN_LEFT|wxALL, 5);
664 return "Test Sequence-based";
696 size_tcolor_index = 0;
698 switch(
buf[
i]) {
739 size_tindex = (size_t) score;
755wxUnusedVar(
color);
793: m_ColumnCount(0), m_SequenceLevel(
orig.m_SequenceLevel)
795 for(
auto i= 0;
i< EColors::eLast; ++
i)
809 return "Nonsynonymous substitutions";
813 Note: nonsynonymous substitution coloring is available only for CDS alignments. 814 Any sequence in alignment or pre-calculated consensus with only ACGT letters can be set as a master.)foo"; 833fill(scores.begin(), scores.end(), -1.);
835 for(
size_t i= 0;
i<
column.size();
i++) {
836 boolsame = (
column[
i] == cons);
867 intindex = (
int) floor(score *
size);
void GetParams(stParams ¶ms) const
CNonSynonymousScoringMethod - implementation of IScoringMethod.
CRgbaGradColorTable m_ColorTable
virtual string GetName() const override
returns unique name of the method that is used in UI to identify it
virtual int GetType() const override
returns combination of EAlignType flags defining types of alignments that can be colored with this me...
virtual int GetSupportedColorTypes() const override
returns a combination of EColorType flags
virtual string GetDescription() const override
returns a detailed description of the method that is used in UI
virtual void CalculateScores(char cons, const string &column, TScore &col_score, TScoreVector &scores) override
virtual const CRgbaColor & GetColorForNoScore(EColorType type) const override
Call for display colors when CanCalculateScores returns false.
virtual const CRgbaColor & GetColorForScore(TScore score, EColorType type) const override
returns a color corresponding to a given score value.
virtual ~CNonSynonymousScoringMethod()
CNonSynonymousScoringMethod()
CNonSynonymousScoringMethod.
virtual IUITool * Clone() const override
virtual void SetColorForNoScore(EColorType type, const CRgbaColor &color) override
CRgbaColor m_Colors[EColors::eLast]
class CRgbaColor provides a simple abstraction for managing colors.
virtual string GetDescription() const
returns a detailed description of the method that is used in UI
virtual IUITool * Clone() const
virtual int GetSupportedColorTypes() const
returns a combination of EColorType flags
friend class CSNPScoringPanel
virtual bool HasPropertiesPanel() const
returns true if the method supports properties dialog
virtual bool CanCalculateScores(const IScoringAlignment &aln)
Do we have what it takes to calculate scores? e.g. a master row selected?
virtual const CMenuItem * GetMenu()
Returns a pointer to the submenu.
virtual const CRgbaColor & GetColorForNoScore(EColorType type) const
Call for display colors when CanCalculateScores returns false.
virtual const CRgbaColor & GetColorForScore(TScore score, EColorType type) const
returns a color corresponding to a given score value.
virtual void CalculateScores(char cons, const string &column, TScore &col_score, TScoreVector &scores)
CSNPScoringMethod()
CSNPScoringMethod.
virtual wxWindow * CreatePropertiesPanel(wxWindow *parent)
This a factory method that shall produce a CPropertiesPanel representing properties of the method; th...
virtual string GetName() const
returns unique name of the method that is used in UI to identify it
virtual void SetColorForNoScore(EColorType type, const CRgbaColor &color)
void OnApply(wxCommandEvent &event)
CSNPScoringPanel(CSNPScoringMethod &method, wxWindow *parent, wxWindowID id=wxID_ANY)
CSNPScoringMethod & m_Method
CSimpleScoringMethod - trivial implementation of IScoringMethod.
virtual IUITool * Clone() const
virtual void CalculateScores(char cons, const string &column, TScore &col_score, TScoreVector &scores)
friend class CSimpleScoringPanel
CSimpleScoringMethod()
CSimpleScoringMethod.
virtual int GetType() const
returns combination of EAlignType flags defining types of alignments that can be colored with this me...
unique_ptr< CMenuItem > m_Menu
virtual wxWindow * CreatePropertiesPanel(wxWindow *parent)
This a factory method that shall produce a CPropertiesPanel representing properties of the method; th...
CRgbaGradColorTable m_ColorTable
virtual bool CanCalculateScores(const IScoringAlignment &aln)
Do we have what it takes to calculate scores? e.g. a master row selected?
virtual string GetDescription() const
returns a detailed description of the method that is used in UI
virtual bool IsAverageable() const
return "true" if scores could be averaged
virtual const CRgbaColor & GetColorForNoScore(EColorType type) const
Call for display colors when CanCalculateScores returns false.
CRgbaColor m_Worst
combination of EOptions flags
void SetOptions(int options)
virtual void SetColorForNoScore(EColorType type, const CRgbaColor &color)
vector< int > m_vCharCounts
char m_Space
histogramm of characters
virtual string GetName() const
returns unique name of the method that is used in UI to identify it
void CreateColorTable(int size)
virtual const CMenuItem * GetMenu()
Returns a pointer to the submenu.
virtual ~CSimpleScoringMethod()
virtual bool HasPropertiesPanel() const
returns true if the method supports properties dialog
virtual int GetSupportedColorTypes() const
returns a combination of EColorType flags
virtual const CRgbaColor & GetColorForScore(TScore score, EColorType type) const
returns a color corresponding to a given score value.
void OnApply(wxCommandEvent &event)
CSimpleScoringMethod & m_Method
CGradientColorPanel * m_GradPanel
CSimpleScoringPanel(CSimpleScoringMethod &method, wxWindow *parent, wxWindowID id=wxID_ANY)
int GetType() const
returns combination of EAlignType flags defining types of alignments that can be colored with this me...
virtual void CalculateScores(IAlnExplorer::TNumrow row, const IScoringAlignment &aln, TScoreColl &scores)
virtual int GetSupportedColorTypes() const
returns a combination of EColorType flags
CTestSeqBasedMethod()
CTestSeqBasedMethod.
virtual const CRgbaColor & GetColorForScore(TScore score, EColorType type) const
returns a color corresponding to a given score value.
virtual string GetName() const
returns unique name of the method that is used in UI to identify it
virtual string GetDescription() const
returns a detailed description of the method that is used in UI
virtual const CRgbaColor & GetColorForNoScore(IScoringMethod::EColorType type) const
Call for display colors when CanCalculateScores returns false.
CRgbaColor m_NoScoreColor
vector< CRgbaColor > m_vColors
virtual void SetColorForNoScore(IScoringMethod::EColorType type, const CRgbaColor &color)
virtual bool IsAverageable() const
return "true" if scores could be averaged
virtual IUITool * Clone() const
virtual void UpdateSettings(const IScoringAlignment &aln)
Set alignment specifi settings.
std::function< bool(char c, char b)> mf_CompareResidue
char m_AmbiguousResidue
Ambiguous Residue, typically 'N' for nucleotides, 'X' for proteins.
static const int kAmbiguousResidueScore
virtual TSeqPos GetAlnStart() const =0
virtual IAlnExplorer::EAlignType GetAlignType() const =0
virtual TSeqPos GetAlnStop() const =0
virtual string & GetAlnSeqString(IAlnExplorer::TNumrow row, string &buffer, const IAlnExplorer::TSignedRange &aln_range) const =0
vector< TScore > TScoreVector
static const int sm_DefGradientSize
default number of colors in gradient
static const Colors colors
Include a standard set of the NCBI C++ Toolkit most basic headers.
static const char * column
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
void SetSize(size_t size)
void FillGradient(const CRgbaColor &start_c, const CRgbaColor &end_c)
initialize the whole table with gradient colors in [start_c, end_c] range
void SetFrom(TSeqPos start)
void Set(float r, float g, float b)
set the color from an Fl_Color
void Lighten(float scale)
void push_back(const attr_type &attr)
position_type GetLength(void) const
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
TFrom GetFrom(void) const
Get the From member data.
unsigned int
A callback function used to compare two keys in a database.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
static const float kUndef
const string CNONSYNONYMOUS_METHOD_DESCR
static bool s_CompareBases(char consensus, char base)
static bool s_CompareResidues(char consensus, char residue)
static const int kDefGradientSize
static const float kSameBase
#define row(bind, expected)
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