Skip to content

Commit c7c16d2

Browse files
committed
Fix issue with gecco convert when given a relative path
1 parent b29f503 commit c7c16d2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gecco/cli/commands/convert.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _convert_gbk_bigslice(self, ctx: contextlib.ExitStack) -> None:
133133
record.features.append(subregion_feature)
134134
# rename the {id}_cluster_{N}.gbk file to {id}.region{N}.gbk
135135
gbk_name = os.path.basename(gbk_file)
136-
contig_id, cluster_n = re.search("^(.*)_cluster_(\d+).gbk", gbk_file).groups() # type: ignore
136+
contig_id, cluster_n = re.search("^(.*)_cluster_(\d+).gbk", gbk_name).groups() # type: ignore
137137
new_name = os.path.join(self.input_dir, "{}.region{:03}.gbk".format(contig_id, int(cluster_n)))
138138
self.info(f"Rewriting {gbk_file!r} to {new_name!r}")
139139
Bio.SeqIO.write(record, new_name, "genbank")

0 commit comments

Comments
 (0)