diff --git a/anglerfish/explore/cli.py b/anglerfish/explore/cli.py index 975f819..1cceab5 100644 --- a/anglerfish/explore/cli.py +++ b/anglerfish/explore/cli.py @@ -11,65 +11,68 @@ "--threads", default=4, type=int, - help="Number of threads specified by minimap2", + help="Number of threads specified to minimap2", ) @click.option( - "-n", "--no_overwrite", is_flag=True, help="Do not overwrite existing alignments" + "-e", + "--use-existing", + is_flag=True, + help="Use existing alignments if found in the specified output directory.", ) @click.option( "-g", "--good_hit_threshold", default=0.9, type=float, - help="Fraction of bases before and after index insert required to match perfectly for a hit to be considered a good hit. Default=0.9", + help="Fraction of adaptor bases immediately before and immediately after index insert required to match perfectly for a hit to be considered a good hit (default=0.9).", ) @click.option( "-i", "--insert_thres_low", default=4, type=int, - help="Lower threshold for insert length, with value included", + help="Lower threshold for index(+UMI) insert length, with value included (deafult=4).", ) @click.option( "-j", "--insert_thres_high", default=30, type=int, - help="Upper threshold for insert length, with value included", + help="Upper threshold for index(+UMI) insert length, with value included (default=30).", ) @click.option( "-B", "--minimap_b", default=4, type=int, - help="Minimap2 -B parameter, mismatch penalty", + help="Minimap2 -B parameter, mismatch penalty (default=4).", ) @click.option( "-m", "--min_hits_per_adaptor", default=50, type=int, - help="Minimum number of good hits for an adaptor to be included in the analysis", + help="Minimum number of good hits for an adaptor to be included in the analysis (default=50).", ) @click.option( "-u", "--umi_threshold", default=11, type=float, - help="Minimum number of bases in insert to perform entropy calculation", + help="Minimum number of bases in insert to perform entropy calculation (default=11).", ) @click.option( "-k", "--kmer_length", default=2, type=int, - help="Length of k-mers to use for entropy calculation", + help="Length of k-mers to use for entropy calculation (default=2).", ) def main( fastq, outdir, threads, - no_overwrite, + use_existing, good_hit_threshold, insert_thres_low, insert_thres_high, @@ -82,7 +85,7 @@ def main( fastq, outdir, threads, - no_overwrite, + use_existing, good_hit_threshold, insert_thres_low, insert_thres_high, diff --git a/anglerfish/explore/explore.py b/anglerfish/explore/explore.py index de176b1..1fd9cf8 100644 --- a/anglerfish/explore/explore.py +++ b/anglerfish/explore/explore.py @@ -16,7 +16,7 @@ def run_explore( fastq, outdir, threads, - no_overwrite, + use_existing, good_hit_threshold, insert_thres_low, insert_thres_high, @@ -31,9 +31,9 @@ def run_explore( os.mkdir(outdir) except FileExistsError: log.info(f"Output directory {outdir} already exists") - if not no_overwrite: + if not use_existing: log.error( - f"Output directory {outdir} already exists, please use --no_overwrite to continue" + f"Output directory {outdir} already exists, please use --use_existing to continue" ) exit(1) else: @@ -52,7 +52,7 @@ def run_explore( # Align aln_path = os.path.join(outdir, f"{adaptor_name}.paf") alignments.append((adaptor, aln_path)) - if os.path.exists(aln_path) and no_overwrite: + if os.path.exists(aln_path) and use_existing: log.info(f"Skipping {adaptor_name} as alignment already exists") continue adaptor_path = os.path.join(outdir, f"{adaptor_name}.fasta")