> vvstr;
GetChnInfo(Iinfo.id, vvstr);
if ( !vvstr.size() ) {
Iinfo.prot_ch_cnt = 0;
return;
}
*/
DomIntvlData dip[100];
resp.out() << " \n \n"
<< " | "
<< "Chain ID | \n"
<< " "
<< "Domains | \n"
<< " "
<< "Residue Range | \n";
if (isStr) {
}
else
resp.out() << " "
<< "No. of Neighbors | \n";
resp.out() << "
\n\n";
unsigned sdi, line_cnt=1, total_nbr=0;
for (unsigned i=0; i< vvstr.size(); i++)
{
unsigned chnNo = ToUnsigned(vvstr[i][0]);
unsigned domintvl_no =
GetVSDomIntvlData(Dinfo.JobID, chnNo, dip, 100);
for (unsigned j=0; j< domintvl_no; j++)
{
// if (!j && isStr && domintvl_no > 1) continue;
if (dip[j].domNo >= 10000) continue;
sdi = DomNo2Sdi(Iinfo.id, chnNo, dip[j].domNo);
total_nbr = GetVSNumOfAllNbrs(sdi);
resp.out() << " \n | ["
<< vvstr[i][1] << "] | \n";
if (!isStr && total_nbr) {
resp.out() << " \n"
<< "";
}
else resp.out() << " | \n";
if ( !dip[j].domNo ) // dip[0].domNo = j = 0;
resp.out() << "entire chain | \n";
else
resp.out() << "domain " <\n";
resp.out()
<< " " << dip[j].frm
<< " - " << dip[j].tu;
if (j) {
for (unsigned k=j+1; k< domintvl_no; k++) {
if (dip[j].domNo == dip[k].domNo) {
resp.out() << ", " << dip[k].frm << " - " << dip
[k].tu;
dip[k].domNo += 10000;
}
}
}
resp.out() << " | \n";
if (!isStr) {
resp.out()
<< " "<< total_nbr
<< " | \n"
<< "
\n\n";
}
line_cnt ++;
}
}
resp.out() << "
\n\n";
} // SumTab()
void SendSummaryPageText(CCgiContext& ctx, bool VastLink, bool JobDone)
{
CCgiRequest& req = ctx.GetRequest();
CCgiResponse& response = ctx.GetResponse();
static DataInfo Dinfo;
static VSMmdbConf thisConf;
static ImgInfo Iinfo;
BiostrucPtr bsp;
PDNMS ModelStruc;
PMSD pmsdThis = 0;
BiostrucSourcePtr pbssThis = 0;
ValNodePtr pvnThis = 0;
BiostrucHistoryPtr pbshThis = 0;
// char* pcAuthors = 0;
// bsp = FetchBS((char*)bFile.c_str(), 1, 2, 1000, POWER_VIEW);
bsp = VSOpenBSP(Iinfo.id, 2, 1000);
if (bsp == 0) {
string strtmp = "Missing Biostruc data for reqid = "
+ ReqId2Str(Dinfo.ReqID)
+ ". Please inform chenj@ncbi.nlm.nih.gov for this problem. Thanks!";
PrtMes::PrintErrorHeader(&response, "Vast Search", 1);
PrtMes::PrintMsgWithTail(&response, strtmp);
exit(1);
}
ModelStruc = MakeAModelstruc(bsp);
if (ModelStruc == 0) {
PrtMes::PrintErrorHeader(&response, "Vast Search", 1);
PrtMes::PrintMsgWithTail(&response, "ModelStruc==NULL.\nPlease inform chenj@ncbi.nlm.nih.gov.\n");
return;
}
pmsdThis = (PMSD) ModelStruc->data.ptrvalue;
pvnThis
=ValNodeFindNext(pmsdThis->pbsBS->descr,NULL,BiostrucDescr_history);
if (pvnThis) {
pbshThis = (BiostrucHistoryPtr) pvnThis->data.ptrvalue;
pbssThis = pbshThis->data_source;
// how to delete pbshThis and pbssThis
}
string urlstr = "" ;
string dispOp = "";
unsigned chaincnt = ChainCount(pmsdThis);
unsigned chbeg = 1; // (CurPage-1)*ChainPerImg +1;
response.out()
<< "\n\n"
<< " \n | | \n
\n\n";
vector< vector > vvstr;
GetChnInfo(Iinfo.id, vvstr);
Iinfo.prot_ch_cnt = 1;
if ( !vvstr.size() ) Iinfo.prot_ch_cnt = 0;
if (!VastLink) {
response.out()
<< " \n | "
<< "Data Parsing Done | \n"
<< "
\n\n"
<< " | |
\n\n"
<< " \n | \n"
<< "Your structure data has been uploaded. Request ID: "
<< "" << Dinfo.GrpID << "\n"
<< " | \n
\n\n";
if (Iinfo.prot_ch_cnt)
response.out()<< " \n | \n"
<< "Bookmark this page to return later.\n";
response.out() << " |
|
\n\n";
if (Iinfo.prot_ch_cnt) {
response.out() << " \n \n"
<< "Query Chains/Domains Summary
|
\n\n"
<< " \n | \n";
SumTab(ctx, vvstr, 1);
response.out() << " | \n
\n\n";
}
else {
response.out() << " \n | \n"
<< "VAST Chains Summary: "
<< "No protein chains submitted for VAST Search.\n";
urlstr= "'" + thisConf.IbutHelpF + "_NulCh.html'";
dispOp = "'resizable=yes, scrollbars=yes, width=400, height=200'";
CreateIbutn(urlstr, dispOp, 15, ctx);
response.out() << " | \n
\n\n";
}
response.out() << " \n | \n";
PrintChainsMap(bsp, ModelStruc, chbeg, chaincnt, ctx, VastLink);
response.out() << " | \n
\n\n";
response.out() << " \n | The \n";
if (Iinfo.prot_ch_cnt)
response.out() << "table and ";
response.out() << "graphics above indicate the individual chains and 3D domains identified in your structure. You may view them in "
<< "Cn3D\n"
<<" to verify whether the data parsing is correct by clicking \"View 3D Structure\" below.\n";
urlstr = "'" + thisConf.IbutHelpF + "_Graph.html'";
dispOp = "'resizable=yes, scrollbars=yes, width=420, height=200'";
CreateIbutn(urlstr, dispOp, 15, ctx);
response.out() << " | \n
\n";
PrintActionButtons(ctx);
response.out() << " \n | |
\n"
<< " \n | \nBack to the HomePage\n | \n
\n";
ctx.GetResponse().out() << "
\n" << "
\n";
}
else {
string errmsg;
if (HaveErrmsgFromVSCal(Dinfo.GrpID, errmsg)) {
response.out() << " \n"
<< " | VAST Search Error Report | \n"
<< "
\n\n"
<< " | | \n
\n\n"
<< " \n | \n"
<< "Your VAST search has stopped due to the following error.\n"
<< " |
\n"
<< " | "
<< errmsg << ""
<< " |
\n"
<< " \n | |
\n"
<< " \n
|
\n"
<< " \n | \nBack to the HomePage\n | \n
\n";
}
else if (JobDone) {
response.out()
<< " \n"
<< " | VAST Search Done | \n
\n\n"
<< " | | \n
\n\n"
<< " \n | \n"
<< "Your VAST search has finished successfully. Follow links on the Query Structure Summary to see results.\n"
<< " |
\n";
/*
urlstr = "'" + thisConf.IbutHelpF + "_VSlink.html'";
dispOp = "'resizable=yes, scrollbars=yes, width=420, height=200'";
CreateIbutn(urlstr, dispOp, 15, ctx);
*/
response.out() << "
|
\n\n"
<< " \n \n"
<< "Query Structure Summary
"
<< " | \n
\n\n \n | \n";
SumTab(ctx, vvstr, 0);
response.out() << " | \n
\n\n";
/*
<< "
|
\n\n"
<< "
|
\n\n";
*/
string showImg = req.GetEntry("showImg_fin").GetValue();
if ("Yes" == showImg) {
/*
response.out() << " "
<< "Query Structure Summary
| \n"
*/
response.out() << "
|
\n\n"
<< " \n\n \n | \n";
PrintChainsMap(bsp, ModelStruc, chbeg, chaincnt, ctx, VastLink);
response.out() << " | \n
\n\n"
<< " \n | \n"
<< "The graphics above indicate the individual chains and 3D domains identified in your structure. You may view them in "
<< "Cn3D\n"
<<" by clicking \"View 3D Structure\" below. "
<< "You may also click each of them to look at their VAST neighbors.\n";
urlstr = "'" + thisConf.IbutHelpF + "_Graph.html'";
dispOp = "'resizable=yes, scrollbars=yes, width=420, height=200'";
CreateIbutn(urlstr, dispOp, 15, ctx);
/*
response.out() << " | \n
\n"
<< "
|
\n\n";
*/
VastLink=false;
PrintActionButtons(ctx);
response.out() << "
|
\n\n"
<< " | |
\n\n"
<< " | \n"
<< "Close the graphical Summary.\n |
\n"
<< " \n | |
\n"
<< " \n | \n"
<< "Back to the HomePage\n | \n
\n"
<< "\n\n";
}
else {
response.out()
<< "
|
\n\n"
<< "
|
\n\n"
<< " \n | \n"
<< "View"
<< " the Summary (graphical).\n | \n
\n"
<< " \n | |
\n"
<< " \n | \n"
<< "Back to the HomePage\n | \n
\n"
<< "\n\n";
}
}
else {
unsigned DomCnt = TotalDom(Dinfo.JobID);
sqmInit();
string subTime = sqmGetReqTime(GrpId2ReqId(Dinfo.GrpID));
sqmFree();
string curTime = CTime(CTime::eCurrent).AsString();
string subsetstr = GetSubsetName4Grpid(Dinfo.GrpID);
unsigned estT = 3 + (int)((DomCnt-1)*2.5);
if (subsetstr == "All") estT *= 10;
unsigned subH = atoi(subTime.substr(11,2).c_str());
unsigned subM = atoi(subTime.substr(14,2).c_str());
unsigned curH = atoi(curTime.substr(11,2).c_str());
unsigned curM = atoi(curTime.substr(14,2).c_str());
if (curH < subH) curH += 24;
unsigned waiT = (curH-subH)*60 + (curM-subM);
unsigned refT;
ostringstream output;
string refMsg;
if ( estT <= waiT ) {
if ( waiT < 60 ) {
refT = 5;
output << "Your job needs more time to finish, its status will be checked automatically after "
<< "" << refT << " minutes.";
}
else if (waiT < 120) {
refT = 10;
output << "Your job hasn't finised after running for 1 hour, its status will be checked automatically after "
<< "" << refT << " minutes.";
}
else {
refT = 0;
output << "Your job has been running longer than 2 hours, it may need more time to finish, please "
<< "check your job status later manually.";
}
}
else {
refT = estT - waiT;
output << "\n \n"
<< " | "
<< "Estimated completion Time: | \n"
<< " "
<< "" << refT << " minutes. | \n
\n"
<< " | | \n"
<< " "
<< "(actual time depends on the number of chains, "
<< "domains, and the size of the query protein; "
<< "highly populated folds such as a TIM barrel "
<< "will take a longer time). | \n
\n\n"
<< " | "
<< "The job status will be checked automatically after "
<< "" < minutes. | \n
\n\n"
<< "
\n\n";
}
if (refT) {
/*
response.out() << "\n";
*/
response.out() << "\n";
}
response.out()
<< " \n "
<< "VAST Search in Progress \n"
<< " | \n
\n\n"
<< " | |
\n\n"
<< " | \n"
<< "Your VAST Search job was submitted at "
<< subTime
<< "(EDT). Request ID: " < |
\n\n"
<< " | " << output.str()
<< " |
\n\n"
<< " | |
\n\n"
<< " \n | \n"
<< "Bookmark this page to return and manually \n"
<< "check later.\n | \n
\n\n";
/*
<< "check later.\n Request ID: "
<< Dinfo.GrpID
<< ".\n \n \n\n"
<< " \n | \nOr click "
<< "here to check previous jobs.\n | \n
\n\n"
<< " \n | |
\n";
*/
string showImg = req.GetEntry("showImg_mid").GetValue();
if ( "Yes" == showImg ) {
response.out() << "
|
\n\n"
<< " \n"
<< "Query Structure Summary
| "
<< "
\n\n"
<< " \n | \n";
PrintChainsMap(bsp, ModelStruc, chbeg, chaincnt, ctx, VastLink);
response.out() << " | \n
\n\n"
<< " \n | \n"
<< "The graphics above indicate the individual chains and 3D domains identified in your structure. You may view them in "
<< "Cn3D\n"
<<" by clicking \"View 3D Structure\" below. ";
urlstr = "'" + thisConf.IbutHelpF + "_Graph.html'";
dispOp = "'resizable=yes, scrollbars=yes, width=420, height=200'";
CreateIbutn(urlstr, dispOp, 15, ctx);
VastLink=false;
PrintActionButtons(ctx);
response.out() << " |
|
\n\n"
<< " | |
\n\n"
<< " | \n"
<< "Close the graphical Summary .\n |
\n"
<< " \n | |
\n";
}
else {
response.out() << "
|
\n\n"
<< " | |
\n\n"
<< " \n | \n"
<< "View"
<< " the Query Structure Summary.\n | \n
\n"
<< " | |
\n\n";
}
response.out() << " \n | \nBack to the HomePage\n | \n
\n"
<< "\n\n";
}
} // ViewNbr
return;
} // SendSummaryPage