hybkit.settings

This module contains settings information for hybkit classes and methods.

hybkit.settings.HYB_SUFFIXES = ['.hyb', '.Hyb', '.HYB']

Allowed suffixes for “Hyb” files.

hybkit.settings.VIENNA_SUFFIXES = ['.vienna', '.Vienna', '.VIENNA']

Allowed suffixes for “Vienna” files.

hybkit.settings.CT_SUFFIXES = ['.ct', '.Ct', '.CT']

Allowed suffixes for “Connection-Table” files.

hybkit.settings.FOLD_SUFFIXES = ['.vienna', '.Vienna', '.VIENNA', '.ct', '.Ct', '.CT']

Allowed suffixes for “Vienna” and “Connection-Table” files.

hybkit.settings.MIRNA_TYPES = ['miRNA', 'microRNA']

Default miRNA types for use in mirna_analysis().

hybkit.settings.HybRecord_settings_info

Information for settings of HybRecord class. Copied into HybRecord_settings for use at runtime.

hybkit.settings.HybRecord_settings_info = {
'allow_undefined_flags': {'Argp-Flag': None,
                           'Argp-Opts': {'const': True, 'nargs': '?'},
                           'Argp-Type': 'custom_bool_from_str',
                           'Def-Val': False,
                           'Desc.': 'Allow use of flags not definied in the '
                                    'hybkit-specificiation order when reading and '
                                    'writing hyb records. As the preferred '
                                    'alternative to using this setting, the '
                                    '--custom_flags arguement can be be used to '
                                    'supply custom allowed flags.'},
 'allow_unknown_seg_types': {'Argp-Flag': None,
                             'Argp-Opts': {'const': True, 'nargs': '?'},
                             'Argp-Type': 'custom_bool_from_str',
                             'Def-Val': False,
                             'Desc.': 'Allow unknown segment types when assigning '
                                      'segment types.'},
 'check_complete_seg_types': {'Argp-Flag': None,
                              'Argp-Opts': {'const': True, 'nargs': '?'},
                              'Argp-Type': 'custom_bool_from_str',
                              'Def-Val': False,
                              'Desc.': 'Check every segment possibility when '
                                       'assigning segment types, rather than '
                                       'breaking after the first match is found. If '
                                       'True, finding segment types is slower but '
                                       'better at catching errors.'},
 'custom_flags': {'Argp-Flag': None,
                  'Argp-Opts': {'nargs': '+'},
                  'Argp-Type': 'str',
                  'Def-Val': [],
                  'Desc.': 'Custom flags to allow in addition to those specified in '
                           'the hybkit specification.'},
 'hyb_placeholder': {'Argp-Flag': None,
                     'Argp-Opts': {},
                     'Argp-Type': 'str',
                     'Def-Val': '.',
                     'Desc.': 'placeholder character/string for missing data in hyb '
                              'files.'},
 'mirna_types': {'Argp-Flag': None,
                 'Argp-Opts': {'nargs': '+'},
                 'Argp-Type': 'str',
                 'Def-Val': ['miRNA', 'microRNA'],
                 'Desc.': '"seg_type" fields identifying a miRNA'},
 'reorder_flags': {'Argp-Flag': None,
                   'Argp-Opts': {},
                   'Argp-Type': 'custom_bool_from_str',
                   'Def-Val': True,
                   'Desc.': 'Re-order flags to the hybkit-specificiation order when '
                            'writing hyb records.'}
}
hybkit.settings.HybFile_settings_info

Information for settings of HybFile class. Copied into HybFile_settings for use at runtime.

hybkit.settings.HybFile_settings_info = {
'hybformat_id': {'Argp-Flag': None,
                  'Argp-Opts': {'const': True, 'nargs': '?'},
                  'Argp-Type': 'custom_bool_from_str',
                  'Def-Val': False,
                  'Desc.': 'The Hyb Software Package places further information in '
                           'the "id" field of the hybrid record that can be used to '
                           'infer the number of contained read counts. When set to '
                           'True, the identifiers will be parsed as: '
                           '"<read_id>_<read_count>"'},
 'hybformat_ref': {'Argp-Flag': None,
                   'Argp-Opts': {'const': True, 'nargs': '?'},
                   'Argp-Type': 'custom_bool_from_str',
                   'Def-Val': False,
                   'Desc.': 'The Hyb Software Package uses a reference database '
                            'with identifiers that contain sequence type and other '
                            'sequence information. When set to True, all hyb file '
                            'identifiers will be parsed as: '
                            '"<gene_id>_<transcript_id>_<gene_name>_<seg_type>"'}
}
hybkit.settings.FoldRecord_settings_info

Information for settings of FoldRecord class. Copied into FoldRecord_settings for use at runtime.

hybkit.settings.FoldRecord_settings_info = {
'allowed_mismatches': {'Argp-Flag': None,
                        'Argp-Opts': {},
                        'Argp-Type': 'int',
                        'Def-Val': 0,
                        'Desc.': 'For DynamicFoldRecords, allowed number of '
                                 'mismatches with a HybRecord.'},
 'fold_placeholder': {'Argp-Flag': None,
                      'Argp-Opts': {},
                      'Argp-Type': 'str',
                      'Def-Val': '.',
                      'Desc.': 'Placeholder character/string for missing data for '
                               'reading/writing fold records.'}
}
hybkit.settings.FoldFile_settings_info

Information for settings of FoldFile class. Copied into FoldFile_settings for use at runtime.

hybkit.settings.FoldFile_settings_info = {
'foldfile_error_mode': {'Argp-Flag': None,
                         'Argp-Opts': {'choices': {'raise',
                                                   'return',
                                                   'warn_return'}},
                         'Argp-Type': 'str',
                         'Def-Val': 'raise',
                         'Desc.': 'Mode for handling errors during reading of '
                                  'HybFiles (overridden by '
                                  "HybFoldIter.settings['error_mode'] when using "
                                  'HybFoldIter). Options: "raise": Raise an error '
                                  'when encountered and exit program; '
                                  '"warn_return": Print a warning and return the '
                                  'error_value ; "return": Return the error value '
                                  'with no program output. record is encountered.'},
 'foldrecord_type': {'Argp-Flag': None,
                     'Argp-Opts': {'choices': ['strict', 'dynamic']},
                     'Argp-Type': 'str',
                     'Def-Val': 'strict',
                     'Desc.': 'Type of fold record object to use. Options: '
                              '"strict": FoldRecord, requires an exact sequence '
                              'match to be paired with a HybRecord; "dynamic": '
                              'DynamicFoldRecord, requires a sequence match to the '
                              '"dynamic" annotated regions of a HybRecord, and may '
                              'be shorter/longer than the original sequence.'}
}
hybkit.settings.HybFoldIter_settings_info

Information for settings of HybFoldIter class. Copied into HybFoldIter_settings for use at runtime.

hybkit.settings.HybFoldIter_settings_info = {
'error_checks': {'Argp-Flag': None,
                  'Argp-Opts': {'choices': {'foldrecord_nofold',
                                            'hybrecord_indel',
                                            'max_mismatch'}},
                  'Argp-Type': 'str',
                  'Def-Val': ['hybrecord_indel',
                              'foldrecord_nofold',
                              'max_mismatch'],
                  'Desc.': 'Error checks for simultaneous HybFile and FoldFile '
                           'parsing. Options: "hybrecord_indel": Error for '
                           'HybRecord objects where one/both sequences have '
                           'insertions/deletions in alignment, which prevents '
                           'matching of sequences; "foldrecord_nofold": Error when '
                           'failure in reading a fold_record object; '
                           '"max_mismatch": Error when mismatch between hybrecord '
                           'and foldrecord sequences is'},
 'error_mode': {'Argp-Flag': None,
                'Argp-Opts': {'choices': {'raise',
                                          'skip',
                                          'warn_return',
                                          'warn_skip'}},
                'Argp-Type': 'str',
                'Def-Val': 'warn_skip',
                'Desc.': 'Mode for handling errors found during error checks. '
                         'Options: "raise": Raise an error when encountered and '
                         'exit program; "warn_return": Print a warning and return '
                         'the value ; "warn_skip": Print a warning and continue to '
                         'the next iteration; "skip": Continue to the next '
                         'iteration without any output.'},
 'max_sequential_skips': {'Argp-Flag': None,
                          'Argp-Opts': {},
                          'Argp-Type': 'int',
                          'Def-Val': 20,
                          'Desc.': 'Maximum number of record(-pairs) to skip in a '
                                   'row. Limited as several sequential skips '
                                   'usually indicates an issue with record '
                                   'formatting or a desynchrnoization between '
                                   'files.'}
}
hybkit.settings.Analysis_settings_info

Information for settings of Analysis class. Copied into Analysis_settings for use at runtime.

hybkit.settings.Analysis_settings_info = {
'allow_mirna_dimers': {'Argp-Flag': None,
                        'Argp-Opts': {'const': True, 'nargs': '?'},
                        'Argp-Type': 'custom_bool_from_str',
                        'Def-Val': False,
                        'Desc.': 'Include miRNA / miRNA dimers in TargetAnalysis. '
                                 'If False, exclude these from analysis results.'},
 'count_mode': {'Argp-Flag': None,
                'Argp-Opts': {'choices': ['read', 'record']},
                'Argp-Type': 'str',
                'Def-Val': 'record',
                'Desc.': 'Method for counting records. "read": use the number of '
                         'reads per hyb record as the count (may contain PCR '
                         'duplicates); "record" count the number of records '
                         'represented by each (hyb record entry 1 for "unmerged" '
                         'records, >= 1 for "merged" records)'},
 'mirna_sort': {'Argp-Flag': None,
                'Argp-Opts': {},
                'Argp-Type': 'custom_bool_from_str',
                'Def-Val': True,
                'Desc.': 'During TypeAnalysis, sort miRNAs first for '
                         '"miRNA"-"Other" segtype pairs. If False, sort '
                         'alphabetically.'},
 'out_delim': {'Argp-Flag': None,
               'Argp-Opts': {},
               'Argp-Type': 'str',
               'Def-Val': ',',
               'Desc.': 'Delimiter-string to place between fields in analysis '
                        'output.'},
 'type_sep': {'Argp-Flag': None,
              'Argp-Opts': {},
              'Argp-Type': 'str',
              'Def-Val': '-',
              'Desc.': 'Separator-string to place between types in analysis '
                       'output.'}
}
hybkit.settings.HybRecord_settings = {'allow_undefined_flags': False, 'allow_unknown_seg_types': False, 'check_complete_seg_types': False, 'custom_flags': [], 'hyb_placeholder': '.', 'mirna_types': ['miRNA', 'microRNA'], 'reorder_flags': True}

Settings for HybRecord, created from HybRecord_settings_info

hybkit.settings.HybFile_settings = {'hybformat_id': False, 'hybformat_ref': False}

Settings for HybFile, created from HybFile_settings_info

hybkit.settings.FoldRecord_settings = {'allowed_mismatches': 0, 'fold_placeholder': '.'}

Settings for FoldRecord, created from FoldRecord_settings_info

hybkit.settings.FoldFile_settings = {'foldfile_error_mode': 'raise', 'foldrecord_type': 'strict'}

Settings for FoldFile, created from FoldFile_settings_info

hybkit.settings.HybFoldIter_settings = {'error_checks': ['hybrecord_indel', 'foldrecord_nofold', 'max_mismatch'], 'error_mode': 'warn_skip', 'max_sequential_skips': 20}

Settings for HybFoldIter, created from HybFoldIter_settings_info

hybkit.settings.Analysis_settings = {'allow_mirna_dimers': False, 'count_mode': 'record', 'mirna_sort': True, 'out_delim': ',', 'type_sep': '-'}

Settings for BaseAnalysis, created from Analysis_settings_info