Skip to content

Commit

Permalink
Merge pull request #122 from paulzierep/fix-import
Browse files Browse the repository at this point in the history
fix bgc_data import issue
  • Loading branch information
adraismawur authored Jan 31, 2024
2 parents 1784604 + bcc82d4 commit c1aac2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
12 changes: 6 additions & 6 deletions bigscape.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ def runHmmScan(fastaPath, hmmPath, outputdir, verbose):
sys.exit("Error running hmmscan: Fasta file " + fastaPath + " doesn't exist")


def parseHmmScan(hmmscanResults, pfd_folder, pfs_folder, overlapCutoff):
def parseHmmScan(hmmscanResults, pfd_folder, pfs_folder, overlapCutoff, genbankDict):
outputbase = ".".join(hmmscanResults.split(os.sep)[-1].split(".")[:-1])
# try to read the domtable file to find out if this gbk has domains. Domains
# need to be parsed into fastas anyway.
Expand Down Expand Up @@ -1960,10 +1960,10 @@ def CMD_parser():
Toggle to activate.")

parser.add_argument("-d", "--domain_overlap_cutoff",
dest="domain_overlap_cutoff", default=0.1, help="Specify\
at which overlap percentage domains are considered to \
overlap. Domain with the best score is kept \
(default=0.1).")
dest="domain_overlap_cutoff", default=0.1,
type=float, help="Specify at which overlap percentage \
domains are considered to overlap. Domain with the best \
score is kept (default=0.1).")

parser.add_argument("-m", "--min_bgc_size", dest="min_bgc_size", default=0,
help="Provide the minimum size of a BGC to be included in\
Expand Down Expand Up @@ -2519,7 +2519,7 @@ def main():
# Using serialized version for now. Probably doesn't have too bad an impact
#pool = Pool(cores,maxtasksperchild=32)
for domtableFile in domtableFiles - alreadyDone:
parseHmmScan(domtableFile, pfd_folder, pfs_folder, options.domain_overlap_cutoff)
parseHmmScan(domtableFile, pfd_folder, pfs_folder, options.domain_overlap_cutoff, genbankDict)
#pool.apply_async(parseHmmScan, args=(domtableFile,output_folder,options.domain_overlap_cutoff))
#pool.close()
#pool.join()
Expand Down
7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
from distutils.core import setup


def generate_package_data():
data_files = []
for directory in ['html_template','Annotated_MIBiG_reference']:
Expand All @@ -17,10 +18,10 @@ def generate_package_data():

setup(
name='bigscape',
version='1.1.5',
version='1.1.8',
py_modules=['functions','ArrowerSVG'],
packages=['bigscape'],
package_dir={'bigscape': '.'},
packages=["bigscape", "bgc_data"],
package_dir={"bigscape": ".", "bgc_data": "."},
package_data=generate_package_data(),
entry_points={
'console_scripts': ['bigscape=bigscape.__main__:main']
Expand Down

0 comments on commit c1aac2c

Please sign in to comment.