From 0303732b849a14554d24ec16b484f39e5780f442 Mon Sep 17 00:00:00 2001 From: Remi Planel <rplanel@pasteur.fr> Date: Fri, 15 Nov 2019 12:50:26 +0100 Subject: [PATCH] Limit sequence format to fasta or genbank --- crisprbact/cli.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/crisprbact/cli.py b/crisprbact/cli.py index a3cc12f..081278d 100644 --- a/crisprbact/cli.py +++ b/crisprbact/cli.py @@ -1,6 +1,6 @@ -import click from crisprbact import on_target_predict from Bio import SeqIO +import click class Config(object): @@ -32,7 +32,8 @@ def predict(config): @pass_config def from_str(config, target, output_file): """ - Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on-target activity from a target gene. + Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on-target + activity from a target gene. [OUTPUT_FILE] file where the precitions are saved. Default = "stdout" @@ -49,12 +50,20 @@ def from_str(config, target, output_file): @click.option( "-t", "--target", type=click.File("rU"), required=True, help="Sequence file" ) -@click.option("-f", "--seq-format", help="Sequence file format", default="fasta") +@click.option( + "-f", + "--seq-format", + type=click.Choice(["fasta", "fa", "gb", "genbank"]), + help="Sequence file format", + default="fasta", + show_default=True, +) @click.argument("output-file", type=click.File("w"), default="-") @pass_config def from_seq(config, target, seq_format, output_file): """ - Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on-target activity from a target gene. + Outputs candidate guide RNAs for the S. pyogenes dCas9 with predicted on-target + activity from a target gene. [OUTPUT_FILE] file where the precitions are saved. Default = "stdout" -- GitLab