diff --git a/scripts/build_midas_db.py b/scripts/build_midas_db.py index 303c1de..817bfe3 100755 --- a/scripts/build_midas_db.py +++ b/scripts/build_midas_db.py @@ -77,7 +77,6 @@ def check_args(args): if __name__ == "__main__": - args = fetch_arguments() utility.add_executables(args) check_args(args) diff --git a/scripts/call_consensus.py b/scripts/call_consensus.py index 8db39fb..2694620 100755 --- a/scripts/call_consensus.py +++ b/scripts/call_consensus.py @@ -100,6 +100,7 @@ def print_args(args): lines.append(" site_maf: %s" % args['site_maf']) lines.append(" site_ratio: %s" % args['site_ratio']) lines.append(" max_sites: %s" % args['max_sites']) + lines.append("================================") sys.stdout.write('\n'.join(lines)+'\n') def check_args(args): diff --git a/scripts/merge_midas.py b/scripts/merge_midas.py index c692afd..3b87c08 100755 --- a/scripts/merge_midas.py +++ b/scripts/merge_midas.py @@ -268,17 +268,22 @@ def print_arguments(program, args): def print_species_arguments(args): print ("===========Parameters===========") + print ("Command: %s" % ' '.join(sys.argv)) print ("Script: merge_midas.py species") + print ("Database: %s" % args['db']) print ("Input: %s" % args['input']) print ("Input type: %s" % args['intype']) print ("Output directory: %s" % args['outdir']) print ("Minimum coverage for estimating prevalence: %s" % args['min_cov']) if args['max_samples']: print ("Keep <= %s samples" % args['max_samples']) + print ("===============================") print ("") def print_genes_arguments(args): print ("===========Parameters===========") + print ("Command: %s" % ' '.join(sys.argv)) print ("Script: merge_midas.py genes") + print ("Database: %s" % args['db']) print ("Input: %s" % args['input']) print ("Input type: %s" % args['intype']) print ("Output directory: %s" % args['outdir']) @@ -292,11 +297,14 @@ def print_genes_arguments(args): print ("Gene quantification criterea:") print (" present (1): genes with copy number >= %s" % args['min_copy']) print (" absent (0): genes with copy number < %s" % args['min_copy']) + print ("===============================") print ("") def print_snps_arguments(args): print ("===========Parameters===========") + print ("Command: %s" % ' '.join(sys.argv)) print ("Script: merge_midas.py snps") + print ("Database: %s" % args['db']) print ("Input: %s" % args['input']) print ("Input type: %s" % args['intype']) print ("Output directory: %s" % args['outdir']) @@ -312,6 +320,7 @@ def print_snps_arguments(args): print (" keep sites covered by >= %s reads across >= %s percent of samples" % (args['site_depth'], 100*args['site_prev'])) if args['max_sites'] != float('Inf'): print (" keep <= %s sites" % (args['max_sites'])) print ("Number of CPUs to use: %s" % args['threads']) + print ("===============================") print ("") def run_program(program, args): diff --git a/scripts/run_midas.py b/scripts/run_midas.py index 0e73f77..f0848e7 100755 --- a/scripts/run_midas.py +++ b/scripts/run_midas.py @@ -140,17 +140,20 @@ def species_arguments(): def print_species_arguments(args): lines = [] lines.append("===========Parameters===========") + lines.append("Command: %s" % ' '.join(sys.argv)) lines.append("Script: run_midas.py species") + lines.append("Database: %s" % args['db']) lines.append("Output directory: %s" % args['outdir']) lines.append("Input reads (1st mate): %s" % args['m1']) lines.append("Input reads (2nd mate): %s" % args['m2']) lines.append("Remove temporary files: %s" % args['remove_temp']) lines.append("Word size for database search: %s" % args['word_size']) if args['mapid']: lines.append("Minimum mapping identity: %s" % args['mapid']) - lines.append("Minimum alignment coverage: %s" % args['aln_cov']) + lines.append("Minimum mapping alignment coverage: %s" % args['aln_cov']) lines.append("Number of reads to use from input: %s" % (args['max_reads'] if args['max_reads'] else 'use all')) if args['read_length']: lines.append("Trim reads to %s-bp and discard reads with length < %s-bp" % (args['read_length'], args['read_length'])) lines.append("Number of threads for database search: %s" % args['threads']) + lines.append("================================") args['log'].write('\n'.join(lines)+'\n') sys.stdout.write('\n'.join(lines)+'\n') @@ -267,7 +270,9 @@ def gene_arguments(): def print_gene_arguments(args): lines = [] lines.append("===========Parameters===========") + lines.append("Command: %s" % ' '.join(sys.argv)) lines.append("Script: run_midas.py genes") + lines.append("Database: %s" % args['db']) lines.append("Output directory: %s" % args['outdir']) lines.append("Remove temporary files: %s" % args['remove_temp']) lines.append("Pipeline options:") @@ -299,6 +304,7 @@ def print_gene_arguments(args): lines.append(" minimum read quality score: %s" % args['readq']) lines.append(" minimum mapping quality score: %s" % args['mapq']) lines.append(" trim %s base-pairs from read-tails" % args['trim']) + lines.append("================================") args['log'].write('\n'.join(lines)+'\n') sys.stdout.write('\n'.join(lines)+'\n') @@ -385,7 +391,9 @@ def snp_arguments(): def print_snp_arguments(args): lines = [] lines.append("===========Parameters===========") + lines.append("Command: %s" % ' '.join(sys.argv)) lines.append("Script: run_midas.py snps") + lines.append("Database: %s" % args['db']) lines.append("Output directory: %s" % args['outdir']) lines.append("Remove temporary files: %s" % args['remove_temp']) lines.append("Pipeline options:") @@ -420,6 +428,7 @@ def print_snp_arguments(args): if args['discard']: lines.append(" discard discordant read-pairs") if args['baq']: lines.append(" enable BAQ (per-base alignment quality)") if args['adjust_mq']: lines.append(" adjust MAPQ") + lines.append("================================") args['log'].write('\n'.join(lines)+'\n') sys.stdout.write('\n'.join(lines)+'\n') diff --git a/scripts/snp_diversity.py b/scripts/snp_diversity.py index 36015c7..8ae381d 100755 --- a/scripts/snp_diversity.py +++ b/scripts/snp_diversity.py @@ -110,6 +110,7 @@ def format_site_type(args): def print_args(args): lines = [] lines.append("===========Parameters===========") + lines.append("Command: %s" % ' '.join(sys.argv)) lines.append("Script: snp_diversity.py") lines.append("Input directory: %s" % args['indir']) lines.append("Output file: %s" % args['out']) @@ -135,6 +136,7 @@ def print_args(args): lines.append(" site_ratio: %s" % args['site_ratio']) lines.append(" site_freq: %s" % args['site_freq']) lines.append(" max_sites: %s" % args['max_sites']) + print ("===============================") sys.stdout.write('\n'.join(lines)+'\n') def check_args(args):