def ac_method(name, description, required=True, default=AC_MODEL_NAIVE_BAYES): return CaseSensitiveStringParameter(name, description, required=required, allow_multiple=False, enum=[AC_MODEL_GMM, AC_MODEL_NAIVE_BAYES, AC_MODEL_CUTPOINT], default=default)
def chromosome_num(required=False, allow_multiple=True, param_type=PARAMETER_TYPES.query): # @UndefinedVariable """ Create a parameter instance for specifying chromosome number. """ return CaseSensitiveStringParameter(CHR_NUM, "Comma separated " \ "integers specifying chromosome " \ "numbers. ", required=required, allow_multiple=allow_multiple, param_type=param_type)
def sequence_names(required=False, allow_multiple=True, param_type=PARAMETER_TYPES.query): # @UndefinedVariable """ Create a parameter instance for specifying sequence name(s). """ return CaseSensitiveStringParameter(SEQUENCE_NAME, "Comma separated " \ "sequence name(s). ", param_type=param_type, required=required, allow_multiple=allow_multiple)
def filenames(required=True, allow_multiple=True, param_type=PARAMETER_TYPES.query): # @UndefinedVariable """ Create a parameter instance for specifying filename(s). """ return CaseSensitiveStringParameter(FILENAMES, "Comma separated list " \ "of target filename(s) to delete.", param_type=param_type, required=required, allow_multiple=allow_multiple)
def snpsearch_name(required=False, allow_multiple=True, param_type=PARAMETER_TYPES.query): # @UndefinedVariable """ Create a parameter instance for specifying chromosome number. """ return CaseSensitiveStringParameter(SNP_SEARCH_NAME, "Comma " \ "separated integers specifying " \ "snp search name. ", required=required, allow_multiple=allow_multiple, param_type=param_type)
def format(): """ Create a parameter instance for defining the return format of the result. """ return CaseSensitiveStringParameter(FORMAT, "Format of result.", FORMATS._fields, default=FORMATS.json, # @UndefinedVariable allow_multiple=False)
def available_stacks(cls, name, description, stack_type, required=True, allow_multiple=False): existing_stacks = cls._DB_CONNECTOR.find(IMAGES_COLLECTION, {STACK_TYPE: stack_type}, [NAME]) uniq_names = set([rec[NAME] for rec in existing_stacks]) return CaseSensitiveStringParameter(name, description, required=required, allow_multiple=allow_multiple, enum=uniq_names)
def mon_camera_type(name=STACK_TYPE, description=None, required=True, allow_multiple=True, default=None): if not description: description = "Comma separated list of available monitor cameras." return CaseSensitiveStringParameter(name, description, required=required, allow_multiple=allow_multiple, default=default, enum={MONITOR1, MONITOR2})
def dyes(name=DYES, description=None, required=True, allow_multiple=True, default=None): if not description: description = "Comma separated list of dye names." return CaseSensitiveStringParameter(name, description, required=required, allow_multiple=allow_multiple, default=default, enum=get_dyes())
def cs_string(name, description, alias=None, required=True, allow_multiple=False, enum=None): return CaseSensitiveStringParameter(name, description, alias=alias, required=required, allow_multiple=allow_multiple)
def device(required=True, default=None): return CaseSensitiveStringParameter(DEVICE, "Device name.", required=required, allow_multiple=False, enum=get_devices(), default=default)
def dye(name, description, required=False, default=None): return CaseSensitiveStringParameter(name, description, required=required, allow_multiple=False, enum=get_dyes(), default=default)
def archive(required=True): return CaseSensitiveStringParameter(ARCHIVE, "Archive directory name.", required=required, allow_multiple=False, enum=get_archives())
def pa_data_source(required=True): return CaseSensitiveStringParameter(PA_DATA_SOURCE, "Primary analysis data source.", required=required, allow_multiple=False, enum=get_archives()+get_hdf5_dataset_names())