Skip to content

Commit

Permalink
for release
Browse files Browse the repository at this point in the history
  • Loading branch information
turbomam committed Aug 21, 2024
1 parent 08bd562 commit 5930933
Show file tree
Hide file tree
Showing 4 changed files with 141 additions and 1 deletion.
50 changes: 49 additions & 1 deletion nmdc_schema/nmdc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Auto generated from nmdc.yaml by pythongen.py version: 0.0.1
# Generation date: 2024-07-24T13:21:38
# Generation date: 2024-08-21T17:07:04
# Schema: NMDC
#
# id: https://w3id.org/nmdc/nmdc
Expand Down Expand Up @@ -71,6 +71,7 @@
PANTHER_FAMILY = CurieNamespace('PANTHER_FAMILY', 'https://bioregistry.io/panther.family:')
PATO = CurieNamespace('PATO', 'http://purl.obolibrary.org/obo/PATO_')
PFAM = CurieNamespace('PFAM', 'https://bioregistry.io/pfam:')
PFAM_CLAN = CurieNamespace('PFAM_CLAN', 'https://bioregistry.io/pfam.clan:')
PO = CurieNamespace('PO', 'http://purl.obolibrary.org/obo/PO_')
PR = CurieNamespace('PR', 'http://purl.obolibrary.org/obo/PR_')
PUBCHEM_COMPOUND = CurieNamespace('PUBCHEM_COMPOUND', 'https://bioregistry.io/pubchem.compound:')
Expand Down Expand Up @@ -330,6 +331,39 @@ class NomAnalysisActivityId(WorkflowExecutionActivityId):
pass


@dataclass
class EukEval(YAMLRoot):
"""
This class contains information pertaining to evaluating if a Metagenome-Assembled Genome (MAG) is eukaryotic.
"""
_inherited_slots: ClassVar[List[str]] = []

class_class_uri: ClassVar[URIRef] = NMDC["EukEval"]
class_class_curie: ClassVar[str] = "nmdc:EukEval"
class_name: ClassVar[str] = "EukEval"
class_model_uri: ClassVar[URIRef] = NMDC.EukEval

completeness: Optional[float] = None
contamination: Optional[float] = None
ncbi_lineage_tax_ids: Optional[str] = None
ncbi_lineage: Optional[str] = None

def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.completeness is not None and not isinstance(self.completeness, float):
self.completeness = float(self.completeness)

if self.contamination is not None and not isinstance(self.contamination, float):
self.contamination = float(self.contamination)

if self.ncbi_lineage_tax_ids is not None and not isinstance(self.ncbi_lineage_tax_ids, str):
self.ncbi_lineage_tax_ids = str(self.ncbi_lineage_tax_ids)

if self.ncbi_lineage is not None and not isinstance(self.ncbi_lineage, str):
self.ncbi_lineage = str(self.ncbi_lineage)

super().__post_init__(**kwargs)


@dataclass
class FailureCategorization(YAMLRoot):
_inherited_slots: ClassVar[List[str]] = []
Expand Down Expand Up @@ -4721,6 +4755,7 @@ class MagBin(YAMLRoot):
number_of_contig: Optional[int] = None
total_bases: Optional[int] = None
type: Optional[str] = None
eukaryotic_evaluation: Optional[Union[dict, EukEval]] = None

def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.bin_name is not None and not isinstance(self.bin_name, str):
Expand Down Expand Up @@ -4783,6 +4818,9 @@ def __post_init__(self, *_: List[str], **kwargs: Dict[str, Any]):
if self.type is not None and not isinstance(self.type, str):
self.type = str(self.type)

if self.eukaryotic_evaluation is not None and not isinstance(self.eukaryotic_evaluation, EukEval):
self.eukaryotic_evaluation = EukEval(**as_dict(self.eukaryotic_evaluation))

super().__post_init__(**kwargs)


Expand Down Expand Up @@ -8747,6 +8785,16 @@ class ProcessingInstitutionEnum(EnumDefinitionImpl):
class slots:
pass

slots.eukaryotic_evaluation = Slot(uri=NMDC.eukaryotic_evaluation, name="eukaryotic_evaluation", curie=NMDC.curie('eukaryotic_evaluation'),
model_uri=NMDC.eukaryotic_evaluation, domain=None, range=Optional[Union[dict, EukEval]])

slots.ncbi_lineage_tax_ids = Slot(uri=NMDC.ncbi_lineage_tax_ids, name="ncbi_lineage_tax_ids", curie=NMDC.curie('ncbi_lineage_tax_ids'),
model_uri=NMDC.ncbi_lineage_tax_ids, domain=None, range=Optional[str],
pattern=re.compile(r'^\d+(-\d+)*$'))

slots.ncbi_lineage = Slot(uri=NMDC.ncbi_lineage, name="ncbi_lineage", curie=NMDC.curie('ncbi_lineage'),
model_uri=NMDC.ncbi_lineage, domain=None, range=Optional[str])

slots.has_failure_categorization = Slot(uri=NMDC.has_failure_categorization, name="has_failure_categorization", curie=NMDC.curie('has_failure_categorization'),
model_uri=NMDC.has_failure_categorization, domain=None, range=Optional[Union[Union[dict, FailureCategorization], List[Union[dict, FailureCategorization]]]])

Expand Down
27 changes: 27 additions & 0 deletions nmdc_schema/nmdc.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4103,6 +4103,29 @@
"title": "EnvironmentalMaterialTerm",
"type": "object"
},
"EukEval": {
"additionalProperties": false,
"description": "This class contains information pertaining to evaluating if a Metagenome-Assembled Genome (MAG) is eukaryotic.",
"properties": {
"completeness": {
"type": "number"
},
"contamination": {
"type": "number"
},
"ncbi_lineage": {
"description": "Comma delimited ordered list of NCBI taxonomy names.",
"type": "string"
},
"ncbi_lineage_tax_ids": {
"description": "Dash-delimited ordered list of NCBI taxonomy identifiers (TaxId)",
"pattern": "^\\d+(-\\d+)*$",
"type": "string"
}
},
"title": "EukEval",
"type": "object"
},
"ExtWallOrientEnum": {
"description": "",
"enum": [
Expand Down Expand Up @@ -5258,6 +5281,10 @@
"contamination": {
"type": "number"
},
"eukaryotic_evaluation": {
"$ref": "#/$defs/EukEval",
"description": "Contains results from evaluating if a Metagenome-Assembled Genome is of eukaryotic lineage."
},
"gene_count": {
"type": "integer"
},
Expand Down
27 changes: 27 additions & 0 deletions nmdc_schema/nmdc_materialized_patterns.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4112,6 +4112,29 @@
"title": "EnvironmentalMaterialTerm",
"type": "object"
},
"EukEval": {
"additionalProperties": false,
"description": "This class contains information pertaining to evaluating if a Metagenome-Assembled Genome (MAG) is eukaryotic.",
"properties": {
"completeness": {
"type": "number"
},
"contamination": {
"type": "number"
},
"ncbi_lineage": {
"description": "Comma delimited ordered list of NCBI taxonomy names.",
"type": "string"
},
"ncbi_lineage_tax_ids": {
"description": "Dash-delimited ordered list of NCBI taxonomy identifiers (TaxId)",
"pattern": "^\\d+(-\\d+)*$",
"type": "string"
}
},
"title": "EukEval",
"type": "object"
},
"ExtWallOrientEnum": {
"description": "",
"enum": [
Expand Down Expand Up @@ -5276,6 +5299,10 @@
"contamination": {
"type": "number"
},
"eukaryotic_evaluation": {
"$ref": "#/$defs/EukEval",
"description": "Contains results from evaluating if a Metagenome-Assembled Genome is of eukaryotic lineage."
},
"gene_count": {
"type": "integer"
},
Expand Down
38 changes: 38 additions & 0 deletions nmdc_schema/nmdc_materialized_patterns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ prefixes:
PFAM:
prefix_prefix: PFAM
prefix_reference: 'https://bioregistry.io/pfam:'
PFAM.CLAN:
prefix_prefix: PFAM.CLAN
prefix_reference: 'https://bioregistry.io/pfam.clan:'
PO:
prefix_prefix: PO
prefix_reference: http://purl.obolibrary.org/obo/PO_
Expand Down Expand Up @@ -3713,6 +3716,27 @@ enums:
meaning: https://genomecenter.ucdavis.edu/
title: University of California, Davis Genome Center
slots:
eukaryotic_evaluation:
name: eukaryotic_evaluation
description: Contains results from evaluating if a Metagenome-Assembled Genome
is of eukaryotic lineage.
from_schema: https://w3id.org/nmdc/nmdc
range: EukEval
ncbi_lineage_tax_ids:
name: ncbi_lineage_tax_ids
description: Dash-delimited ordered list of NCBI taxonomy identifiers (TaxId)
comments:
- Example 1-131567-2759-2611352-33682-191814-2603949
from_schema: https://w3id.org/nmdc/nmdc
range: string
pattern: ^\d+(-\d+)*$
ncbi_lineage:
name: ncbi_lineage
description: Comma delimited ordered list of NCBI taxonomy names.
comments:
- Example root,cellular organisms,Eukaryota,Discoba,Euglenozoa,Diplonemea,Diplonemidae
from_schema: https://w3id.org/nmdc/nmdc
range: string
has_failure_categorization:
name: has_failure_categorization
from_schema: https://w3id.org/nmdc/nmdc
Expand Down Expand Up @@ -18219,6 +18243,19 @@ slots:
domain: Activity
range: string
classes:
EukEval:
name: EukEval
description: This class contains information pertaining to evaluating if a Metagenome-Assembled
Genome (MAG) is eukaryotic.
comments:
- A tool like eukCC (https://doi.org/10.1186/s13059-020-02155-4) would generate
information for this class.
from_schema: https://w3id.org/nmdc/nmdc
slots:
- completeness
- contamination
- ncbi_lineage_tax_ids
- ncbi_lineage
FailureCategorization:
name: FailureCategorization
from_schema: https://w3id.org/nmdc/nmdc
Expand Down Expand Up @@ -20287,6 +20324,7 @@ classes:
- number_of_contig
- total_bases
- type
- eukaryotic_evaluation
MetaboliteQuantification:
name: MetaboliteQuantification
description: This is used to link a metabolomics analysis workflow to a specific
Expand Down

0 comments on commit 5930933

Please sign in to comment.