Ejemplo n.º 1
0
KEGG_GENES_PREFIX = "kegg.genes"
KEGG_GENOME_PREFIX = "kegg.genome"
KEGG_PATHWAY_PREFIX = "kegg.pathway"

BASE = "http://rest.kegg.jp"
SKIP = {
    "T03333",
    "T03334",
    "T03356",
    "T03357",
    "T03358",
    "T03359",
}

from_kegg_species = TypeDef(
    reference=Reference.default("inKeggTaxon", "in KEGG taxon"),
    parents=from_species.reference,
)


@dataclass
class KEGGGenome:
    """A data structure for a parsed line of the KEGG Genomes list."""

    identifier: str
    name: str
    code: Optional[str]
    long_code: Optional[str]
    taxonomy_id: Optional[str]

    def annotate_term(self, term: Term) -> None:
Ejemplo n.º 2
0
KEGG_GENES_PREFIX = 'kegg.genes'
KEGG_GENOME_PREFIX = 'kegg.genome'
KEGG_PATHWAY_PREFIX = 'kegg.pathway'

BASE = 'http://rest.kegg.jp'
SKIP = {
    'T03333',
    'T03334',
    'T03356',
    'T03357',
    'T03358',
    'T03359',
}

from_kegg_species = TypeDef(
    reference=Reference.default('inKeggTaxon', 'in KEGG taxon'),
    parents=from_species.reference,
)


@dataclass
class KEGGGenome:
    """A data structure for a parsed line of the KEGG Genomes list."""

    identifier: str
    name: str
    code: Optional[str]
    long_code: Optional[str]
    taxonomy_id: Optional[str]

    def annotate_term(self, term: Term) -> None: