void inputoptions() { /* input the information on the options */ long i; scan_eoln(infile); for (i = 0; i < (chars); i++) weight[i] = 1; if (ancvar) inputancestors(anczero0, ancone0); if (factors) inputfactors(chars, factor, &factors); if (weights) inputweights(chars, weight, &weights); putchar('\n'); if (weights) printweights(stdout, 0, chars, weight, "Characters"); if (factors) printfactors(stdout, chars, factor, ""); for (i = 0; i < (chars); i++) { if (!ancvar) { anczero[i] = true; ancone[i] = false; } else { anczero[i] = anczero0[i]; ancone[i] = ancone0[i]; } } if (ancvar) printancestors(stdout, anczero, ancone); if (!thresh) threshold = spp; questions = false; for (i = 0; i < (chars); i++) { questions = (questions || (ancone[i] && anczero[i])); threshwt[i] = threshold * weight[i]; } } /* inputoptions */
void inputoptions() { /* input the information on the options */ long weightsum, maxfactsize, i, j, k, l, m; if (data == genefreqs) { k = 0; l = 0; for (i = 0; i < (loci); i++) { m = alleles[i]; k++; for (j = 1; j <= m; j++) { l++; factorr[l - 1] = k; } } } else { for (i = 1; i <= (sites); i++) factorr[i - 1] = i; } for (i = 0; i < (sites); i++) oldweight[i] = 1; if (weights) inputweightsstr2(phyloweights->Str[0],0, sites, &weightsum, oldweight, &weights, "seqboot"); if (factors && printdata) { for(i = 0; i < sites; i++) factor[i] = (char)('0' + (factorr[i]%10)); printfactors(outfile, sites, factor, " (least significant digit)"); } if (weights && printdata) printweights(outfile, 0, sites, oldweight, "Sites"); for (i = 0; i < (loci); i++) how_many[i] = 0; for (i = 0; i < (loci); i++) where[i] = 0; for (i = 1; i <= (sites); i++) { how_many[factorr[i - 1] - 1]++; if (where[factorr[i - 1] - 1] == 0) where[factorr[i - 1] - 1] = i; } groups = factorr[sites - 1]; newgroups = 0; newsites = 0; maxfactsize = 0; for(i = 0 ; i < loci ; i++){ if(how_many[i] > maxfactsize){ maxfactsize = how_many[i]; } } maxnewsites = groups * maxfactsize; allocnew(); for (i = 0; i < (groups); i++) { if (oldweight[where[i] - 1] > 0) { newgroups++; newsites += how_many[i]; newwhere[newgroups - 1] = where[i]; newhowmany[newgroups - 1] = how_many[i]; } } } /* inputoptions */