Skip to content

Commit

Permalink
GMP | 1. EXP., us_convert -- corrected format for channels' descripti…
Browse files Browse the repository at this point in the history
…ons passed from ./makeall.sh -j10 EXP-to-XPN_viewer-to-us_convet: 'solname, comment'...
  • Loading branch information
alexsav815 committed Jan 16, 2024
1 parent 245d135 commit 5446ad8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 19 deletions.
40 changes: 27 additions & 13 deletions programs/us_convert/us_convert_gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2127,8 +2127,13 @@ DbgLv(1) << "CGui:iA: CURRENT DIR_1: " << importDir;
// Give it a new unique GUID, since we are making a copy
QString uuidst = US_Util::new_guid();
US_Util::uuid_parse( uuidst, (unsigned char*)&rdata.rawGUID );
DbgLv(1) << "CGui:iA: trx" << trx << "uuid" << uuidst << importDir;

DbgLv(1) << "CGui:iA: trx" << trx << "uuid" << uuidst << importDir;

//Correct/parse channels' description:
qDebug() << "Description before: " << rdata.description;
correct_description( rdata.description, QString::number( rdata.cell ), QString( rdata.channel ) );
qDebug() << "Description after: " << rdata.description;

// Save the raw data for this triple
allData << rdata;

Expand Down Expand Up @@ -2260,22 +2265,31 @@ DbgLv(1) << "rTS: NON_EXIST:" << tmst_fnamei;


//Correct description for double solution names
QString US_ConvertGui::correct_description( QString & description )
QString US_ConvertGui::correct_description( QString & description, QString cell, QString chan )
{
QStringList desc_from_allData_A = (description.split(";")[0]).split(":");
QStringList desc_from_allData_B = (description.split(";")[1]).split(":");

QString desc_chan_A = desc_from_allData_A[2].simplified().split(",")[0];
QString desc_chan_B = desc_from_allData_B[1].simplified().split(" ")[0];
QString desc_corrected = desc_from_allData_A[0] + ":" +
desc_from_allData_A[1] + ": " +
desc_chan_A + ";" +
desc_from_allData_B[0] + ": " +
desc_chan_B;
// QString desc_chan_A = desc_from_allData_A[2].simplified().split(",")[0];
// QString desc_chan_B = desc_from_allData_B[1].simplified().split(" ")[0];
// QString desc_corrected = desc_from_allData_A[0] + ":" +
// desc_from_allData_A[1] + ": " +
// desc_chan_A + ";" +
// desc_from_allData_B[0] + ": " +
// desc_chan_B;

QString desc_chan_A = desc_from_allData_A[2].simplified();
QString desc_chan_B = desc_from_allData_B[1].simplified();
QString desc_corrected = desc_chan_A + " -- " + desc_chan_B;

// qDebug() << "DESC A: " << desc_chan_A;
// qDebug() << "DESC B: " << desc_chan_B;
// qDebug() << "DECS_CORRECTED: " << desc_corrected;
qDebug() << "DESC A: " << desc_chan_A;
qDebug() << "DESC B: " << desc_chan_B;
qDebug() << "DESC CORR: " << desc_corrected;

if ( chan == "A" )
description = desc_chan_A;
if ( chan == "B" )
description = desc_chan_B;

return desc_corrected;
}
Expand Down
2 changes: 1 addition & 1 deletion programs/us_convert/us_convert_gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ class US_ConvertGui : public US_Widgets

void update_autoflow_record_atLimsImport( void );

QString correct_description( QString& );
QString correct_description( QString&, QString, QString );


void setTripleInfo ( void );
Expand Down
17 changes: 12 additions & 5 deletions programs/us_experiment/us_experiment_gui_optima.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7604,12 +7604,19 @@ void US_ExperGuiUpload::submitExperiment()
if ( channel_cell.startsWith(QString::number(j+1)) )
{
if ( channel_cell.contains("sample") ) // <-- Channel A
solname += ": A: " + sol_split[0] + ", " // <-- solution name
+ sol_split[sol_split.size()-1] + "; "; // <-- solution manual comment
{
// solname += ": A: " + sol_split[0] + ", " // <-- solution name
// + sol_split[sol_split.size()-1] + "; "; // <-- solution manual comment
solname += ": A: " + solution + "; ";
}

if ( channel_cell.contains("reference") ) // <-- Channel B
solname += "B: " + sol_split[0] + " " // <-- solution name
+ sol_split[sol_split.size()-1]; // <-- solution manual comment
}
{
// solname += "B: " + sol_split[0] + ", " // <-- solution name
// + sol_split[sol_split.size()-1]; // <-- solution manual comment
solname += "B: " + solution;
}
}
}
solname += "\'";
////////////////////////////////
Expand Down
3 changes: 3 additions & 0 deletions utils/us_xpn_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,6 +1422,8 @@ DbgLv(1) << "BldRawD channel" << rdata.channel
int rdx = 0;
//rdata.description = ccdescs.at( ccx );
rdata.description = cc_description( celchn );
qDebug() << "::build_rawData(); rdata.description -- " << rdata.description;

QString triple = triples[ trx ].replace( " / ", "/" );
QString trnode = trnodes[ trx ];
DbgLv(1) << "BldRawD trip" << trnode << "descr" << rdata.description
Expand Down Expand Up @@ -3051,6 +3053,7 @@ DbgLv(1) << "XpDa:b_i: jcell jchan" << jcell << jchan;
no_desc = false;
ccdescs << csdrec.samplName;
DbgLv(1) << "XpDa:b_i: samplName" << csdrec.samplName << "ccdescs sz" << ccdescs.count();
qDebug() << "::build_internals(); csdrec.samplName -- " << csdrec.samplName;
break;
}
}
Expand Down

0 comments on commit 5446ad8

Please sign in to comment.