Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions minUP.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,14 @@
config_file = os.path.join(os.path.sep, \
os.path.dirname(os.path.realpath('__file__' \
)), 'minup_posix.config')
logfolder = os.path.join(os.path.sep, \
os.path.dirname(os.path.realpath('__file__' \
)), 'minup_run_logs')
VALID_REF_DIR = os.path.join(os.path.sep, \
os.path.dirname(os.path.realpath('__file__')), \

default_log_dir = os.path.join(
os.path.sep,
os.path.dirname(os.path.realpath('__file__')),
'minup_run_logs',
)
VALID_REF_DIR = os.path.join(os.path.sep,
os.path.dirname(os.path.realpath('__file__')),
'valid_reference_fasta_files')
BWA_INDEX_DIR = os.path.join(os.path.sep, \
os.path.dirname(os.path.realpath('__file__')), \
Expand All @@ -94,9 +97,13 @@
if OPER is 'windows':
config_file = os.path.join(os.path.sep, sys.prefix,
'minup_windows.config')
logfolder = os.path.join(os.path.sep, sys.prefix,
'minup_run_logs')
VALID_REF_DIR = os.path.join(os.path.sep, sys.prefix, \

default_log_dir = os.path.join(
os.path.sep,
sys.prefix,
'minup_run_logs',
)
VALID_REF_DIR = os.path.join(os.path.sep, sys.prefix,
'valid_reference_fasta_files')
BWA_INDEX_DIR = os.path.join(os.path.sep, sys.prefix, \
'bwa_indexes')
Expand Down Expand Up @@ -434,6 +441,14 @@
version=('%(prog)s version={version}').format(version=__version__),
)

parser.add_argument(
'-logdir',
'--log-directory',
help='Directory where munUP will write its logs.',
default=default_log_dir,
dest='logdir',
)

#-------------------------------------------------------------------------------

args = parser.parse_args()
Expand All @@ -448,8 +463,7 @@
BWA_INDEX_DIR = REF_DIR + '/gbwa.indexes/'
LAST_INDEX_DIR = REF_DIR + '/glast.indexes/'



logfolder = args.logdir

if not os.path.exists(logfolder):
os.makedirs(logfolder)
Expand Down
6 changes: 0 additions & 6 deletions modules/checkRead.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,6 @@ def check_read(
print 'Making new database: ', dbname
print '='*80
sys.stdout.flush()
dbF = open('dbname.txt','w')
dbF.write(dbname+"\n")
dbF.close()




sql = 'CREATE DATABASE %s' % dbname
cursor.execute(sql)
Expand Down