Skip to content

Commit

Permalink
hotfix for antismash
Browse files Browse the repository at this point in the history
  • Loading branch information
KateSakharova committed Jul 16, 2020
1 parent f4c671c commit 1e8e721
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ done

echo "run antismash"
source ${CONDA_ENV} antismash && \
antismash --smcogs --asf --disable-svg --knownclusterblast --outputfolder ${OUTFOLDER} ${INPUT} # --subclusterblast -v
antismash --genefinding prodigal-m --smcogs --asf --disable-svg --knownclusterblast --outputfolder ${OUTFOLDER} ${INPUT} # --subclusterblast -v
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,16 @@
for cluster in data:
for locus in data[cluster]['orfs']:
old_locus_tag = locus['locus_tag']
number = old_locus_tag.split('_')[0].split('ctg')[1]
postfix = old_locus_tag.split('_')[1]
if len(old_locus_tag.split('_')[0].split('ctg')) > 1:
number = old_locus_tag.split('_')[0].split('ctg')[1]
postfix = old_locus_tag.split('_')[1]

limit = min(NAME_LIMIT - 1 - len(number), len(accession) - 1)
name = accession[0:limit]
limit = min(NAME_LIMIT - 1 - len(number), len(accession) - 1)
name = accession[0:limit]

new_locus_tag = name + '-' + number + '_' + postfix
locus['locus_tag'] = new_locus_tag
description = locus['description']
locus['description'] = description.replace(old_locus_tag, new_locus_tag)
new_locus_tag = name + '-' + number + '_' + postfix
locus['locus_tag'] = new_locus_tag
description = locus['description']
locus['description'] = description.replace(old_locus_tag, new_locus_tag)
json.dump(data, out_json)

0 comments on commit 1e8e721

Please sign in to comment.