Legofit
infers population history from nucleotide site patterns.

Calculate confidence interval from a flat file.

bootci.py: calculate confidence interval from a flat file.

usage: bootci.py [options] <foo.flat>

where <foo.flat> is a file with parameters in columns and data sets
in rows. Such files are produced by flatfile.py and booma. The first
row should contain a column header listing parameter names. The second
should contain parameter estimates for the real data. Each succeeding
row should contain a parameter estimate for a bootstrap replicate.

Options may include:

  -c <x> or --conf <x>     Set confidence level.
  -h     or --help         Print this message.
  -l <x> or --label <x>    Set label.

The program writes to standard output.


# bootci.py run at: 2017-01-06 22:32:58.916983
# real data: lancre.legofit
# bootstrap replicates: boot0.legofit boot1.legofit boot10.legofit ...
# confidence: 0.950
      par             est             low            high
      Tnd  25882.18097500  25783.98581875  25918.98318675
      Txy   1910.32458600   1898.67020375   2020.23384350
       mD      0.00030900      0.00001650      0.00133550
       mN      0.01769600      0.01396675      0.01715075
   twoNnd   1204.62497100   1168.42503700   1327.14358450
   twoNxy  59669.81112500  59120.53155525  61060.16095975
 twoNxynd  34355.15657100  34093.55639600  34552.91827875

Here, "par" lists the parameter names, "est" gives the estimates, and "low" and "high" give the lower and upper confidence bounds.

By default, the confidence level is 95%, but this can be changed with the –conf command-line option.

The –label <x> option will add a column in which every row contains the character string <x>. This is useful in data analysis, if one concatenates the output from several runs of bootci.py. The column of labels makes it possible to distinguish the estimates from different runs of bootci.py.

For example,

bootci.py --label lancre lancre.legofit boot*.legofit

would generate

# bootci.py run at: 2017-01-06 22:32:58.916983
# real data: lancre.legofit
# bootstrap replicates: boot0.legofit boot1.legofit boot10.legofit ...
# confidence: 0.950
      par             est             low            high lbl
      Tnd  25882.18097500  25783.98581875  25918.98318675 lancre
      Txy   1910.32458600   1898.67020375   2020.23384350 lancre
       mD      0.00030900      0.00001650      0.00133550 lancre
       mN      0.01769600      0.01396675      0.01715075 lancre
   twoNnd   1204.62497100   1168.42503700   1327.14358450 lancre
   twoNxy  59669.81112500  59120.53155525  61060.16095975 lancre
 twoNxynd  34355.15657100  34093.55639600  34552.91827875 lancre