Python library for constructing GO-CAM model RDF
Project description
# gocamgen
Base repo for constructing GO-CAM model RDF
## Installation
```
pip install gocamgen
```
## Usage
```
from gocamgen.gocamgen import GoCamModel
model = GoCamModel("output_file.ttl")
model.declare_class("PomBase:SPBC12C2.02c")
uri_a = model.declare_individual("GO:0016757")
uri_b = model.declare_individual("PomBase:SPBC12C2.02c")
axiom = model.add_axiom(uri_a, URIRef(expand_uri("RO:0002333")), uri_b)
model.add_evidence(axiom, "EXP", "PMID:1234567")
with open(model.filepath, 'wb') as f:
model.writer.writer.serialize(destination=f)
```
Base repo for constructing GO-CAM model RDF
## Installation
```
pip install gocamgen
```
## Usage
```
from gocamgen.gocamgen import GoCamModel
model = GoCamModel("output_file.ttl")
model.declare_class("PomBase:SPBC12C2.02c")
uri_a = model.declare_individual("GO:0016757")
uri_b = model.declare_individual("PomBase:SPBC12C2.02c")
axiom = model.add_axiom(uri_a, URIRef(expand_uri("RO:0002333")), uri_b)
model.add_evidence(axiom, "EXP", "PMID:1234567")
with open(model.filepath, 'wb') as f:
model.writer.writer.serialize(destination=f)
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gocamgen-0.0.2.tar.gz
(4.9 kB
view details)
File details
Details for the file gocamgen-0.0.2.tar.gz
.
File metadata
- Download URL: gocamgen-0.0.2.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cac1afb33239c923754558bcb0e14b24b45f153ad36014ba79f533f15f321dfc |
|
MD5 | ba01a637740d0e1b1e87b89677e7b0a7 |
|
BLAKE2b-256 | fd4c838b81681a5433aded4b735f9364727efe95170f5c4bc74a62c98727bf86 |