Commits

Qian Zhu committed 7075593

SeekReader: convert DAB/sparse dab to text-based matrix

Comments (0)

Files changed (5)

tools/SeekReader/SeekReader.cpp

 		return 0;
 	}
 
+
+	if(sArgs.convert_dab_flag==1){
+		string dab_file_name = sArgs.dab_file_arg;
+		if(dab_file_name.find(".2.dab")!=string::npos){
+			CSeekIntIntMap d1(vecstrGenes.size());
+			CSparseFlatMatrix<float> sm (0);
+			CSeekWriter::ReadSeekSparseMatrix<unsigned short>(sArgs.dab_file_arg,
+				sm, d1, 1000, 0.99, vecstrGenes);	
+			utype ii = 0;
+			const vector<utype> &allRGenes = d1.GetAllReverse();
+			FILE *pFile;
+			pFile = fopen(sArgs.output_matrix_arg, "w");
+			fprintf(pFile, "Genes\t");
+			for(i=0; i<d1.GetNumSet(); i++){	
+				string g = vecstrGenes[allRGenes[i]];
+				fprintf(pFile, "%s", g.c_str());
+				if(i<d1.GetNumSet()-1)
+					fprintf(pFile, "\t");
+			}
+			fprintf(pFile, "\n");
+		
+			unsigned int j, t;	
+			for(i=0; i<d1.GetNumSet(); i++){	
+				string g = vecstrGenes[allRGenes[i]];
+				fprintf(pFile, "%s\t", g.c_str());
+				vector<float> vf;
+				vf.resize(vecstrGenes.size());
+				for(j=0; j<vecstrGenes.size(); j++)
+					vf[j] = 0;
+				utype ii = allRGenes[i];
+				vector<CPair<float> >::iterator row_it;
+				float rv;
+				for(row_it = sm.RowBegin(ii); row_it!=sm.RowEnd(ii); row_it++){
+					j = (size_t) row_it->i;
+					rv = row_it->v;
+					vf[j] = rv;
+				}
+			
+				for(j=0; j<d1.GetNumSet(); j++){
+					t = allRGenes[j];
+					fprintf(pFile, "%.3e", vf[t]);
+					if(j<d1.GetNumSet()-1)
+						fprintf(pFile, "\t");
+				}
+				fprintf(pFile, "\n");
+			}
+			fclose(pFile);
+			return 0;
+		}
+
+		CDataPair Dat;
+		fprintf(stderr, "Opening file...\n");
+		if(!Dat.Open(sArgs.dab_file_arg, false, false, 2, false, false)){
+			cerr << "error opening file" << endl;
+			return 1;
+		}
+
+		vector<unsigned int> veciGenes;
+		veciGenes.resize(vecstrGenes.size());
+		for(i=0; i<vecstrGenes.size(); i++)
+			veciGenes[i] = (unsigned int) Dat.GetGeneIndex(vecstrGenes[i]);
+
+		unsigned int s, t, j, ss, tt;
+		float d;
+		CSeekIntIntMap m(vecstrGenes.size());
+		for(i=0; i<vecstrGenes.size(); i++){
+			if((s=veciGenes[i])==(unsigned int)-1) continue;
+			m.Add(i);
+		}
+
+		const vector<utype> &allRGenes = m.GetAllReverse();
+		FILE *pFile;
+		pFile = fopen(sArgs.output_matrix_arg, "w");
+		fprintf(pFile, "Genes\t");
+		for(i=0; i<m.GetNumSet(); i++){	
+			string g = vecstrGenes[allRGenes[i]];
+			fprintf(pFile, "%s", g.c_str());
+			if(i<m.GetNumSet()-1){
+				fprintf(pFile, "\t");
+			}
+		}
+		fprintf(pFile, "\n");
+			
+		for(i=0; i<m.GetNumSet(); i++){	
+			s = veciGenes[allRGenes[i]];
+			string g = vecstrGenes[allRGenes[i]];
+			fprintf(pFile, "%s\t", g.c_str());
+			for(j=0; j<m.GetNumSet(); j++){
+				t = veciGenes[allRGenes[j]];
+				if(CMeta::IsNaN(d = Dat.Get(s,t)))
+					d = 0;
+				fprintf(pFile, "%.3e", d);
+				if(j<m.GetNumSet()-1){
+					fprintf(pFile, "\t");
+				}
+			}
+			fprintf(pFile, "\n");
+		}
+		fclose(pFile);
+		return 0;
+	}
+
+
 	if(sArgs.limit_hub_flag==1){
 		float per = 0.30;
 		CDataPair Dat;

tools/SeekReader/SeekReader.ggo

 								flag	off
 option	"convert_aracne"	J	"Convert Aracne output (.txt) to DAB file"
 								flag	off
+option	"convert_dab"		k	"Convert DAB to matrix"
+								flag	off
 option	"limit_hub"			Y	"Limit genes in the DAB to those that are hubby"
 								flag	off
 
 option	"output_dab_file"	L	"DAB file"
 								string typestr="filename" default="NA"
 
+section "Convert DAB to matrix"
+option	"dab_file"			f	"DAB file"
+								string typestr="filename" default="NA"
+option	"output_matrix"		m	"Output matrix filename"
+								string typestr="filename" default="NA"
+
 section "Weight"
 option	"dweight_dir"		E	"Dataset weight directory"
 								string typestr="directory" default="NA"

tools/SeekReader/cmdline.c

 /*
-  File autogenerated by gengetopt version 2.22.5
+  File autogenerated by gengetopt version 2.22
   generated with the following command:
-  /usr/bin/gengetopt -iSeekReader.ggo --default-optional -u -N -e 
+  /memex/qzhu/usr/bin/gengetopt -iSeekReader.ggo --default-optional -u -N -e 
 
   The developers of gengetopt consider the fixed text that goes in all
   gengetopt output files to be in the public domain:
 #include <stdlib.h>
 #include <string.h>
 
-#ifndef FIX_UNUSED
-#define FIX_UNUSED(X) (void) (X) /* avoid warnings for unused params */
-#endif
-
-#include <getopt.h>
+#include "getopt.h"
 
 #include "cmdline.h"
 
   "  -U, --weight2                 Test dataset weights 2  (default=off)",
   "  -C, --comp_ranking            Compare two rankings (*.gscore files)  \n                                  (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)",
   "\nLimit Hub:",
   "  -y, --dabinput=filename       DAB input file  (default=`NA')",
   "\nConvert Aracne:",
   "  -K, --aracne_file=filename    Aracne .txt output file  (default=`NA')",
   "  -L, --output_dab_file=filename\n                                DAB file  (default=`NA')",
+  "\nConvert DAB to matrix:",
+  "  -f, --dab_file=filename       DAB file  (default=`NA')",
+  "  -m, --output_matrix=filename  Output matrix filename  (default=`NA')",
   "\nWeight:",
   "  -E, --dweight_dir=directory   Dataset weight directory  (default=`NA')",
   "  -n, --dweight_num=INT         Number of .dweight files  (default=`1000')",
 void clear_args (struct gengetopt_args_info *args_info);
 
 static int
-cmdline_parser_internal (int argc, char **argv, struct gengetopt_args_info *args_info,
+cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
                         struct cmdline_parser_params *params, const char *additional_error);
 
 
   args_info->weight2_given = 0 ;
   args_info->comp_ranking_given = 0 ;
   args_info->convert_aracne_given = 0 ;
+  args_info->convert_dab_given = 0 ;
   args_info->limit_hub_given = 0 ;
   args_info->dabinput_given = 0 ;
   args_info->hub_dab_output_given = 0 ;
   args_info->aracne_file_given = 0 ;
   args_info->output_dab_file_given = 0 ;
+  args_info->dab_file_given = 0 ;
+  args_info->output_matrix_given = 0 ;
   args_info->dweight_dir_given = 0 ;
   args_info->dweight_num_given = 0 ;
   args_info->dweight_map_given = 0 ;
 static
 void clear_args (struct gengetopt_args_info *args_info)
 {
-  FIX_UNUSED (args_info);
   args_info->databaselet_flag = 0;
   args_info->dataset_flag = 0;
   args_info->weight_flag = 0;
   args_info->weight2_flag = 0;
   args_info->comp_ranking_flag = 0;
   args_info->convert_aracne_flag = 0;
+  args_info->convert_dab_flag = 0;
   args_info->limit_hub_flag = 0;
   args_info->dabinput_arg = gengetopt_strdup ("NA");
   args_info->dabinput_orig = NULL;
   args_info->aracne_file_orig = NULL;
   args_info->output_dab_file_arg = gengetopt_strdup ("NA");
   args_info->output_dab_file_orig = NULL;
+  args_info->dab_file_arg = gengetopt_strdup ("NA");
+  args_info->dab_file_orig = NULL;
+  args_info->output_matrix_arg = gengetopt_strdup ("NA");
+  args_info->output_matrix_orig = NULL;
   args_info->dweight_dir_arg = gengetopt_strdup ("NA");
   args_info->dweight_dir_orig = NULL;
   args_info->dweight_num_arg = 1000;
   args_info->weight2_help = gengetopt_args_info_help[6] ;
   args_info->comp_ranking_help = gengetopt_args_info_help[7] ;
   args_info->convert_aracne_help = gengetopt_args_info_help[8] ;
-  args_info->limit_hub_help = gengetopt_args_info_help[9] ;
-  args_info->dabinput_help = gengetopt_args_info_help[11] ;
-  args_info->hub_dab_output_help = gengetopt_args_info_help[12] ;
-  args_info->aracne_file_help = gengetopt_args_info_help[14] ;
-  args_info->output_dab_file_help = gengetopt_args_info_help[15] ;
-  args_info->dweight_dir_help = gengetopt_args_info_help[17] ;
-  args_info->dweight_num_help = gengetopt_args_info_help[18] ;
-  args_info->dweight_map_help = gengetopt_args_info_help[19] ;
-  args_info->dweight_test_dir_help = gengetopt_args_info_help[20] ;
-  args_info->dweight_test_num_help = gengetopt_args_info_help[21] ;
-  args_info->gscore_dir1_help = gengetopt_args_info_help[23] ;
-  args_info->gscore_dir2_help = gengetopt_args_info_help[24] ;
-  args_info->gscore_num1_help = gengetopt_args_info_help[25] ;
-  args_info->order_stat_single_gene_query_help = gengetopt_args_info_help[27] ;
-  args_info->db_help = gengetopt_args_info_help[28] ;
-  args_info->dset_list_help = gengetopt_args_info_help[29] ;
-  args_info->input_help = gengetopt_args_info_help[30] ;
-  args_info->single_query_help = gengetopt_args_info_help[31] ;
-  args_info->dir_in_help = gengetopt_args_info_help[32] ;
-  args_info->dir_prep_in_help = gengetopt_args_info_help[33] ;
-  args_info->dir_gvar_in_help = gengetopt_args_info_help[34] ;
-  args_info->dir_sinfo_in_help = gengetopt_args_info_help[35] ;
-  args_info->is_nibble_help = gengetopt_args_info_help[36] ;
-  args_info->platform_dir_help = gengetopt_args_info_help[37] ;
-  args_info->gvar_cutoff_help = gengetopt_args_info_help[38] ;
-  args_info->multi_query_help = gengetopt_args_info_help[39] ;
-  args_info->output_file_help = gengetopt_args_info_help[40] ;
+  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] ;
   
 }
 
 void
 cmdline_parser_print_version (void)
 {
-  printf ("%s %s\n",
-     (strlen(CMDLINE_PARSER_PACKAGE_NAME) ? CMDLINE_PARSER_PACKAGE_NAME : CMDLINE_PARSER_PACKAGE),
-     CMDLINE_PARSER_VERSION);
+  printf ("%s %s\n", CMDLINE_PARSER_PACKAGE, CMDLINE_PARSER_VERSION);
 }
 
 static void print_help_common(void) {
   printf("\n");
 
   if (strlen(gengetopt_args_info_description) > 0)
-    printf("%s\n\n", gengetopt_args_info_description);
+    printf("%s\n", gengetopt_args_info_description);
 }
 
 void
   clear_args (args_info);
   init_args_info (args_info);
 
-  args_info->inputs = 0;
+  args_info->inputs = NULL;
   args_info->inputs_num = 0;
 }
 
   free_string_field (&(args_info->aracne_file_orig));
   free_string_field (&(args_info->output_dab_file_arg));
   free_string_field (&(args_info->output_dab_file_orig));
+  free_string_field (&(args_info->dab_file_arg));
+  free_string_field (&(args_info->dab_file_orig));
+  free_string_field (&(args_info->output_matrix_arg));
+  free_string_field (&(args_info->output_matrix_orig));
   free_string_field (&(args_info->dweight_dir_arg));
   free_string_field (&(args_info->dweight_dir_orig));
   free_string_field (&(args_info->dweight_num_orig));
 
 
 static void
-write_into_file(FILE *outfile, const char *opt, const char *arg, const char *values[])
+write_into_file(FILE *outfile, const char *opt, const char *arg, char *values[])
 {
-  FIX_UNUSED (values);
   if (arg) {
     fprintf(outfile, "%s=\"%s\"\n", opt, arg);
   } else {
     write_into_file(outfile, "comp_ranking", 0, 0 );
   if (args_info->convert_aracne_given)
     write_into_file(outfile, "convert_aracne", 0, 0 );
+  if (args_info->convert_dab_given)
+    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->dabinput_given)
     write_into_file(outfile, "aracne_file", args_info->aracne_file_orig, 0);
   if (args_info->output_dab_file_given)
     write_into_file(outfile, "output_dab_file", args_info->output_dab_file_orig, 0);
+  if (args_info->dab_file_given)
+    write_into_file(outfile, "dab_file", args_info->dab_file_orig, 0);
+  if (args_info->output_matrix_given)
+    write_into_file(outfile, "output_matrix", args_info->output_matrix_orig, 0);
   if (args_info->dweight_dir_given)
     write_into_file(outfile, "dweight_dir", args_info->dweight_dir_orig, 0);
   if (args_info->dweight_num_given)
 char *
 gengetopt_strdup (const char *s)
 {
-  char *result = 0;
+  char *result = NULL;
   if (!s)
     return result;
 
 }
 
 int
-cmdline_parser (int argc, char **argv, struct gengetopt_args_info *args_info)
+cmdline_parser (int argc, char * const *argv, struct gengetopt_args_info *args_info)
 {
   return cmdline_parser2 (argc, argv, args_info, 0, 1, 1);
 }
 
 int
-cmdline_parser_ext (int argc, char **argv, struct gengetopt_args_info *args_info,
+cmdline_parser_ext (int argc, char * const *argv, struct gengetopt_args_info *args_info,
                    struct cmdline_parser_params *params)
 {
   int result;
-  result = cmdline_parser_internal (argc, argv, args_info, params, 0);
+  result = cmdline_parser_internal (argc, argv, args_info, params, NULL);
 
   return result;
 }
 
 int
-cmdline_parser2 (int argc, char **argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
+cmdline_parser2 (int argc, char * const *argv, struct gengetopt_args_info *args_info, int override, int initialize, int check_required)
 {
   int result;
   struct cmdline_parser_params params;
   params.check_ambiguity = 0;
   params.print_errors = 1;
 
-  result = cmdline_parser_internal (argc, argv, args_info, &params, 0);
+  result = cmdline_parser_internal (argc, argv, args_info, &params, NULL);
 
   return result;
 }
 int
 cmdline_parser_required (struct gengetopt_args_info *args_info, const char *prog_name)
 {
-  FIX_UNUSED (args_info);
-  FIX_UNUSED (prog_name);
   return EXIT_SUCCESS;
 }
 
 static
 int update_arg(void *field, char **orig_field,
                unsigned int *field_given, unsigned int *prev_given, 
-               char *value, const char *possible_values[],
-               const char *default_value,
+               char *value, char *possible_values[], const char *default_value,
                cmdline_parser_arg_type arg_type,
                int check_ambiguity, int override,
                int no_free, int multiple_option,
   const char *val = value;
   int found;
   char **string_field;
-  FIX_UNUSED (field);
 
   stop_char = 0;
   found = 0;
       return 1; /* failure */
     }
 
-  FIX_UNUSED (default_value);
     
   if (field_given && *field_given && ! override)
     return 0;
 
 
 int
-cmdline_parser_internal (
-  int argc, char **argv, struct gengetopt_args_info *args_info,
+cmdline_parser_internal (int argc, char * const *argv, struct gengetopt_args_info *args_info,
                         struct cmdline_parser_params *params, const char *additional_error)
 {
   int c;	/* Character of the parsed option.  */
         { "weight2",	0, NULL, 'U' },
         { "comp_ranking",	0, NULL, 'C' },
         { "convert_aracne",	0, NULL, 'J' },
+        { "convert_dab",	0, NULL, 'k' },
         { "limit_hub",	0, NULL, 'Y' },
         { "dabinput",	1, NULL, 'y' },
         { "hub_dab_output",	1, NULL, 'Z' },
         { "aracne_file",	1, NULL, 'K' },
         { "output_dab_file",	1, NULL, 'L' },
+        { "dab_file",	1, NULL, 'f' },
+        { "output_matrix",	1, NULL, 'm' },
         { "dweight_dir",	1, NULL, 'E' },
         { "dweight_num",	1, NULL, 'n' },
         { "dweight_map",	1, NULL, 'M' },
         { "gvar_cutoff",	1, NULL, 'v' },
         { "multi_query",	1, NULL, 'Q' },
         { "output_file",	1, NULL, 'o' },
-        { 0,  0, 0, 0 }
+        { NULL,	0, NULL, 0 }
       };
 
-      c = getopt_long (argc, argv, "VDAWUCJYy:Z:K:L: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, "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);
 
       if (c == -1) break;	/* Exit from `while (1)' loop.  */
 
             goto failure;
         
           break;
+        case 'k':	/* Convert DAB to matrix.  */
+        
+        
+          if (update_arg((void *)&(args_info->convert_dab_flag), 0, &(args_info->convert_dab_given),
+              &(local_args_info.convert_dab_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "convert_dab", 'k',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'Y':	/* Limit genes in the DAB to those that are hubby.  */
         
         
             goto failure;
         
           break;
+        case 'f':	/* DAB file.  */
+        
+        
+          if (update_arg( (void *)&(args_info->dab_file_arg), 
+               &(args_info->dab_file_orig), &(args_info->dab_file_given),
+              &(local_args_info.dab_file_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "dab_file", 'f',
+              additional_error))
+            goto failure;
+        
+          break;
+        case 'm':	/* Output matrix filename.  */
+        
+        
+          if (update_arg( (void *)&(args_info->output_matrix_arg), 
+               &(args_info->output_matrix_orig), &(args_info->output_matrix_given),
+              &(local_args_info.output_matrix_given), optarg, 0, "NA", ARG_STRING,
+              check_ambiguity, override, 0, 0,
+              "output_matrix", 'm',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'E':	/* Dataset weight directory.  */
         
         

tools/SeekReader/cmdline.h

 /** @file cmdline.h
  *  @brief The header file for the command line option parser
- *  generated by GNU Gengetopt version 2.22.5
+ *  generated by GNU Gengetopt version 2.22
  *  http://www.gnu.org/software/gengetopt.
  *  DO NOT modify this file, since it can be overwritten
  *  @author GNU Gengetopt by Lorenzo Bettini */
 #endif /* __cplusplus */
 
 #ifndef CMDLINE_PARSER_PACKAGE
-/** @brief the program name (used for printing errors) */
+/** @brief the program name */
 #define CMDLINE_PARSER_PACKAGE "SeekReader"
 #endif
 
-#ifndef CMDLINE_PARSER_PACKAGE_NAME
-/** @brief the complete program name (used for help and version) */
-#define CMDLINE_PARSER_PACKAGE_NAME "SeekReader"
-#endif
-
 #ifndef CMDLINE_PARSER_VERSION
 /** @brief the program version */
 #define CMDLINE_PARSER_VERSION "1.0"
   const char *comp_ranking_help; /**< @brief Compare two rankings (*.gscore files) help description.  */
   int convert_aracne_flag;	/**< @brief Convert Aracne output (.txt) to DAB file (default=off).  */
   const char *convert_aracne_help; /**< @brief Convert Aracne output (.txt) to DAB file help description.  */
+  int convert_dab_flag;	/**< @brief Convert DAB to matrix (default=off).  */
+  const char *convert_dab_help; /**< @brief Convert DAB to matrix help description.  */
   int limit_hub_flag;	/**< @brief Limit genes in the DAB to those that are hubby (default=off).  */
   const char *limit_hub_help; /**< @brief Limit genes in the DAB to those that are hubby help description.  */
   char * dabinput_arg;	/**< @brief DAB input file (default='NA').  */
   char * output_dab_file_arg;	/**< @brief DAB file (default='NA').  */
   char * output_dab_file_orig;	/**< @brief DAB file original value given at command line.  */
   const char *output_dab_file_help; /**< @brief DAB file help description.  */
+  char * dab_file_arg;	/**< @brief DAB file (default='NA').  */
+  char * dab_file_orig;	/**< @brief DAB file original value given at command line.  */
+  const char *dab_file_help; /**< @brief DAB file help description.  */
+  char * output_matrix_arg;	/**< @brief Output matrix filename (default='NA').  */
+  char * output_matrix_orig;	/**< @brief Output matrix filename original value given at command line.  */
+  const char *output_matrix_help; /**< @brief Output matrix filename help description.  */
   char * dweight_dir_arg;	/**< @brief Dataset weight directory (default='NA').  */
   char * dweight_dir_orig;	/**< @brief Dataset weight directory original value given at command line.  */
   const char *dweight_dir_help; /**< @brief Dataset weight directory help description.  */
   unsigned int weight2_given ;	/**< @brief Whether weight2 was given.  */
   unsigned int comp_ranking_given ;	/**< @brief Whether comp_ranking was given.  */
   unsigned int convert_aracne_given ;	/**< @brief Whether convert_aracne was given.  */
+  unsigned int convert_dab_given ;	/**< @brief Whether convert_dab was given.  */
   unsigned int limit_hub_given ;	/**< @brief Whether limit_hub was given.  */
   unsigned int dabinput_given ;	/**< @brief Whether dabinput was given.  */
   unsigned int hub_dab_output_given ;	/**< @brief Whether hub_dab_output was given.  */
   unsigned int aracne_file_given ;	/**< @brief Whether aracne_file was given.  */
   unsigned int output_dab_file_given ;	/**< @brief Whether output_dab_file was given.  */
+  unsigned int dab_file_given ;	/**< @brief Whether dab_file was given.  */
+  unsigned int output_matrix_given ;	/**< @brief Whether output_matrix was given.  */
   unsigned int dweight_dir_given ;	/**< @brief Whether dweight_dir was given.  */
   unsigned int dweight_num_given ;	/**< @brief Whether dweight_num was given.  */
   unsigned int dweight_map_given ;	/**< @brief Whether dweight_map was given.  */
  * @param args_info the structure where option information will be stored
  * @return 0 if everything went fine, NON 0 if an error took place
  */
-int cmdline_parser (int argc, char **argv,
+int cmdline_parser (int argc, char * const *argv,
   struct gengetopt_args_info *args_info);
 
 /**
  * @return 0 if everything went fine, NON 0 if an error took place
  * @deprecated use cmdline_parser_ext() instead
  */
-int cmdline_parser2 (int argc, char **argv,
+int cmdline_parser2 (int argc, char * const *argv,
   struct gengetopt_args_info *args_info,
   int override, int initialize, int check_required);
 
  * @param params additional parameters for the parser
  * @return 0 if everything went fine, NON 0 if an error took place
  */
-int cmdline_parser_ext (int argc, char **argv,
+int cmdline_parser_ext (int argc, char * const *argv,
   struct gengetopt_args_info *args_info,
   struct cmdline_parser_params *params);
 

tools/SeekReader/stdafx.h

 #include "seekbasic.h"
 #include "seekmap.h"
 #include "seekreader.h"
+#include "seekwriter.h"
 #include "sparsematrix.h"
 #include "meta.h"
 using namespace Sleipnir;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.