1. libsleipnir
  2. sleipnir

Commits

Qian Zhu  committed a1d9b71

Added function to see PR values at each recall value for each query in
SeekEvaluator
Added function see the positive genes in SeekEvaluator
Added function to add .gscore files
Changed PCLServer for model-organism SEEK

  • Participants
  • Parent commits 5c0395e
  • Branches sleipnir

Comments (0)

Files changed (10)

File tools/PCLServer/PCLServer.cpp

View file
 
 		fprintf(stderr, "acquired %d for dataset %s...\n", n, iterS->c_str());
 		//pcl[n]->Reset();
-		//string strFileStem = (*iterS).substr(0, (*iterS).find(".bin"));
+		//string strFileStem = (*iterS).substr(0, (*iterS).find(".bin")); //for human-SEEK
 		fprintf(stderr, "dataset reset \n");
-		string pcl_path = pcl_input_dir + "/" + *iterS;
+		string pcl_path = pcl_input_dir + "/" + *iterS + ".bin"; //for model-organism-SEEK
 		pcl[n]->Open(pcl_path.c_str());
 		//pcl[n]->Open(strFileStem.c_str(), 2, false, false);
 		fprintf(stderr, "dataset opened\n");
 
 		if(outputCoexpression || outputQueryCoexpression){
 			vd = new CSeekDataset();
-			string strFileStem = datasetName[i].substr(0, datasetName[i].find(".bin"));
+			//string strFileStem = datasetName[i].substr(0, datasetName[i].find(".bin")); //for human-SEEK
+			string strFileStem = datasetName[i]; //for model-organism-SEEK
 
 			int dbID = mapstrintDatasetDB[strFileStem];
 	

File tools/SeekEvaluator/SeekEvaluator.cpp

View file
 	return true;
 }
 
+bool GetPositiveGenesOneQuery(const vector<AResultFloat> &sortedScore,
+	const vector<char> &goldstdGenePresence, const vector<string> &vecstrGenes,
+	vector<string> &positive){
+	size_t i, numPos = 1;
+	positive.clear();
+	vector<AResultFloat>::const_iterator iterScore = sortedScore.begin();
+	for(i=0; iterScore!=sortedScore.end(); i++, iterScore++){
+		if(goldstdGenePresence[iterScore->i]==1){
+			positive.push_back(vecstrGenes[iterScore->i]);
+		}
+	}
+	positive.resize(positive.size());
+	return true;
+}
+
 bool EvaluateOneQuery(const gengetopt_args_info &sArgs, const enum METRIC &met,
 	const vector<AResultFloat> &sortedGenes,
 	const vector<char> &goldstdGenePresence, const float &nan,
 
 bool DoAggregate(const gengetopt_args_info &sArgs, const enum METRIC &met, 
 	vector<AResultFloat> *sortedGenes, vector<utype> *queryGeneID, 
-	int listSize, vector<char> *goldstdGenePresence, vector<char> *excludeGene,
-	vector<char> *includeGene, 
+	int listSize, vector<char> *goldstdGenePresence, vector<string> &vecstrGenes,
+	vector<char> *excludeGene, vector<char> *includeGene, 
 	vector< vector<float> > &result
 
 	){
 		//ASSUME THIS IS TRUE
 		for(i=0; i<listSize; i++){
 			for(j=0; j<sortedGenes[0].size(); j++){
+				if(includeGene[i][sortedGenes[i][j].i]==0){
+					sortedGenes[i][j].f = nan;
+				}
 				if(q[i][sortedGenes[i][j].i]==1){
 					sortedGenes[i][j].f = nan;
 				}
 		}else{
 			sort(sortedGenes[i].begin(), sortedGenes[i].end());
 		}
+	}
+
+	if(sArgs.display_gene_pr_flag==1 && sArgs.display_all_flag==1 && met==PR_ALL){
+		for(i=0; i<listSize; i++){
+			vector<string> strAll;
+			bool ret = GetPositiveGenesOneQuery(sortedGenes[i],
+				goldstdGenePresence[i], vecstrGenes, strAll);
+			if(!ret) return 1;
+			for(j=0; j<strAll.size(); j++){
+				fprintf(stderr, "%s", strAll[j].c_str());
+				if(j==strAll.size()-1){
+					fprintf(stderr, "\n");
+				}else{
+					fprintf(stderr, " ");
+				}
+			}
+		}
+		return 0;
+	}
+
+	for(i=0; i<listSize; i++){
 		if(met!=PR_ALL){
 			float fEval;
 			bool ret = EvaluateOneQuery(sArgs, met, sortedGenes[i],
 
 		}else{
 			vector<float> evalAll;
+			//fprintf(stderr, "Start evaluating query %d...\n", i);
 			bool ret = EvaluateOneQuery(sArgs, met, sortedGenes[i],
 				goldstdGenePresence[i], nan, evalAll);
 			if(!ret) return 1;
 			vecevalAll[i] = evalAll;
+			//fprintf(stderr, "Finished evaluating query\n");
 		}
 	}
 
 		//fprintf(stderr, "Got here 2\n");
 	}
 
-	if(met!=PR_ALL){
+	if(met!=PR_ALL){ //display a single-point precision measurement
 		if(sArgs.agg_avg_flag==1){
 			float avg, stdev;
 			MeanStandardDeviation(eval, avg, stdev);
 			return 0;
 		}
 
-	}else{
+	}else{ //display all precision measurements for a query
+		if(sArgs.display_all_flag==1){
+			result.resize(vecevalAll.size());
+			for(i=0; i<vecevalAll.size(); i++){
+				result[i] = vector<float>();
+				for(j=0; j<vecevalAll[i].size(); j++){
+					result[i].push_back(vecevalAll[i][j]);
+				}
+			}
+			return 0;
+		}
+
+		//else requires each query's gold standard gene-set to be the same size 
+		//(in order for aggregate to work correctly)
+		int s1 = vecevalAll[0].size();
+		for(i=0; i<vecevalAll.size(); i++){
+			if(s1!=vecevalAll[i].size()){
+				fprintf(stderr, "Error: gold standard gene-set size is different between queries\n");
+				return 1;
+			}
+		}
+
 		vector< vector<float> > veceval;
 		veceval.resize(vecevalAll[0].size());
 		for(i=0; i<vecevalAll.size(); i++)
 			return 0;
 		}
 
+		string excludeFile = sArgs.exclude_arg;
+		vector<string> excludeGenes;
+		vector<char> exGene;
+		CSeekTools::ReadMultiGeneOneLine(excludeFile, excludeGenes);
+		CSeekTools::InitVector(exGene, vecstrGenes.size(), (char) 0);
+		for(i=0; i<excludeGenes.size(); i++)
+			exGene[mapstriGenes[excludeGenes[i]]] = 1;
+
+		string includeFile = sArgs.include_arg;
+		vector<string> includeGenes;
+		vector<char> inGene;
+		CSeekTools::ReadMultiGeneOneLine(includeFile, includeGenes);
+		CSeekTools::InitVector(inGene, vecstrGenes.size(), (char) 0);
+		for(i=0; i<includeGenes.size(); i++)
+			inGene[mapstriGenes[includeGenes[i]]] = 1;
+		
 		if(sArgs.dislay_only_flag==1){
-			for(i=0; i<15000; i++)
+			int LIMIT = sortedGenes.size() * 0.8;
+			for(i=0; i<LIMIT; i++){
+				if(exGene[sortedGenes[i].i]==1) continue;
+				if(inGene[sortedGenes[i].i]==0) continue;
 				fprintf(stderr, "%s\t%.5f\n", 
 					vecstrGenes[sortedGenes[i].i].c_str(), sortedGenes[i].f);
+			}
 			return 0;
 		}
 
 		CSeekTools::InitVector(goldstdGenePresence,
 			vecstrGenes.size(), (char) 0);
 
-		for(i=0; i<goldstdGenes.size(); i++)
-			goldstdGenePresence[mapstriGenes[goldstdGenes[i]]] = 1;
+		for(i=0; i<goldstdGenes.size(); i++){
+			int si = mapstriGenes[goldstdGenes[i]];
+			if(exGene[si]==1 || inGene[si]==0) continue;
+			goldstdGenePresence[si] = 1;
+		}
 
 		if(met!=PR_ALL){
 			float eval;
 	}
 
 	if(qmode == MULTI_QUERY){
-		string goldstdList = sArgs.goldstd_list_arg;
+
 		vector<string> vecstrList;
-		CSeekTools::ReadListOneColumn(goldstdList, vecstrList);
-		vector<char> *goldstdGenePresence =
-			new vector<char>[vecstrList.size()];
-		for(i=0; i<vecstrList.size(); i++){
-			vector<string> goldstdGenes;
-			CSeekTools::ReadMultiGeneOneLine(vecstrList[i], goldstdGenes);
-			CSeekTools::InitVector(goldstdGenePresence[i],
-				vecstrGenes.size(), (char) 0);
-			for(j=0; j<goldstdGenes.size(); j++)
-				goldstdGenePresence[i][mapstriGenes[goldstdGenes[j]]] = 1;
-		}
-
-		//fprintf(stderr, "Finished reading gold standard list\n");
-
 		string queryList = sArgs.query_list_arg;
 		vecstrList.clear();
 		CSeekTools::ReadListOneColumn(queryList, vecstrList);
 				includeGene[i][mapstriGenes[in[j]]] = 1;
 		}
 
+		string goldstdList = sArgs.goldstd_list_arg;
+		vecstrList.clear();
+		CSeekTools::ReadListOneColumn(goldstdList, vecstrList);
+		vector<char> *goldstdGenePresence =
+			new vector<char>[vecstrList.size()];
+		bool errorOccurred = false;
+		for(i=0; i<vecstrList.size(); i++){
+			vector<string> goldstdGenes;
+			CSeekTools::ReadMultiGeneOneLine(vecstrList[i], goldstdGenes);
+			CSeekTools::InitVector(goldstdGenePresence[i],
+				vecstrGenes.size(), (char) 0);
+			int numGoldstd = 0;
+			for(j=0; j<goldstdGenes.size(); j++){
+				int si = mapstriGenes[goldstdGenes[j]];
+				if(includeGene[i][si]==0 || excludeGene[i][si]==1) continue;
+				goldstdGenePresence[i][si] = 1;
+				numGoldstd++;
+			}
+			if(numGoldstd==0){
+				fprintf(stderr, "Error: for query %d, there are no gold standard genes\n", (int) i);
+				errorOccurred = true;
+			}
+		}
+		if(errorOccurred){
+			return -1;
+		}
+
+
+		//fprintf(stderr, "Finished reading gold standard list\n");
 
 		string genescoreList = sArgs.gscore_list_arg;
 		vecstrList.clear();
 
 		vector<vector<float> > result;
 		DoAggregate(sArgs, met, sortedGenes, queryGeneID, vecstrList.size(),
-			goldstdGenePresence, excludeGene, includeGene, result);
+			goldstdGenePresence, vecstrGenes, excludeGene, includeGene, result);
 
 
 		/*

File tools/SeekEvaluator/SeekEvaluator.ggo

View file
 								flag	off
 option	"display_all"		E	"Display the metric for all queries"
 								flag	off
+option	"display_gene_pr"	l	"Display positive genes at all recall points (requires --pr_all and --display_all)"
+								flag	off
 
 section	"Input required by all"
 option	"input"				i	"Gene mapping file"
 								string typestr="filename"
 option	"exclude"			y	"Exclude genes (.exclude)"
 								string typestr="filename"
+option	"include"			U	"Include genes (.include) (ie annotated genes)"
+								string typestr="filename"
 								
 section	"Input required by multi-query"
 option	"goldstd_list"		S	"List of gold standard gene set files"

File tools/SeekEvaluator/cmdline.c

View file
   "  -C, --agg_ranksum            Sum up the ranks of genes in all query rankings \n                                 to produce a master list sorted by summed \n                                 rank, and perform metric on this list  \n                                 (default=off)",
   "  -D, --agg_scoresum           Sum up the scores of genes in all query rankings \n                                 to produce a master list sorted by summed \n                                 score, and perform metric on this list  \n                                 (default=off)",
   "  -E, --display_all            Display the metric for all queries  \n                                 (default=off)",
+  "  -l, --display_gene_pr        Display positive genes at all recall points \n                                 (requires --pr_all and --display_all)  \n                                 (default=off)",
   "\nInput required by all:",
   "  -i, --input=filename         Gene mapping file",
   "\nInput required by dataset weight display (single .dweight file):",
   "  -g, --gscore=filename        Gene score file (.gscore)",
   "  -q, --query=filename         Query gene set file (to be excluded from \n                                 evaluation) (.query)",
   "  -y, --exclude=filename       Exclude genes (.exclude)",
+  "  -U, --include=filename       Include genes (.include) (ie annotated genes)",
   "\nInput required by multi-query:",
   "  -S, --goldstd_list=filename  List of gold standard gene set files",
   "  -G, --gscore_list=filename   List of gene score files",
   args_info->agg_ranksum_given = 0 ;
   args_info->agg_scoresum_given = 0 ;
   args_info->display_all_given = 0 ;
+  args_info->display_gene_pr_given = 0 ;
   args_info->input_given = 0 ;
   args_info->dataset_map_given = 0 ;
   args_info->weight_given = 0 ;
   args_info->gscore_given = 0 ;
   args_info->query_given = 0 ;
   args_info->exclude_given = 0 ;
+  args_info->include_given = 0 ;
   args_info->goldstd_list_given = 0 ;
   args_info->gscore_list_given = 0 ;
   args_info->query_list_given = 0 ;
   args_info->agg_ranksum_flag = 0;
   args_info->agg_scoresum_flag = 0;
   args_info->display_all_flag = 0;
+  args_info->display_gene_pr_flag = 0;
   args_info->input_arg = NULL;
   args_info->input_orig = NULL;
   args_info->dataset_map_arg = NULL;
   args_info->query_orig = NULL;
   args_info->exclude_arg = NULL;
   args_info->exclude_orig = NULL;
+  args_info->include_arg = NULL;
+  args_info->include_orig = NULL;
   args_info->goldstd_list_arg = NULL;
   args_info->goldstd_list_orig = NULL;
   args_info->gscore_list_arg = NULL;
   args_info->agg_ranksum_help = gengetopt_args_info_help[21] ;
   args_info->agg_scoresum_help = gengetopt_args_info_help[22] ;
   args_info->display_all_help = gengetopt_args_info_help[23] ;
-  args_info->input_help = gengetopt_args_info_help[25] ;
-  args_info->dataset_map_help = gengetopt_args_info_help[27] ;
-  args_info->weight_help = gengetopt_args_info_help[28] ;
-  args_info->dweight_list_help = gengetopt_args_info_help[30] ;
-  args_info->fold_over_random_help = gengetopt_args_info_help[32] ;
-  args_info->p_value_help = gengetopt_args_info_help[33] ;
-  args_info->random_dir_help = gengetopt_args_info_help[34] ;
-  args_info->random_num_help = gengetopt_args_info_help[35] ;
-  args_info->nan_help = gengetopt_args_info_help[37] ;
-  args_info->neg_cor_help = gengetopt_args_info_help[38] ;
-  args_info->goldstd_help = gengetopt_args_info_help[40] ;
-  args_info->gscore_help = gengetopt_args_info_help[41] ;
-  args_info->query_help = gengetopt_args_info_help[42] ;
-  args_info->exclude_help = gengetopt_args_info_help[43] ;
-  args_info->goldstd_list_help = gengetopt_args_info_help[45] ;
-  args_info->gscore_list_help = gengetopt_args_info_help[46] ;
-  args_info->query_list_help = gengetopt_args_info_help[47] ;
-  args_info->exclude_list_help = gengetopt_args_info_help[48] ;
-  args_info->include_list_help = gengetopt_args_info_help[49] ;
-  args_info->dir_out_help = gengetopt_args_info_help[51] ;
+  args_info->display_gene_pr_help = gengetopt_args_info_help[24] ;
+  args_info->input_help = gengetopt_args_info_help[26] ;
+  args_info->dataset_map_help = gengetopt_args_info_help[28] ;
+  args_info->weight_help = gengetopt_args_info_help[29] ;
+  args_info->dweight_list_help = gengetopt_args_info_help[31] ;
+  args_info->fold_over_random_help = gengetopt_args_info_help[33] ;
+  args_info->p_value_help = gengetopt_args_info_help[34] ;
+  args_info->random_dir_help = gengetopt_args_info_help[35] ;
+  args_info->random_num_help = gengetopt_args_info_help[36] ;
+  args_info->nan_help = gengetopt_args_info_help[38] ;
+  args_info->neg_cor_help = gengetopt_args_info_help[39] ;
+  args_info->goldstd_help = gengetopt_args_info_help[41] ;
+  args_info->gscore_help = gengetopt_args_info_help[42] ;
+  args_info->query_help = gengetopt_args_info_help[43] ;
+  args_info->exclude_help = gengetopt_args_info_help[44] ;
+  args_info->include_help = gengetopt_args_info_help[45] ;
+  args_info->goldstd_list_help = gengetopt_args_info_help[47] ;
+  args_info->gscore_list_help = gengetopt_args_info_help[48] ;
+  args_info->query_list_help = gengetopt_args_info_help[49] ;
+  args_info->exclude_list_help = gengetopt_args_info_help[50] ;
+  args_info->include_list_help = gengetopt_args_info_help[51] ;
+  args_info->dir_out_help = gengetopt_args_info_help[53] ;
   
 }
 
   free_string_field (&(args_info->query_orig));
   free_string_field (&(args_info->exclude_arg));
   free_string_field (&(args_info->exclude_orig));
+  free_string_field (&(args_info->include_arg));
+  free_string_field (&(args_info->include_orig));
   free_string_field (&(args_info->goldstd_list_arg));
   free_string_field (&(args_info->goldstd_list_orig));
   free_string_field (&(args_info->gscore_list_arg));
     write_into_file(outfile, "agg_scoresum", 0, 0 );
   if (args_info->display_all_given)
     write_into_file(outfile, "display_all", 0, 0 );
+  if (args_info->display_gene_pr_given)
+    write_into_file(outfile, "display_gene_pr", 0, 0 );
   if (args_info->input_given)
     write_into_file(outfile, "input", args_info->input_orig, 0);
   if (args_info->dataset_map_given)
     write_into_file(outfile, "query", args_info->query_orig, 0);
   if (args_info->exclude_given)
     write_into_file(outfile, "exclude", args_info->exclude_orig, 0);
+  if (args_info->include_given)
+    write_into_file(outfile, "include", args_info->include_orig, 0);
   if (args_info->goldstd_list_given)
     write_into_file(outfile, "goldstd_list", args_info->goldstd_list_orig, 0);
   if (args_info->gscore_list_given)
         { "agg_ranksum",	0, NULL, 'C' },
         { "agg_scoresum",	0, NULL, 'D' },
         { "display_all",	0, NULL, 'E' },
+        { "display_gene_pr",	0, NULL, 'l' },
         { "input",	1, NULL, 'i' },
         { "dataset_map",	1, NULL, 'I' },
         { "weight",	1, NULL, 'w' },
         { "gscore",	1, NULL, 'g' },
         { "query",	1, NULL, 'q' },
         { "exclude",	1, NULL, 'y' },
+        { "include",	1, NULL, 'U' },
         { "goldstd_list",	1, NULL, 'S' },
         { "gscore_list",	1, NULL, 'G' },
         { "query_list",	1, NULL, 'Q' },
         { 0,  0, 0, 0 }
       };
 
-      c = getopt_long (argc, argv, "hVOMTzratcux:e:p:FWABCDEi:I:w:Z:fPR:N:n:Ks:g:q:y:S:G:Q:X:Y:d:", long_options, &option_index);
+      c = getopt_long (argc, argv, "hVOMTzratcux:e:p:FWABCDEli:I:w:Z:fPR:N:n:Ks:g:q:y:U:S:G:Q:X:Y:d:", long_options, &option_index);
 
       if (c == -1) break;	/* Exit from `while (1)' loop.  */
 
             goto failure;
         
           break;
+        case 'l':	/* Display positive genes at all recall points (requires --pr_all and --display_all).  */
+        
+        
+          if (update_arg((void *)&(args_info->display_gene_pr_flag), 0, &(args_info->display_gene_pr_given),
+              &(local_args_info.display_gene_pr_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "display_gene_pr", 'l',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'i':	/* Gene mapping file.  */
         
         
             goto failure;
         
           break;
+        case 'U':	/* Include genes (.include) (ie annotated genes).  */
+        
+        
+          if (update_arg( (void *)&(args_info->include_arg), 
+               &(args_info->include_orig), &(args_info->include_given),
+              &(local_args_info.include_given), optarg, 0, 0, ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "include", 'U',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'S':	/* List of gold standard gene set files.  */
         
         

File tools/SeekEvaluator/cmdline.h

View file
   const char *agg_scoresum_help; /**< @brief Sum up the scores of genes in all query rankings to produce a master list sorted by summed score, and perform metric on this list help description.  */
   int display_all_flag;	/**< @brief Display the metric for all queries (default=off).  */
   const char *display_all_help; /**< @brief Display the metric for all queries help description.  */
+  int display_gene_pr_flag;	/**< @brief Display positive genes at all recall points (requires --pr_all and --display_all) (default=off).  */
+  const char *display_gene_pr_help; /**< @brief Display positive genes at all recall points (requires --pr_all and --display_all) help description.  */
   char * input_arg;	/**< @brief Gene mapping file.  */
   char * input_orig;	/**< @brief Gene mapping file original value given at command line.  */
   const char *input_help; /**< @brief Gene mapping file help description.  */
   char * exclude_arg;	/**< @brief Exclude genes (.exclude).  */
   char * exclude_orig;	/**< @brief Exclude genes (.exclude) original value given at command line.  */
   const char *exclude_help; /**< @brief Exclude genes (.exclude) help description.  */
+  char * include_arg;	/**< @brief Include genes (.include) (ie annotated genes).  */
+  char * include_orig;	/**< @brief Include genes (.include) (ie annotated genes) original value given at command line.  */
+  const char *include_help; /**< @brief Include genes (.include) (ie annotated genes) help description.  */
   char * goldstd_list_arg;	/**< @brief List of gold standard gene set files.  */
   char * goldstd_list_orig;	/**< @brief List of gold standard gene set files original value given at command line.  */
   const char *goldstd_list_help; /**< @brief List of gold standard gene set files help description.  */
   unsigned int agg_ranksum_given ;	/**< @brief Whether agg_ranksum was given.  */
   unsigned int agg_scoresum_given ;	/**< @brief Whether agg_scoresum was given.  */
   unsigned int display_all_given ;	/**< @brief Whether display_all was given.  */
+  unsigned int display_gene_pr_given ;	/**< @brief Whether display_gene_pr was given.  */
   unsigned int input_given ;	/**< @brief Whether input was given.  */
   unsigned int dataset_map_given ;	/**< @brief Whether dataset_map was given.  */
   unsigned int weight_given ;	/**< @brief Whether weight was given.  */
   unsigned int gscore_given ;	/**< @brief Whether gscore was given.  */
   unsigned int query_given ;	/**< @brief Whether query was given.  */
   unsigned int exclude_given ;	/**< @brief Whether exclude was given.  */
+  unsigned int include_given ;	/**< @brief Whether include was given.  */
   unsigned int goldstd_list_given ;	/**< @brief Whether goldstd_list was given.  */
   unsigned int gscore_list_given ;	/**< @brief Whether gscore_list was given.  */
   unsigned int query_list_given ;	/**< @brief Whether query_list was given.  */

File tools/SeekPrep/SeekPrep.cpp

View file
 			mean[k] = sum[k] / (float) num[k];
 			stdev[k] = sq_sum[k] / (float) num[k] - mean[k] * mean[k];
 			stdev[k] = sqrt(stdev[k]);
-			fprintf(stderr, "%d %.5f %.5f\n", geneID, mean[k], stdev[k]);
+			fprintf(stderr, "%s G%d P%d %.5f %.5f\n", thisGene.c_str(), geneID, k, mean[k], stdev[k]);
 			platform_avg.Set(k, geneID, mean[k]);
 			platform_stdev.Set(k, geneID, stdev[k]);
 		}

File tools/SeekReader/SeekReader.cpp

View file
 	for(i=0; i<vecstrGenes.size(); i++)
 		mapstrintGene[vecstrGenes[i]] = i;
 
+	if(sArgs.add_gscore_flag==1){
+		vector<string> vecstrGScore;
+		if(!CSeekTools::ReadListOneColumn(sArgs.gscore_list_arg, vecstrGScore))
+			return false;
+		string gscoreDir = sArgs.gscore_dir_arg;
+		vector<float> totalScore;
+		totalScore.resize(vecstrGeneID.size());
+		for(int j=0; j<totalScore.size(); j++){
+			totalScore[j] = 0;
+		}
+		for(int j=0; j<vecstrGScore.size(); j++){
+			string path = gscoreDir + "/" + vecstrGScore[j];
+			vector<float> v1;
+			CSeekTools::ReadArray(path.c_str(), v1);
+			for(int k=0; k<v1.size(); k++){
+				if(v1[k]<-320){
+					totalScore[k] = -320;
+				}else{
+					totalScore[k]+=v1[k];
+				}
+			}
+		}
+		for(int j=0; j<totalScore.size(); j++){
+			if(totalScore[j]==-320){
+				continue;
+			}
+			totalScore[j]/=(float)totalScore.size();
+		}
+		CSeekTools::WriteArray(sArgs.gscore_output2_arg, totalScore);
+		return 0;
+	}
+
+
+	if(sArgs.increase_gscore_flag==1){
+		vector<float> v1;
+		CSeekTools::ReadArray(sArgs.gscore_file_arg, v1);
+
+		vector<float> v2;
+		CSeekTools::ReadArray(sArgs.gscore_file_2_arg, v2);
+
+		int num_genes_1 = 0;
+		int num_genes_2 = 0;
+		for(int j=0; j<v1.size(); j++){
+			if(v1[j]<-320) continue;
+			num_genes_1++;
+		}
+		for(int j=0; j<v2.size(); j++){
+			if(v2[j]<-320) continue;
+			num_genes_2++;
+		}
+
+		vector<CPair<float> > cp1, cp2;
+		cp1.resize(v1.size());
+		cp2.resize(v2.size());
+		for(int j=0; j<v1.size(); j++){
+			cp1[j].i = (utype) j;
+			cp1[j].v = v1[j];
+			cp2[j].i = (utype) j;
+			cp2[j].v = v2[j];
+		}
+		sort(cp1.begin(), cp1.end(), CDescendingValue<float>());
+		sort(cp2.begin(), cp2.end(), CDescendingValue<float>());
+
+		for(int j=0; j<v1.size(); j++){
+			if(cp1[j].v<-320){
+			}else{
+				v1[cp1[j].i] = (float) (num_genes_1 - j) / num_genes_1;
+			}
+			if(cp2[j].v<-320){
+			}else{
+				v2[cp2[j].i] = (float) (num_genes_2 - j) / num_genes_2;
+			}
+		}
+
+		vector<float> sum_v;
+		sum_v.resize(v1.size());
+		for(int j=0; j<v1.size(); j++){
+			if(v1[j]<-320 || v2[j]<-320){
+				sum_v[j] = -320;
+			}else{
+				sum_v[j] = v1[j] + v2[j];
+			}
+		}
+
+		CSeekTools::WriteArray(sArgs.gscore_output_arg, sum_v);
+		return 0;
+	}
+
 	if(sArgs.weight2_flag==1){
 		vector<string> vecstrDataset;
 		if(!CSeekTools::ReadListOneColumn(sArgs.dweight_map_arg, vecstrDataset))

File tools/SeekReader/SeekReader.ggo

View file
 								flag	off
 option	"combine_pcl"		B	"Combine PCL bin files"
 								flag	off
+option	"increase_gscore"	R	"Increase the gene scores"
+								flag	off
+option	"add_gscore"		g	"Add the gene scores"
+								flag	off
+
+section	"Increase the gene scores of given queries"
+option	"gscore_file"		S	"Gene score file (input)"
+								string typestr="filename" default="NA"
+option	"gscore_file_2"		T	"Gene score file (input 2)"
+								string typestr="filename" default="NA"
+option	"gscore_output"		t	"Gene score output file"
+								string typestr="filename" default="NA"
+
+section "Add the gene score for a bunch of files"
+option	"gscore_list"		a	"Gene score list"
+								string typestr="filename" default="NA"
+option	"gscore_dir"		c	"Gene score directory"
+								string typestr="directory" default="NA"
+option	"gscore_output2"	e	"Gene score output file"
+								string typestr="filename" default="NA"
 
 section	"Combine PCL"
 option	"pcl_list"			u	"File containing a list of pcl bin files (including path)"

File tools/SeekReader/cmdline.c

View file
 
 const char *gengetopt_args_info_help[] = {
   "      --help                    Print help and exit",
-  "  -V, --version                 Print version and exit",
+  "      --version                 Print version and exit",
   "\nDiagnosis:",
   "  -D, --databaselet             Display values from databaselet(s)  \n                                  (default=off)",
   "  -A, --dataset                 Check which datasets contain query of interest, \n                                  based on .gpres file  (default=off)",
   "  -J, --convert_aracne          Convert Aracne output (.txt) to DAB file  \n                                  (default=off)",
   "  -k, --convert_dab             Convert DAB to matrix  (default=off)",
   "  -Y, --limit_hub               Limit genes in the DAB to those that are hubby  \n                                  (default=off)",
+  "  -B, --combine_pcl             Combine PCL bin files  (default=off)",
+  "  -R, --increase_gscore         Increase the gene scores  (default=off)",
+  "  -g, --add_gscore              Add the gene scores  (default=off)",
+  "\nIncrease the gene scores of given queries:",
+  "  -S, --gscore_file=filename    Gene score file (input)  (default=`NA')",
+  "  -T, --gscore_file_2=filename  Gene score file (input 2)  (default=`NA')",
+  "  -t, --gscore_output=filename  Gene score output file  (default=`NA')",
+  "\nAdd the gene score for a bunch of files:",
+  "  -a, --gscore_list=filename    Gene score list  (default=`NA')",
+  "  -c, --gscore_dir=directory    Gene score directory  (default=`NA')",
+  "  -e, --gscore_output2=filename Gene score output file  (default=`NA')",
+  "\nCombine PCL:",
+  "  -u, --pcl_list=filename       File containing a list of pcl bin files \n                                  (including path)  (default=`NA')",
+  "  -b, --binarize                Binarize the output matrix  (default=off)",
+  "  -V, --output_pcl=filename     Output file  (default=`NA')",
   "\nLimit Hub:",
   "  -y, --dabinput=filename       DAB input file  (default=`NA')",
   "  -Z, --hub_dab_output=filename DAB output file  (default=`NA')",
   args_info->convert_aracne_given = 0 ;
   args_info->convert_dab_given = 0 ;
   args_info->limit_hub_given = 0 ;
+  args_info->combine_pcl_given = 0 ;
+  args_info->increase_gscore_given = 0 ;
+  args_info->add_gscore_given = 0 ;
+  args_info->gscore_file_given = 0 ;
+  args_info->gscore_file_2_given = 0 ;
+  args_info->gscore_output_given = 0 ;
+  args_info->gscore_list_given = 0 ;
+  args_info->gscore_dir_given = 0 ;
+  args_info->gscore_output2_given = 0 ;
+  args_info->pcl_list_given = 0 ;
+  args_info->binarize_given = 0 ;
+  args_info->output_pcl_given = 0 ;
   args_info->dabinput_given = 0 ;
   args_info->hub_dab_output_given = 0 ;
   args_info->aracne_file_given = 0 ;
   args_info->convert_aracne_flag = 0;
   args_info->convert_dab_flag = 0;
   args_info->limit_hub_flag = 0;
+  args_info->combine_pcl_flag = 0;
+  args_info->increase_gscore_flag = 0;
+  args_info->add_gscore_flag = 0;
+  args_info->gscore_file_arg = gengetopt_strdup ("NA");
+  args_info->gscore_file_orig = NULL;
+  args_info->gscore_file_2_arg = gengetopt_strdup ("NA");
+  args_info->gscore_file_2_orig = NULL;
+  args_info->gscore_output_arg = gengetopt_strdup ("NA");
+  args_info->gscore_output_orig = NULL;
+  args_info->gscore_list_arg = gengetopt_strdup ("NA");
+  args_info->gscore_list_orig = NULL;
+  args_info->gscore_dir_arg = gengetopt_strdup ("NA");
+  args_info->gscore_dir_orig = NULL;
+  args_info->gscore_output2_arg = gengetopt_strdup ("NA");
+  args_info->gscore_output2_orig = NULL;
+  args_info->pcl_list_arg = gengetopt_strdup ("NA");
+  args_info->pcl_list_orig = NULL;
+  args_info->binarize_flag = 0;
+  args_info->output_pcl_arg = gengetopt_strdup ("NA");
+  args_info->output_pcl_orig = NULL;
   args_info->dabinput_arg = gengetopt_strdup ("NA");
   args_info->dabinput_orig = NULL;
   args_info->hub_dab_output_arg = gengetopt_strdup ("NA");
   args_info->convert_aracne_help = gengetopt_args_info_help[8] ;
   args_info->convert_dab_help = gengetopt_args_info_help[9] ;
   args_info->limit_hub_help = gengetopt_args_info_help[10] ;
-  args_info->dabinput_help = gengetopt_args_info_help[12] ;
-  args_info->hub_dab_output_help = gengetopt_args_info_help[13] ;
-  args_info->aracne_file_help = gengetopt_args_info_help[15] ;
-  args_info->output_dab_file_help = gengetopt_args_info_help[16] ;
-  args_info->dab_file_help = gengetopt_args_info_help[18] ;
-  args_info->output_matrix_help = gengetopt_args_info_help[19] ;
-  args_info->dweight_dir_help = gengetopt_args_info_help[21] ;
-  args_info->dweight_num_help = gengetopt_args_info_help[22] ;
-  args_info->dweight_map_help = gengetopt_args_info_help[23] ;
-  args_info->dweight_test_dir_help = gengetopt_args_info_help[24] ;
-  args_info->dweight_test_num_help = gengetopt_args_info_help[25] ;
-  args_info->gscore_dir1_help = gengetopt_args_info_help[27] ;
-  args_info->gscore_dir2_help = gengetopt_args_info_help[28] ;
-  args_info->gscore_num1_help = gengetopt_args_info_help[29] ;
-  args_info->order_stat_single_gene_query_help = gengetopt_args_info_help[31] ;
-  args_info->db_help = gengetopt_args_info_help[32] ;
-  args_info->dset_list_help = gengetopt_args_info_help[33] ;
-  args_info->input_help = gengetopt_args_info_help[34] ;
-  args_info->single_query_help = gengetopt_args_info_help[35] ;
-  args_info->dir_in_help = gengetopt_args_info_help[36] ;
-  args_info->dir_prep_in_help = gengetopt_args_info_help[37] ;
-  args_info->dir_gvar_in_help = gengetopt_args_info_help[38] ;
-  args_info->dir_sinfo_in_help = gengetopt_args_info_help[39] ;
-  args_info->is_nibble_help = gengetopt_args_info_help[40] ;
-  args_info->platform_dir_help = gengetopt_args_info_help[41] ;
-  args_info->gvar_cutoff_help = gengetopt_args_info_help[42] ;
-  args_info->multi_query_help = gengetopt_args_info_help[43] ;
-  args_info->output_file_help = gengetopt_args_info_help[44] ;
+  args_info->combine_pcl_help = gengetopt_args_info_help[11] ;
+  args_info->increase_gscore_help = gengetopt_args_info_help[12] ;
+  args_info->add_gscore_help = gengetopt_args_info_help[13] ;
+  args_info->gscore_file_help = gengetopt_args_info_help[15] ;
+  args_info->gscore_file_2_help = gengetopt_args_info_help[16] ;
+  args_info->gscore_output_help = gengetopt_args_info_help[17] ;
+  args_info->gscore_list_help = gengetopt_args_info_help[19] ;
+  args_info->gscore_dir_help = gengetopt_args_info_help[20] ;
+  args_info->gscore_output2_help = gengetopt_args_info_help[21] ;
+  args_info->pcl_list_help = gengetopt_args_info_help[23] ;
+  args_info->binarize_help = gengetopt_args_info_help[24] ;
+  args_info->output_pcl_help = gengetopt_args_info_help[25] ;
+  args_info->dabinput_help = gengetopt_args_info_help[27] ;
+  args_info->hub_dab_output_help = gengetopt_args_info_help[28] ;
+  args_info->aracne_file_help = gengetopt_args_info_help[30] ;
+  args_info->output_dab_file_help = gengetopt_args_info_help[31] ;
+  args_info->dab_file_help = gengetopt_args_info_help[33] ;
+  args_info->output_matrix_help = gengetopt_args_info_help[34] ;
+  args_info->dweight_dir_help = gengetopt_args_info_help[36] ;
+  args_info->dweight_num_help = gengetopt_args_info_help[37] ;
+  args_info->dweight_map_help = gengetopt_args_info_help[38] ;
+  args_info->dweight_test_dir_help = gengetopt_args_info_help[39] ;
+  args_info->dweight_test_num_help = gengetopt_args_info_help[40] ;
+  args_info->gscore_dir1_help = gengetopt_args_info_help[42] ;
+  args_info->gscore_dir2_help = gengetopt_args_info_help[43] ;
+  args_info->gscore_num1_help = gengetopt_args_info_help[44] ;
+  args_info->order_stat_single_gene_query_help = gengetopt_args_info_help[46] ;
+  args_info->db_help = gengetopt_args_info_help[47] ;
+  args_info->dset_list_help = gengetopt_args_info_help[48] ;
+  args_info->input_help = gengetopt_args_info_help[49] ;
+  args_info->single_query_help = gengetopt_args_info_help[50] ;
+  args_info->dir_in_help = gengetopt_args_info_help[51] ;
+  args_info->dir_prep_in_help = gengetopt_args_info_help[52] ;
+  args_info->dir_gvar_in_help = gengetopt_args_info_help[53] ;
+  args_info->dir_sinfo_in_help = gengetopt_args_info_help[54] ;
+  args_info->is_nibble_help = gengetopt_args_info_help[55] ;
+  args_info->platform_dir_help = gengetopt_args_info_help[56] ;
+  args_info->gvar_cutoff_help = gengetopt_args_info_help[57] ;
+  args_info->multi_query_help = gengetopt_args_info_help[58] ;
+  args_info->output_file_help = gengetopt_args_info_help[59] ;
   
 }
 
 cmdline_parser_release (struct gengetopt_args_info *args_info)
 {
   unsigned int i;
+  free_string_field (&(args_info->gscore_file_arg));
+  free_string_field (&(args_info->gscore_file_orig));
+  free_string_field (&(args_info->gscore_file_2_arg));
+  free_string_field (&(args_info->gscore_file_2_orig));
+  free_string_field (&(args_info->gscore_output_arg));
+  free_string_field (&(args_info->gscore_output_orig));
+  free_string_field (&(args_info->gscore_list_arg));
+  free_string_field (&(args_info->gscore_list_orig));
+  free_string_field (&(args_info->gscore_dir_arg));
+  free_string_field (&(args_info->gscore_dir_orig));
+  free_string_field (&(args_info->gscore_output2_arg));
+  free_string_field (&(args_info->gscore_output2_orig));
+  free_string_field (&(args_info->pcl_list_arg));
+  free_string_field (&(args_info->pcl_list_orig));
+  free_string_field (&(args_info->output_pcl_arg));
+  free_string_field (&(args_info->output_pcl_orig));
   free_string_field (&(args_info->dabinput_arg));
   free_string_field (&(args_info->dabinput_orig));
   free_string_field (&(args_info->hub_dab_output_arg));
     write_into_file(outfile, "convert_dab", 0, 0 );
   if (args_info->limit_hub_given)
     write_into_file(outfile, "limit_hub", 0, 0 );
+  if (args_info->combine_pcl_given)
+    write_into_file(outfile, "combine_pcl", 0, 0 );
+  if (args_info->increase_gscore_given)
+    write_into_file(outfile, "increase_gscore", 0, 0 );
+  if (args_info->add_gscore_given)
+    write_into_file(outfile, "add_gscore", 0, 0 );
+  if (args_info->gscore_file_given)
+    write_into_file(outfile, "gscore_file", args_info->gscore_file_orig, 0);
+  if (args_info->gscore_file_2_given)
+    write_into_file(outfile, "gscore_file_2", args_info->gscore_file_2_orig, 0);
+  if (args_info->gscore_output_given)
+    write_into_file(outfile, "gscore_output", args_info->gscore_output_orig, 0);
+  if (args_info->gscore_list_given)
+    write_into_file(outfile, "gscore_list", args_info->gscore_list_orig, 0);
+  if (args_info->gscore_dir_given)
+    write_into_file(outfile, "gscore_dir", args_info->gscore_dir_orig, 0);
+  if (args_info->gscore_output2_given)
+    write_into_file(outfile, "gscore_output2", args_info->gscore_output2_orig, 0);
+  if (args_info->pcl_list_given)
+    write_into_file(outfile, "pcl_list", args_info->pcl_list_orig, 0);
+  if (args_info->binarize_given)
+    write_into_file(outfile, "binarize", 0, 0 );
+  if (args_info->output_pcl_given)
+    write_into_file(outfile, "output_pcl", args_info->output_pcl_orig, 0);
   if (args_info->dabinput_given)
     write_into_file(outfile, "dabinput", args_info->dabinput_orig, 0);
   if (args_info->hub_dab_output_given)
 
       static struct option long_options[] = {
         { "help",	0, NULL, 0 },
-        { "version",	0, NULL, 'V' },
+        { "version",	0, NULL, 0 },
         { "databaselet",	0, NULL, 'D' },
         { "dataset",	0, NULL, 'A' },
         { "weight",	0, NULL, 'W' },
         { "convert_aracne",	0, NULL, 'J' },
         { "convert_dab",	0, NULL, 'k' },
         { "limit_hub",	0, NULL, 'Y' },
+        { "combine_pcl",	0, NULL, 'B' },
+        { "increase_gscore",	0, NULL, 'R' },
+        { "add_gscore",	0, NULL, 'g' },
+        { "gscore_file",	1, NULL, 'S' },
+        { "gscore_file_2",	1, NULL, 'T' },
+        { "gscore_output",	1, NULL, 't' },
+        { "gscore_list",	1, NULL, 'a' },
+        { "gscore_dir",	1, NULL, 'c' },
+        { "gscore_output2",	1, NULL, 'e' },
+        { "pcl_list",	1, NULL, 'u' },
+        { "binarize",	0, NULL, 'b' },
+        { "output_pcl",	1, NULL, 'V' },
         { "dabinput",	1, NULL, 'y' },
         { "hub_dab_output",	1, NULL, 'Z' },
         { "aracne_file",	1, NULL, 'K' },
         { 0,  0, 0, 0 }
       };
 
-      c = getopt_long (argc, argv, "VDAWUCJkYy:Z:K:L:f:m:E:n:M:F:G:H:h:I:Ox:X:i:q:d:p:r:s:NP:v:Q:o:", long_options, &option_index);
+      c = getopt_long (argc, argv, "DAWUCJkYBRgS:T:t:a:c:e:u:bV:y:Z:K:L:f:m:E:n:M:F:G:H:h:I:Ox:X:i:q:d:p:r:s:NP:v:Q:o:", long_options, &option_index);
 
       if (c == -1) break;	/* Exit from `while (1)' loop.  */
 
       switch (c)
         {
-        case 'V':	/* Print version and exit.  */
-        
-        
-          if (update_arg( 0 , 
-               0 , &(args_info->version_given),
-              &(local_args_info.version_given), optarg, 0, 0, ARG_NO,
-              check_ambiguity, override, 0, 0,
-              "version", 'V',
-              additional_error))
-            goto failure;
-          cmdline_parser_free (&local_args_info);
-          return 0;
-        
-          break;
         case 'D':	/* Display values from databaselet(s).  */
         
         
             goto failure;
         
           break;
+        case 'B':	/* Combine PCL bin files.  */
+        
+        
+          if (update_arg((void *)&(args_info->combine_pcl_flag), 0, &(args_info->combine_pcl_given),
+              &(local_args_info.combine_pcl_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "combine_pcl", 'B',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'R':	/* Increase the gene scores.  */
+        
+        
+          if (update_arg((void *)&(args_info->increase_gscore_flag), 0, &(args_info->increase_gscore_given),
+              &(local_args_info.increase_gscore_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "increase_gscore", 'R',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'g':	/* Add the gene scores.  */
+        
+        
+          if (update_arg((void *)&(args_info->add_gscore_flag), 0, &(args_info->add_gscore_given),
+              &(local_args_info.add_gscore_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "add_gscore", 'g',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'S':	/* Gene score file (input).  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_file_arg), 
+               &(args_info->gscore_file_orig), &(args_info->gscore_file_given),
+              &(local_args_info.gscore_file_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_file", 'S',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'T':	/* Gene score file (input 2).  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_file_2_arg), 
+               &(args_info->gscore_file_2_orig), &(args_info->gscore_file_2_given),
+              &(local_args_info.gscore_file_2_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_file_2", 'T',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 't':	/* Gene score output file.  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_output_arg), 
+               &(args_info->gscore_output_orig), &(args_info->gscore_output_given),
+              &(local_args_info.gscore_output_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_output", 't',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'a':	/* Gene score list.  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_list_arg), 
+               &(args_info->gscore_list_orig), &(args_info->gscore_list_given),
+              &(local_args_info.gscore_list_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_list", 'a',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'c':	/* Gene score directory.  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_dir_arg), 
+               &(args_info->gscore_dir_orig), &(args_info->gscore_dir_given),
+              &(local_args_info.gscore_dir_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_dir", 'c',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'e':	/* Gene score output file.  */
+        
+        
+          if (update_arg( (void *)&(args_info->gscore_output2_arg), 
+               &(args_info->gscore_output2_orig), &(args_info->gscore_output2_given),
+              &(local_args_info.gscore_output2_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "gscore_output2", 'e',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'u':	/* File containing a list of pcl bin files (including path).  */
+        
+        
+          if (update_arg( (void *)&(args_info->pcl_list_arg), 
+               &(args_info->pcl_list_orig), &(args_info->pcl_list_given),
+              &(local_args_info.pcl_list_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "pcl_list", 'u',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'b':	/* Binarize the output matrix.  */
+        
+        
+          if (update_arg((void *)&(args_info->binarize_flag), 0, &(args_info->binarize_given),
+              &(local_args_info.binarize_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "binarize", 'b',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'V':	/* Output file.  */
+        
+        
+          if (update_arg( (void *)&(args_info->output_pcl_arg), 
+               &(args_info->output_pcl_orig), &(args_info->output_pcl_given),
+              &(local_args_info.output_pcl_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "output_pcl", 'V',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'y':	/* DAB input file.  */
         
         
             exit (EXIT_SUCCESS);
           }
 
+          /* Print version and exit.  */
+          if (strcmp (long_options[option_index].name, "version") == 0)
+          {
+          
+          
+            if (update_arg( 0 , 
+                 0 , &(args_info->version_given),
+                &(local_args_info.version_given), optarg, 0, 0, ARG_NO,
+                check_ambiguity, override, 0, 0,
+                "version", 'V',
+                additional_error))
+              goto failure;
+            cmdline_parser_free (&local_args_info);
+            return 0;
+          
+          }
+          
+          break;
         case '?':	/* Invalid option.  */
           /* `getopt_long' already printed an error message.  */
           goto failure;

File tools/SeekReader/cmdline.h

View file
   const char *limit_hub_help; /**< @brief Limit genes in the DAB to those that are hubby help description.  */
   int combine_pcl_flag;	/**< @brief Combine PCL bin files (default=off).  */
   const char *combine_pcl_help; /**< @brief Combine PCL bin files help description.  */
+  int increase_gscore_flag;	/**< @brief Increase the gene scores (default=off).  */
+  const char *increase_gscore_help; /**< @brief Increase the gene scores help description.  */
+  int add_gscore_flag;	/**< @brief Add the gene scores (default=off).  */
+  const char *add_gscore_help; /**< @brief Add the gene scores help description.  */
+  char * gscore_file_arg;	/**< @brief Gene score file (input) (default='NA').  */
+  char * gscore_file_orig;	/**< @brief Gene score file (input) original value given at command line.  */
+  const char *gscore_file_help; /**< @brief Gene score file (input) help description.  */
+  char * gscore_file_2_arg;	/**< @brief Gene score file (input 2) (default='NA').  */
+  char * gscore_file_2_orig;	/**< @brief Gene score file (input 2) original value given at command line.  */
+  const char *gscore_file_2_help; /**< @brief Gene score file (input 2) help description.  */
+  char * gscore_output_arg;	/**< @brief Gene score output file (default='NA').  */
+  char * gscore_output_orig;	/**< @brief Gene score output file original value given at command line.  */
+  const char *gscore_output_help; /**< @brief Gene score output file help description.  */
+  char * gscore_list_arg;	/**< @brief Gene score list (default='NA').  */
+  char * gscore_list_orig;	/**< @brief Gene score list original value given at command line.  */
+  const char *gscore_list_help; /**< @brief Gene score list help description.  */
+  char * gscore_dir_arg;	/**< @brief Gene score directory (default='NA').  */
+  char * gscore_dir_orig;	/**< @brief Gene score directory original value given at command line.  */
+  const char *gscore_dir_help; /**< @brief Gene score directory help description.  */
+  char * gscore_output2_arg;	/**< @brief Gene score output file (default='NA').  */
+  char * gscore_output2_orig;	/**< @brief Gene score output file original value given at command line.  */
+  const char *gscore_output2_help; /**< @brief Gene score output file help description.  */
   char * pcl_list_arg;	/**< @brief File containing a list of pcl bin files (including path) (default='NA').  */
   char * pcl_list_orig;	/**< @brief File containing a list of pcl bin files (including path) original value given at command line.  */
   const char *pcl_list_help; /**< @brief File containing a list of pcl bin files (including path) help description.  */
   unsigned int convert_dab_given ;	/**< @brief Whether convert_dab was given.  */
   unsigned int limit_hub_given ;	/**< @brief Whether limit_hub was given.  */
   unsigned int combine_pcl_given ;	/**< @brief Whether combine_pcl was given.  */
+  unsigned int increase_gscore_given ;	/**< @brief Whether increase_gscore was given.  */
+  unsigned int add_gscore_given ;	/**< @brief Whether add_gscore was given.  */
+  unsigned int gscore_file_given ;	/**< @brief Whether gscore_file was given.  */
+  unsigned int gscore_file_2_given ;	/**< @brief Whether gscore_file_2 was given.  */
+  unsigned int gscore_output_given ;	/**< @brief Whether gscore_output was given.  */
+  unsigned int gscore_list_given ;	/**< @brief Whether gscore_list was given.  */
+  unsigned int gscore_dir_given ;	/**< @brief Whether gscore_dir was given.  */
+  unsigned int gscore_output2_given ;	/**< @brief Whether gscore_output2 was given.  */
   unsigned int pcl_list_given ;	/**< @brief Whether pcl_list was given.  */
   unsigned int binarize_given ;	/**< @brief Whether binarize was given.  */
   unsigned int output_pcl_given ;	/**< @brief Whether output_pcl was given.  */