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

GMP: REPORTING -- mods for ussue 357 on how to treat the report, gmp … #132

Merged
merged 3 commits into from
Oct 11, 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
4 changes: 2 additions & 2 deletions programs/us_audit_trail_gmp/us_audit_trail_gmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ void US_auditTrailGMP::loadGMPReport( void )
//read 'data' .tar.gz for autoflowGMPReport record:
if ( gmpReport_runname_selected_c. contains("combined") )
{
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0];
gmpReport_runname_selected. simplified();
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0]. simplified();
//gmpReport_runname_selected. simplified();
}
else
gmpReport_runname_selected = gmpReport_runname_selected_c;
Expand Down
12 changes: 6 additions & 6 deletions programs/us_esigner_gmp/us_esigner_gmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,8 @@ void US_eSignaturesGMP::loadGMPReportDB_assigned_separate( void )
//read 'data' .tar.gz for autoflowGMPReport record:
if ( gmpReport_runname_selected_c. contains("combined") )
{
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0];
gmpReport_runname_selected. simplified();
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0]. simplified();
//gmpReport_runname_selected. simplified();
}
else
gmpReport_runname_selected = gmpReport_runname_selected_c;
Expand Down Expand Up @@ -3237,8 +3237,8 @@ void US_eSignaturesGMP::loadGMPReportDB_assigned_auto( QString aID_passed )
//Correct name for 'combined' runs:
if ( gmpReport_runname_selected_c. contains("combined") )
{
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0];
gmpReport_runname_selected. simplified();
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0]. simplified();
//gmpReport_runname_selected. simplified();
}
else
gmpReport_runname_selected = gmpReport_runname_selected_c;
Expand Down Expand Up @@ -3388,8 +3388,8 @@ void US_eSignaturesGMP::loadGMPReportDB_assigned( void )
//read 'data' .tar.gz for autoflowGMPReport record:
if ( gmpReport_runname_selected_c. contains("combined") )
{
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0];
gmpReport_runname_selected. simplified();
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0]. simplified();
//gmpReport_runname_selected. simplified();
}
else
gmpReport_runname_selected = gmpReport_runname_selected_c;
Expand Down
29 changes: 24 additions & 5 deletions programs/us_reporter_gmp/us_reporter_gmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1028,12 +1028,15 @@ void US_ReporterGMP::check_for_missing_models ( void )
QString US_ReporterGMP::missing_models_msg( void )
{
QString models_str;
int num_dropped_triples = 0;
int num_total_missed_triples = 0;

QMap < QString, QStringList >::iterator mmm;
for ( mmm = Triple_to_ModelsMissing.begin(); mmm != Triple_to_ModelsMissing.end(); ++mmm )
{
if ( !mmm.value().isEmpty() )
{
++num_total_missed_triples;
//check if missing models because of triple dropped
bool isDropped = false;
QString c_triple = mmm.key();
Expand All @@ -1044,21 +1047,27 @@ QString US_ReporterGMP::missing_models_msg( void )
d_triple.replace(".","");
if ( c_triple == d_triple )
{
++num_dropped_triples;
isDropped = true;
break;
}
}

//compose
//compose : Do we want to report on dropped triples at all ?
models_str += mmm.key() + ", missing models: " + mmm.value().join(", ");
if( isDropped )
models_str += "<font color='red'> [triple dropped]</font>";

models_str += "<br>";
}
}

if ( !models_str.isEmpty() )

qDebug() << "Number of total missing triples; Number of dropped triples -- "
<< num_total_missed_triples << "; " << num_dropped_triples;

// Do we want to report on dropped triples at all ?
// Do ONLY dropped triples trigger report to be non-GMP ?
if ( !models_str.isEmpty() & num_total_missed_triples != num_dropped_triples )
GMP_report = false;

return models_str;
Expand Down Expand Up @@ -1134,6 +1143,13 @@ void US_ReporterGMP::check_models ( int autoflowID )
QString channel_desc_alt = chndescs_alt[ i ];
QString channel_desc = chndescs[ i ];

//check if channel meant to be analyzed/reported
int analysis_to_be_run = analysis_runs[ i ];
int report_to_be_run = report_runs[ i ];

if ( analysis_to_be_run == 0 || report_to_be_run == 0 )
continue;

QList < double > chann_wvls = ch_wvls[ channel_desc_alt ];
int chann_wvl_number = chann_wvls.size();

Expand Down Expand Up @@ -1382,8 +1398,8 @@ void US_ReporterGMP::load_gmp_report_db ( void )
//read 'data' .tar.gz for autoflowGMPReport record:
if ( gmpReport_runname_selected_c. contains("combined") )
{
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0];
gmpReport_runname_selected. simplified();
gmpReport_runname_selected = gmpReport_runname_selected_c.split("(")[0]. simplified();
//gmpReport_runname_selected. simplified();
}
else
gmpReport_runname_selected = gmpReport_runname_selected_c;
Expand Down Expand Up @@ -1978,6 +1994,9 @@ void US_ReporterGMP::read_protocol_and_reportMasks( void )
chndescs = currAProf.chndescs;
//Channel alt_descriptions
chndescs_alt = currAProf.chndescs_alt;
//Channel run/analysis_run
analysis_runs = currAProf.analysis_run;
report_runs = currAProf.report_run;
//Channel reports
ch_reports = currAProf.ch_reports;
//Channel wavelengths
Expand Down
2 changes: 2 additions & 0 deletions programs/us_reporter_gmp/us_reporter_gmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ class US_ReporterGMP : public US_Widgets
US_AnaProfile::AnaProfPCSA cAPp; //!< PCSA analysis profile
QStringList chndescs; //!< Channel descriptions
QStringList chndescs_alt; //!< Alternative channel descriptions
QList<int> analysis_runs; //!< Analysis runs
QList<int> report_runs; //!< Report runs
QMap<QString, QMap<QString, US_ReportGMP>> ch_reports; //!< Channel reports
QMap<QString, QMap<QString, US_ReportGMP>> ch_reports_internal; //!< Internal channel reports
QMap<QString, QList<double>> ch_wvls; //!< Channel wavelengths
Expand Down