Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions erdiagram-autogen/anatomical_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,21 +176,12 @@ ParcellationTerminology {
}

AnatomicalAnnotationSet ||--|o VersionedNamedThing : "revision_of"
AnatomicalAnnotationSet ||--}o Attribute : "has attribute"
AnatomicalSpace ||--|o VersionedNamedThing : "revision_of"
AnatomicalSpace ||--}o Attribute : "has attribute"
ImageDataset ||--|o VersionedNamedThing : "revision_of"
ImageDataset ||--}o Attribute : "has attribute"
ParcellationAtlas ||--|o VersionedNamedThing : "revision_of"
ParcellationAtlas ||--}o Attribute : "has attribute"
ParcellationColorScheme ||--|o VersionedNamedThing : "revision_of"
ParcellationColorScheme ||--}o Attribute : "has attribute"
ParcellationTerm ||--|o VersionedNamedThing : "revision_of"
ParcellationTerm ||--}o Attribute : "has attribute"
ParcellationTermSet ||--|o VersionedNamedThing : "revision_of"
ParcellationTermSet ||--}o Attribute : "has attribute"
ParcellationTerminology ||--|o VersionedNamedThing : "revision_of"
ParcellationTerminology ||--}o Attribute : "has attribute"

```

46 changes: 0 additions & 46 deletions erdiagram-autogen/bke_taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,6 @@ ObservationRow {
stringList provided_by
label_typeList synonym
stringList type
}
ProvActivity {

}
ProvEntity {

}
SpatialProportions {
float adj
Expand Down Expand Up @@ -292,80 +286,40 @@ SpatialProportions {
uriorcurieList xref
}

Abbreviation ||--|o ProvActivity : "was_generated_by"
Abbreviation ||--|o ProvEntity : "was_derived_from"
Abbreviation ||--}o Attribute : "has attribute"
Abbreviation ||--}o CellTypeTaxon : "denotes_cell_type"
Abbreviation ||--}o GeneAnnotation : "denotes_gene_annotation"
Abbreviation ||--}o ParcellationTerm : "denotes_parcellation_term"
CellSpecimen ||--|o ProvActivity : "was_generated_by"
CellSpecimen ||--|o ProvEntity : "was_derived_from"
CellSpecimen ||--}o Attribute : "has attribute"
CellTypeSet ||--|o CellTypeSet : "has_parent"
CellTypeSet ||--|o CellTypeTaxonomy : "part_of_taxonomy"
CellTypeSet ||--|o ProvActivity : "was_generated_by"
CellTypeSet ||--|o ProvEntity : "was_derived_from"
CellTypeSet ||--}o Abbreviation : "has_abbreviation"
CellTypeSet ||--}o Attribute : "has attribute"
CellTypeSet ||--}o CellTypeTaxon : "contains_taxon"
CellTypeTaxon ||--|o CellTypeTaxon : "has_parent"
CellTypeTaxon ||--|o CellTypeTaxonomy : "part_of_taxonomy"
CellTypeTaxon ||--|o ProvActivity : "was_generated_by"
CellTypeTaxon ||--|o ProvEntity : "was_derived_from"
CellTypeTaxon ||--|o SpatialProportions : "spatial_proportions_human, spatial_proportions_macaque, spatial_proportions_marmoset, spatial_regional_proportions"
CellTypeTaxon ||--}o Abbreviation : "has_abbreviation"
CellTypeTaxon ||--}o Attribute : "has attribute"
CellTypeTaxon ||--}o Cluster : "contains_cluster"
CellTypeTaxon ||--}o GeneAnnotation : "curated_markers_to_mouse, curated_markers_to_primates"
CellTypeTaxonomy ||--|o CellTypeTaxonomy : "is_revision_of"
CellTypeTaxonomy ||--|o CellTypeTaxonomyCreationProcess : "was_generated_by"
CellTypeTaxonomy ||--}o Attribute : "has attribute"
CellTypeTaxonomy ||--}o ClusterSet : "was_derived_from"
CellTypeTaxonomyCreationProcess ||--}o Attribute : "has attribute"
CellTypeTaxonomyCreationProcess ||--}o ClusterSet : "used"
Cluster ||--|o ClusterSet : "part_of_set"
Cluster ||--|o ProvActivity : "was_generated_by"
Cluster ||--|o ProvEntity : "was_derived_from"
Cluster ||--}o Attribute : "has attribute"
Cluster ||--}o CellSpecimen : "contains_sample"
Cluster ||--}o ObservationRow : "contains_observation"
ClusterSet ||--|o ClusterSet : "is_revision_of"
ClusterSet ||--|o ClusteringProcess : "was_generated_by"
ClusterSet ||--}o Attribute : "has attribute"
ClusterSet ||--}o ObservationMatrix : "was_derived_from"
ClusteringProcess ||--}o Attribute : "has attribute"
ClusteringProcess ||--}o ObservationMatrix : "used"
ColorPalette ||--|o CellTypeTaxonomy : "is_palette_for"
ColorPalette ||--|o ProvActivity : "was_generated_by"
ColorPalette ||--|o ProvEntity : "was_derived_from"
ColorPalette ||--}o Attribute : "has attribute"
DisplayColor ||--|o CellTypeSet : "is_color_for_set"
DisplayColor ||--|o CellTypeTaxon : "is_color_for_taxon"
DisplayColor ||--|o ColorPalette : "part_of_palette"
DisplayColor ||--|o ProvActivity : "was_generated_by"
DisplayColor ||--|o ProvEntity : "was_derived_from"
DisplayColor ||--}o Attribute : "has attribute"
MatrixFile ||--|o ProvActivity : "was_generated_by"
MatrixFile ||--|o ProvEntity : "was_derived_from"
MatrixFile ||--}o Attribute : "has attribute"
ObservationMatrix ||--|o ObservationMatrixCreationProcess : "was_generated_by"
ObservationMatrix ||--}o Attribute : "has attribute"
ObservationMatrix ||--}o CellSpecimen : "was_derived_from"
ObservationMatrix ||--}o GeneAnnotation : "has_variable"
ObservationMatrix ||--}o MatrixFile : "represented_by"
ObservationMatrixCreationProcess ||--|o ProvEntity : "used"
ObservationMatrixCreationProcess ||--}o Attribute : "has attribute"
ObservationRow ||--|o CellSpecimen : "was_derived_from"
ObservationRow ||--|o MatrixFile : "represented_in"
ObservationRow ||--|o ObservationMatrix : "part_of_matrix"
ObservationRow ||--|o ProvActivity : "was_generated_by"
ObservationRow ||--}o Attribute : "has attribute"
ProvActivity ||--|o ProvEntity : "used"
ProvEntity ||--|o ProvActivity : "was_generated_by"
ProvEntity ||--|o ProvEntity : "was_derived_from"
SpatialProportions ||--|o ProvActivity : "was_generated_by"
SpatialProportions ||--|o ProvEntity : "was_derived_from"
SpatialProportions ||--}o Attribute : "has attribute"

```

32 changes: 0 additions & 32 deletions erdiagram-autogen/cell_taxonomy.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,51 +162,19 @@ ExpressionMatrix {
stringList type
uriorcurieList xref
}
ProvActivity {

}
ProvEntity {

}

Cell ||--|o Cluster : "part_of_cluster"
Cell ||--|o ProvActivity : "was_generated_by"
Cell ||--|o ProvEntity : "was_derived_from"
Cell ||--}o Attribute : "has attribute"
CellTypeSet ||--|o CellTypeSet : "has_parent"
CellTypeSet ||--|o CellTypeTaxonomy : "part_of_taxonomy"
CellTypeSet ||--|o ProvActivity : "was_generated_by"
CellTypeSet ||--|o ProvEntity : "was_derived_from"
CellTypeSet ||--}o Attribute : "has attribute"
CellTypeTaxon ||--|o CellTypeSet : "part_of_set"
CellTypeTaxon ||--|o CellTypeTaxon : "has_parent"
CellTypeTaxon ||--|o ProvActivity : "was_generated_by"
CellTypeTaxon ||--|o ProvEntity : "was_derived_from"
CellTypeTaxon ||--}o Attribute : "has attribute"
CellTypeTaxon ||--}o GeneAnnotation : "curated_markers_to_mouse, curated_markers_to_primates"
CellTypeTaxonomy ||--|o ProvActivity : "was_generated_by"
CellTypeTaxonomy ||--}o Attribute : "has attribute"
CellTypeTaxonomy ||--}o ClusterSet : "was_derived_from"
CellTypeTaxonomy ||--}o Embedding : "has_embedding"
CellTypeTaxonomy ||--}o ExpressionMatrix : "has_expression_matrix"
Cluster ||--|o ClusterSet : "part_of_set"
Cluster ||--|o ProvActivity : "was_generated_by"
Cluster ||--|o ProvEntity : "was_derived_from"
Cluster ||--}o Attribute : "has attribute"
Cluster ||--}o CellTypeTaxon : "has_parent"
ClusterSet ||--|o ProvActivity : "was_generated_by"
ClusterSet ||--}o Attribute : "has attribute"
ClusterSet ||--}o ExpressionMatrix : "was_derived_from"
Embedding ||--|o ProvActivity : "was_generated_by"
Embedding ||--|o ProvEntity : "was_derived_from"
Embedding ||--}o Attribute : "has attribute"
ExpressionMatrix ||--|o ProvActivity : "was_generated_by"
ExpressionMatrix ||--|o ProvEntity : "was_derived_from"
ExpressionMatrix ||--}o Attribute : "has attribute"
ExpressionMatrix ||--}o GeneAnnotation : "has_variable"
ProvActivity ||--|o ProvEntity : "used"
ProvEntity ||--|o ProvActivity : "was_generated_by"
ProvEntity ||--|o ProvEntity : "was_derived_from"

```

4 changes: 0 additions & 4 deletions erdiagram-autogen/genome_annotation.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,8 @@ GenomeAssembly {
AnnotationCollection ||--}o GeneAnnotation : "annotations"
AnnotationCollection ||--}o GenomeAnnotation : "genome_annotations"
AnnotationCollection ||--}o GenomeAssembly : "genome_assemblies"
GeneAnnotation ||--}o Attribute : "has attribute"
GeneAnnotation ||--}o OrganismTaxon : "in taxon"
GenomeAnnotation ||--}o Attribute : "has attribute"
GenomeAnnotation ||--}o OrganismTaxon : "in taxon"
GenomeAssembly ||--}o Attribute : "has attribute"
GenomeAssembly ||--}o OrganismTaxon : "in taxon"

```

44 changes: 0 additions & 44 deletions erdiagram-autogen/library_generation.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,12 +341,6 @@ LibraryPooling {
label_typeList synonym
stringList type
uriorcurieList xref
}
ProvActivity {

}
ProvEntity {

}
TissueDissection {
string id
Expand Down Expand Up @@ -384,65 +378,27 @@ TissueSample {

AmplifiedCdna ||--|o BarcodedCellSample : "was_derived_from"
AmplifiedCdna ||--|o CdnaAmplification : "was_generated_by"
AmplifiedCdna ||--}o Attribute : "has attribute"
BarcodedCellSample ||--|o CellBarcoding : "was_generated_by"
BarcodedCellSample ||--}o Attribute : "has attribute"
BarcodedCellSample ||--}o ProvEntity : "was_derived_from"
BrainSlab ||--|o ProvActivity : "was_generated_by"
BrainSlab ||--|o ProvEntity : "was_derived_from"
BrainSlab ||--}o Attribute : "has attribute"
CdnaAmplification ||--|o BarcodedCellSample : "used"
CdnaAmplification ||--}o Attribute : "has attribute"
CellBarcoding ||--}o Attribute : "has attribute"
CellBarcoding ||--}o ProvEntity : "used"
CellDissociation ||--}o Attribute : "has attribute"
CellDissociation ||--}o TissueSample : "used"
CellEnrichment ||--}o Attribute : "has attribute"
CellEnrichment ||--}o DissociatedCellSample : "used"
DigitalAsset ||--|o LibraryPool : "was_derived_from"
DigitalAsset ||--|o ProvActivity : "was_generated_by"
DigitalAsset ||--}o Attribute : "has attribute"
DissectionRoiDelineation ||--|o BrainSlab : "used"
DissectionRoiDelineation ||--}o Attribute : "has attribute"
DissectionRoiPolygon ||--|o BrainSlab : "annotates"
DissectionRoiPolygon ||--|o DissectionRoiDelineation : "was_generated_by"
DissectionRoiPolygon ||--|o ProvEntity : "was_derived_from"
DissectionRoiPolygon ||--}o Attribute : "has attribute"
DissociatedCellSample ||--|o CellDissociation : "was_generated_by"
DissociatedCellSample ||--}o Attribute : "has attribute"
DissociatedCellSample ||--}o TissueSample : "was_derived_from"
Donor ||--|o ProvActivity : "was_generated_by"
Donor ||--|o ProvEntity : "was_derived_from"
Donor ||--}o Attribute : "has attribute"
Donor ||--}o OrganismTaxon : "in taxon"
EnrichedCellSample ||--|o ProvActivity : "was_generated_by"
EnrichedCellSample ||--}o Attribute : "has attribute"
EnrichedCellSample ||--}o ProvEntity : "was_derived_from"
EnrichedCellSampleSplitting ||--|o EnrichedCellSample : "used"
EnrichedCellSampleSplitting ||--}o Attribute : "has attribute"
Library ||--|o LibraryConstruction : "was_generated_by"
Library ||--|o ProvEntity : "was_derived_from"
Library ||--}o Attribute : "has attribute"
LibraryAliquot ||--|o Library : "was_derived_from"
LibraryAliquot ||--|o ProvActivity : "was_generated_by"
LibraryAliquot ||--}o Attribute : "has attribute"
LibraryConstruction ||--|o ProvEntity : "used"
LibraryConstruction ||--}o Attribute : "has attribute"
LibraryPool ||--|o LibraryPooling : "was_generated_by"
LibraryPool ||--}o Attribute : "has attribute"
LibraryPool ||--}o LibraryAliquot : "was_derived_from"
LibraryPooling ||--}o Attribute : "has attribute"
LibraryPooling ||--}o LibraryAliquot : "used"
ProvActivity ||--|o ProvEntity : "used"
ProvEntity ||--|o ProvActivity : "was_generated_by"
ProvEntity ||--|o ProvEntity : "was_derived_from"
TissueDissection ||--|o BrainSlab : "used"
TissueDissection ||--|o DissectionRoiPolygon : "was_guided_by"
TissueDissection ||--}o Attribute : "has attribute"
TissueSample ||--|o DissectionRoiPolygon : "dissection_was_guided_by"
TissueSample ||--|o Donor : "was_derived_from"
TissueSample ||--|o TissueDissection : "was_generated_by"
TissueSample ||--}o Attribute : "has attribute"

```

23 changes: 23 additions & 0 deletions utils/fix_and_create_erdiagram.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@
import subprocess as sp
import yaml

# Classes inherited from bican_biolink that add noise without domain value.
CLASSES_TO_EXCLUDE = {"Attribute", "ProvActivity", "ProvEntity"}


def _remove_excluded_classes(diagram_txt: str) -> str:
lines = diagram_txt.splitlines()
result = []
in_excluded_block = False
for line in lines:
if any(line.startswith(f"{cls} {{") for cls in CLASSES_TO_EXCLUDE):
in_excluded_block = True
if in_excluded_block:
if line.strip() == "}":
in_excluded_block = False
continue
if any(f" {cls} : " in line for cls in CLASSES_TO_EXCLUDE):
continue
result.append(line)
return "\n".join(result)


def fix_diagram(yaml_model: pathlib.Path, diagram: pathlib.Path):
# reading the yaml schema and getting all names of classes
Expand All @@ -22,6 +42,9 @@ def fix_diagram(yaml_model: pathlib.Path, diagram: pathlib.Path):
with diagram.open() as f:
diagram_txt = f.read()

# remove classes inherited from bican_biolink that add noise to domain diagrams
diagram_txt = _remove_excluded_classes(diagram_txt)

to_fix_list = [
"iri type",
"predicate type",
Expand Down
Loading