Examples
Mapping samples against an entire ontology
example_config_all_foodon.json:
[
{
"http://purl.obolibrary.org/obo/foodon.owl":
"http://purl.obolibrary.org/obo/BFO_0000001"
}
]
example_input.csv:
id,sample
0,potato flakes
1,fish fillet
2,wheat
Run:
$ lexmapr example_input.csv -c example_config_all_fooodon.json
Terminal output:
Sample_Id Sample_Desc Cleaned_Sample Matched_Components
0 potato flakes potato flakes ['potato flakes:foodon_00002792']
1 fish fillet fish fillet ['fish fillet:foodon_00002679']
2 wheat wheat ['wheat:foodon_03315184']
Mapping samples against a subset of an ontology
example_config_foodon_plants_only.json:
[
{
"http://purl.obolibrary.org/obo/foodon.owl":
"http://purl.obolibrary.org/obo/FOODON_00001015"
}
]
example_input.csv
id,sample
0,potato flakes
1,fish fillet
2,wheat
Run:
$ lexmapr example_input.csv -c example_config_foodon_plants_only.json
Terminal output:
0 potato flakes potato flakes ['potato flakes:foodon_00002792']
1 fish fillet fish fillet []
2 wheat wheat ['wheat:foodon_03315184']
Mapping samples against multiple ontologies
example_config_foodon_and_envo.json:
[
{
"http://purl.obolibrary.org/obo/foodon.owl":
"http://purl.obolibrary.org/obo/BFO_0000001"
},
{
"http://purl.obolibrary.org/obo/envo.owl":
"http://purl.obolibrary.org/obo/BFO_0000001"
}
]
example_input.csv
id,sample
0,potato flakes from a field
1,fish fillet from a lake
2,wheat from a mountain
Run:
$ lexmapr example_input.csv -c example_config_foodon_and_envo.json
Terminal output:
Sample_Id Sample_Desc Cleaned_Sample Matched_Components
0 potato flakes from a field potato flakes field ['potato flakes:foodon_00002792', 'field:envo_01000352']
1 fish fillet from a lake fish fillet lake ['fish fillet:foodon_00002679', 'lake:envo_00000020']
2 wheat from a mountain wheat mountain ['wheat:foodon_03315184', 'mountain:envo_00000081']