static GtOPrval parse_options(GtStr *indexname,GtStrArray *indexnametab, int *parsed_args, int argc, const char **argv, GtError *err) { GtOptionParser *op; GtOPrval oprval; GtOption *option; gt_error_check(err); op = gt_option_parser_new("storeindex <mkvindex1> <mkvindex2> ...", "Merge indexes into one index."); gt_option_parser_set_mail_address(op,"<*****@*****.**>"); option = gt_option_new_filename_array("ii", "specify input index files (mandatory)", indexnametab); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); option = gt_option_new_string("indexname", "specify index to be created", indexname, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); oprval = gt_option_parser_parse(op, parsed_args, argc, argv, gt_versionfunc, err); gt_option_parser_delete(op); return oprval; }
static GtOptionParser* gt_csa_option_parser_new(void *tool_arguments) { CSAArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [GFF3_file]", "Transform spliced alignments from GFF3 file into " "consensus spliced alignments."); /* -join-length */ option = gt_option_new_uword("join-length", "set join length for the spliced " "alignment clustering", &arguments->join_length, GT_DEFAULT_JOIN_LENGTH); gt_option_parser_add_option(op, option); /* -v */ option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); /* output file options */ gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); gt_option_parser_set_max_args(op, 1); return op; }
static GtOptionParser* gt_seqtransform_option_parser_new(void *tool_arguments) { SeqtransformArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *o; gt_assert(arguments); op = gt_option_parser_new("[option ...] [sequence_file ...]", "Perform simple transformations on the given " "sequence file(s)."); /* -addstopaminos */ o = gt_option_new_bool("addstopaminos", "append stop amino acids ('" GT_STOP_AMINO_CSTR"') to given protein sequences, if " "not already present", &arguments->addstopaminos, false); gt_option_parser_add_option(op, o); /* -width */ o = gt_option_new_width(&arguments->width); gt_option_parser_add_option(op, o); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); return op; }
static GtOptionParser* gt_encseq_check_option_parser_new(void *tool_arguments) { GtEncseqCheckArguments *arguments = tool_arguments; GtOptionParser *op; GT_UNUSED GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [file]", "Check the consistency of an encoded " "sequence file."); option = gt_option_new_ulong("scantrials", "specify number of scan trials", &arguments->scantrials, 0); gt_option_parser_add_option(op, option); option = gt_option_new_ulong("multicharcmptrials", "specify number of multicharacter trials", &arguments->multicharcmptrials, 0); gt_option_parser_add_option(op, option); option = gt_option_new_ulong_min_max("prefixlength", "prefix length", &arguments->prefixlength, 0, 0, MAXPREFIXLENGTH); gt_option_parser_add_option(op, option); gt_option_parser_set_min_args(op, 1); return op; }
static GtOptionParser* gt_shredder_option_parser_new(void *tool_arguments) { GtShredderArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *o; gt_assert(arguments); op = gt_option_parser_new("[option ...] [sequence_file ...]", "GtShredder sequence_file into consecutive pieces of " "random length."); o = gt_option_new_ulong_min("coverage", "set the number of times the " "sequence_file is shreddered", &arguments->coverage, 1, 1); gt_option_parser_add_option(op, o); o = gt_option_new_ulong("minlength", "set the minimum length of the shreddered " "fragments", &arguments->minlength, 300); gt_option_parser_add_option(op, o); o = gt_option_new_ulong("maxlength", "set the maximum length of the shreddered " "fragments", &arguments->maxlength, 700); gt_option_parser_add_option(op, o); o = gt_option_new_ulong("overlap", "set the overlap between consecutive " "pieces", &arguments->overlap, 0); gt_option_parser_add_option(op, o); o = gt_option_new_probability("sample", "take samples of the generated " "sequences pieces with the given probability", &arguments->sample_probability, 1.0); gt_option_parser_add_option(op, o); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); return op; }
static GtOptionParser* gt_seqtranslate_option_parser_new(void *tool_arguments) { GtTranslateArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [files]", "Translates a nucleotide sequence into a protein " "sequence."); option = gt_option_new_bool("reverse", "also translate reverse complements", &arguments->reverse, true); gt_option_parser_add_option(op, option); option = gt_option_new_uword("fastawidth", "width of the FASTA output", &arguments->fasta_width, 60); gt_option_parser_add_option(op, option); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); gt_option_parser_set_min_args(op, 1); return op; }
static GtOptionParser* gt_interfeat_option_parser_new(void *tool_arguments) { InterFeatArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [GFF3_file ...]", "Duplicate " "internal feature nodes in given GFF3 files."); /* -outside */ option = gt_option_new_string("dest", "set destination type", arguments->dest_type, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); /* -inter */ option = gt_option_new_string("source", "set source type", arguments->source_type, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); /* output file options */ gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); return op; }
static GtOptionParser* gt_gff3validator_option_parser_new(void *tool_arguments) { GFF3ValidatorArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [GFF3_file ...]", "Strictly validate given GFF3 files."); /* typecheck options */ gt_typecheck_info_register_options(arguments->tci, op); /* xrfcheck options */ gt_xrfcheck_info_register_options(arguments->xci, op); /* -strict */ option = gt_option_new_bool("strict", "be very strict during GFF3 parsing " "(stricter than the specification requires)", &arguments->strict, false); gt_option_is_development_option(option); gt_option_parser_add_option(op, option); return op; }
static GtOptionParser* gt_extractfeat_option_parser_new(void *tool_arguments) { GtExtractFeatArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); op = gt_option_parser_new("[option ...] [GFF3_file]", "Extract features given in GFF3 file from " "sequence file."); /* -type */ option = gt_option_new_string("type", "set type of features to extract", arguments->type, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); /* -join */ option = gt_option_new_bool("join", "join feature sequences in the same " "subgraph into a single one", &arguments->join, false); gt_option_parser_add_option(op, option); /* -translate */ option = gt_option_new_bool("translate", "translate the features (of a DNA " "sequence) into protein", &arguments->translate, false); gt_option_parser_add_option(op, option); /* -seqid */ option = gt_option_new_bool("seqid", "add sequence ID of extracted features " "to FASTA descriptions", &arguments->seqid, false); gt_option_parser_add_option(op, option); /* -target */ option = gt_option_new_bool("target", "add target ID(s) of extracted " "features to FASTA descriptions", &arguments->target, false); gt_option_parser_add_option(op, option); /* -seqfile, -matchdesc, -usedesc and -regionmapping */ gt_seqid2file_register_options(op, arguments->s2fi); /* -v */ option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); /* -width */ option = gt_option_new_width(&arguments->width); gt_option_parser_add_option(op, option); /* output file options */ gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); gt_option_parser_set_max_args(op, 1); return op; }
static GtOptionParser* gt_inlineseq_split_option_parser_new( void *tool_arguments) { GtInlineseqSplitArguments *arguments = tool_arguments; GtOptionParser *op; GtOption GT_UNUSED *option, *seqopt, *gff3opt; gt_assert(arguments); /* init */ op = gt_option_parser_new("(-seqfile <seqfile> | -gff3file <gff3file>) " "[GFF3_file]", "Split GFF3 annotations with inline sequences into " "separate files."); /* -seqfile */ seqopt = gt_option_new_string("seqfile", "output file for sequences as FASTA", arguments->seqoutfile, NULL); gt_option_parser_add_option(op, seqopt); /* -gff3file */ gff3opt = gt_option_new_string("gff3file", "output file for annotations " "as GFF3", arguments->gffoutfile, NULL); gt_option_parser_add_option(op, gff3opt); gt_option_is_mandatory_either(seqopt, gff3opt); return op; }
static GtOptionParser* gt_encseq_bitextract_option_parser_new(void *tool_arguments) { GtEncseqBitextractArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); op = gt_option_parser_new("[option ...] [indexname]", "Extracts internal data from encoded sequences."); option = gt_option_new_bool("mirrored", "mirror sequence", &arguments->mirror, false); gt_option_parser_add_option(op, option); option = gt_option_new_ulong("stoppos", "output stop positions", &arguments->stoppos, GT_UNDEF_ULONG); gt_option_parser_add_option(op, option); option = gt_option_new_bool("specialranges", "output special ranges", &arguments->specialranges, false); gt_option_parser_add_option(op, option); option = gt_option_new_ulong("bitpos", "extract and display " "two bit encoding for position", &arguments->bitpos, GT_UNDEF_ULONG); gt_option_parser_add_option(op, option); gt_encseq_options_add_readmode_option(op, arguments->readmode); gt_option_parser_set_min_args(op, 1U); return op; }
static OPrval parse_options(int *parsed_args, RegionCovArguments *arguments, int argc, const char **argv, GtError *err) { GtOptionParser *op; GtOption *o; OPrval oprval; gt_error_check(err); op = gt_option_parser_new("[option ...] GFF3_file", "Show which parts of the given sequence regions are " "covered by features."); /* -maxfeaturedist */ o = gt_option_new_ulong("maxfeaturedist", "set the maximum distance two " "features can have while still being in the same " "``cluster''", &arguments->max_feature_dist, 0); gt_option_parser_add_option(op, o); /* -v */ o = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, o); /* parse */ gt_option_parser_set_min_max_args(op, 1, 1); oprval = gt_option_parser_parse(op, parsed_args, argc, argv, gt_versionfunc, err); gt_option_parser_delete(op); return oprval; }
static GtOptionParser* gt_script_filter_option_parser_new(void *tool_arguments) { GtScriptFilterArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] [script file(s)]", "Get info about and validate Lua script filters."); /* -showinfo */ option = gt_option_new_bool("showinfo", "show information about filter", &arguments->showinfo, true); gt_option_parser_add_option(op, option); /* -validate */ option = gt_option_new_bool("validate", "validate filter function", &arguments->validate, true); gt_option_parser_add_option(op, option); /* -oneline */ option = gt_option_new_bool("oneline", "show compact information on one line", &arguments->oneline, false); gt_option_parser_add_option(op, option); /* -scriptname */ option = gt_option_new_bool("scriptname", "show script name", &arguments->scriptname, true); gt_option_parser_add_option(op, option); gt_option_parser_set_min_args(op, 1); return op; }
static GtOptionParser* gt_splicesiteinfo_option_parser_new(void *tool_arguments) { SpliceSiteInfoArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); op = gt_option_parser_new("[option ...] [GFF3_file ...]", "Show information " "about splice sites given in GFF3 files."); /* -seqfile, -matchdesc, -usedesc and -regionmapping */ gt_seqid2file_register_options(op, arguments->s2fi); /* -addintrons */ option = gt_option_new_bool("addintrons", "add intron features between " "existing exon features\n(before computing the " "information to be shown)", &arguments->addintrons, false); gt_option_parser_add_option(op, option); /* output file options */ gt_outputfile_register_options(op, &arguments->outfp, arguments->ofi); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); return op; }
static GtOptionParser* gt_compressedbits_option_parser_new(void *tool_arguments) { GtCompressdbitsArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...]", "Testing compressed bitsequence, save to disk, reload."); /* -size */ option = gt_option_new_ulong("size", "size of GtBitsequence to create " "(words 32/64 bit)", &arguments->size, 20UL); gt_option_parser_add_option(op, option); arguments->size_op = gt_option_ref(option); /* -samplerate */ option = gt_option_new_uint("samplerate", "samplerate of random GtBitsequence to test", &arguments->samplerate, 32U); gt_option_parser_add_option(op, option); /* -rand */ option = gt_option_new_bool("rand", "create random bitvector", &arguments->fill_random, false); gt_option_parser_add_option(op, option); arguments->rand_op = gt_option_ref(option); /* -check */ option = gt_option_new_bool("check", "compare original with compressed and " "loaded from file", &arguments->check_consistency, false); gt_option_parser_add_option(op, option); arguments->rand_op = gt_option_ref(option); /* -input */ option = gt_option_new_filename( "input", "load vector from file, format is as follows:\n" "[ULL size in bits][[ULL bits]...]\n" " not usable with -size and -rand", arguments->filename); gt_option_parser_add_option(op, option); arguments->filename_op = gt_option_ref(option); gt_option_exclude(arguments->filename_op, arguments->size_op); gt_option_exclude(arguments->filename_op, arguments->rand_op); /* -benches */ option = gt_option_new_ulong("benches", "number of function calls to benchmark", &arguments->benches, 100000UL); gt_option_parser_add_option(op, option); return op; }
static GtOptionParser* gt_seqids_option_parser_new(GT_UNUSED void *tool_arguments) { GtOptionParser *op; op = gt_option_parser_new("[GFF3_file]", "Show sequence IDs from annotation file."); gt_option_parser_set_min_max_args(op, 1, 1); return op; }
static GtOptionParser* gt_gff3_to_gtf_option_parser_new(void *tool_arguments) { GFF3ToGTFArguments *arguments = tool_arguments; GtOptionParser *op; op = gt_option_parser_new("[GFF3_file ...]", "Parse GFF3 file(s) and show them as GTF2.2."); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); return op; }
static GtOptionParser* gt_seqfilter_option_parser_new(void *tool_arguments) { SeqFilterArguments *arguments = tool_arguments; GtOption *option; GtOptionParser *op; gt_assert(arguments); op = gt_option_parser_new("[option ...] [sequence_file ...]", "Filter the given sequence file(s) and show the " "results on stdout."); /* -minlength */ option = gt_option_new_uword("minlength", "set minimum length a sequence must " "have to pass the filter", &arguments->minlength, GT_UNDEF_UWORD); gt_option_parser_add_option(op, option); /* -maxlength */ option = gt_option_new_uword("maxlength", "set maximum length a sequence can " "have to pass the filter", &arguments->maxlength, GT_UNDEF_UWORD); gt_option_parser_add_option(op, option); /* -maxseqnum */ option = gt_option_new_uword("maxseqnum", "set the maximum number of " "sequences which can pass the filter", &arguments->maxseqnum, GT_UNDEF_UWORD); gt_option_parser_add_option(op, option); /* -sample */ option = gt_option_new_double_min_max("sample", "set a probability for each " "sequence to pass the filter", &arguments->sample_prob, SEQFILTER_DEF_PROB, SEQFILTER_MIN_PROB, SEQFILTER_MAX_PROB); gt_option_parser_add_option(op, option); /* -step */ option = gt_option_new_uword_min("step", "only every 'step'-th sequence " "passes the filter", &arguments->step, SEQFILTER_DEF_STEP, SEQFILTER_MIN_STEP); gt_option_parser_add_option(op, option); /* -width */ option = gt_option_new_width(&arguments->width); gt_option_parser_add_option(op, option); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); return op; }
static GtOptionParser* gt_compreads_compress_option_parser_new(void *tool_arguments) { GtCsrHcrEncodeArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; static const char *methods[] = { "page", "regular", "none" }; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] (-files file [...])", "Generates compact encoding for fastq data."); option = gt_option_new_bool("descs","encode descriptions", &arguments->descs, false); gt_option_parser_add_option(op, option); option = gt_option_new_filename_array("files", "File(s) containing reads.", arguments->files); gt_option_parser_add_option(op, option); option = gt_option_new_string("name", "specify base name for HCR to be" " generated. Only mandatory, if more than one" " file was given.", arguments->name, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_string("smap", "file containing alphabet description." " If \"-smap\" is not set, dna alphabet is" " used.", arguments->smap, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_range("qrange", "specify range of quality values." " All values smaller or equal to the lower bound" " will be converted to the lower bound. All" " values equal or larger than the upper bound" " will be converted to the upper bound.", &arguments->arg_range, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_uword("srate", "sampling rate, set to sensible default" " depending on sampling method", &arguments->srate, GT_UNDEF_UWORD); gt_option_parser_add_option(op, option); option = gt_option_new_choice("stype", "type of sampling\n" "one of regular - page - none", arguments->method, "page", methods); gt_option_parser_add_option(op, option); gt_option_parser_set_min_max_args(op, 0U, 0U); return op; }
static GtOptionParser* gt_compreads_decompress_option_parser_new(void *tool_arguments) { GtCsrHcrDecodeArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] (-file file)", "Decodes a file of compressed reads."); option = gt_option_new_bool("v", "be verbose", &arguments->verbose, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("descs","enable description decoding", &arguments->descs, false); gt_option_parser_add_option(op, option); option = gt_option_new_string("file", "specify base name of files containing" " HCR.", arguments->file, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); option = gt_option_new_string("name", "specify base name for decoded hcr" " (suffix will be \".fastq\")", arguments->name, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_string("smap", "specify file containing alphabet" "description (file must be an .al1 file)." " If \"-smap\" is not set, dna alphabet is" " used.", arguments->smap, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_range("range", "decode multiple consecutive reads." " If range is not specified, the " " entire file will be decoded.", &arguments->rng, NULL); gt_option_parser_add_option(op, option); option = gt_option_new_ulong("benchmark", "decode given number random reads " "and report the time to do this", &arguments->bench, 0); gt_option_is_development_option(option); gt_option_parser_add_option(op, option); gt_option_parser_set_min_max_args(op, 0U, 0U); return op; }
static GtOptionParser* gt_dev_option_parser_new(void *tool_arguments) { GtToolbox *dev_toolbox = tool_arguments; GtOptionParser *op; gt_assert(dev_toolbox); op = gt_option_parser_new("[option ...] dev_tool_name [argument ...]", "Call development tool with name dev_tool_name and " "pass argument(s) to it."); gt_option_parser_set_comment_func(op, gt_toolbox_show, dev_toolbox); gt_option_parser_set_min_args(op, 1); return op; }
static GtOptionParser* gt_packedindex_option_parser_new(void *tool_arguments) { GtToolbox *index_toolbox = tool_arguments; GtOptionParser *op; gt_assert(index_toolbox); op = gt_option_parser_new("[option ...] index_tool [argument ...]", "Call apacked index subtool and pass argument(s) to " "it."); gt_option_parser_set_comment_func(op, gt_toolbox_show, index_toolbox); gt_option_parser_set_min_args(op, 1); gt_option_parser_refer_to_manual(op); return op; }
static GtOptionParser* gt_cds_option_parser_new(void *tool_arguments) { CDSArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); op = gt_option_parser_new("[option ...] [GFF3_file]", "Add CDS (coding sequence) features to exon " "features given in GFF3 file."); /* -minorflen */ option = gt_option_new_uint_min("minorflen", "set the minimum length an open " "reading frame (ORF) must have to be added " "as a CDS feature (measured in amino acids)", &arguments->minorflen, 64, 1); gt_option_parser_add_option(op, option); /* -startcodon */ option = gt_option_new_bool("startcodon", "require than an ORF must begin " "with a start codon", &arguments->start_codon, false); gt_option_parser_add_option(op, option); /* -finalstopcodon */ option = gt_option_new_bool("finalstopcodon", "require that the final ORF " "must end with a stop codon", &arguments->final_stop_codon, false); gt_option_parser_add_option(op, option); /* -genericstartcodons */ option = gt_option_new_bool("genericstartcodons", "use generic start codons", &arguments->generic_start_codons, false); gt_option_is_development_option(option); gt_option_parser_add_option(op, option); /* -seqfile, -matchdesc, -usedesc and -regionmapping */ gt_seqid2file_register_options(op, arguments->s2fi); /* -v */ option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); /* output file options */ gt_outputfile_register_options(op, &arguments->outfp, arguments->ofi); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); gt_option_parser_set_max_args(op, 1); return op; }
static GtOptionParser* gt_cge_option_parser_new(void *tool_arguments) { GtToolbox *index_toolbox = tool_arguments; GtOptionParser *op; gt_assert(index_toolbox != NULL); op = gt_option_parser_new( "[option ...] congruence_tool [argument ...]", "Call a congruence subtool and pass argument(s) to it."); gt_option_parser_set_comment_func(op, gt_toolbox_show, index_toolbox); gt_option_parser_set_min_args(op, 1U); gt_option_parser_refer_to_manual(op); return op; }
static GtOptionParser* gt_speck_option_parser_new(void *tool_arguments) { GtOptionParser *op; GtOption *option; SpeccheckArguments *arguments = tool_arguments; /* init */ op = gt_option_parser_new("[options] [GFF3_file ...]", "Checks spec definition compliance in GFF3 input."); option = gt_option_new_filename("specfile", "file with specification definition", arguments->specfile); gt_option_parser_add_option(op, option); gt_option_is_mandatory(option); option = gt_option_new_bool("colored", "show colored output", &arguments->colored, true); gt_option_parser_add_option(op, option); option = gt_option_new_bool("provideindex", "provide feature index in " "specfile namespace (requires O(n) memory for n " "input features)", &arguments->provideindex, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("sort", "sort input before checking (requires " "O(n) memory for n input features)", &arguments->sort, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("failhard", "stop processing and report runtime " "errors instead of recording them in the results", &arguments->fail_hard, false); gt_option_parser_add_option(op, option); /* -format */ option = gt_option_new_string("output", "output format\n" "choose from: json, text, html, statsonly", arguments->format, "text"); gt_option_parser_add_option(op, option); gt_typecheck_info_register_options_with_default(arguments->tci, op, "so"); gt_seqid2file_register_options_ext(op, arguments->s2fi, false, false); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); return op; }
static GtOptionParser* gt_sequniq_option_parser_new(void *tool_arguments) { GtSequniqArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *seqit_option, *verbose_option, *width_option, *rev_option, *nofseqs_option; gt_assert(arguments); op = gt_option_parser_new("[option ...] sequence_file [...] ", "Filter out repeated sequences in given " "sequence files."); /* -seqit */ seqit_option = gt_option_new_bool("seqit", "use sequence iterator", &arguments->seqit, false); gt_option_is_development_option(seqit_option); gt_option_parser_add_option(op, seqit_option); /* -nofseqs */ nofseqs_option = gt_option_new_uword("nofseqs", "number of sequences " "(improves efficiency)\ndefault: unspecified", &arguments->nofseqs, 0); gt_option_is_development_option(nofseqs_option); gt_option_hide_default(nofseqs_option); gt_option_parser_add_option(op, nofseqs_option); /* -rev */ rev_option = gt_option_new_bool("rev", "also filter out sequences whose " "reverse complement is identical to a sequence already output", &arguments->rev, false); gt_option_parser_add_option(op, rev_option); /* -v */ verbose_option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, verbose_option); /* -width */ width_option = gt_option_new_width(&arguments->width); gt_option_parser_add_option(op, width_option); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); /* option implications */ gt_option_imply(verbose_option, seqit_option); gt_option_parser_set_comment_func(op, gt_gtdata_show_help, NULL); gt_option_parser_set_min_args(op, 1U); return op; }
static GtOptionParser* gt_condenseq_hmmsearch_option_parser_new(void *tool_arguments) { GtCondenseqHmmsearchArguments *arguments = tool_arguments; GtOptionParser *op; GtOption *option; gt_assert(arguments); /* init */ op = gt_option_parser_new("[option ...] -db DATABASE -hmm HMMPROFILE", "Perform a hmmsearch on the given compressed " "database."); /* -db and -verbose */ gt_condenseq_search_register_options(arguments->csa, op); /* -hmm */ option = gt_option_new_string("hmm", "hmm query", arguments->hmm, NULL); gt_option_is_mandatory(option); gt_option_parser_add_option(op, option); /* -hmmsearch */ option = gt_option_new_string("hmmsearch", "path to hmmsearch, please set if " "not installed at (linux) default location", arguments->hmmsearch_path, "/usr/bin/hmmsearch"); gt_option_parser_add_option(op, option); /* -tblout */ option = gt_option_new_string("tblout", "file basename to output tabular " "hmmsearch output to (like hmmer option " "--tblout). Depending on -max_queries will " "produce multiple numbered files.", arguments->outtable_filename, NULL); gt_option_parser_add_option(op, option); /* -force_ow */ option = gt_option_new_bool("force_ow", "force overwrite of existing files", &arguments->force_ow, false); gt_option_parser_add_option(op, option); /* -max_queries */ option = gt_option_new_uint("max_queries", "maximum number of queries per " "fine search, influences file-size and therefore " "speed!, 0 disables splitting", &arguments->max_queries, 5U); gt_option_parser_add_option(op, option); return op; }
static GtOptionParser* gt_speck_option_parser_new(void *tool_arguments) { GtOptionParser *op; GtOption *option; SpeccheckArguments *arguments = tool_arguments; /* init */ op = gt_option_parser_new("[options] [GFF3_file ...]", "Checks spec definition compliance in GFF3 input."); option = gt_option_new_filename("specfile", "file with specification definition", arguments->specfile); gt_option_parser_add_option(op, option); gt_option_is_mandatory(option); option = gt_option_new_bool("colored", "show colored output", &arguments->colored, true); gt_option_parser_add_option(op, option); option = gt_option_new_bool("allexpects", "show results counted by " "expectations instead of by nodes", &arguments->allexpects, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("provideindex", "provide feature index in " "specfile namespace (requires O(n) memory for n " "input features)", &arguments->provideindex, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("sort", "sort input before checking (requires " "O(n) memory for n input features)", &arguments->sort, false); gt_option_parser_add_option(op, option); option = gt_option_new_bool("failhard", "stop processing and report runtime " "errors instead of recording them in the results", &arguments->fail_hard, false); gt_option_parser_add_option(op, option); option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); gt_seqid2file_register_options(op, arguments->s2fi); gt_output_file_info_register_options(arguments->ofi, op, &arguments->outfp); return op; }
static GtOptionParser *gt_tyr_search_option_parser_new(void *tool_arguments) { GtOptionParser *op; GtOption *option, *optiontyr, *optionqueries; Tyr_search_options *arguments = tool_arguments; op = gt_option_parser_new("[options] -tyr tallymer-index -q queryfile0 " "[queryfile1..] [options]", "Search a set of k-mers in an index constructed " "by \"gt tyr mkindex\"."); gt_option_parser_set_mailaddress(op,"<*****@*****.**>"); optiontyr = gt_option_new_string("tyr","specify tallymer-index", arguments->str_inputindex, NULL); gt_option_is_mandatory(optiontyr); gt_option_parser_add_option(op, optiontyr); optionqueries = gt_option_new_filenamearray("q","specify query file names", arguments->queryfilenames); gt_option_is_mandatory(optionqueries); gt_option_parser_add_option(op, optionqueries); option = gt_option_new_string("strand", "specify the strand to be searched: " "use f (for forward strand) or " "p (for reverse complemented strand) or " "fp (for both); default is f", arguments->strandspec, "f"); gt_option_parser_add_option(op, option); option = gt_option_new_stringarray("output", "specify output flags " "(qseqnum, qpos, counts, sequence)", arguments->showmodespec); gt_option_parser_add_option(op, option); option = gt_option_new_bool("test", "perform tests to verify program " "correctness", &arguments->performtest, false); gt_option_is_development_option(option); gt_option_parser_add_option(op, option); option = gt_option_new_verbose(&arguments->verbose); gt_option_parser_add_option(op, option); return op; }
static GtOPrval parse_options(int *parsed_args, int argc, const char **argv, GtError *err) { GtOptionParser *op; GtOPrval oprval; gt_error_check(err); op = gt_option_parser_new("file [...]", "Map the supplied files into memory and " "read them once."); gt_option_parser_set_min_args(op, 1); oprval = gt_option_parser_parse(op, parsed_args, argc, argv, gt_versionfunc, err); gt_option_parser_delete(op); return oprval; }