diff --git a/scripts/dnachisel b/scripts/dnachisel index af651e3..547c09d 100755 --- a/scripts/dnachisel +++ b/scripts/dnachisel @@ -4,17 +4,20 @@ DNA Chisel Command Line Interface Usage: - dnachisel [--circular] [--mute] + dnachisel [--circular] [--mute] [--with_sequence_edits] Where ``source`` is a fasta or Genbank file, and target can be one of: - A folder name or a zip name (extension .zip). In this case a complete report along with the sequence will be generated. +- A Genbank file. In this case, only the optimized sequence file is created. + The with_sequence_edits option specifies that edits are also annotated in the + Genbank file. Note that the filename must end with '.gb'. Note: this CLI will be developed on a per-request basis, so don't hesitate to ask for more handles and options on Github (https://github.com/Edinburgh-Genome-Foundry/DnaChisel/issues) -Example to output the result to a genbank (filename must end with '.gb'): +Example to output the result to a genbank: >>> dnachisel annotated_record.gb optimized_record.gb @@ -57,11 +60,15 @@ if __name__ == "__main__": ) if target.lower().endswith(".gb"): # save genbank + if params["--with_sequence_edits"]: + annotate_edits=True + else: + annotate_edits=False verbose_print("Resolving Constraints...") problem.resolve_constraints() verbose_print("Optimizing...") problem.optimize() - problem.to_record(filepath=target, with_sequence_edits=True) + problem.to_record(filepath=target, with_sequence_edits=annotate_edits) else: # save into zip or folder project_name = os.path.basename(source)