iqbal-lab-org / make_prg

Code to create a PRG from a Multiple Sequence Alignment file
Other
21 stars 7 forks source link

Refactored clustering code and new kmeans clustering criterion #19

Closed bricoletc closed 3 years ago

bricoletc commented 3 years ago

This PR has two main goals:

One important point is I've changed the command name prg_from_msa to from_msa; this way we call make_prg from_msa. This may be annoying because will need to change scripts using make_prg if we go ahead with this. I find it more descriptive and easier to type, but has to be weighed against changing calls in existing scripts/pipelines.

Added

Modified

Test coverage

Goes from

Name                                   Stmts   Miss  Cover   Missing
--------------------------------------------------------------------
make_prg/__init__.py                      11      2    82%   13-14
make_prg/interval_partition.py           124      2    98%   67, 132
make_prg/io_utils.py                      99     79    20%   15-18, 36-39, 42-62, 67-126, 133-140, 153-178
make_prg/make_prg_from_msa.py            196     30    85%   70-74, 202-203, 290-297, 319, 343-374, 378-381
make_prg/prg_encoder.py                   40      0   100%
make_prg/seq_utils.py                     48      4    92%   77-84
make_prg/subcommands/__init__.py           2      0   100%
make_prg/subcommands/prg_from_msa.py      43     37    14%   9-68, 72-128
--------------------------------------------------------------------
TOTAL                                    563    154    73%

in current master

to

Name                                      Stmts   Miss  Cover   Missing
-----------------------------------------------------------------------
make_prg/__init__.py                          6      2    67%   6-7
make_prg/from_msa/__init__.py                 4      0   100%
make_prg/from_msa/cluster_sequences.py      141      0   100%
make_prg/from_msa/interval_partition.py     124      2    98%   67, 132
make_prg/from_msa/prg_builder.py            120     28    77%   67-71, 158-165, 187, 211-242, 246-249
make_prg/io_utils.py                        100     79    21%   16-19, 37-40, 43-63, 68-127, 134-141, 154-179
make_prg/prg_encoder.py                      40      0   100%
make_prg/seq_utils.py                        50      4    92%   81-88
make_prg/subcommands/__init__.py              1      0   100%
-----------------------------------------------------------------------
TOTAL                                       586    115    80%

in this branch