Skip to content

Commit 5f75776

Browse files
Dom LaetschDom Laetsch
authored andcommitted
...
1 parent 9afec84 commit 5f75776

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

forge.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@
3636
import lib.BtCore as bt
3737
import lib.BtLog as BtLog
3838
import lib.BtIO as BtIO
39-
from os.path import basename, isfile, join, dirname
39+
import os.path
4040

4141

4242
if __name__ == '__main__':
4343
ASSEMBLY_TYPES = [None, 'spades', 'soap', 'abyss', 'velvet']
44-
main_dir = dirname(__file__)
44+
main_dir = os.path.dirname(__file__)
4545
#print data_dir
4646
args = docopt(__doc__)
4747
#print args
@@ -60,19 +60,19 @@
6060
names_f = args['--names']
6161
nodes_f = args['--nodes']
6262
taxrules = args['--taxrule']
63-
title = args['--title'] if (args['--title']) else basename(".".join(fasta_f.split('.')[0:-1]))
63+
title = args['--title'] if (args['--title']) else os.path.basename(".".join(fasta_f.split('.')[0:-1]))
6464

6565

6666
# Do files exist ?
6767
files = [x for x in list([fasta_f] + sam_fs + bam_fs + cov_fs + cas_fs + [names_f] + [nodes_f] + hit_fs) if x is not None]
6868
for f in files:
69-
if not isfile(f):
69+
if not os.path.isfile(f):
7070
BtLog.error('0', f)
7171

7272
# Is taxonomy provided?
7373
if nodesDB_f == "data/nodesDB.txt":
74-
nodesDB_f = join(main_dir, nodesDB_f)
75-
if not isfile(nodesDB_f) and not ((names_f) and (nodes_f)):
74+
nodesDB_f = os.path.join(main_dir, nodesDB_f)
75+
if not os.path.isfile(nodesDB_f) and not ((names_f) and (nodes_f)):
7676
BtLog.error('3')
7777

7878
if not (hit_fs):
@@ -107,7 +107,7 @@
107107
nodesDB, nodesDB_f = BtIO.getNodesDB(nodes=nodes_f, names=names_f, nodesDB=nodesDB_f)
108108
blobDb.nodesDB_f = nodesDB_f
109109

110-
if not isfile(nodesDB_f):
110+
if not os.path.isfile(nodesDB_f):
111111
print BtLog.status_d['5'] % nodesDB_f
112112
BtIO.writeNodesDB(nodesDB, nodesDB_f)
113113

lib/BtMisc.py

Whitespace-only changes.

0 commit comments

Comments
 (0)