Skip to content

Commit

Permalink
release 3.1.7 complete
Browse files Browse the repository at this point in the history
  • Loading branch information
kbessonov1984 committed Aug 31, 2023
1 parent adf7e2c commit 4d4cab0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
15 changes: 7 additions & 8 deletions mob_suite/mob_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,8 @@ def arguments():
action='count',
help='Set the verbosity level. Can by used multiple times')

parser.add_argument('-V', '--version', action='version', version="%(prog)s (" + __version__ + ")")

args = parser.parse_args()

parser.add_argument('-V', '--version', action='version', version="%(prog)s " + __version__ + "")
args, unknown_args = parser.parse_known_args()
return args


Expand Down Expand Up @@ -119,17 +117,20 @@ def extract(fname, outdir):
os.remove(fname)

def main():

args = arguments()


database_directory = os.path.abspath(args.database_directory)


if os.path.exists(database_directory) == False:
os.makedirs(database_directory)
logger.info("Database directory folder created at {}".format(database_directory))
else:
logger.info("Database directory folder already exists at {}".format(database_directory))


# Helper function to simplify adding database_directory to everything
prepend_db_dir = functools.partial(os.path.join, database_directory)

Expand Down Expand Up @@ -230,9 +231,7 @@ def main():
try:
logger.info("Init ete3 library ...")
ete3taxadbpath = os.path.abspath(os.path.join(database_directory,"taxa.sqlite"))
ncbi = NCBITaxa()
ncbi.dbfile=ete3taxadbpath
ncbi.update_taxonomy_database()
NCBITaxa(dbfile=ete3taxadbpath) #the creatuib if NCBITaxa class triggers update_taxonomy_database()
except Exception as e:
logger.error("Init of ete3 library failed with error {}. Removing lock file".format(e))
os.remove(lockfilepath)
Expand Down
5 changes: 4 additions & 1 deletion mob_suite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,7 +1369,10 @@ def create_biomarker_dataframe(parameters,id_mapping,logging):

data_frames = []
for label in parameters:
file = parameters[label]['file']
file = parameters[label]['file']
print(file, label)
if not os.path.isfile(file):
continue
blast_df = pd.read_csv(file,header=0,sep="\t")
if len(blast_df) == 0:
continue
Expand Down

0 comments on commit 4d4cab0

Please sign in to comment.