README

Installation

  1. git clone https://github.com/wish1/neg_bin_fit
  2. cd neg_bin_fit
  3. pip3 install .
  4. ???
  5. profit!

Usage

  1. Collect coverage statistics negbin_fit collect -I <inp_1> -I <inp_2> ... -O <dir>
    • Files to provide in -I option should have the same format as described in Formats section
    • -O directory to save BAD-wise statistics into (default: ./)
  2. Fit neg-binomial distribution negbin_fit -O <dir>
    • Directory provided in -O option should be the same with -O from step1
    • To visualize result add --visualize option
    • To use deprecated 'point fit' add -p option
  3. Calculate p-values calc_pval -I <inp_1> -I <inp_2> ... -O <dir> -w <dir>
    • Provide the same directory to -w option as in -O from the step1 and step2
    • To visualize result add --visualize option
    • -O directory to save tables with calculated p-value into (names of the files will be the same; extension will be changed to .pvalue_table)
  4. Aggregate p-value tables calc_pval aggregate -I <inp_1> -I <inp_2> ... -O <out_file>
    • -I option requires obtained on step3 tables. Format is described in Formats section
    • a FILE to save aggregated table should be provided with -O option

Formats

  1. Input file for step1 and step2 should have the following columns:

    • #CHROM, POS, ID: genome position;
    • REF, ALT: reference and alternative bases;
    • REF_COUNTS, ALT_COUNTS: reference and alternative read counts;
    • BAD: BAD estimates with BABACHI.
  2. Input file for step 4 should have the same columns as described above with 4 additional columns:

    • PVAL_REF, PVAL_ALT: Calculated p-values;
    • ES_REF, ES_ALT: Calculated effect sizes.