Added command line options for:
a. 'salt method' like "-m 1" or "-m 2" here 1 is for SANTALUCIA and 2 is for OWCZARZY b. 'salt concentration' "-a 0.01" valid range is from 0.01 to 0.3. if not specified then we use default 0.05 git-svn-id: https://www.grenoble.prabi.fr/svn/LECASofts/ecoPrimers/trunk@224 60f365c0-8329-0410-b2a4-ec073aeeaa1d
This commit is contained in:
@ -157,6 +157,8 @@ void initoptions(poptions_t options)
|
||||
options->no_multi_match=FALSE;
|
||||
options->pnparm = NULL;
|
||||
strcpy(options->taxonrank, DEFAULTTAXONRANK); /*taxon level for results, species by default*/
|
||||
options->saltmethod = SALT_METHOD_SANTALUCIA;
|
||||
options->salt = DEF_SALT;
|
||||
}
|
||||
|
||||
void printapair(int32_t index,ppair_t pair, poptions_t options)
|
||||
@ -540,11 +542,10 @@ int main(int argc, char **argv)
|
||||
//printf ("\nGETREVCODE: A=%d, C=%d, G=%d, T=%d\n", GETREVCODE(t[0]), GETREVCODE('C'), GETREVCODE('G'), GETREVCODE('T'));
|
||||
//return 0;
|
||||
CNNParams nnparams;
|
||||
nparam_InitParams(&nnparams, DEF_CONC_PRIMERS,DEF_CONC_SEQUENCES,DEF_SALT,SALT_METHOD_SANTALUCIA);
|
||||
|
||||
initoptions(&options);
|
||||
|
||||
while ((carg = getopt(argc, argv, "hfvcUDSd:l:L:e:i:r:R:q:3:s:x:t:O:")) != -1) {
|
||||
while ((carg = getopt(argc, argv, "hfvcUDSd:l:L:e:i:r:R:q:3:s:x:t:O:m:a:")) != -1) {
|
||||
|
||||
switch (carg) {
|
||||
/* ---------------------------- */
|
||||
@ -674,7 +675,19 @@ int main(int argc, char **argv)
|
||||
sscanf(optarg,"%d",&(options.primer_length));
|
||||
break;
|
||||
|
||||
/* -------------------- */
|
||||
/* --------------------------------- */
|
||||
case 'm': /* set salt method */
|
||||
/* --------------------------------- */
|
||||
sscanf(optarg,"%d",&(options.saltmethod));
|
||||
break;
|
||||
|
||||
/* --------------------------------- */
|
||||
case 'a': /* set salt */
|
||||
/* --------------------------------- */
|
||||
sscanf(optarg,"%f",&(options.salt));
|
||||
break;
|
||||
|
||||
/* -------------------- */
|
||||
case 'c': /* sequences are circular */
|
||||
/* --------------------------------- */
|
||||
options.circular = 1;
|
||||
@ -687,6 +700,15 @@ int main(int argc, char **argv)
|
||||
|
||||
}
|
||||
options.pnparm = &nnparams;
|
||||
if (options.saltmethod != 2) //if not SALT_METHOD_OWCZARZY
|
||||
options.saltmethod = SALT_METHOD_SANTALUCIA; //then force SALT_METHOD_SANTALUCIA
|
||||
|
||||
|
||||
if (options.salt < 0.01 || options.salt > 0.3) //if salt value out of literature values
|
||||
options.salt = DEF_SALT; //set to default
|
||||
|
||||
nparam_InitParams(&nnparams, DEF_CONC_PRIMERS,DEF_CONC_SEQUENCES,options.salt,options.saltmethod);
|
||||
|
||||
fprintf(stderr,"Reading taxonomy database ...");
|
||||
taxonomy = read_taxonomy(options.prefix,0);
|
||||
fprintf(stderr,"Ok\n");
|
||||
|
@ -278,6 +278,8 @@ typedef struct {
|
||||
int32_t outsamples;
|
||||
int32_t intaxa;
|
||||
int32_t outtaxa;
|
||||
int saltmethod;
|
||||
float salt;
|
||||
PNNParams pnparm;
|
||||
} options_t, *poptions_t;
|
||||
|
||||
|
@ -89,14 +89,6 @@ float nparam_CalcTM(float entropy,float enthalpy)
|
||||
return tm;
|
||||
}
|
||||
|
||||
/* PURPOSE: Initialize nearest neighbor parameters.
|
||||
*
|
||||
* PARAMETERS:
|
||||
* none
|
||||
*
|
||||
* RETURN VALUE:
|
||||
* void
|
||||
*/
|
||||
|
||||
void nparam_InitParams(PNNParams nparm, float c1, float c2, float kp, int sm)
|
||||
{
|
||||
|
Reference in New Issue
Block a user