49 static const char*
const kCDSKey =
"GBPlugins.SeqGraphicGeneModelCDS";
68 if (iter != sm_StyleMap.end()) {
79 for (iter = sm_StyleMap.begin(); iter != sm_StyleMap.end(); ++iter) {
80 if (iter->second == style) {
106 for (iter = sm_OptionMap.begin(); iter != sm_OptionMap.end(); ++iter) {
107 if (iter->second ==
option) {
118 if (iter != sm_OptionMap.end()) {
126 const string& reg_path,
127 const string& profile)
135 true,
false,
CRgbaColor(0.0, 0.6f, 0.0f, 0.1f),
188 const string& reg_path,
189 const string& profile)
197 true,
false,
CRgbaColor(0.0, 0.6f, 0.0f, 0.1f),
234 const string& reg_path,
235 const string& profile)
const
378 <<
"the setting is not supported: "
379 << iter->first <<
":" << iter->second);
381 LOG_POST(
Warning <<
"CGeneModelConfig::UpdateSettings() invalid setting - "
382 << iter->first <<
":" << iter->second);
392 if ( !preset_style.empty() ) {
393 settings[
"profile"] = preset_style;
CRgbaColor m_SeqProtMismatch
mismatched sequence color.
bool m_Dirty
dirty flag indicating any setting changed
CGlTextureFont m_ProdFont
CRgbaColor m_LabelProtProd
protein product label color.
CRgbaColor m_SeqProtTrans
translated sequence color.
CRgbaColor m_fgProtProd
protein product frorground color.
CRgbaColor m_SeqProt
sequence color.
CRgbaColor m_bgProtProd
protein product background color.
CGlTextureFont m_TransFont
bool m_CCDSOnly
Show only CCDS variants.
bool m_ShowCDSProductFeats
CDS associated protein features.
bool m_ShowGeneProducts
feature histogram on a gene.
bool m_ShowNtRuler
Show nucleotide ruler.
EMergeStyle m_MergeStyle
the way on how to merge CDSs and RNAs.
static ERenderingOption OptionStrToValue(const string &option)
static const string & OptionValueToStr(CGeneModelConfig::ERenderingOption option)
static EMergeStyle StyleStrToValue(const string &style)
bool m_ShowAaRuler
Show protein ruler.
bool m_SelectOnly
Show only Select/MANE variants.
void SaveSettings(CConstRef< CSeqGraphicConfig > g_conf, const string ®_path, const string &profile) const
void UpdateSettings(const CSGConfigUtils::TKeyValuePairs &settings)
bool m_HideNonCoding
Hide transcripts without associated CDS.
void LoadSettingsPartial(const string ®_path, const string &profile)
void LoadSettings(CConstRef< CSeqGraphicConfig > g_conf, const string ®_path, const string &profile)
bool m_ShowVDJCs
show VDJ_segments and C_region
CRef< CBoundaryParams > m_GeneBoxConfig
bool m_ShowHistogram
show gene distribution histogram.
ERenderingOption
rendering options on how to render features overall.
@ eOption_SingleLine
merge all RNAs and CDSs into one line
@ eOption_MergeAll
merge all RNAs and CDSs, show exons, no gene bar
@ eOption_ShowAll
show all features individually
@ eOption_MergePairs
merge each RNA and CDS pair, show exons, no gene bar
@ eOption_ShowAllButGenes
show all RNAs, CDSs and exons, no gene bar
@ eOption_GeneOnly
show gene bar only
string SaveSettingsAsString(const string &preset_style) const
string m_CDSProfile
cds setting profile
static const string & StyleValueToStr(CGeneModelConfig::EMergeStyle style)
CRef< CCdsConfig > m_CdsConfig
EMergeStyle
style on how to merge RNAs and CDSs.
@ eMerge_OneLine
merge into one line
@ eMerge_Pairs
merge each transcript and CDS pair
@ eMerge_All
merge all transcripts and CDSs
@ eMerge_No
show all feature individually
bool m_ShowLMGeneLabel
landmark gene labels.
bool m_HideModels
Hide Model RefSeqs.
bool m_ShowLabel
Show labels.
static CGuiRegistry & GetInstance()
access the application-wide singleton
class CRegistryReadView provides a nested hierarchical view at a particular key.
int GetInt(const string &key, int default_val=0) const
access a named key at this level, with no recursion
bool GetBool(const string &key, bool default_val=false) const
string GetString(const string &key, const string &default_val=kEmptyStr) const
void Set(const string &key, int val)
access a named key at this level, with no recursion
class CRgbaColor provides a simple abstraction for managing colors.
static CRegistryReadView GetSizeReadView(const CGuiRegistry ®, const string &base_key, const string §, const string &key, const string &def_sect="")
static void GetFont(const CRegistryReadView &view, const string &face_key, const string &size_key, CGlTextureFont &f)
static string ComposeProfileString(const TKeyValuePairs &settings)
static CRegistryReadView GetColorReadView(const CGuiRegistry ®, const string &base_key, const string §, const string &key, const string &def_sect="")
Create a read view specifically for 'Color' section.
static CRegistryReadView GetReadView(const CGuiRegistry ®, const string &base_key, const string &curr_key, const string &def_key1="", const string &def_key2="", const string &def_key3="")
read/readwrite view creation helper methods.
static CRegistryWriteView GetWriteView(CGuiRegistry ®, const string &base_key, const string &curr_key, const string &def_key1="", const string &def_key2="", const string &def_key3="")
static CRegistryWriteView GetColorRWView(CGuiRegistry ®, const string &base_key, const string §, const string &key, const string &def_sect="")
static CRegistryWriteView GetSizeRWView(CGuiRegistry ®, const string &base_key, const string §, const string &key, const string &def_sect="")
static void SetColor(CRegistryWriteView &view, const string &key, const CRgbaColor &color)
static void GetColor(const CRegistryReadView &view, const string &key, CRgbaColor &color)
static void SetFont(CRegistryWriteView &view, const string &face_key, const string &size_key, const CGlTextureFont &f)
const string & GetSizeLevel() const
const string & GetColorTheme() const
class CStaticArrayMap<> provides access to a static array in much the same way as CStaticArraySet<>,...
TBase::const_iterator const_iterator
CStaticArrayMap< string, CGeneModelConfig::EMergeStyle > TStyleMap
CStaticArrayMap< string, CGeneModelConfig::ERenderingOption > TOptionMap
SStaticPair< const char *, CGeneModelConfig::EMergeStyle > TStyleStr
static const char *const kDefProfile
CGeneModelConfig implementation.
static const TOptionStr s_OptionStrs[]
SStaticPair< const char *, CGeneModelConfig::ERenderingOption > TOptionStr
static const TStyleStr s_StyleStrs[]
static const char *const kCDSKey
DEFINE_STATIC_ARRAY_MAP(TStyleMap, sm_StyleMap, s_StyleStrs)
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
#define NCBI_THROW(exception_class, err_code, message)
Generic macro to throw an exception, given the exception class, error code and message string.
void Warning(CExceptionArgs_Base &args)
void Reset(void)
Reset reference object.
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static bool StringToBool(const CTempString str)
Convert string to bool.
static int StringToInt(const CTempString str, TStringToNumFlags flags=0, int base=10)
Convert string to int.
static const string BoolToString(bool value)
Convert bool to string.
static bool EqualNocase(const CTempString s1, SIZE_TYPE pos, SIZE_TYPE n, const char *s2)
Case-insensitive equality of a substring with another string.
Template structure SStaticPair is simlified replacement of STL pair<> Main reason of introducing this...