Skip to content

Commit

Permalink
rst fixes and two typos
Browse files Browse the repository at this point in the history
  • Loading branch information
fchapoton committed Dec 16, 2024
1 parent f49f497 commit e96c531
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
4 changes: 3 additions & 1 deletion ppanggolin/genome.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,16 +889,18 @@ class Organism(MetaFeatures):
Describe the Genome content and some information
Methods:
- `families`: Returns a set of gene families present in the organism.
- `genes`: Returns a generator to get genes in the organism.
- `number_of_genes`: Returns the number of genes in the organism.
- `contigs`: Returns the values in the contig dictionary from the organism.
- `get_contig`: Gets the contig with the given identifier in the organism, adding it if it does not exist.
- `_create_contig`: Creates a new contig object and adds it to the contig dictionary.
- `mk_bitarray`: Produces a bitarray representing the presence/absence of gene families
in the organism using the provided index.
in the organism using the provided index.
Fields:
- `name`: Name of the organism.
- `bitarray`: Bitarray representing the presence/absence of gene families in the organism.
"""
Expand Down
6 changes: 3 additions & 3 deletions ppanggolin/meta/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ def assign_metadata(
:param source: A string representing the source of the metadata.
:param metatype: A string representing the type of element to which metadata will be assigned.
:param omit: A boolean indicating whether to raise an error if metadata cannot be assigned to an element.
If True, metadata will not be assigned to elements that do not exist in the pangenome.
If False, an error will be raised. Default is False.
If ``True``, metadata will not be assigned to elements that do not exist in the pangenome.
If ``False``, an error will be raised. Default is ``False``.
:param disable_bar: A boolean indicating whether to disable the progress bar. Default is False.
:raise KeyError: element name is not find in pangenome
Expand Down Expand Up @@ -228,7 +228,7 @@ def check_metadata_arguments(
Check the arguments provided for and raise errors if they are incompatible or missing.
:param args: An argparse.Namespace object containing parsed command-line arguments.
:param parser : parser of the command
:param parser: parser of the command
:return: A string indicating the input mode ('single' or 'multiple').
"""

Expand Down
3 changes: 2 additions & 1 deletion ppanggolin/projection/projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def write_projection_results(
Note:
- If `write_proksee` is True and input organisms have modules, module colors for ProkSee are obtained.
- The function calls other functions such as `summarize_projection`, `read_genome_file`, `write_proksee_organism`,
`write_gff_file`, and `write_summaries` to generate various output files and summaries.
Expand Down Expand Up @@ -1496,7 +1497,7 @@ def check_projection_arguments(
Check the arguments provided for genome projection and raise errors if they are incompatible or missing.
:param args: An argparse.Namespace object containing parsed command-line arguments.
:param parser : parser of the command
:param parser: parser of the command
:return: A string indicating the input mode ('single' or 'multiple').
"""

Expand Down
2 changes: 1 addition & 1 deletion ppanggolin/utility/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def launch_default_config(args: argparse.Namespace):
arg_lines.append(f"\n{sub_command}:")
arg_lines += get_default_argument_lines(specific_actions)

logging.getLogger("PPanGGOLiN").info(f"Writting default config in {args.output}")
logging.getLogger("PPanGGOLiN").info(f"Writing default config in {args.output}")
with open(args.output, "w") as fl:
fl.write("\n".join(arg_lines) + "\n")

Expand Down
5 changes: 3 additions & 2 deletions ppanggolin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ def read_compressed_or_not(
Parameters:
file (pathlib.Path, io.BytesIO, io.TextIOWrapper, io.TextIOBase): The file to read.
It can be a Path object from the pathlib module, a BytesIO object, a TextIOWrapper, or TextIOBase object.
It can be a Path object from the pathlib module, a BytesIO object, a TextIOWrapper, or TextIOBase object.
Returns:
str: The contents of the file, decompressed if it was a recognized compressed format.
Expand Down Expand Up @@ -506,7 +506,8 @@ def _plain_bfs(g: nx.Graph, source: Any, removed: set, weight: float):
:param g: graph with the nodes
:param source: current node
:param removed: set of removed nodes
:param weight:threshold to remove node or not
:param weight: threshold to remove node or not
"""

nextlevel = {source}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_genefamily.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def test_raise_exception_if_representative_not_set(self, family):

@pytest.fixture
def genes(self) -> Generator[Set[Gene], None, None]:
"""Creeate a set of genes to fill gene families"""
"""Create a set of genes to fill gene families"""
genes = set()
for i in range(1, randint(11, 20)):
gene = Gene(f"gene_{str(i)}")
Expand Down

0 comments on commit e96c531

Please sign in to comment.