Skip to content

Commit

Permalink
MAINT: format code add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
Vini2 committed Jan 16, 2024
1 parent 360b01d commit 02b4dd8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 1 deletion.
4 changes: 4 additions & 0 deletions phables/workflow/scripts/phables_utils/coverage_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ def get_junction_pe_coverage(bam_path, output):


def get_sub_path_coverage(sub_path_cov, bam_path, output):
"""
Get coverage values of sub paths using long reads
"""

if os.path.isfile(f"{output}/sub_path_coverage.pickle"):
sub_path_cov = defaultdict(int)
with open(f"{output}/sub_path_coverage.pickle", "rb") as handle:
Expand Down
6 changes: 5 additions & 1 deletion phables/workflow/scripts/phables_utils/edge_graph_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@ def remove_dead_ends(G_edge):


def get_all_sub_paths(assembly_graph, unitig_names):
"""
Get all sub paths of length 2 and 3
"""

sub_paths = defaultdict(int)

for v in range(assembly_graph.vcount()):
Expand All @@ -273,7 +277,7 @@ def get_all_sub_paths(assembly_graph, unitig_names):
node3 = unitig_names[path[2]]
sub_paths[tuple([node1, node2, node3])] = 0

if len(path) == 2: # Length 2 means 2 vertices (1 edge)
elif len(path) == 2: # Length 2 means 2 vertices (1 edge)
node1 = unitig_names[path[0]]
node2 = unitig_names[path[1]]
sub_paths[tuple([node1, node2])] = 0
Expand Down
4 changes: 4 additions & 0 deletions phables/workflow/scripts/phables_utils/long_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def resolve_long(
output,
nthreads,
):
"""
Resolve genomic paths using long reads
"""

resolved_edges = set()

all_resolved_paths = []
Expand Down
4 changes: 4 additions & 0 deletions phables/workflow/scripts/phables_utils/short_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def resolve_short(
output,
nthreads,
):
"""
Resolve genomic paths using short reads
"""

resolved_edges = set()

all_resolved_paths = []
Expand Down

0 comments on commit 02b4dd8

Please sign in to comment.