From a50b1e9999e12e9010eb1b7709de742cb7851d64 Mon Sep 17 00:00:00 2001 From: Vijini Mallawaarachchi Date: Wed, 4 Sep 2024 12:10:45 +0930 Subject: [PATCH] MAINT: add/update dunder attributes for metadata --- reneo/workflow/scripts/combineJunctionPickles.py | 2 +- reneo/workflow/scripts/reneo.py | 2 +- reneo/workflow/scripts/reneo_utils/FD_Inexact.py | 15 +++++++++++++-- .../scripts/reneo_utils/component_utils.py | 11 +++++++++++ .../scripts/reneo_utils/coverage_utils.py | 10 ++++++++++ .../scripts/reneo_utils/edge_graph_utils.py | 13 ++++++++++++- reneo/workflow/scripts/reneo_utils/flow_utils.py | 11 ++++++++++- reneo/workflow/scripts/reneo_utils/gene_utils.py | 10 ++++++++++ .../workflow/scripts/reneo_utils/genome_utils.py | 11 +++++++++++ .../workflow/scripts/reneo_utils/output_utils.py | 12 +++++++++++- reneo/workflow/scripts/sampleJunctions.py | 2 +- 11 files changed, 91 insertions(+), 8 deletions(-) diff --git a/reneo/workflow/scripts/combineJunctionPickles.py b/reneo/workflow/scripts/combineJunctionPickles.py index 54e4b07..ebc075f 100644 --- a/reneo/workflow/scripts/combineJunctionPickles.py +++ b/reneo/workflow/scripts/combineJunctionPickles.py @@ -4,7 +4,7 @@ from collections import defaultdict __author__ = "Michael Roach" -__copyright__ = "Copyright 2022, Reneo Project" +__copyright__ = "Copyright 2023, Reneo Project" __license__ = "MIT" __version__ = "0.5.0" __maintainer__ = "Vijini Mallawaarachchi" diff --git a/reneo/workflow/scripts/reneo.py b/reneo/workflow/scripts/reneo.py index de01552..8e76ab3 100644 --- a/reneo/workflow/scripts/reneo.py +++ b/reneo/workflow/scripts/reneo.py @@ -23,7 +23,7 @@ ) __author__ = "Vijini Mallawaarachchi" -__copyright__ = "Copyright 2022, Reneo Project" +__copyright__ = "Copyright 2023, Reneo Project" __license__ = "MIT" __version__ = "0.5.0" __maintainer__ = "Vijini Mallawaarachchi" diff --git a/reneo/workflow/scripts/reneo_utils/FD_Inexact.py b/reneo/workflow/scripts/reneo_utils/FD_Inexact.py index 36d68b2..ebed488 100644 --- a/reneo/workflow/scripts/reneo_utils/FD_Inexact.py +++ b/reneo/workflow/scripts/reneo_utils/FD_Inexact.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + # Source: https://github.com/algbio/MFD-ILP import logging @@ -5,8 +7,17 @@ import more_itertools import networkx as nx -# create logger -logger = logging.getLogger("reneo 0.5.0") +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + + +# Create logger +logger = logging.getLogger(f"reneo {__version__}") def read_input(graphfile, number_subpath): diff --git a/reneo/workflow/scripts/reneo_utils/component_utils.py b/reneo/workflow/scripts/reneo_utils/component_utils.py index bd7e79d..e48079a 100644 --- a/reneo/workflow/scripts/reneo_utils/component_utils.py +++ b/reneo/workflow/scripts/reneo_utils/component_utils.py @@ -1,3 +1,14 @@ +#!/usr/bin/env python3 + +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + + def get_components(**kwargs): """ Get connected components with VOGs and no SMGs. diff --git a/reneo/workflow/scripts/reneo_utils/coverage_utils.py b/reneo/workflow/scripts/reneo_utils/coverage_utils.py index 42cff10..9213a5a 100644 --- a/reneo/workflow/scripts/reneo_utils/coverage_utils.py +++ b/reneo/workflow/scripts/reneo_utils/coverage_utils.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import glob import os import pickle @@ -7,6 +9,14 @@ import pysam +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + def get_unitig_coverage(coverage): """ diff --git a/reneo/workflow/scripts/reneo_utils/edge_graph_utils.py b/reneo/workflow/scripts/reneo_utils/edge_graph_utils.py index 05be7c5..565f09d 100644 --- a/reneo/workflow/scripts/reneo_utils/edge_graph_utils.py +++ b/reneo/workflow/scripts/reneo_utils/edge_graph_utils.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import copy import logging from collections import defaultdict @@ -6,8 +8,17 @@ from Bio.Seq import Seq from igraph import * +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + + # Create logger -logger = logging.getLogger("reneo 0.5.0") +logger = logging.getLogger(f"reneo {__version__}") class BidirectionalError(Exception): diff --git a/reneo/workflow/scripts/reneo_utils/flow_utils.py b/reneo/workflow/scripts/reneo_utils/flow_utils.py index 623d344..135f8a8 100644 --- a/reneo/workflow/scripts/reneo_utils/flow_utils.py +++ b/reneo/workflow/scripts/reneo_utils/flow_utils.py @@ -1,9 +1,18 @@ -import tempfile +#!/usr/bin/env python3 +import tempfile import networkx as nx from .FD_Inexact import SolveInstances +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + def get_source_sink_circular(G_edge, graph_unitigs, minlength, self_looped_nodes): """ diff --git a/reneo/workflow/scripts/reneo_utils/gene_utils.py b/reneo/workflow/scripts/reneo_utils/gene_utils.py index 3915739..e27aff0 100644 --- a/reneo/workflow/scripts/reneo_utils/gene_utils.py +++ b/reneo/workflow/scripts/reneo_utils/gene_utils.py @@ -1,6 +1,16 @@ +#!/usr/bin/env python3 + from collections import defaultdict from pathlib import Path +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + def get_smg_unitigs(hmmout, mg_frac): """ diff --git a/reneo/workflow/scripts/reneo_utils/genome_utils.py b/reneo/workflow/scripts/reneo_utils/genome_utils.py index 7f580d3..febdec3 100644 --- a/reneo/workflow/scripts/reneo_utils/genome_utils.py +++ b/reneo/workflow/scripts/reneo_utils/genome_utils.py @@ -1,3 +1,14 @@ +#!/usr/bin/env python3 + +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" + + # Class for genome path class GenomePath: def __init__( diff --git a/reneo/workflow/scripts/reneo_utils/output_utils.py b/reneo/workflow/scripts/reneo_utils/output_utils.py index cbe79a8..a8fd7df 100644 --- a/reneo/workflow/scripts/reneo_utils/output_utils.py +++ b/reneo/workflow/scripts/reneo_utils/output_utils.py @@ -1,9 +1,19 @@ +#!/usr/bin/env python3 + import os import subprocess -FASTA_LINE_LEN = 60 +__author__ = "Vijini Mallawaarachchi" +__copyright__ = "Copyright 2023, Reneo Project" +__license__ = "MIT" +__version__ = "0.5.0" +__maintainer__ = "Vijini Mallawaarachchi" +__email__ = "viji.mallawaarachchi@gmail.com" +__status__ = "Development" +FASTA_LINE_LEN = 60 + def write_unitigs(nodes, unitig_names, graph_unitigs, filename, output): """ Write unitigs to FASTA file diff --git a/reneo/workflow/scripts/sampleJunctions.py b/reneo/workflow/scripts/sampleJunctions.py index a4c8e97..618f048 100644 --- a/reneo/workflow/scripts/sampleJunctions.py +++ b/reneo/workflow/scripts/sampleJunctions.py @@ -7,7 +7,7 @@ from reneo_utils.coverage_utils import read_pair_generator __author__ = "Michael Roach" -__copyright__ = "Copyright 2022, Reneo Project" +__copyright__ = "Copyright 2023, Reneo Project" __license__ = "MIT" __version__ = "0.5.0" __maintainer__ = "Vijini Mallawaarachchi"