Ejemplo n.º 1
0
//**********************************************************************************************************************
vector<string> ClearcutCommand::setParameters(){	
	try {
		CommandParameter pphylip("phylip", "InputTypes", "", "", "FastaPhylip", "FastaPhylip", "none","tree",false,false,true); parameters.push_back(pphylip);
		CommandParameter pfasta("fasta", "InputTypes", "", "", "FastaPhylip", "FastaPhylip", "none","tree",false,false,true); parameters.push_back(pfasta);
		CommandParameter pverbose("verbose", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pverbose);
		CommandParameter pquiet("quiet", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pquiet);
		CommandParameter pversion("version", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pversion);
		CommandParameter pseed("seed", "String", "", "", "*", "", "","",false,false); parameters.push_back(pseed);
		CommandParameter pnorandom("norandom", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pnorandom);
		CommandParameter pshuffle("shuffle", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pshuffle);
		CommandParameter pneighbor("neighbor", "Boolean", "", "T", "", "", "","",false,false); parameters.push_back(pneighbor);
		CommandParameter pexpblen("expblen", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pexpblen);
		CommandParameter pexpdist("expdist", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pexpdist);
		CommandParameter pDNA("DNA", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pDNA);
		CommandParameter pprotein("protein", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pprotein);
		CommandParameter pjukes("jukes", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pjukes);
		CommandParameter pkimura("kimura", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pkimura);
		CommandParameter pstdout("stdout", "Boolean", "", "F", "", "", "","",false,false); parameters.push_back(pstdout);
		CommandParameter pntrees("ntrees", "Number", "", "1", "", "", "","",false,false); parameters.push_back(pntrees);
		CommandParameter pmatrixout("matrixout", "String", "", "", "", "", "","",false,false); parameters.push_back(pmatrixout);
		CommandParameter pinputdir("inputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(pinputdir);
		CommandParameter poutputdir("outputdir", "String", "", "", "", "", "","",false,false); parameters.push_back(poutputdir);
		
		vector<string> myArray;
		for (int i = 0; i < parameters.size(); i++) {	myArray.push_back(parameters[i].name);		}
		return myArray;
	}
	catch(exception& e) {
		m->errorOut(e, "ClearcutCommand", "setParameters");
		exit(1);
	}
}
Ejemplo n.º 2
0
int prirup( void )
{
   int sus ;
   char userirup[10];
   sus = 0 ;
   fgets(userirup, 10, stdin);
   if ( (!strcmp(userirup, "c\n")    ) ||
        (!strcmp(userirup, "t\n")    ) ||
        (!strcmp(userirup, "cycle\n")) ||
        (!strcmp(userirup, "time\n") ) ) {
      printtc() ;
   } else if ( (!strcmp(userirup, "r\n")  ) ||
               (!strcmp(userirup, "rad\n")) ) {
      printrc() ;
   } else if (!strcmp(userirup, "wdmp\n")) {
      sus = 1 ;
   } else if (!strcmp(userirup, "wgdmp\n")) {
      sus = 2 ;
   } else if ( (!strcmp(userirup, "stop\n") ) ||
               (!strcmp(userirup, "pause\n")) ) {
      sus     = -1 ;
      pccsoff =  1 ;
   } else if ( (!strcmp(userirup, "quit\n")) ||
               (!strcmp(userirup, "end\n") ) ) {
      sus     = -2 ;
      pccsoff =  1 ;
   } else if ( (!strcmp(userirup, "?\n")   ) ||
               (!strcmp(userirup, "h\n")   ) ||
               (!strcmp(userirup, "help\n")) ) {
      PRINT(stdout,"Help for Run Interrupt Commands:\n");
      PRINT(stdout,"   c, t, cycle, time : Print timestep info\n");
      PRINT(stdout,"   r, rad            : Print radiation info\n");
#ifdef SILO
      PRINT(stdout,"   wdmp, wgdmp       : Dump restart or graphics file\n");
#endif
      PRINT(stdout,"   stop, pause       : Suspend run & accept commands\n");
      PRINT(stdout,"   quit, end         : Terminate execution completely\n");
      PRINT(stdout,"   ?, h, help        : Display this help info\n");
      PRINT(stdout,"   v, version        : Print compile version info\n");
   } else if ( (!strcmp(userirup, "v\n")      ) ||
               (!strcmp(userirup, "version\n")) ) {
      pversion();
   } else if (strcmp(userirup, "\n")) {
      /* PRINT(stdout, "%s %s", "Unknown interrupt command:", userirup); */
   }
   return(sus) ;
}