class ServiceHealth(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "ServiceHealth", "namespace": "org.gel.models.system.avro", "fields":
[{"name": "serviceName", "type": "string"}, {"name": "requestUrl", "type": "string"}, {"name":
"datetime", "type": "string"}, {"name": "status", "type": {"type": "enum", "name": "Status", "doc":
"", "symbols": ["OK", "DOWN"]}}, {"name": "dependencies", "type": {"type": "record", "name":
"Dependencies", "doc": "", "fields": [{"name": "datastores", "type": {"type": "array", "items":
{"type": "record", "name": "DataStore", "doc": "", "fields": [{"name": "type", "type": "string"},
{"name": "description", "type": "string"}, {"name": "url", "type": {"type": "array", "items":
"string"}}, {"name": "status", "type": "Status"}, {"name": "additionalProperties", "type": ["null",
{"type": "map", "values": "string"}]}]}}}, {"name": "apis", "type": {"type": "array", "items":
{"type": "record", "name": "API", "doc": "", "fields": [{"name": "type", "type": {"type": "enum",
"name": "APIType", "symbols": ["REST", "MONGODB", "OTHER"]}}, {"name": "description", "type":
"string"}, {"name": "url", "type": {"type": "array", "items": "string"}}, {"name": "status", "type":
"Status"}, {"name": "additionalProperties", "type": ["null", {"type": "map", "values":
"string"}]}]}}}]}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "datetime",
        "dependencies",
        "requestUrl",
        "serviceName",
        "status",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'dependencies': Dependencies,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'dependencies': Dependencies,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'datetime', 'dependencies', 'requestUrl', 'serviceName',
        'status'
    ]

    def __init__(self, **kwargs):
        self.datetime = kwargs.get(
            'datetime', None)
        self.dependencies = kwargs.get(
            'dependencies', Dependencies())
        self.requestUrl = kwargs.get(
            'requestUrl', None)
        self.serviceName = kwargs.get(
            'serviceName', None)
        self.status = kwargs.get(
            'status', None)
Beispiel #2
0
class Transcript(ProtocolElement):
    """
    All coverage information about a given transcript
    """
    _schemaSource = """
{"type": "record", "name": "Transcript", "namespace": "org.gel.models.coverage.avro", "doc": "",
"fields": [{"name": "id", "type": "string", "doc": ""}, {"name": "stats", "type": {"type": "record",
"name": "RegionStatistics", "doc": "", "fields": [{"name": "avg", "type": "float", "doc": ""},
{"name": "sd", "type": "float", "doc": ""}, {"name": "med", "type": "float", "doc": ""}, {"name":
"gc", "type": ["null", "float"], "doc": ""}, {"name": "pct75", "type": "float", "doc": ""}, {"name":
"pct25", "type": "float", "doc": ""}, {"name": "bases", "type": ["null", "int"], "doc": ""},
{"name": "bases_lt_15x", "type": ["null", "int"], "doc": ""}, {"name": "bases_gte_15x", "type":
["null", "int"], "doc": ""}, {"name": "bases_gte_30x", "type": ["null", "int"], "doc": ""}, {"name":
"bases_gte_50x", "type": ["null", "int"], "doc": ""}, {"name": "gte50x", "type": "float", "doc":
""}, {"name": "gte30x", "type": "float", "doc": ""}, {"name": "gte15x", "type": "float", "doc": ""},
{"name": "lt15x", "type": "float", "doc": ""}, {"name": "rmsd", "type": ["null", "float"], "doc":
""}]}, "doc": ""}, {"name": "exons", "type": ["null", {"type": "array", "items": {"type": "record",
"name": "Exon", "doc": "", "fields": [{"name": "exon", "type": "string", "doc": ""}, {"name": "s",
"type": "int", "doc": ""}, {"name": "padded_s", "type": ["null", "int"], "doc": ""}, {"name": "e",
"type": "int", "doc": ""}, {"name": "padded_e", "type": ["null", "int"], "doc": ""}, {"name": "l",
"type": ["null", "int"], "doc": ""}, {"name": "gaps", "type": {"type": "array", "items": {"type":
"record", "name": "CoverageGap", "doc": "", "fields": [{"name": "s", "type": "int", "doc": ""},
{"name": "e", "type": "int", "doc": ""}, {"name": "l", "type": ["null", "int"], "doc": ""}]}},
"doc": ""}, {"name": "stats", "type": "RegionStatistics", "doc": ""}]}}], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "exons",
        "id",
        "stats",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'exons': Exon,
            'stats': RegionStatistics,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'exons': Exon,
            'stats': RegionStatistics,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'exons', 'id', 'stats'
    ]

    def __init__(self, **kwargs):
        self.exons = kwargs.get(
            'exons', None)
        self.id = kwargs.get(
            'id', None)
        self.stats = kwargs.get(
            'stats', RegionStatistics())
Beispiel #3
0
class WholeGenome(ProtocolElement):
    """
    No documentation
    """
    _schemaSource = """
{"type": "record", "name": "WholeGenome", "namespace": "org.gel.models.coverage.avro", "fields":
[{"name": "stats", "type": {"type": "record", "name": "RegionStatistics", "doc": "", "fields":
[{"name": "avg", "type": "float", "doc": ""}, {"name": "sd", "type": "float", "doc": ""}, {"name":
"med", "type": "float", "doc": ""}, {"name": "gc", "type": ["null", "float"], "doc": ""}, {"name":
"pct75", "type": "float", "doc": ""}, {"name": "pct25", "type": "float", "doc": ""}, {"name":
"bases", "type": ["null", "int"], "doc": ""}, {"name": "bases_lt_15x", "type": ["null", "int"],
"doc": ""}, {"name": "bases_gte_15x", "type": ["null", "int"], "doc": ""}, {"name": "bases_gte_30x",
"type": ["null", "int"], "doc": ""}, {"name": "bases_gte_50x", "type": ["null", "int"], "doc": ""},
{"name": "gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""},
{"name": "gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""},
{"name": "rmsd", "type": ["null", "float"], "doc": ""}]}, "doc": ""}, {"name": "chrs", "type":
{"type": "array", "items": {"type": "record", "name": "Chromosome", "doc": "", "fields": [{"name":
"chr", "type": "string", "doc": ""}, {"name": "avg", "type": "float", "doc": ""}, {"name": "sd",
"type": "float", "doc": ""}, {"name": "med", "type": "float", "doc": ""}, {"name": "gc", "type":
["null", "float"], "doc": ""}, {"name": "pct75", "type": "float", "doc": ""}, {"name": "pct25",
"type": "float", "doc": ""}, {"name": "bases", "type": "int", "doc": ""}, {"name": "gte50x", "type":
"float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""}, {"name": "gte15x", "type":
"float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""}, {"name": "rmsd", "type":
["null", "float"], "doc": ""}]}}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "chrs",
        "stats",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'chrs': Chromosome,
            'stats': RegionStatistics,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'chrs': Chromosome,
            'stats': RegionStatistics,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'chrs', 'stats'
    ]

    def __init__(self, **kwargs):
        self.chrs = kwargs.get(
            'chrs', None)
        self.stats = kwargs.get(
            'stats', RegionStatistics())
class Dependencies(ProtocolElement):
    """
    Represents contract of all dependencies for a service
    """
    _schemaSource = """
{"type": "record", "name": "Dependencies", "namespace": "org.gel.models.system.avro", "doc": "",
"fields": [{"name": "datastores", "type": {"type": "array", "items": {"type": "record", "name":
"DataStore", "doc": "", "fields": [{"name": "type", "type": "string"}, {"name": "description",
"type": "string"}, {"name": "url", "type": {"type": "array", "items": "string"}}, {"name": "status",
"type": {"type": "enum", "name": "Status", "doc": "", "symbols": ["OK", "DOWN"]}}, {"name":
"additionalProperties", "type": ["null", {"type": "map", "values": "string"}]}]}}}, {"name": "apis",
"type": {"type": "array", "items": {"type": "record", "name": "API", "doc": "", "fields": [{"name":
"type", "type": {"type": "enum", "name": "APIType", "symbols": ["REST", "MONGODB", "OTHER"]}},
{"name": "description", "type": "string"}, {"name": "url", "type": {"type": "array", "items":
"string"}}, {"name": "status", "type": "Status"}, {"name": "additionalProperties", "type": ["null",
{"type": "map", "values": "string"}]}]}}}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "apis",
        "datastores",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'apis': API,
            'datastores': DataStore,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'apis': API,
            'datastores': DataStore,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'apis', 'datastores'
    ]

    def __init__(self, **kwargs):
        self.apis = kwargs.get(
            'apis', None)
        self.datastores = kwargs.get(
            'datastores', None)
class DataStore(ProtocolElement):
    """
    Represents the contract of DataStore. Type of the datastore can be
    mongodb, postgres, etc
    """
    _schemaSource = """
{"type": "record", "name": "DataStore", "namespace": "org.gel.models.system.avro", "doc": "",
"fields": [{"name": "type", "type": "string"}, {"name": "description", "type": "string"}, {"name":
"url", "type": {"type": "array", "items": "string"}}, {"name": "status", "type": {"type": "enum",
"name": "Status", "doc": "", "symbols": ["OK", "DOWN"]}}, {"name": "additionalProperties", "type":
["null", {"type": "map", "values": "string"}]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalProperties",
        "description",
        "status",
        "type",
        "url",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalProperties', 'description', 'status', 'type', 'url'
    ]

    def __init__(self, **kwargs):
        self.additionalProperties = kwargs.get(
            'additionalProperties', None)
        self.description = kwargs.get(
            'description', None)
        self.status = kwargs.get(
            'status', None)
        self.type = kwargs.get(
            'type', None)
        self.url = kwargs.get(
            'url', None)
class API(ProtocolElement):
    """
    Represents the contract of API dependency (either REST or OTHER)
    """
    _schemaSource = """
{"type": "record", "name": "API", "namespace": "org.gel.models.system.avro", "doc": "", "fields":
[{"name": "type", "type": {"type": "enum", "name": "APIType", "symbols": ["REST", "MONGODB",
"OTHER"]}}, {"name": "description", "type": "string"}, {"name": "url", "type": {"type": "array",
"items": "string"}}, {"name": "status", "type": {"type": "enum", "name": "Status", "doc": "",
"symbols": ["OK", "DOWN"]}}, {"name": "additionalProperties", "type": ["null", {"type": "map",
"values": "string"}]}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "additionalProperties",
        "description",
        "status",
        "type",
        "url",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'additionalProperties', 'description', 'status', 'type', 'url'
    ]

    def __init__(self, **kwargs):
        self.additionalProperties = kwargs.get(
            'additionalProperties', None)
        self.description = kwargs.get(
            'description', None)
        self.status = kwargs.get(
            'status', None)
        self.type = kwargs.get(
            'type', None)
        self.url = kwargs.get(
            'url', None)
Beispiel #7
0
class UncoveredGene(ProtocolElement):
    """
    A gene for which there is no information about coverage. A low
    covered gene will not be identified in this list,     only genes
    for which there is no coverage data.
    """
    _schemaSource = """
{"type": "record", "name": "UncoveredGene", "namespace": "org.gel.models.coverage.avro", "doc": "",
"fields": [{"name": "chr", "type": "string", "doc": ""}, {"name": "name", "type": "string", "doc":
""}, {"name": "s", "type": ["null", "int"], "doc": ""}, {"name": "e", "type": ["null", "int"],
"doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "chr",
        "e",
        "name",
        "s",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'chr', 'e', 'name', 's'
    ]

    def __init__(self, **kwargs):
        self.chr = kwargs.get(
            'chr', None)
        self.e = kwargs.get(
            'e', None)
        self.name = kwargs.get(
            'name', None)
        self.s = kwargs.get(
            's', None)
Beispiel #8
0
class CoverageGap(ProtocolElement):
    """
    A gap in coverage. A gap is a contiguous region under a certain
    depth of coverage.     There are two thresholds to define at
    analysis time: * The depth of coverage threshold under which a gap
    is considered * The number of consecutive positions under the
    depth of coverage threshold to call a gap      e.g.: we may
    consider a gap those regions of more than 5 consecutive bp under
    15x
    """
    _schemaSource = """
{"type": "record", "name": "CoverageGap", "namespace": "org.gel.models.coverage.avro", "doc": "",
"fields": [{"name": "s", "type": "int", "doc": ""}, {"name": "e", "type": "int", "doc": ""},
{"name": "l", "type": ["null", "int"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "e",
        "l",
        "s",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'e', 'l', 's'
    ]

    def __init__(self, **kwargs):
        self.e = kwargs.get(
            'e', None)
        self.l = kwargs.get(
            'l', None)
        self.s = kwargs.get(
            's', None)
Beispiel #9
0
class RegionStatistics(ProtocolElement):
    """
    Represents a group of coverage statistics over a genomic region
    """
    _schemaSource = """
{"type": "record", "name": "RegionStatistics", "namespace": "org.gel.models.coverage.avro", "doc":
"", "fields": [{"name": "avg", "type": "float", "doc": ""}, {"name": "sd", "type": "float", "doc":
""}, {"name": "med", "type": "float", "doc": ""}, {"name": "gc", "type": ["null", "float"], "doc":
""}, {"name": "pct75", "type": "float", "doc": ""}, {"name": "pct25", "type": "float", "doc": ""},
{"name": "bases", "type": ["null", "int"], "doc": ""}, {"name": "bases_lt_15x", "type": ["null",
"int"], "doc": ""}, {"name": "bases_gte_15x", "type": ["null", "int"], "doc": ""}, {"name":
"bases_gte_30x", "type": ["null", "int"], "doc": ""}, {"name": "bases_gte_50x", "type": ["null",
"int"], "doc": ""}, {"name": "gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type":
"float", "doc": ""}, {"name": "gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type":
"float", "doc": ""}, {"name": "rmsd", "type": ["null", "float"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "avg",
        "bases",
        "bases_gte_15x",
        "bases_gte_30x",
        "bases_gte_50x",
        "bases_lt_15x",
        "gc",
        "gte15x",
        "gte30x",
        "gte50x",
        "lt15x",
        "med",
        "pct25",
        "pct75",
        "rmsd",
        "sd",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'avg', 'bases', 'bases_gte_15x', 'bases_gte_30x',
        'bases_gte_50x', 'bases_lt_15x', 'gc', 'gte15x', 'gte30x',
        'gte50x', 'lt15x', 'med', 'pct25', 'pct75', 'rmsd', 'sd'
    ]

    def __init__(self, **kwargs):
        self.avg = kwargs.get(
            'avg', None)
        self.bases = kwargs.get(
            'bases', None)
        self.bases_gte_15x = kwargs.get(
            'bases_gte_15x', None)
        self.bases_gte_30x = kwargs.get(
            'bases_gte_30x', None)
        self.bases_gte_50x = kwargs.get(
            'bases_gte_50x', None)
        self.bases_lt_15x = kwargs.get(
            'bases_lt_15x', None)
        self.gc = kwargs.get(
            'gc', None)
        self.gte15x = kwargs.get(
            'gte15x', None)
        self.gte30x = kwargs.get(
            'gte30x', None)
        self.gte50x = kwargs.get(
            'gte50x', None)
        self.lt15x = kwargs.get(
            'lt15x', None)
        self.med = kwargs.get(
            'med', None)
        self.pct25 = kwargs.get(
            'pct25', None)
        self.pct75 = kwargs.get(
            'pct75', None)
        self.rmsd = kwargs.get(
            'rmsd', None)
        self.sd = kwargs.get(
            'sd', None)
Beispiel #10
0
class CoverageAnalysisResults(ProtocolElement):
    """
    Coverage analysis results
    """
    _schemaSource = """
{"type": "record", "name": "CoverageAnalysisResults", "namespace": "org.gel.models.coverage.avro",
"doc": "", "fields": [{"name": "genes", "type": {"type": "array", "items": {"type": "record",
"name": "Gene", "doc": "", "fields": [{"name": "trs", "type": {"type": "array", "items": {"type":
"record", "name": "Transcript", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""},
{"name": "stats", "type": {"type": "record", "name": "RegionStatistics", "doc": "", "fields":
[{"name": "avg", "type": "float", "doc": ""}, {"name": "sd", "type": "float", "doc": ""}, {"name":
"med", "type": "float", "doc": ""}, {"name": "gc", "type": ["null", "float"], "doc": ""}, {"name":
"pct75", "type": "float", "doc": ""}, {"name": "pct25", "type": "float", "doc": ""}, {"name":
"bases", "type": ["null", "int"], "doc": ""}, {"name": "bases_lt_15x", "type": ["null", "int"],
"doc": ""}, {"name": "bases_gte_15x", "type": ["null", "int"], "doc": ""}, {"name": "bases_gte_30x",
"type": ["null", "int"], "doc": ""}, {"name": "bases_gte_50x", "type": ["null", "int"], "doc": ""},
{"name": "gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""},
{"name": "gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""},
{"name": "rmsd", "type": ["null", "float"], "doc": ""}]}, "doc": ""}, {"name": "exons", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Exon", "doc": "", "fields":
[{"name": "exon", "type": "string", "doc": ""}, {"name": "s", "type": "int", "doc": ""}, {"name":
"padded_s", "type": ["null", "int"], "doc": ""}, {"name": "e", "type": "int", "doc": ""}, {"name":
"padded_e", "type": ["null", "int"], "doc": ""}, {"name": "l", "type": ["null", "int"], "doc": ""},
{"name": "gaps", "type": {"type": "array", "items": {"type": "record", "name": "CoverageGap", "doc":
"", "fields": [{"name": "s", "type": "int", "doc": ""}, {"name": "e", "type": "int", "doc": ""},
{"name": "l", "type": ["null", "int"], "doc": ""}]}}, "doc": ""}, {"name": "stats", "type":
"RegionStatistics", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "union_tr", "type":
"Transcript", "doc": ""}, {"name": "name", "type": "string", "doc": ""}, {"name": "chr", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "coding_region", "type": ["null", {"type": "record",
"name": "CodingRegion", "doc": "", "fields": [{"name": "stats", "type": "RegionStatistics", "doc":
""}, {"name": "chrs", "type": {"type": "array", "items": {"type": "record", "name": "Chromosome",
"doc": "", "fields": [{"name": "chr", "type": "string", "doc": ""}, {"name": "avg", "type": "float",
"doc": ""}, {"name": "sd", "type": "float", "doc": ""}, {"name": "med", "type": "float", "doc": ""},
{"name": "gc", "type": ["null", "float"], "doc": ""}, {"name": "pct75", "type": "float", "doc": ""},
{"name": "pct25", "type": "float", "doc": ""}, {"name": "bases", "type": "int", "doc": ""}, {"name":
"gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""}, {"name":
"gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""}, {"name":
"rmsd", "type": ["null", "float"], "doc": ""}]}}, "doc": ""}]}], "doc": ""}, {"name":
"whole_genome", "type": ["null", {"type": "record", "name": "WholeGenome", "fields": [{"name":
"stats", "type": "RegionStatistics", "doc": ""}, {"name": "chrs", "type": {"type": "array", "items":
"Chromosome"}, "doc": ""}]}], "doc": ""}, {"name": "uncovered_genes", "type": {"type": "array",
"items": {"type": "record", "name": "UncoveredGene", "doc": "", "fields": [{"name": "chr", "type":
"string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}, {"name": "s", "type": ["null",
"int"], "doc": ""}, {"name": "e", "type": ["null", "int"], "doc": ""}]}}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "coding_region",
        "genes",
        "uncovered_genes",
        "whole_genome",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'coding_region': CodingRegion,
            'genes': Gene,
            'uncovered_genes': UncoveredGene,
            'whole_genome': WholeGenome,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'coding_region': CodingRegion,
            'genes': Gene,
            'uncovered_genes': UncoveredGene,
            'whole_genome': WholeGenome,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'coding_region', 'genes', 'uncovered_genes', 'whole_genome'
    ]

    def __init__(self, **kwargs):
        self.coding_region = kwargs.get(
            'coding_region', None)
        self.genes = kwargs.get(
            'genes', None)
        self.uncovered_genes = kwargs.get(
            'uncovered_genes', None)
        self.whole_genome = kwargs.get(
            'whole_genome', None)
Beispiel #11
0
class Chromosome(ProtocolElement):
    """
    All coverage information about a given chromosome
    """
    _schemaSource = """
{"type": "record", "name": "Chromosome", "namespace": "org.gel.models.coverage.avro", "doc": "",
"fields": [{"name": "chr", "type": "string", "doc": ""}, {"name": "avg", "type": "float", "doc":
""}, {"name": "sd", "type": "float", "doc": ""}, {"name": "med", "type": "float", "doc": ""},
{"name": "gc", "type": ["null", "float"], "doc": ""}, {"name": "pct75", "type": "float", "doc": ""},
{"name": "pct25", "type": "float", "doc": ""}, {"name": "bases", "type": "int", "doc": ""}, {"name":
"gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""}, {"name":
"gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""}, {"name":
"rmsd", "type": ["null", "float"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "avg",
        "bases",
        "chr",
        "gc",
        "gte15x",
        "gte30x",
        "gte50x",
        "lt15x",
        "med",
        "pct25",
        "pct75",
        "rmsd",
        "sd",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'avg', 'bases', 'chr', 'gc', 'gte15x', 'gte30x', 'gte50x',
        'lt15x', 'med', 'pct25', 'pct75', 'rmsd', 'sd'
    ]

    def __init__(self, **kwargs):
        self.avg = kwargs.get(
            'avg', None)
        self.bases = kwargs.get(
            'bases', None)
        self.chr = kwargs.get(
            'chr', None)
        self.gc = kwargs.get(
            'gc', None)
        self.gte15x = kwargs.get(
            'gte15x', None)
        self.gte30x = kwargs.get(
            'gte30x', None)
        self.gte50x = kwargs.get(
            'gte50x', None)
        self.lt15x = kwargs.get(
            'lt15x', None)
        self.med = kwargs.get(
            'med', None)
        self.pct25 = kwargs.get(
            'pct25', None)
        self.pct75 = kwargs.get(
            'pct75', None)
        self.rmsd = kwargs.get(
            'rmsd', None)
        self.sd = kwargs.get(
            'sd', None)
Beispiel #12
0
class AnalysisParameters(ProtocolElement):
    """
    The configuration parameters used for the analysis
    """
    _schemaSource = """
{"type": "record", "name": "AnalysisParameters", "namespace": "org.gel.models.coverage.avro", "doc":
"", "fields": [{"name": "coding_region_stats_enabled", "type": "boolean", "doc": ""}, {"name":
"exon_stats_enabled", "type": "boolean", "doc": ""}, {"name": "wg_stats_enabled", "type": "boolean",
"doc": ""}, {"name": "gene_list", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "panel", "type": ["null", "string"], "doc": ""}, {"name": "panel_version", "type":
["null", "string"], "doc": ""}, {"name": "panelapp_host", "type": ["null", "string"], "doc": ""},
{"name": "panelapp_gene_confidence", "type": ["null", "string"], "doc": ""}, {"name":
"transcript_filtering_biotypes", "type": "string", "doc": ""}, {"name":
"transcript_filtering_flags", "type": "string", "doc": ""}, {"name": "cellbase_host", "type":
"string", "doc": ""}, {"name": "cellbase_version", "type": "string", "doc": ""}, {"name": "grch37",
"type": "string", "doc": ""}, {"name": "species", "type": "string", "doc": ""}, {"name":
"exon_padding", "type": "int", "doc": ""}, {"name": "gap_coverage_threshold", "type": "int", "doc":
""}, {"name": "gap_length_threshold", "type": "int", "doc": ""}, {"name": "input_file", "type":
"string", "doc": ""}, {"name": "configuration_file", "type": "string", "doc": ""}, {"name":
"wg_regions", "type": ["null", "string"], "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "cellbase_host",
        "cellbase_version",
        "coding_region_stats_enabled",
        "configuration_file",
        "exon_padding",
        "exon_stats_enabled",
        "gap_coverage_threshold",
        "gap_length_threshold",
        "gene_list",
        "grch37",
        "input_file",
        "panel",
        "panel_version",
        "panelapp_gene_confidence",
        "panelapp_host",
        "species",
        "transcript_filtering_biotypes",
        "transcript_filtering_flags",
        "wg_regions",
        "wg_stats_enabled",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {}
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {}

        return embeddedTypes[fieldName]

    __slots__ = [
        'cellbase_host', 'cellbase_version',
        'coding_region_stats_enabled', 'configuration_file',
        'exon_padding', 'exon_stats_enabled',
        'gap_coverage_threshold', 'gap_length_threshold', 'gene_list',
        'grch37', 'input_file', 'panel', 'panel_version',
        'panelapp_gene_confidence', 'panelapp_host', 'species',
        'transcript_filtering_biotypes', 'transcript_filtering_flags',
        'wg_regions', 'wg_stats_enabled'
    ]

    def __init__(self, **kwargs):
        self.cellbase_host = kwargs.get(
            'cellbase_host', None)
        self.cellbase_version = kwargs.get(
            'cellbase_version', None)
        self.coding_region_stats_enabled = kwargs.get(
            'coding_region_stats_enabled', None)
        self.configuration_file = kwargs.get(
            'configuration_file', None)
        self.exon_padding = kwargs.get(
            'exon_padding', None)
        self.exon_stats_enabled = kwargs.get(
            'exon_stats_enabled', None)
        self.gap_coverage_threshold = kwargs.get(
            'gap_coverage_threshold', None)
        self.gap_length_threshold = kwargs.get(
            'gap_length_threshold', None)
        self.gene_list = kwargs.get(
            'gene_list', None)
        self.grch37 = kwargs.get(
            'grch37', None)
        self.input_file = kwargs.get(
            'input_file', None)
        self.panel = kwargs.get(
            'panel', None)
        self.panel_version = kwargs.get(
            'panel_version', None)
        self.panelapp_gene_confidence = kwargs.get(
            'panelapp_gene_confidence', None)
        self.panelapp_host = kwargs.get(
            'panelapp_host', None)
        self.species = kwargs.get(
            'species', None)
        self.transcript_filtering_biotypes = kwargs.get(
            'transcript_filtering_biotypes', None)
        self.transcript_filtering_flags = kwargs.get(
            'transcript_filtering_flags', None)
        self.wg_regions = kwargs.get(
            'wg_regions', None)
        self.wg_stats_enabled = kwargs.get(
            'wg_stats_enabled', None)
Beispiel #13
0
class AnalysisResults(ProtocolElement):
    """
    The output of a coverage analysis
    """
    _schemaSource = """
{"type": "record", "name": "AnalysisResults", "namespace": "org.gel.models.coverage.avro", "doc":
"", "fields": [{"name": "results", "type": {"type": "record", "name": "CoverageAnalysisResults",
"doc": "", "fields": [{"name": "genes", "type": {"type": "array", "items": {"type": "record",
"name": "Gene", "doc": "", "fields": [{"name": "trs", "type": {"type": "array", "items": {"type":
"record", "name": "Transcript", "doc": "", "fields": [{"name": "id", "type": "string", "doc": ""},
{"name": "stats", "type": {"type": "record", "name": "RegionStatistics", "doc": "", "fields":
[{"name": "avg", "type": "float", "doc": ""}, {"name": "sd", "type": "float", "doc": ""}, {"name":
"med", "type": "float", "doc": ""}, {"name": "gc", "type": ["null", "float"], "doc": ""}, {"name":
"pct75", "type": "float", "doc": ""}, {"name": "pct25", "type": "float", "doc": ""}, {"name":
"bases", "type": ["null", "int"], "doc": ""}, {"name": "bases_lt_15x", "type": ["null", "int"],
"doc": ""}, {"name": "bases_gte_15x", "type": ["null", "int"], "doc": ""}, {"name": "bases_gte_30x",
"type": ["null", "int"], "doc": ""}, {"name": "bases_gte_50x", "type": ["null", "int"], "doc": ""},
{"name": "gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""},
{"name": "gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""},
{"name": "rmsd", "type": ["null", "float"], "doc": ""}]}, "doc": ""}, {"name": "exons", "type":
["null", {"type": "array", "items": {"type": "record", "name": "Exon", "doc": "", "fields":
[{"name": "exon", "type": "string", "doc": ""}, {"name": "s", "type": "int", "doc": ""}, {"name":
"padded_s", "type": ["null", "int"], "doc": ""}, {"name": "e", "type": "int", "doc": ""}, {"name":
"padded_e", "type": ["null", "int"], "doc": ""}, {"name": "l", "type": ["null", "int"], "doc": ""},
{"name": "gaps", "type": {"type": "array", "items": {"type": "record", "name": "CoverageGap", "doc":
"", "fields": [{"name": "s", "type": "int", "doc": ""}, {"name": "e", "type": "int", "doc": ""},
{"name": "l", "type": ["null", "int"], "doc": ""}]}}, "doc": ""}, {"name": "stats", "type":
"RegionStatistics", "doc": ""}]}}], "doc": ""}]}}, "doc": ""}, {"name": "union_tr", "type":
"Transcript", "doc": ""}, {"name": "name", "type": "string", "doc": ""}, {"name": "chr", "type":
"string", "doc": ""}]}}, "doc": ""}, {"name": "coding_region", "type": ["null", {"type": "record",
"name": "CodingRegion", "doc": "", "fields": [{"name": "stats", "type": "RegionStatistics", "doc":
""}, {"name": "chrs", "type": {"type": "array", "items": {"type": "record", "name": "Chromosome",
"doc": "", "fields": [{"name": "chr", "type": "string", "doc": ""}, {"name": "avg", "type": "float",
"doc": ""}, {"name": "sd", "type": "float", "doc": ""}, {"name": "med", "type": "float", "doc": ""},
{"name": "gc", "type": ["null", "float"], "doc": ""}, {"name": "pct75", "type": "float", "doc": ""},
{"name": "pct25", "type": "float", "doc": ""}, {"name": "bases", "type": "int", "doc": ""}, {"name":
"gte50x", "type": "float", "doc": ""}, {"name": "gte30x", "type": "float", "doc": ""}, {"name":
"gte15x", "type": "float", "doc": ""}, {"name": "lt15x", "type": "float", "doc": ""}, {"name":
"rmsd", "type": ["null", "float"], "doc": ""}]}}, "doc": ""}]}], "doc": ""}, {"name":
"whole_genome", "type": ["null", {"type": "record", "name": "WholeGenome", "fields": [{"name":
"stats", "type": "RegionStatistics", "doc": ""}, {"name": "chrs", "type": {"type": "array", "items":
"Chromosome"}, "doc": ""}]}], "doc": ""}, {"name": "uncovered_genes", "type": {"type": "array",
"items": {"type": "record", "name": "UncoveredGene", "doc": "", "fields": [{"name": "chr", "type":
"string", "doc": ""}, {"name": "name", "type": "string", "doc": ""}, {"name": "s", "type": ["null",
"int"], "doc": ""}, {"name": "e", "type": ["null", "int"], "doc": ""}]}}, "doc": ""}]}, "doc": ""},
{"name": "parameters", "type": {"type": "record", "name": "AnalysisParameters", "doc": "", "fields":
[{"name": "coding_region_stats_enabled", "type": "boolean", "doc": ""}, {"name":
"exon_stats_enabled", "type": "boolean", "doc": ""}, {"name": "wg_stats_enabled", "type": "boolean",
"doc": ""}, {"name": "gene_list", "type": ["null", {"type": "array", "items": "string"}], "doc":
""}, {"name": "panel", "type": ["null", "string"], "doc": ""}, {"name": "panel_version", "type":
["null", "string"], "doc": ""}, {"name": "panelapp_host", "type": ["null", "string"], "doc": ""},
{"name": "panelapp_gene_confidence", "type": ["null", "string"], "doc": ""}, {"name":
"transcript_filtering_biotypes", "type": "string", "doc": ""}, {"name":
"transcript_filtering_flags", "type": "string", "doc": ""}, {"name": "cellbase_host", "type":
"string", "doc": ""}, {"name": "cellbase_version", "type": "string", "doc": ""}, {"name": "grch37",
"type": "string", "doc": ""}, {"name": "species", "type": "string", "doc": ""}, {"name":
"exon_padding", "type": "int", "doc": ""}, {"name": "gap_coverage_threshold", "type": "int", "doc":
""}, {"name": "gap_length_threshold", "type": "int", "doc": ""}, {"name": "input_file", "type":
"string", "doc": ""}, {"name": "configuration_file", "type": "string", "doc": ""}, {"name":
"wg_regions", "type": ["null", "string"], "doc": ""}]}, "doc": ""}]}
"""
    schema = avro_parse(_schemaSource)
    requiredFields = {
        "parameters",
        "results",
    }

    @classmethod
    def isEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'parameters': AnalysisParameters,
            'results': CoverageAnalysisResults,
        }
        return fieldName in embeddedTypes

    @classmethod
    def getEmbeddedType(cls, fieldName):
        embeddedTypes = {
            'parameters': AnalysisParameters,
            'results': CoverageAnalysisResults,
        }

        return embeddedTypes[fieldName]

    __slots__ = [
        'parameters', 'results'
    ]

    def __init__(self, **kwargs):
        self.parameters = kwargs.get(
            'parameters', AnalysisParameters())
        self.results = kwargs.get(
            'results', CoverageAnalysisResults())