Skip to content

Commit

Permalink
Fix issue with gecco convert when given a relative path
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Mar 21, 2024
1 parent b29f503 commit c7c16d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gecco/cli/commands/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def _convert_gbk_bigslice(self, ctx: contextlib.ExitStack) -> None:
record.features.append(subregion_feature)
# rename the {id}_cluster_{N}.gbk file to {id}.region{N}.gbk
gbk_name = os.path.basename(gbk_file)
contig_id, cluster_n = re.search("^(.*)_cluster_(\d+).gbk", gbk_file).groups() # type: ignore
contig_id, cluster_n = re.search("^(.*)_cluster_(\d+).gbk", gbk_name).groups() # type: ignore
new_name = os.path.join(self.input_dir, "{}.region{:03}.gbk".format(contig_id, int(cluster_n)))
self.info(f"Rewriting {gbk_file!r} to {new_name!r}")
Bio.SeqIO.write(record, new_name, "genbank")
Expand Down

0 comments on commit c7c16d2

Please sign in to comment.