Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Removing debug warnings/comments #117

Merged
merged 1 commit into from
Aug 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions src/ProgramOptionsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ END_EVENT_TABLE()

TEnzymeSettingsTab::TEnzymeSettingsTab ( wxWindow *parent , const int _mode ) : wxPanel ( parent )
{
wxPrintf( "D: TEnzymeSettingsTab::TEnzymeSettingsTab - start\n" ) ;
//wxPrintf( "D: TEnzymeSettingsTab::TEnzymeSettingsTab - start\n" ) ;
myapp()->frame->push_help ( _T("GENtle:Options") ) ;
mode = _mode ;
int w , h ;
Expand Down Expand Up @@ -131,7 +131,7 @@ TEnzymeSettingsTab::TEnzymeSettingsTab ( wxWindow *parent , const int _mode ) :
updateGlobalEnzymes () ;
vs->Fit ( this ) ;

wxPrintf( "D: TEnzymeSettingsTab::TEnzymeSettingsTab - end\n" ) ;
//wxPrintf( "D: TEnzymeSettingsTab::TEnzymeSettingsTab - end\n" ) ;
}

ProgramOptionsDialog::~ProgramOptionsDialog ()
Expand All @@ -141,7 +141,7 @@ ProgramOptionsDialog::~ProgramOptionsDialog ()

void TEnzymeSettingsTab::updateGlobalEnzymes ()
{
wxPrintf( "D: TEnzymeSettingsTab::updateGlobalEnzymes - start\n" ) ;
//wxPrintf( "D: TEnzymeSettingsTab::updateGlobalEnzymes - start\n" ) ;
bool use = useSettings->GetValue() ;
useMinCutoff->Enable ( use ) ;
useMaxCutoff->Enable ( use ) ;
Expand All @@ -163,7 +163,7 @@ void TEnzymeSettingsTab::updateGlobalEnzymes ()
updateColorButton ( bcol1 , col1 ) ;
updateColorButton ( bcol2 , col2 ) ;
updateColorButton ( bcol3 , col3 ) ;
wxPrintf( "D: TEnzymeSettingsTab::updateGlobalEnzymes - end - useMaxCutoff:%d\n" , useMaxCutoff ) ;
//wxPrintf( "D: TEnzymeSettingsTab::updateGlobalEnzymes - end - useMaxCutoff:%d\n" , useMaxCutoff ) ;
}

void TEnzymeSettingsTab::updateColorButton ( wxButton *b , const wxColour &c )
Expand Down Expand Up @@ -207,19 +207,19 @@ void TEnzymeSettingsTab::OnButton3 ( wxCommandEvent &event )

void TEnzymeSettingsTab::updateColor ( wxColour &c )
{
wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) - start\n",c.GetAsString()) ;
//wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) - start\n",c.GetAsString()) ;

wxColour c2 = wxGetColourFromUser ( this , c ) ;
wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) wxGetColourFromUser -> %s\n" , c.GetAsString() , c2.GetAsString()) ;
//wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) wxGetColourFromUser -> %s\n" , c.GetAsString() , c2.GetAsString()) ;

if ( !c2.Ok() )
{
wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) -> ret !c2.Ok()" ,c.GetAsString() , c2.GetAsString()) ;
//wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) -> ret !c2.Ok()" ,c.GetAsString() , c2.GetAsString()) ;
return ;
}
c = c2 ;
updateGlobalEnzymes () ;
wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) - end\n",c.GetAsString()) ;
//wxPrintf("D: TEnzymeSettingsTab::updateColor(%s) - end\n",c.GetAsString()) ;
}


Expand Down Expand Up @@ -459,11 +459,11 @@ void TEnzymeRules::init () // Default settings

void TEnzymeRules::load_global_settings () /* not const */
{
wxPrintf( "D: TEnzymeRules::load_global_settings - start\n" ) ;
//wxPrintf( "D: TEnzymeRules::load_global_settings - start\n" ) ;
init () ;
wxString s = myapp()->frame->LS->getOption ( _T("GLOBALENZYMESETTINGS") , _T("") ) ;
from_string ( s ) ;
wxPrintf( "D: TEnzymeRules::load_global_settings - end\n" ) ;
//wxPrintf( "D: TEnzymeRules::load_global_settings - end\n" ) ;
}

void TEnzymeRules::save_global_settings () const
Expand Down Expand Up @@ -557,7 +557,7 @@ wxString TEnzymeRules::to_string () const

void TEnzymeRules::from_string ( const wxString& s )
{
wxPrintf( "D: TEnzymeRules::from_string - start\n" ) ;
//wxPrintf( "D: TEnzymeRules::from_string - start\n" ) ;
init () ;
wxArrayString as ;
explode ( _T("\r") , s , as ) ;
Expand Down Expand Up @@ -589,7 +589,7 @@ void TEnzymeRules::from_string ( const wxString& s )
else if ( key == _T("methylation") ) methylation = l ;
else if ( key == _T("showgc") ) showgc = l ;
}
wxPrintf( "D: TEnzymeRules::from_string - end\n" ) ;
//wxPrintf( "D: TEnzymeRules::from_string - end\n" ) ;
}

wxColour TEnzymeRules::scan_color ( const wxString& s ) const
Expand All @@ -614,7 +614,7 @@ wxColour *TEnzymeRules::getColor ( const int cuts )

void TEnzymeRules::getVectorCuts ( /* not const */ TVector * const v ) const
{
wxPrintf( "D: TEnzymeRules::getVectorCuts - start ( on %s )\n" , v->getName() ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - start ( on %s )\n" , v->getName() ) ;
for ( int a = 0 ; a < v->re.GetCount() ; a++ )
{
if ( NULL == v->re[a] )
Expand All @@ -638,7 +638,7 @@ void TEnzymeRules::getVectorCuts ( /* not const */ TVector * const v ) const
// Getting the default list of enzymes
wxArrayTRestrictionEnzyme ve ;
wxArrayString vs ;
wxPrintf( "D: TEnzymeRules::getVectorCuts - requesting Enzymes for default group '%s'\n" , default_group ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - requesting Enzymes for default group '%s'\n" , default_group ) ;
myapp()->frame->LS->getEnzymesInGroup ( default_group , vs ) ;
ve.Alloc ( vs.GetCount() ) ;

Expand Down Expand Up @@ -680,15 +680,15 @@ void TEnzymeRules::getVectorCuts ( /* not const */ TVector * const v ) const
v->getCuts ( ve[a] , vc , false , max ) ;
if ( use_min_cutoff && min_cutoff > vc.size() )
{
wxPrintf( "D: TEnzymeRules::getVectorCuts - min cutoff: %d - skipping enzyme:%s - too few cuts - vc.size():%lu\n" , min_cutoff, ve[a]->getName() , vc.size() ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - min cutoff: %d - skipping enzyme:%s - too few cuts - vc.size():%lu\n" , min_cutoff, ve[a]->getName() , vc.size() ) ;
}
else if ( use_max_cutoff && max_cutoff < vc.size() )
{
wxPrintf( "D: TEnzymeRules::getVectorCuts - max cutoff: %d - skipping enzyme:%s - too many cuts - vc.size():%lu\n" , max_cutoff, ve[a]->getName() , vc.size() ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - max cutoff: %d - skipping enzyme:%s - too many cuts - vc.size():%lu\n" , max_cutoff, ve[a]->getName() , vc.size() ) ;
}
else
{
wxPrintf( "D: TEnzymeRules::getVectorCuts - accepting - accepting enzyme:%s vc.size():%lu\n" , ve[a]->getName() , vc.size() ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - accepting - accepting enzyme:%s vc.size():%lu\n" , ve[a]->getName() , vc.size() ) ;
v->re2.Add ( ve[a] ) ;
for ( int b = 0 ; b < vc.size() ; b++ )
{
Expand All @@ -697,6 +697,6 @@ void TEnzymeRules::getVectorCuts ( /* not const */ TVector * const v ) const
}
}

wxPrintf( "D: TEnzymeRules::getVectorCuts - end - (for %s, v->re2.GetCount(): %lu)\n" , v->getName(), v->re2.GetCount() ) ;
//wxPrintf( "D: TEnzymeRules::getVectorCuts - end - (for %s, v->re2.GetCount(): %lu)\n" , v->getName(), v->re2.GetCount() ) ;
}

28 changes: 14 additions & 14 deletions src/SequenceTypeAA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,47 +163,47 @@ void SeqAA::fixOffsets ( TVector * const v )

void SeqAA::initFromTVector ( const TVector * const v )
{
wxPrintf( "D: SeqAA::initFromTVector - start\n" ) ;
//wxPrintf( "D: SeqAA::initFromTVector - start\n" ) ;

if ( ! v )
{
wxPrintf ( " SeqAA::initFromTVector ( NULL ) - abort\n" ) ;
wxPrintf ( "E: SeqAA::initFromTVector ( NULL ) - abort\n" ) ;
abort() ;
}

wxPrintf( "D: SeqAA::initFromTVector( %s ) - start\n" , v->getName() ) ;
//wxPrintf( "D: SeqAA::initFromTVector( %s ) - start\n" , v->getName() ) ;

showNumbers = true ;
if ( ! vec )
{
wxPrintf ( "D: SeqAA::initFromTVector: allocating new vector.\n" ) ;
//wxPrintf ( "D: SeqAA::initFromTVector: allocating new vector.\n" ) ;
vec = new TVector ( ) ;
}
else
{
wxPrintf ( "D: SeqAA::initFromTVector: reusing existing vector - why?\n" ) ;
//wxPrintf ( "D: SeqAA::initFromTVector: reusing existing vector - why?\n" ) ;
}
wxPrintf ( "D: SeqAA::initFromTVector: pre vec->copy()\n" ) ;
//wxPrintf ( "D: SeqAA::initFromTVector: pre vec->copy()\n" ) ;
vec->copy ( *v ) ;
wxPrintf ( "D: SeqAA::initFromTVector: post vec->copy()\n" ) ;
//wxPrintf ( "D: SeqAA::initFromTVector: post vec->copy()\n" ) ;

bool truncateEditSequence = false ;
if ( can && can->getEditMode() && vec->getSequenceLength() && vec->getSequenceChar(vec->getSequenceLength()-1) == ' ' )
{
wxPrintf ( "D: SeqAA::initFromTVector: can && can->getEditMode() && vec->getSequenceLength() && vec->getSequenceChar(vec->getSequenceLength()-1) == ' '\n" ) ;
//wxPrintf ( "D: SeqAA::initFromTVector: can && can->getEditMode() && vec->getSequenceLength() && vec->getSequenceChar(vec->getSequenceLength()-1) == ' '\n" ) ;
vec->eraseSequence ( vec->getSequenceLength()-1 , 1 ) ;
truncateEditSequence = true ;
}

wxString t = vec->getSequence() ;
if (0 >= t.length())
{
wxPrintf("D: SeqAA::initFromTVector: Assigned the empty string with t=%ld.\n" , t.length() ) ;
//wxPrintf("D: SeqAA::initFromTVector: Assigned the empty string with t=%ld.\n" , t.length() ) ;
s="";
}
else
{
wxPrintf("D: SeqAA::initFromTVector: Assigning blanks of length %ld\n", t.length() ) ;
//wxPrintf("D: SeqAA::initFromTVector: Assigning blanks of length %ld\n", t.length() ) ;
wxString empty(' ', t.length() ) ;
s = empty ;
}
Expand Down Expand Up @@ -296,7 +296,7 @@ void SeqAA::initFromTVector ( const TVector * const v )
}
if ( truncateEditSequence )
{
wxPrintf ( "D; SeqAA::initFromTVector: truncateEditSequence\n" ) ;
//wxPrintf ( "D; SeqAA::initFromTVector: truncateEditSequence\n" ) ;
vec->addToSequence ( _T(" ") ) ;
s += _T(" ") ;
}
Expand All @@ -308,7 +308,7 @@ void SeqAA::initFromTVector ( const TVector * const v )
// mem += sizeof ( wxArrayTProteaseCut ) + sizeof ( wxArrayTProtease ) + sizeof ( wxArrayTVectorItem ) ;
mylog ( "AA_mem" , wxString::Format ( "%d" , mem ) ) ;

wxPrintf( "D: SeqAA::initFromTVector - end\n" ) ;
//wxPrintf( "D: SeqAA::initFromTVector - end\n" ) ;
}

// direct
Expand Down Expand Up @@ -341,7 +341,7 @@ int SeqAA::arrange_direct ( const int n ) /* not const */

void SeqAA::show_direct ( wxDC& dc )
{
wxPrintf("D: SeqAA::show_direct - start\n" ) ;
//wxPrintf("D: SeqAA::show_direct - start\n" ) ;
myass ( itemsperline , "AA:show_direct_ipl" ) ;
if ( !itemsperline ) return ;
mylog ( "SeqAA::show_direct" , "0" ) ;
Expand Down Expand Up @@ -506,7 +506,7 @@ void SeqAA::show_direct ( wxDC& dc )
dc.SetBackgroundMode ( bm ) ;
dc.SetTextBackground ( tbg ) ;
dc.SetTextForeground ( tfg ) ;
wxPrintf("D: SeqAA::show_direct - end\n" ) ;
//wxPrintf("D: SeqAA::show_direct - end\n" ) ;
}

int SeqAA::getLine ( const int _y ) const
Expand Down
Loading
Loading