Commits

Lance Parsons committed 2e635bb

Merged Harvard changeset 445 by Curtis Huttenhower: Add absolute value criterion to CDat filtering and Dat2Graph

Comments (0)

Files changed (15)

  * gold standards.
  */
 void CDat::FilterGenes( const CGenes& Genes, EFilter eFilter, size_t iLimit, float dEdgeAggressiveness,
-	const vector<float>* pvecdWeights ) {
+	bool fAbsolute, const vector<float>* pvecdWeights ) {
 	size_t			i, j;
 	vector<bool>	vecfGenes;
 	vecfGenes.resize( GetGenes( ) );
 	switch( eFilter ) {
 		case EFilterPixie:
 		case EFilterHefalmp:
-			FilterGenesGraph( Genes, vecfGenes, iLimit, dEdgeAggressiveness, eFilter == EFilterHefalmp, pvecdWeights );
+			FilterGenesGraph( Genes, vecfGenes, iLimit, dEdgeAggressiveness, eFilter == EFilterHefalmp, fAbsolute, pvecdWeights );
 			return; }
 
 	for( i = 0; i < GetGenes( ); ++i ) {
 };
 
 void CDatImpl::FilterGenesGraph( const CGenes& Genes, vector<bool>& vecfGenes, size_t iLimit,
-	float dEdgeAggressiveness, bool fHefalmp, const vector<float>* pvecdWeights ) {
+	float dEdgeAggressiveness, bool fHefalmp, bool fAbsolute, const vector<float>* pvecdWeights ) {
 	vector<float>				vecdNeighbors, vecdWeights;
 	size_t						i, j, iOne, iTwo, iMinOne, iMinTwo, iN;
 	vector<size_t>				veciGenes, veciFinal, veciDegree;
 				if( ( iOne = veciGenes[ j ] ) == -1 )
 					continue;
 				if( !CMeta::IsNaN( d = Get( i, iOne ) ) ) {
+					if( fAbsolute )
+						d = fabs( d );
 					iIn++;
 					dIn += d * (*pvecdWeights)[ j ]; } }
 			for( iOut = j = 0; j < GetGenes( ); ++j )
 				if( !CMeta::IsNaN( d = Get( i, j ) ) ) {
+					if( fAbsolute )
+						d = fabs( d );
 					iOut++;
 					dOut += d; }
 			vecdNeighbors[ i ] = ( iIn && dOut ) ? ( dIn * iOut / iIn / dOut ) : 0; }
 			for( j = 0; j < GetGenes( ); ++j ) {
 				if( vecfGenes[ j ] )
 					continue;
-				if( !CMeta::IsNaN( d = Get( iOne, j ) ) )
-					vecdNeighbors[ j ] += d * (*pvecdWeights)[ i ]; } }
+				if( !CMeta::IsNaN( d = Get( iOne, j ) ) ) {
+					if( fAbsolute )
+						d = fabs( d );
+					vecdNeighbors[ j ] += d * (*pvecdWeights)[ i ]; } } }
 	for( i = 0; i < vecdNeighbors.size( ); ++i )
 		if( ( d = vecdNeighbors[ i ] ) > 0 )
 			pqueNeighbors.push( SPixie( i, d ) );
 	void Rank( );
 	bool FilterGenes( const char* szGenes, EFilter eFilter, size_t iLimit = -1 );
 	void FilterGenes( const CGenes& Genes, EFilter eFilter, size_t iLimit = -1,
-		float dEdgeAggressiveness = 0.5, const std::vector<float>* pvecdWeights = NULL );
++ 		float dEdgeAggressiveness = 0.5, bool fAbsolute = false, const std::vector<float>* pvecdWeights = NULL );
 	void NormalizeQuantiles( size_t iQuantiles );
 
 	void Clear( float dValue ) {
 	void OpenHelper( const CGenes*, const CGenes*, float );
 	bool OpenHelper( );
 	bool OpenMemmap( const unsigned char* );
-	void FilterGenesGraph( const CGenes&, std::vector<bool>&, size_t, float, bool, const std::vector<float>* );
+	void FilterGenesGraph( const CGenes&, std::vector<bool>&, size_t, float, bool, bool, const std::vector<float>* );
 
 	float& Get( size_t iX, size_t iY ) const {
 		static float	s_dRet;
 	return dRet;
 }
 
+double CMeasureDice::Measure( const float* adX, size_t iM, const float* adY,
+	size_t iN, EMap eMap, const float* adWX, const float* adWY ) const {
+	double	dDot, dXY, dYX, dX, dY;
+	size_t	i;
+
+	dDot = dXY = dYX = 0;
+	for( i = 0; i < min(iM, iN); ++i ) {
+		if( CMeta::IsNaN( dX = adX[i] ) || CMeta::IsNaN( dY = adY[i] ) )
+			continue;
+		dX *= GetWeight( adWX, i );
+		dY *= GetWeight( adWY, i );
+		dDot += dX * dY;
+		dXY += pow( max(0.0, dX - dY), 2 );
+		dYX += pow( max(0.0, dY - dX), 2 ); }
+	dX = dDot + ( m_dAlpha * dXY ) + ( ( 1 - m_dAlpha ) * dYX );
+	return ( dX ? ( dDot / dX ) : CMeta::GetNaN( ) ); }
+
 }
 		return new CMeasurePearsonSignificance( ); }
 };
 
+/*!
+ * \brief
+ * Calculates the continuous of Dice coefficient between two vectors, dot(x, y) /
+ * ( dot(x, y) + a*||x-y|| + (1-a)*||y-x|| ).
+ */
+class CMeasureDice : public IMeasure {
+public:
+	CMeasureDice( float dAlpha = 0.5 ) : m_dAlpha(dAlpha) { }
+
+	double Measure( const float* adX, size_t iN, const float* adY, size_t iM, EMap eMap = EMapCenter,
+		const float* adWX = NULL, const float* adWY = NULL ) const;
+
+	const char* GetName( ) const {
+
+		return "dice"; }
+
+	bool IsRank( ) const {
+
+		return false; }
+
+	IMeasure* Clone( ) const {
+
+		return new CMeasureDice( ); }
+
+private:
+	float	m_dAlpha;
+};
+
 }
 
 #endif // MEASURE_H
 		const char* szSimilarityMeasure, bool fNormalize, bool fZScore,
 		bool fAutocorrelate, const char* szGeneFile, float dCutoff,
 		size_t iLimit, CPCL& PCL, CDat& Dat, IMeasure::EMap eMap,
-		bool fFrequencyWeight) {
+		bool fFrequencyWeight, float dAlpha) {
 	size_t i, j, iOne, iTwo;
 	float d;
 	ifstream ifsm;
 	CMeasureMutualInformation MutualInfo;
 	CMeasureRelativeAUC RelAuc;
 	CMeasurePearsonSignificance PearSig;
+	CMeasureDice Dice( dAlpha );
 
 	if (szFile) {
 		ifsm.open(szFile);
 			EuclideanSig(&Euclidean, false, 1.0f / PCL.GetExperiments());
 	IMeasure* apMeasures[] = { &Pearson, &EuclideanSig, &KendallsTau,
 			&KolmSmir, &Spearman, &PearNorm, &Hypergeom, &PearQuick,
-			&InnerProd, &BinInnerProd, &MutualInfo, &RelAuc, &PearSig, NULL };
+			&InnerProd, &BinInnerProd, &MutualInfo, &RelAuc, &PearSig, &Dice, NULL };
 
 	pMeasure = NULL;
 	for (i = 0; apMeasures[i]; ++i)
 			const char* szSimilarityMeasure, bool fNormalize, bool fZScore,
 			bool fAutocorrelate, const char* szGeneFile, float dCutoff,
 			size_t iLimit, CPCL& PCL, CDat& Dat, IMeasure::EMap eMap =
-					IMeasure::EMapCenter, bool fFrequencyWeight = false);
+					IMeasure::EMapCenter, bool fFrequencyWeight = false, float dAlpha = 0);
 
 	/*!
 	 * \brief

tools/Dat2Graph/Dat2Graph.cpp

 					if( ( j = pDat->GetGene( GenesQr.GetGene( i ).GetName( ) ) ) != -1 )
 						vecdColors[ j ] = 1; }
 			pDat->FilterGenes( GenesQr, sArgs.hefalmp_flag ? CDat::EFilterHefalmp : CDat::EFilterPixie,
-				sArgs.neighbors_arg, (float)sArgs.edges_arg, vecdWeights.empty( ) ? NULL : &vecdWeights ); } }
+				sArgs.neighbors_arg, (float)sArgs.edges_arg, !!sArgs.absolute_flag,
+				vecdWeights.empty( ) ? NULL : &vecdWeights ); } }
 	if( sArgs.knowns_arg ) {
 		CDat			DatKnowns;
 		vector<size_t>	veciKnowns;

tools/Dat2Graph/Dat2Graph.ggo

-package	"Dat2Graph"
-version	"1.0"
-purpose	"Text/binary data file graph output"
-
-section "Main"
-option	"input"		i	"Input DAT/DAB file"
-						string	typestr="filename"
-option	"format"	t	"Output graph format"
-						values="dot","gdf","net","matisse","list","dat","correl"	default="dot"
-
-section "Graph Queries"
-option	"geneq"		q	"Query inclusion file"
-						string	typestr="filename"
-option	"genew"		Q	"Query weights file"
-						string	typestr="filename"
-option	"neighbors"	k	"Size of query neighborhood"
-						int	default="-1"
-option	"hefalmp"	a	"Perform HEFalMp query instead of bioPIXIE query"
-						flag	on
-option	"edges"		d	"Aggressiveness of edge trimming after query"
-						double	default="1"
-option	"hubs"		H	"Number of neighbors to query hubs"
-						int	default="-1"
-
-section "Filtering"
-option	"cutoff"	e	"Minimum edge weight for output"
-						double
-option	"genes"		g	"Gene inclusion file"
-						string	typestr="filename"
-option	"genex"		G	"Gene exclusion file"
-						string	typestr="filename"
-option	"knowns"	w	"Known interactions (DAT/DAB) to ignore"
-						string	typestr="filename"
-
-section "Annotation"
-option	"features"	f	"SGD gene features"
-						string	typestr="filename"
-option	"colors"	l	"Colors for graph nodes"
-						string	typestr="filename"
-option	"borders"	b	"Borders for graph nodes"
-						string	typestr="filename"
-
-section "Optional"
-option	"normalize"	n	"Normalize edge weights before processing"
-						flag	off
-option	"memmap"	m	"Memory map input file"
-						flag	off
-option	"config"	c	"Command line config file"
-						string	typestr="filename"	default="Dat2Graph.ini"
-option	"verbosity"	v	"Message verbosity"
-						int	default="5"
+package	"Dat2Graph"
+version	"1.0"
+purpose	"Text/binary data file graph output"
+
+section "Main"
+option	"input"		i	"Input DAT/DAB file"
+						string	typestr="filename"
+option	"format"	t	"Output graph format"
+						values="dot","gdf","net","matisse","list","dat","correl"	default="dot"
+
+section "Graph Queries"
+option	"geneq"		q	"Query inclusion file"
+						string	typestr="filename"
+option	"genew"		Q	"Query weights file"
+						string	typestr="filename"
+option	"neighbors"	k	"Size of query neighborhood"
+						int	default="-1"
+option	"hefalmp"	a	"Perform HEFalMp query instead of bioPIXIE query"
+						flag	on
+option	"edges"		d	"Aggressiveness of edge trimming after query"
+						double	default="1"
+option	"hubs"		H	"Number of neighbors to query hubs"
+						int	default="-1"
+
+section "Filtering"
+option	"cutoff"	e	"Minimum edge weight for output"
+						double
+option	"genes"		g	"Gene inclusion file"
+						string	typestr="filename"
+option	"genex"		G	"Gene exclusion file"
+						string	typestr="filename"
+option	"knowns"	w	"Known interactions (DAT/DAB) to ignore"
+						string	typestr="filename"
+
+section "Annotation"
+option	"features"	f	"SGD gene features"
+						string	typestr="filename"
+option	"colors"	l	"Colors for graph nodes"
+						string	typestr="filename"
+option	"borders"	b	"Borders for graph nodes"
+						string	typestr="filename"
+
+section "Optional"
+option	"normalize"	n	"Normalize edge weights before processing"
+						flag	off
+option	"absolute"	A	"Use absolute value of edge weights"
+						flag	off
+option	"memmap"	m	"Memory map input file"
+						flag	off
+option	"config"	c	"Command line config file"
+						string	typestr="filename"	default="Dat2Graph.ini"
+option	"verbosity"	v	"Message verbosity"
+						int	default="5"

tools/Dat2Graph/cmdline.c

   "  -b, --borders=filename   Borders for graph nodes",
   "\nOptional:",
   "  -n, --normalize          Normalize edge weights before processing  \n                             (default=off)",
+  "  -A, --absolute           Use absolute value of edge weights  (default=off)",
   "  -m, --memmap             Memory map input file  (default=off)",
   "  -c, --config=filename    Command line config file  (default=`Dat2Graph.ini')",
   "  -v, --verbosity=INT      Message verbosity  (default=`5')",
   args_info->colors_given = 0 ;
   args_info->borders_given = 0 ;
   args_info->normalize_given = 0 ;
+  args_info->absolute_given = 0 ;
   args_info->memmap_given = 0 ;
   args_info->config_given = 0 ;
   args_info->verbosity_given = 0 ;
   args_info->borders_arg = NULL;
   args_info->borders_orig = NULL;
   args_info->normalize_flag = 0;
+  args_info->absolute_flag = 0;
   args_info->memmap_flag = 0;
   args_info->config_arg = gengetopt_strdup ("Dat2Graph.ini");
   args_info->config_orig = NULL;
   args_info->colors_help = gengetopt_args_info_help[19] ;
   args_info->borders_help = gengetopt_args_info_help[20] ;
   args_info->normalize_help = gengetopt_args_info_help[22] ;
-  args_info->memmap_help = gengetopt_args_info_help[23] ;
-  args_info->config_help = gengetopt_args_info_help[24] ;
-  args_info->verbosity_help = gengetopt_args_info_help[25] ;
+  args_info->absolute_help = gengetopt_args_info_help[23] ;
+  args_info->memmap_help = gengetopt_args_info_help[24] ;
+  args_info->config_help = gengetopt_args_info_help[25] ;
+  args_info->verbosity_help = gengetopt_args_info_help[26] ;
   
 }
 
     write_into_file(outfile, "borders", args_info->borders_orig, 0);
   if (args_info->normalize_given)
     write_into_file(outfile, "normalize", 0, 0 );
+  if (args_info->absolute_given)
+    write_into_file(outfile, "absolute", 0, 0 );
   if (args_info->memmap_given)
     write_into_file(outfile, "memmap", 0, 0 );
   if (args_info->config_given)
         { "colors",	1, NULL, 'l' },
         { "borders",	1, NULL, 'b' },
         { "normalize",	0, NULL, 'n' },
+        { "absolute",	0, NULL, 'A' },
         { "memmap",	0, NULL, 'm' },
         { "config",	1, NULL, 'c' },
         { "verbosity",	1, NULL, 'v' },
         { NULL,	0, NULL, 0 }
       };
 
-      c = getopt_long (argc, argv, "hVi:t:q:Q:k:ad:H:e:g:G:w:f:l:b:nmc:v:", long_options, &option_index);
+      c = getopt_long (argc, argv, "hVi:t:q:Q:k:ad:H:e:g:G:w:f:l:b:nAmc:v:", long_options, &option_index);
 
       if (c == -1) break;	/* Exit from `while (1)' loop.  */
 
             goto failure;
         
           break;
+        case 'A':	/* Use absolute value of edge weights.  */
+        
+        
+          if (update_arg((void *)&(args_info->absolute_flag), 0, &(args_info->absolute_given),
+              &(local_args_info.absolute_given), optarg, 0, 0, ARG_FLAG,
+              check_ambiguity, override, 1, 0, "absolute", 'A',
+              additional_error))
+            goto failure;
+        
+          break;
         case 'm':	/* Memory map input file.  */
         
         

tools/Dat2Graph/cmdline.h

   const char *borders_help; /**< @brief Borders for graph nodes help description.  */
   int normalize_flag;	/**< @brief Normalize edge weights before processing (default=off).  */
   const char *normalize_help; /**< @brief Normalize edge weights before processing help description.  */
+  int absolute_flag;	/**< @brief Use absolute value of edge weights (default=off).  */
+  const char *absolute_help; /**< @brief Use absolute value of edge weights help description.  */
   int memmap_flag;	/**< @brief Memory map input file (default=off).  */
   const char *memmap_help; /**< @brief Memory map input file help description.  */
   char * config_arg;	/**< @brief Command line config file (default='Dat2Graph.ini').  */
   unsigned int colors_given ;	/**< @brief Whether colors was given.  */
   unsigned int borders_given ;	/**< @brief Whether borders was given.  */
   unsigned int normalize_given ;	/**< @brief Whether normalize was given.  */
+  unsigned int absolute_given ;	/**< @brief Whether absolute was given.  */
   unsigned int memmap_given ;	/**< @brief Whether memmap was given.  */
   unsigned int config_given ;	/**< @brief Whether config was given.  */
   unsigned int verbosity_given ;	/**< @brief Whether verbosity was given.  */

tools/Distancer/Distancer.cpp

 
 	if( iRet = CPCL::Distance( sArgs.input_arg, sArgs.skip_arg, sArgs.distance_arg, !!sArgs.normalize_flag,
 		!!sArgs.zscore_flag, !!sArgs.autocorrelate_flag, sArgs.genes_arg, sArgs.cutoff_given ?
-		(float)sArgs.cutoff_arg : CMeta::GetNaN( ), sArgs.limit_arg, PCL, Dat, IMeasure::EMapCenter, !!sArgs.freqweight_flag ) ) {
+		(float)sArgs.cutoff_arg : CMeta::GetNaN( ), sArgs.limit_arg, PCL, Dat, IMeasure::EMapCenter,
+		!!sArgs.freqweight_flag, sArgs.alpha_arg ) ) {
 		cmdline_parser_print_help( );
 		return iRet; }
 	if( sArgs.flip_flag )

tools/Distancer/Distancer.ggo

 option	"distance"		d	"Similarity measure"
 							values="pearson","euclidean","kendalls","kolm-smir","spearman",
 							"pearnorm","hypergeom","innerprod","bininnerprod","quickpear",
-							"mutinfo","relauc","pearsig"	default="pearnorm"
+							"mutinfo","relauc","pearsig","dice"	default="pearnorm"
 
 section "Miscellaneous"
 option	"weights"		w	"Input weights file"
 							double
 
 section "Optional"
+option	"alpha"			A	"Alpha parameter for similarity measure"
+							float	default="0"
 option	"skip"			s	"Columns to skip in input PCL"
 							int	default="2"
 option	"limit"			l	"Gene count limit for caching"

tools/Distancer/cmdline.c

   "\nMain:",
   "  -i, --input=filename    Input PCL file",
   "  -o, --output=filename   Output DAT/DAB file",
-  "  -d, --distance=STRING   Similarity measure  (possible values=\"pearson\", \n                            \"euclidean\", \"kendalls\", \"kolm-smir\", \n                            \"spearman\", \"pearnorm\", \"hypergeom\", \n                            \"innerprod\", \"bininnerprod\", \"quickpear\", \n                            \"mutinfo\", \"relauc\", \"pearsig\" \n                            default=`pearnorm')",
+  "  -d, --distance=STRING   Similarity measure  (possible values=\"pearson\", \n                            \"euclidean\", \"kendalls\", \"kolm-smir\", \n                            \"spearman\", \"pearnorm\", \"hypergeom\", \n                            \"innerprod\", \"bininnerprod\", \"quickpear\", \n                            \"mutinfo\", \"relauc\", \"pearsig\", \"dice\" \n                            default=`pearnorm')",
   "\nMiscellaneous:",
   "  -w, --weights=filename  Input weights file",
   "  -a, --autocorrelate     Autocorrelate distances  (default=off)",
   "  -g, --genes=filename    Gene inclusion file",
   "  -e, --cutoff=DOUBLE     Remove scores below cutoff",
   "\nOptional:",
+  "  -A, --alpha=FLOAT       Alpha parameter for similarity measure  (default=`0')",
   "  -s, --skip=INT          Columns to skip in input PCL  (default=`2')",
   "  -l, --limit=INT         Gene count limit for caching  (default=`-1')",
   "  -v, --verbosity=INT     Message verbosity  (default=`5')",
   , ARG_FLAG
   , ARG_STRING
   , ARG_INT
+  , ARG_FLOAT
   , ARG_DOUBLE
 } cmdline_parser_arg_type;
 
                         struct cmdline_parser_params *params, const char *additional_error);
 
 
-char *cmdline_parser_distance_values[] = {"pearson", "euclidean", "kendalls", "kolm-smir", "spearman", "pearnorm", "hypergeom", "innerprod", "bininnerprod", "quickpear", "mutinfo", "relauc", "pearsig", 0} ;	/* Possible values for distance.  */
+char *cmdline_parser_distance_values[] = {"pearson", "euclidean", "kendalls", "kolm-smir", "spearman", "pearnorm", "hypergeom", "innerprod", "bininnerprod", "quickpear", "mutinfo", "relauc", "pearsig", "dice", 0} ;	/* Possible values for distance.  */
 
 static char *
 gengetopt_strdup (const char *s);
   args_info->flip_given = 0 ;
   args_info->genes_given = 0 ;
   args_info->cutoff_given = 0 ;
+  args_info->alpha_given = 0 ;
   args_info->skip_given = 0 ;
   args_info->limit_given = 0 ;
   args_info->verbosity_given = 0 ;
   args_info->genes_arg = NULL;
   args_info->genes_orig = NULL;
   args_info->cutoff_orig = NULL;
+  args_info->alpha_arg = 0;
+  args_info->alpha_orig = NULL;
   args_info->skip_arg = 2;
   args_info->skip_orig = NULL;
   args_info->limit_arg = -1;
   args_info->flip_help = gengetopt_args_info_help[13] ;
   args_info->genes_help = gengetopt_args_info_help[15] ;
   args_info->cutoff_help = gengetopt_args_info_help[16] ;
-  args_info->skip_help = gengetopt_args_info_help[18] ;
-  args_info->limit_help = gengetopt_args_info_help[19] ;
-  args_info->verbosity_help = gengetopt_args_info_help[20] ;
+  args_info->alpha_help = gengetopt_args_info_help[18] ;
+  args_info->skip_help = gengetopt_args_info_help[19] ;
+  args_info->limit_help = gengetopt_args_info_help[20] ;
+  args_info->verbosity_help = gengetopt_args_info_help[21] ;
   
 }
 
   free_string_field (&(args_info->genes_arg));
   free_string_field (&(args_info->genes_orig));
   free_string_field (&(args_info->cutoff_orig));
+  free_string_field (&(args_info->alpha_orig));
   free_string_field (&(args_info->skip_orig));
   free_string_field (&(args_info->limit_orig));
   free_string_field (&(args_info->verbosity_orig));
     write_into_file(outfile, "genes", args_info->genes_orig, 0);
   if (args_info->cutoff_given)
     write_into_file(outfile, "cutoff", args_info->cutoff_orig, 0);
+  if (args_info->alpha_given)
+    write_into_file(outfile, "alpha", args_info->alpha_orig, 0);
   if (args_info->skip_given)
     write_into_file(outfile, "skip", args_info->skip_orig, 0);
   if (args_info->limit_given)
   case ARG_INT:
     if (val) *((int *)field) = strtol (val, &stop_char, 0);
     break;
+  case ARG_FLOAT:
+    if (val) *((float *)field) = (float)strtod (val, &stop_char);
+    break;
   case ARG_DOUBLE:
     if (val) *((double *)field) = strtod (val, &stop_char);
     break;
   /* check numeric conversion */
   switch(arg_type) {
   case ARG_INT:
+  case ARG_FLOAT:
   case ARG_DOUBLE:
     if (val && !(stop_char && *stop_char == '\0')) {
       fprintf(stderr, "%s: invalid numeric value: %s\n", package_name, val);
         { "flip",	0, NULL, 'f' },
         { "genes",	1, NULL, 'g' },
         { "cutoff",	1, NULL, 'e' },
+        { "alpha",	1, NULL, 'A' },
         { "skip",	1, NULL, 's' },
         { "limit",	1, NULL, 'l' },
         { "verbosity",	1, NULL, 'v' },
         { NULL,	0, NULL, 0 }
       };
 
-      c = getopt_long (argc, argv, "hVi:o:d:w:aqnzfg:e:s:l:v:", long_options, &option_index);
+      c = getopt_long (argc, argv, "hVi:o:d:w:aqnzfg:e:A:s:l:v:", long_options, &option_index);
 
       if (c == -1) break;	/* Exit from `while (1)' loop.  */
 
             goto failure;
         
           break;
+        case 'A':	/* Alpha parameter for similarity measure.  */
+        
+        
+          if (update_arg( (void *)&(args_info->alpha_arg), 
+               &(args_info->alpha_orig), &(args_info->alpha_given),
+              &(local_args_info.alpha_given), optarg, 0, "0", ARG_FLOAT,
+              check_ambiguity, override, 0, 0,
+              "alpha", 'A',
+              additional_error))
+            goto failure;
+        
+          break;
         case 's':	/* Columns to skip in input PCL.  */
         
         

tools/Distancer/cmdline.h

   double cutoff_arg;	/**< @brief Remove scores below cutoff.  */
   char * cutoff_orig;	/**< @brief Remove scores below cutoff original value given at command line.  */
   const char *cutoff_help; /**< @brief Remove scores below cutoff help description.  */
+  float alpha_arg;	/**< @brief Alpha parameter for similarity measure (default='0').  */
+  char * alpha_orig;	/**< @brief Alpha parameter for similarity measure original value given at command line.  */
+  const char *alpha_help; /**< @brief Alpha parameter for similarity measure help description.  */
   int skip_arg;	/**< @brief Columns to skip in input PCL (default='2').  */
   char * skip_orig;	/**< @brief Columns to skip in input PCL original value given at command line.  */
   const char *skip_help; /**< @brief Columns to skip in input PCL help description.  */
   unsigned int flip_given ;	/**< @brief Whether flip was given.  */
   unsigned int genes_given ;	/**< @brief Whether genes was given.  */
   unsigned int cutoff_given ;	/**< @brief Whether cutoff was given.  */
+  unsigned int alpha_given ;	/**< @brief Whether alpha was given.  */
   unsigned int skip_given ;	/**< @brief Whether skip was given.  */
   unsigned int limit_given ;	/**< @brief Whether limit was given.  */
   unsigned int verbosity_given ;	/**< @brief Whether verbosity was given.  */
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.