Skip to content

Commit 1e8e721

Browse files
committed
hotfix for antismash
1 parent f4c671c commit 1e8e721

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

tools/Assembly/antismash/chunking_antismash_with_conditionals/antismash/run_antismash_short.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ done
99

1010
echo "run antismash"
1111
source ${CONDA_ENV} antismash && \
12-
antismash --smcogs --asf --disable-svg --knownclusterblast --outputfolder ${OUTFOLDER} ${INPUT} # --subclusterblast -v
12+
antismash --genefinding prodigal-m --smcogs --asf --disable-svg --knownclusterblast --outputfolder ${OUTFOLDER} ${INPUT} # --subclusterblast -v

tools/Assembly/antismash/chunking_antismash_with_conditionals/post-processing/fix_geneclusters_js/change_geneclusters_ctg_js.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@
2424
for cluster in data:
2525
for locus in data[cluster]['orfs']:
2626
old_locus_tag = locus['locus_tag']
27-
number = old_locus_tag.split('_')[0].split('ctg')[1]
28-
postfix = old_locus_tag.split('_')[1]
27+
if len(old_locus_tag.split('_')[0].split('ctg')) > 1:
28+
number = old_locus_tag.split('_')[0].split('ctg')[1]
29+
postfix = old_locus_tag.split('_')[1]
2930

30-
limit = min(NAME_LIMIT - 1 - len(number), len(accession) - 1)
31-
name = accession[0:limit]
31+
limit = min(NAME_LIMIT - 1 - len(number), len(accession) - 1)
32+
name = accession[0:limit]
3233

33-
new_locus_tag = name + '-' + number + '_' + postfix
34-
locus['locus_tag'] = new_locus_tag
35-
description = locus['description']
36-
locus['description'] = description.replace(old_locus_tag, new_locus_tag)
34+
new_locus_tag = name + '-' + number + '_' + postfix
35+
locus['locus_tag'] = new_locus_tag
36+
description = locus['description']
37+
locus['description'] = description.replace(old_locus_tag, new_locus_tag)
3738
json.dump(data, out_json)
3839

0 commit comments

Comments
 (0)