Skip to content

Commit

Permalink
API: changed default k size to 6
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinHuttley committed Aug 25, 2024
1 parent 316d0f9 commit 1335266
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/divergent/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def main():
type=Path,
help="path to .dvtgseqs file",
)
_k = click.option("-k", type=int, default=3, help="k-mer size")
_k = click.option("-k", type=int, default=6, help="k-mer size")


@main.command(**_click_command_opts)
Expand Down
16 changes: 8 additions & 8 deletions src/divergent/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def __init__(
stat: str = "stdev",
moltype: str = "dna",
include: list[str] | str | None = None,
k: int = 4,
k: int = 6,
seed: int | None = None,
) -> None:
"""
Expand All @@ -651,7 +651,7 @@ def __init__(
moltype
molecular type of the sequences
include
sequence names to include
sequence names to include in the final result
k
k-mer size
seed
Expand All @@ -660,9 +660,8 @@ def __init__(
Notes
-----
If called with an alignment, the ungapped sequences are used.
Sequence order of input is randomised. If include is not None, the
named sequences are added to the collection before selecting the
divergent set.
The order of the sequences is randomised. If include is not None, the
named sequences are added to the final result.
"""
self._s2k = seq_to_seqarray(moltype=moltype) + seqarray_to_kmerseq(
k=k,
Expand Down Expand Up @@ -700,7 +699,7 @@ def __init__(
n: int = 3,
moltype: str = "dna",
include: list[str] | str | None = None,
k: int = 4,
k: int = 6,
seed: int | None = None,
) -> None:
"""
Expand All @@ -713,14 +712,15 @@ def __init__(
k
k-mer size
include
sequence names to include
sequence names to include in the final result
seed
random number seed
Notes
-----
If called with an alignment, the ungapped sequences are used.
Sequence order of input is randomised.
The order of the sequences is randomised. If include is not None, the
named sequences are added to the final result.
"""
self._s2k = seq_to_seqarray(moltype=moltype) + seqarray_to_kmerseq(
k=k,
Expand Down

0 comments on commit 1335266

Please sign in to comment.