Skip to content

Commit

Permalink
docs: change 'kmcp' to 'KMCP'
Browse files Browse the repository at this point in the history
  • Loading branch information
Midnighter committed Aug 18, 2023
1 parent 994feb8 commit 39b9517
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Added classifier support for kmcp files (#129)
- Added classifier support for KMCP files (#129)

## [0.4.1] - (2023-07-13)

Expand Down
7 changes: 3 additions & 4 deletions docs/supported_profilers/kmcp.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# kmcp

> [kmcp](https://github.com/shenwei356/kmcp) uses genome coverage information by splitting the reference genomes into chunks and stores k-mers in a modified and optimized Compact Bit-Sliced Signature (COBS) index for fast alignment-free sequence searching. KMCP combines k-mer similarity and genome coverage information to reduce the false positive rate of k-mer-based taxonomic classification and profiling methods.
# KMCP

> [KMCP](https://github.com/shenwei356/kmcp) uses genome coverage information by splitting the reference genomes into chunks and stores k-mers in a modified and optimized Compact Bit-Sliced Signature (COBS) index for fast alignment-free sequence searching. KMCP combines k-mer similarity and genome coverage information to reduce the false positive rate of k-mer-based taxonomic classification and profiling methods.
## Profile Format

Expand All @@ -27,4 +26,4 @@ Taxpasta expects a tab-separated file with seventeen columns. This is generated
| taxpath | |
| taxpathsn | |

See [kmcp docs](https://bioinf.shenwei.me/kmcp/usage/#profile) for further description.
See [KMCP docs](https://bioinf.shenwei.me/kmcp/usage/#profile) for further description.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


class KMCPProfile(BaseDataFrameModel):
"""Define the expected kmcp profile format."""
"""Define the expected KMCP profile format."""

reference: Series[str] = pa.Field(alias="ref")
percentage: Series[float] = pa.Field(ge=0.0, le=100.0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.


"""Provide a reader for kmcp profiles."""
"""Provide a reader for KMCP profiles."""


import pandas as pd
Expand All @@ -29,20 +29,20 @@


class KMCPProfileReader(ProfileReader):
"""Define a reader for kmcp profiles."""
"""Define a reader for KMCP profiles."""

@classmethod
@raise_parser_warnings
def read(cls, profile: BufferOrFilepath) -> DataFrame[KMCPProfile]:
"""
Read a kmcp taxonomic profile from the given source.
Read a KMCP taxonomic profile from the given source.
Args:
profile: A source that contains a tab-separated taxonomic profile generated
by kmcp.
by KMCP.
Returns:
A data frame representation of the kmcp profile.
A data frame representation of the KMCP profile.
"""
result = pd.read_table(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.


"""Provide a standardisation service for kmcp profiles."""
"""Provide a standardisation service for KMCP profiles."""


import logging
Expand All @@ -35,16 +35,16 @@


class KMCPProfileStandardisationService(ProfileStandardisationService):
"""Define a standardisation service for kmcp profiles."""
"""Define a standardisation service for KMCP profiles."""

@classmethod
@pa.check_types(lazy=True)
def transform(cls, profile: DataFrame[KMCPProfile]) -> DataFrame[StandardProfile]:
"""
Tidy up and standardize a given kmcp profile.
Tidy up and standardize a given KMCP profile.
Args:
profile: A taxonomic profile generated by kmcp.
profile: A taxonomic profile generated by KMCP.
Returns:
A standardized profile.
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ def ganon_data_dir(data_dir: Path) -> Path:

@pytest.fixture(scope="session")
def kmcp_data_dir(data_dir: Path) -> Path:
"""Provide the path to the kmcp data directory."""
"""Provide the path to the KMCP data directory."""
return data_dir / "kmcp"
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.


"""Test that the schema model validates kmcp profiles correctly."""
"""Test that the schema model validates KMCP profiles correctly."""


from collections import OrderedDict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.


"""Test that the reader can parse valid kmcp profiles."""
"""Test that the reader can parse valid KMCP profiles."""


from pathlib import Path
Expand Down Expand Up @@ -45,7 +45,7 @@ def test_read_correctness(
filename: str,
checks: List[Tuple[int, int, Union[float, int, str]]],
):
"""Test that the reader can parse valid kmcp profiles."""
"""Test that the reader can parse valid KMCP profiles."""
profile = KMCPProfileReader.read(kmcp_data_dir / filename)
for row, col, value in checks:
assert profile.iat[row, col] == value

0 comments on commit 39b9517

Please sign in to comment.