diff --git a/ppanggolin/genome.py b/ppanggolin/genome.py index 331db45c..3ac112c2 100644 --- a/ppanggolin/genome.py +++ b/ppanggolin/genome.py @@ -889,6 +889,7 @@ 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. @@ -896,9 +897,10 @@ class Organism(MetaFeatures): - `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. """ diff --git a/ppanggolin/meta/meta.py b/ppanggolin/meta/meta.py index 9d9e6a6b..07e7eee0 100644 --- a/ppanggolin/meta/meta.py +++ b/ppanggolin/meta/meta.py @@ -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 @@ -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'). """ diff --git a/ppanggolin/projection/projection.py b/ppanggolin/projection/projection.py index b0a36c5f..0a814342 100644 --- a/ppanggolin/projection/projection.py +++ b/ppanggolin/projection/projection.py @@ -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. @@ -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'). """ diff --git a/ppanggolin/utility/utils.py b/ppanggolin/utility/utils.py index 612eafce..0556ee59 100644 --- a/ppanggolin/utility/utils.py +++ b/ppanggolin/utility/utils.py @@ -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") diff --git a/ppanggolin/utils.py b/ppanggolin/utils.py index b9661a68..bc28e904 100755 --- a/ppanggolin/utils.py +++ b/ppanggolin/utils.py @@ -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. @@ -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} diff --git a/tests/test_genefamily.py b/tests/test_genefamily.py index d985a0c0..9fc1b9af 100644 --- a/tests/test_genefamily.py +++ b/tests/test_genefamily.py @@ -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)}")