Commit 6e707c25 authored by Paul Costea's avatar Paul Costea
Browse files

small things

parent 8fe439a9
......@@ -92,7 +92,7 @@ def split_opt(args):
cov_files = glob(cov_dir + '/*.cov')
project_name = path.basename(args.project_dir)
if not cov_files:
stderr("Cov files not found. Please run metaSNP_COV.\n")
stderr("Coverage files not found.\n")
exit(1)
for f in cov_files:
cmd = ['python',
......@@ -207,11 +207,9 @@ def main():
help='Database gene annotation.')
parser.add_argument('--print-commands', default=False, action='store_true',
help='Instead of executing the commands, simply print them out')
parser.add_argument('--continue-after-opt', default=False, action='store_true',
help='Continue after print-commands')
parser.add_argument('--threads', metavar='INT', default=1,type=int,
help='Number of jobs to run simmultaneously. Will create same number of splits, unless n_splits set differently.')
parser.add_argument('--n_splits', metavar='INT', default=1,
parser.add_argument('--n_splits', metavar='INT', default=1,type=int,
help='Number of bins to split ref into')
parser.add_argument('--ctg_len',metavar='BED_FILE',default='',
help='Per contig lengths, required for splitting.')
......@@ -243,17 +241,14 @@ SOLUTION: Supply contig information through --ctg_len\n\n'''.format(basedir))
if args.threads > 1 and args.n_splits==1:
args.n_splits=args.threads
if not args.continue_after_opt:
if path.exists(args.project_dir):
stderr.write("Project directory '{}' already exists\n\n\n".format(args.project_dir))
parser.print_help()
exit(1)
create_directories(args.project_dir)
compute_opt(args)
if not args.print_commands:
if args.n_splits > 1:
split_opt(args)
snp_call(args)
if path.exists(args.project_dir) and not args.print_commands:
stderr.write("Project directory '{}' already exists\n\n\n".format(args.project_dir))
exit(1)
create_directories(args.project_dir)
compute_opt(args)
if args.n_splits > 1:
split_opt(args)
snp_call(args)
if __name__ == '__main__':
main()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment