labelset_parser.LabelSetParser
labelset_parser.LabelSetParser(self, parser=None, parser_path=None)
A labelset parser object
Parameters
Name | Type | Description | Default |
---|---|---|---|
parser |
dict | A dictionary defining the parser rules. Defaults to None. | None |
parser_path |
Path | A path to a yaml file definition of the parser. Defaults to None. | None |
Methods
Name | Description |
---|---|
apply_parser | Apply the parser to a single interval |
map_parser | Map the parser to an entire sequence tier. |
read_parser | Read in a yaml file defining the parser |
validate_parser | Validate wellformedness of parser |
apply_parser
labelset_parser.LabelSetParser.apply_parser(obj)
Apply the parser to a single interval
Parameters
Name | Type | Description | Default |
---|---|---|---|
obj |
SequenceInterval | A SequenceInterval | required |
map_parser
labelset_parser.LabelSetParser.map_parser(obj)
Map the parser to an entire sequence tier.
Parameters
Name | Type | Description | Default |
---|---|---|---|
obj |
SequenceTier | A SequenceTier | required |
read_parser
labelset_parser.LabelSetParser.read_parser(path)
Read in a yaml file defining the parser
Parameters
Name | Type | Description | Default |
---|---|---|---|
path |
Path | Path to the yaml file definition. | required |
validate_parser
labelset_parser.LabelSetParser.validate_parser(parser)
Validate wellformedness of parser
Parameters
Name | Type | Description | Default |
---|---|---|---|
parser |
dict | parser dictionary | required |
Raises
Type | Description |
---|---|
Exception | Any errors raised by the validator |