Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API extension for Support for Retsynth #63

Draft
wants to merge 31 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
328c6f8
SurrealDB (#62)
TimothyStiles Oct 13, 2022
feabf8e
Created the baseline skeleton code for the retsynth models and the co…
rkrishnasanka Dec 23, 2022
762f432
Updated the queries and the query tests.
rkrishnasanka Dec 28, 2022
a0e23a4
Implemented a basic version of the version control system.
rkrishnasanka Jan 3, 2023
f3741ee
Added baseline GraphQL.
rkrishnasanka Jan 3, 2023
e4de389
Updated queries.go with the small update. Additionally, added the gra…
rkrishnasanka Jan 3, 2023
4439bfa
- Added a makefile for general purpose tools when working with a gola…
rkrishnasanka Jan 3, 2023
b2bbc95
updated the graphql generation yaml
rkrishnasanka Jan 4, 2023
a2a566f
Updated the retsynth queries and stuff
rkrishnasanka Jan 4, 2023
a047bb5
Updated the minimal DB for testing
rkrishnasanka Jan 4, 2023
524c3ca
Stored the latest graphql file
rkrishnasanka Jan 4, 2023
a59fab3
Merge branch 'tempgraphql' into gqlgen
rkrishnasanka Jan 4, 2023
138d2f5
Updated the retsynth codebase to support graphql statements and queri…
rkrishnasanka Jan 17, 2023
544714b
Updated the tests for compounds and organisms.
rkrishnasanka Jan 17, 2023
0ecfbbe
Changelog:
rkrishnasanka Jan 17, 2023
0402229
Changelog:
rkrishnasanka Jan 17, 2023
88a6606
Updated the server code to check if the database exists.
rkrishnasanka Jan 17, 2023
b68f8ea
Updated queries to just raise the panics as and when it occurs. This …
rkrishnasanka Jan 18, 2023
268a2b2
Partial update for coverage to make it easier to track the changes.
rkrishnasanka Jan 18, 2023
7fc7839
Partial Updates
rkrishnasanka Jan 18, 2023
a9d9dba
Updated all the queries test code. Most of the queries need to have t…
rkrishnasanka Jan 18, 2023
9d857b3
Deleted Garbage File from history
rkrishnasanka Jan 18, 2023
e38f816
Updated tests for greater coverage. Currently the queries are failing…
rkrishnasanka Jan 18, 2023
bbc64e9
Updated the code to handle the errors for no rows found. It was naive…
rkrishnasanka Jan 18, 2023
a25076f
Added new queries for like term searches
rkrishnasanka Jan 19, 2023
5838272
Fixed some more queries
rkrishnasanka Jan 19, 2023
d5f1da3
Updated the queries, min DB to include
rkrishnasanka Jan 19, 2023
008eef6
Updated the resolver code
rkrishnasanka Jan 26, 2023
8dd82b4
Addressed analytics tool warnings
rkrishnasanka Jan 26, 2023
ff8d6cb
Finished implementing the first pass of the GraphQL implementation
rkrishnasanka Jan 26, 2023
e942bee
Updated teh model comments
rkrishnasanka Feb 6, 2023
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
48 changes: 24 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
on:
push:
tags:
- v*
branches:
- main
pull_request:
name: Test
jobs:
test:
strategy:
matrix:
go-version: [1.18.x]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Test
run: go test -v ./...
# on:
# push:
# tags:
# - v*
# branches:
# - main
# pull_request:
# name: Test
# jobs:
# test:
# strategy:
# matrix:
# go-version: [1.18.x]
# platform: [ubuntu-latest]
# runs-on: ${{ matrix.platform }}
# steps:
# - name: Install Go
# uses: actions/setup-go@v2
# with:
# go-version: ${{ matrix.go-version }}
# - name: Checkout code
# uses: actions/checkout@v2
# - name: Test
# run: go test -v ./...
24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
install-dependencies:
echo "Installing dependencies..."
go get ./...

graphql-generate:
echo "Generating graphql files..."
go get github.com/99designs/[email protected]
go run github.com/99designs/gqlgen generate --verbose

run-playground:
echo "Running graphql playground..."
go run .

clean:
echo "Cleaning..."
rm -rf ./bin

build: install-dependencies
echo "Building..."
go build -o ./bin/allbase .

run-server:
echo "Running server..."
./bin/allbase
258 changes: 258 additions & 0 deletions data/dev/retsynth/minimal-refschema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
--
-- File generated with SQLiteStudio v3.3.3 on Thu Jan 19 01:45:25 2023
--
-- Text encoding used: UTF-8
--
PRAGMA foreign_keys = off;
BEGIN TRANSACTION;

-- Table: cluster
CREATE TABLE cluster (
cluster_num TEXT,
ID TEXT NOT NULL,
PRIMARY KEY (
ID
)
);


-- Table: compartments
CREATE TABLE compartments (
ID TEXT NOT NULL,
name TEXT,
PRIMARY KEY (
ID
)
);


-- Table: compound
CREATE TABLE compound (
ID TEXT NOT NULL,
name TEXT,
compartment TEXT,
kegg_id TEXT,
chemicalformula TEXT,
casnumber TEXT,
inchistring TEXT,
PRIMARY KEY (
ID
)
);


-- Table: fba_models
CREATE TABLE fba_models (
ID TEXT,
file_name TEXT,
PRIMARY KEY (
ID
)
);


-- Table: model
CREATE TABLE model (
ID TEXT,
file_name TEXT,
PRIMARY KEY (
ID
)
);


-- Table: model_compound
CREATE TABLE model_compound (
cpd_ID TEXT,
model_ID TEXT
);


-- Table: model_reaction
CREATE TABLE model_reaction (
reaction_ID TEXT,
model_ID TEXT,
is_rev BIT (1)
);


-- Table: original_db_cpdIDs
CREATE TABLE original_db_cpdIDs (
ID TEXT,
inchi_id TEXT
);


-- Table: reaction
CREATE TABLE reaction (
ID TEXT NOT NULL,
name TEXT,
kegg_id TEXT,
type TEXT,
PRIMARY KEY (
ID
)
);


-- Table: reaction_catalysts
CREATE TABLE reaction_catalysts (
reaction_ID TEXT,
catalysts_ID TEXT,
name TEXT
);


-- Table: reaction_compound
CREATE TABLE reaction_compound (
reaction_ID TEXT,
cpd_ID TEXT,
is_prod BIT (1),
stoichiometry INT,
filenum INT
);


-- Table: reaction_gene
CREATE TABLE reaction_gene (
reaction_ID TEXT,
model_ID TEXT,
gene_ID TEXT
);


-- Table: reaction_protein
CREATE TABLE reaction_protein (
reaction_ID TEXT,
model_ID TEXT,
protein_ID TEXT
);


-- Table: reaction_reversibility
CREATE TABLE reaction_reversibility (
reaction_ID TEXT,
is_reversible BIT (1),
PRIMARY KEY (
reaction_ID
)
);


-- Table: reaction_solvents
CREATE TABLE reaction_solvents (
reaction_ID TEXT,
solvents_ID TEXT,
name TEXT
);


-- Table: reaction_spresi_info
CREATE TABLE reaction_spresi_info (
reaction_ID TEXT PRIMARY KEY,
temperature REAL,
pressure REAL,
total_time REAL,
yield REAL,
reference TEXT
);


-- Index: cluster_ind
CREATE INDEX cluster_ind ON cluster (
cluster_num
);


-- Index: compound_ind
CREATE INDEX compound_ind ON compound (
ID
);


-- Index: fba_models_ind
CREATE INDEX fba_models_ind ON fba_models (
ID
);


-- Index: model_ind
CREATE INDEX model_ind ON model (
ID
);


-- Index: modelcompound_ind1
CREATE INDEX modelcompound_ind1 ON model_compound (
model_ID
);


-- Index: modelcompound_ind2
CREATE INDEX modelcompound_ind2 ON model_compound (
cpd_ID
);


-- Index: modelreaction_ind1
CREATE INDEX modelreaction_ind1 ON model_reaction (
model_ID
);


-- Index: modelreaction_ind2
CREATE INDEX modelreaction_ind2 ON model_reaction (
reaction_ID
);


-- Index: original_db_cpdIDs_ind
CREATE INDEX original_db_cpdIDs_ind ON original_db_cpdIDs (
ID,
inchi_id
);


-- Index: reaction_ind
CREATE INDEX reaction_ind ON reaction (
ID
);


-- Index: reaction_reversibility_ind
CREATE INDEX reaction_reversibility_ind ON reaction_reversibility (
reaction_ID
);


-- Index: reactioncompound_ind1
CREATE INDEX reactioncompound_ind1 ON reaction_compound (
reaction_ID,
cpd_ID,
is_prod
);


-- Index: reactioncompound_ind2
CREATE INDEX reactioncompound_ind2 ON reaction_compound (
cpd_ID,
is_prod
);


-- Index: reactiongene_ind
CREATE INDEX reactiongene_ind ON reaction_gene (
reaction_ID,
model_ID
);


-- Index: reactionprotein_ind
CREATE INDEX reactionprotein_ind ON reaction_protein (
reaction_ID,
model_ID
);


COMMIT TRANSACTION;
PRAGMA foreign_keys = on;
Binary file added data/dev/retsynth/minimal.db
Binary file not shown.
Loading