Esempio n. 1
0
 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)
Esempio n. 2
0
 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)
Esempio n. 3
0
 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)
Esempio n. 4
0
 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)
Esempio n. 5
0
 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)
Esempio n. 6
0
 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)
Esempio n. 7
0
 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)
Esempio n. 8
0
 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})
Esempio n. 9
0
 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())
Esempio n. 10
0
 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)
Esempio n. 11
0
 def device(required=True, default=None):
     return CaseSensitiveStringParameter(DEVICE, "Device name.",
                                         required=required,
                                         allow_multiple=False,
                                         enum=get_devices(),
                                         default=default)
Esempio n. 12
0
 def dye(name, description, required=False, default=None):
     return CaseSensitiveStringParameter(name, description,
                                         required=required,
                                         allow_multiple=False,
                                         enum=get_dyes(),
                                         default=default)
Esempio n. 13
0
 def archive(required=True):
     return CaseSensitiveStringParameter(ARCHIVE, "Archive directory name.",
                            required=required,
                            allow_multiple=False,
                            enum=get_archives())
Esempio n. 14
0
 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())