Skip to content

Commit

Permalink
Testing with BMDC files
Browse files Browse the repository at this point in the history
  • Loading branch information
danbri committed Mar 19, 2024
1 parent 041e674 commit 2ac79be
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 103 deletions.
15 changes: 15 additions & 0 deletions software/scripts/bmdc2sdo/bmdc2sdo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

export MCF=~/working/datcom/schema/biomedical_schema
export DIR=../../../data/ext/pending

# ok
./mcf2turtle.py $MCF/biological_taxonomy.mcf > $DIR/bmdc_biological_taxonomy.ttl


# not yet ok

./mcf2turtle.py $MCF/disease.mcf > $DIR/bmdc_disease.ttl

# Files so far written:
ls -l $DIR/bmdc*.ttl
6 changes: 5 additions & 1 deletion software/scripts/bmdc2sdo/mcf2turtle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
# bmdc2sdo.py
# find ../schema/biomedical_schema/ -name \*.mcf -exec ./bmdc2sdo.py {} \;

# TODO:
# - fix issue with multiple types in a rangeIncludes/subClassOf/domainIncludes.
# - add enumerations exporter (and statvars?)

# Usage:
# python mcf2turtle.py ~/working/datcom/schema/biomedical_schema/biological_taxonomy.mcf
# or several files
Expand Down Expand Up @@ -60,7 +64,7 @@
sys.path.insert(1, '/home/danbri/working/datcom/data/')

#DEBUG = os.getenv("DEBUG", "0") == "1"
DEBUG = 1
DEBUG = 0

from util.mcf_dict_util import mcf_file_to_dict_list

Expand Down
102 changes: 0 additions & 102 deletions software/scripts/bmdc2sdo/x
Original file line number Diff line number Diff line change
@@ -1,108 +1,6 @@
Testing split_and_format_values function...
DEBUG: Formatted value: dcs:Disease
DEBUG: Formatted value: dcs:ICD10Code
DEBUG: Formatted value: dcs:MeSHDescriptor
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: schema:Number
DEBUG: Formatted value: dcs:Text
All tests passed!
All tests passed!
DEBUG: Loaded MCF data: 39 entries
DEBUG: Generating Turtle for class node: Disease
DEBUG: Formatted value: :Thing
DEBUG: Generating Turtle for class node: DiseaseDiseaseAssociation
DEBUG: Formatted value: :Disease
DEBUG: Generating Turtle for class node: DiseaseGeneAssociation
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: dcs:ICD10Code
DEBUG: Generating Turtle for class node: DiseaseGeneticVariantAssociation
DEBUG: Formatted value: :Disease
DEBUG: Generating Turtle for class node: MeSHConcept
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Generating Turtle for class node: MeSHDescriptor
DEBUG: Formatted value: :Intangible
DEBUG: Generating Turtle for class node: MeSHQualifier
DEBUG: Formatted value: :Intangible
DEBUG: Generating Turtle for class node: MeSHSupplementaryRecord
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Generating Turtle for class node: MeSHTerm
DEBUG: Formatted value: :MeSHConcept
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :AssociationSourceEnum
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :Number
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :Number
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :DiseaseGeneAssociationStatusEnum
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :Number
DEBUG: Formatted value: :DiseaseGeneAssociation
DEBUG: Formatted value: :Number
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Formatted value: dcs:MeSHSupplementaryRecord
DEBUG: Formatted value: :Boolean
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: dcs:MeSHConcept
DEBUG: Formatted value: :MeSHConcept
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: dcs:GeneticVariant
DEBUG: Formatted value: dcs:MeSHConcept
DEBUG: Formatted value: dcs:MeSHDescriptor
DEBUG: Formatted value: dcs:MeSHQualifier
DEBUG: Formatted value: dcs:MeSHSupplementaryRecord
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: :MeSHQualifier
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :ChemicalCompound
DEBUG: Formatted value: dcs:MeSHSupplementaryRecord
DEBUG: Formatted value: :MeSHSupplementaryRecord
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: :MeSHConcept
DEBUG: Formatted value: dcs:MeSHTerm
DEBUG: Formatted value: :MeSHTerm
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: :MeSHDescriptor
DEBUG: Formatted value: dcs:MeSHQualifier
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :MeSHConcept
DEBUG: Formatted value: dcs:MeSHQualifier
DEBUG: Formatted value: :MeSHQualifier
DEBUG: Formatted value: schema:Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :ICD10Code
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :ICD10Code
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text
DEBUG: Formatted value: :Disease
DEBUG: Formatted value: :Text

@prefix : <https://schema.org/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
Expand Down

0 comments on commit 2ac79be

Please sign in to comment.