gocamgen
Base repo for constructing GO-CAM model RDF
Installation
pip install gocamgen
Tests
python3 test_gocamgen.py
Usage
from gocamgen.gocamgen import GoCamModel
model = GoCamModel("model title")
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")
model.write("output_file.ttl")
Quick generation of models from GPAD
Specify source GPAD file. All possible models will be generated and exported to .ttl.
python3 gen_models_by_gene.py --gpad_file wb.gpad
Additionally, a gene product identifier can be specified to only translate and export that GP's model.
python3 gen_models_by_gene.py --gpad_file wb.gpad --specific_gene WB:WBGene00004055
In general, annotation lines will be grouped by gene product identifier (col 2) with some lines filtered out due to various evidence code/reference rules.
Generating annotation extensions usage spreadsheet
To be clear, this creates a spreadsheet aggregating all extensions "patterns" (e.g. happens_during(GO:P), positively_regulates(GO:P)) that are decided to be invalid according to the rules currently encoded in this same script. These same rules are used by the model generation import.
Example to generate spreadsheet from one GPAD file:
python3 gpad_extensions_mapper.py --filename wb.gpad --out_file bad_extensions.tsv
Example to generate spreadsheet (results compiled into one .tsv) from directory of GPADs:
python3 gpad_extensions_mapper.py --dir gpad_files/ --out_file bad_extensions.tsv
Snippet from created spreadsheet:
| Aspect | Total count | Extension | UniProt | WB | ParkinsonsUK-UCL |
|---|---|---|---|---|---|
| F | 2 | happens_during(GO:P),happens_during(WBls) | 2 | 0 | 0 |
| F | 2 | happens_during(WBls) | 0 | 2 | 0 |
| F | 4 | regulates_activity_of(geneID) | 0 | 4 | 0 |
| F | 1 | occurs_in(WBbt),part_of(GO:P) | 1 | 0 | 0 |
| F | 3 | occurs_in(WBbt) | 2 | 1 | 0 |
| F | 1 | activated_by(geneID) | 0 | 1 | 0 |
Drilling down to offending GPAD lines "by extension pattern"
If you'd like to get the actual GPAD containing the invalid extension pattern, just copy-paste the pattern into the --pattern option and rerun on the same GPAD(s):
python3 gpad_extensions_mapper.py --filename wb.gpad --pattern "regulates_activity_of(geneID)"
By default this will output the lines to a [pattern].gpad file like regulates_activity_of(geneID).gpad but this can be overidden with --pattern_outfile. There's also an option for running multiple patterns at once by plugging the path to a newline-separated list of patterns into the --pattern_sourcefile, which then creates multiple GPAD files named after each pattern.
Metadata
Release files for gocamgen 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gocamgen-0.0.5.tar.gz | 28.6 kB | Without provenance | Details for gocamgen-0.0.5.tar.gz |
Release files / gocamgen-0.0.5.tar.gz
| Download URL | gocamgen-0.0.5.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
715f4959077bf7dd44f34cd82e40609b5c87a06b5820f4d706cb57ecf56069aa
|
|
BLAKE2b-256 checksum How to use checksums |
8c3b42fedad038748148f8f27e9565da6d06c606376523a37a08d5b7c84bb34b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5
|
Security for gocamgen 0.0.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.