Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
6a6997d
Update to deploy
3ach Jan 29, 2020
649378d
Allow evaluate POST
3ach Jan 29, 2020
40b4092
Create LICENSE
3ach Mar 9, 2020
1fc12c8
Create README.md
JMante1 Mar 9, 2020
2d42d87
Update README.md
JMante1 Mar 9, 2020
4bad809
Jetfix
3ach Apr 16, 2020
f7c2490
updated input data
JMante1 Apr 18, 2020
99a4f12
Create input_data.py
JMante1 Apr 18, 2020
9149605
Create capitalise_each_word.py
JMante1 Apr 18, 2020
761925b
Create find_role_name.py
JMante1 Apr 18, 2020
3ff5522
Update input_data.py
JMante1 Apr 18, 2020
e479519
Update find_role_name.py
JMante1 Apr 18, 2020
13762b9
Update find_role_name.py
JMante1 Apr 18, 2020
9ae5283
Rename SparqlPreecedingPercent2.txt to PrecedingPercent.txt
JMante1 Apr 19, 2020
11563cc
Create sankey.py
JMante1 Apr 22, 2020
0bfbe4e
Create sankey_graph.py
JMante1 Apr 22, 2020
87eda79
Create retrieve_html.py
JMante1 Apr 22, 2020
d4d5bb1
update sankey run
JMante1 Apr 22, 2020
9605fe2
Rename Sparqlmostused.txt to Most_used_query.txt
JMante1 Apr 22, 2020
1f6086b
Rename PrecedingPercent.txt to Preceding_Percent_Query.txt
JMante1 Apr 22, 2020
2ac0771
Update sankey.py
JMante1 Apr 22, 2020
d3bd790
Rename Most_used_query.txt to Most_Used_Query.txt
JMante1 Apr 22, 2020
6274c1d
Rename sparql.txt to Input_Query.txt
JMante1 Apr 22, 2020
f7daf82
Update input_data.py
JMante1 Apr 22, 2020
2c75fee
Create most_used_bar.py
JMante1 Apr 22, 2020
c443f6d
Update app.py
JMante1 Apr 22, 2020
8c3e98b
Create bar_plot.py
JMante1 Apr 22, 2020
4ee98a0
Rename Sparqlmostused1.txt to Most_Used_By_Type_Query.txt
JMante1 Apr 22, 2020
b4c76bc
Create most_used_by_type_bar.py
JMante1 Apr 22, 2020
8aad94c
Rename toggleswitchhtml.txt to Toggle_Switch_html.txt
JMante1 Apr 22, 2020
e16f021
Update most_used_by_type_bar.py
JMante1 Apr 22, 2020
6e3d471
Update most_used_by_type_bar.py
JMante1 Apr 22, 2020
55df183
Update most_used_bar.py
JMante1 Apr 22, 2020
b671408
Update most_used_bar.py
JMante1 Apr 22, 2020
c63a1dd
Update most_used_by_type_bar.py
JMante1 Apr 22, 2020
c9653f9
Create toggle_bars.py
JMante1 Apr 22, 2020
a135aff
update bar run
JMante1 Apr 22, 2020
7aec65e
Delete Full_v004_20190506.py
JMante1 Apr 22, 2020
b0f035e
Update app.py
JMante1 Apr 22, 2020
6a85d4e
Update app.py
JMante1 Apr 22, 2020
8ee6433
Update app.py
JMante1 Apr 22, 2020
6abcda0
Update app.py
JMante1 Apr 22, 2020
7f9edbb
Update input_data.py
JMante1 Apr 22, 2020
9d96d6b
added uri to url code
JMante1 Apr 22, 2020
b8e666a
Update sankey.py
JMante1 Apr 22, 2020
44206b6
Update sankey.py
JMante1 Apr 22, 2020
53ab520
Update sankey.py
JMante1 Apr 22, 2020
491140d
Update sankey_graph.py
3ach Apr 22, 2020
2805eb7
Update app.py
JMante1 Apr 22, 2020
3612ec0
Delete plotly from function body
3ach Apr 22, 2020
2df7044
Update app.py
JMante1 Apr 22, 2020
8c59886
Update find_role_name.py
JMante1 Apr 22, 2020
22e7270
Update bar_plot.py
JMante1 Apr 22, 2020
f7c697a
Update sankey_graph.py
3ach Apr 22, 2020
3d5891d
Fix typos and get Sankey working
3ach Apr 22, 2020
6d302f3
Make bars work
3ach Apr 22, 2020
705c3e3
Comment out prints
3ach Apr 22, 2020
ec06c86
Update app.py
JMante1 Apr 22, 2020
df94f94
removed unneeded display id parameter from barplot
JMante1 Apr 23, 2020
c11b65a
added comments to bar_plot
JMante1 Apr 23, 2020
5fd3757
added comments to capitalise each word
JMante1 Apr 23, 2020
b2d65fb
added comments to find_role_name
JMante1 Apr 23, 2020
bcc0327
added comments to input data
JMante1 Apr 23, 2020
a57bdc5
removed a space
JMante1 Apr 23, 2020
2367d12
working on commenting most used bar
JMante1 Apr 23, 2020
cdf989c
most_used_bar add comments and update
JMante1 Apr 23, 2020
be1c33a
Update most_used_bar.py
JMante1 Apr 23, 2020
38d8ded
Update most_used_by_type_bar.py
JMante1 Apr 23, 2020
c720574
Update most_used_bar.py
JMante1 Apr 23, 2020
6771c2c
added comments to retrieve_html
JMante1 Apr 23, 2020
642cd5a
update sankey
JMante1 Apr 23, 2020
db7a275
sankey graph comments part way
JMante1 Apr 23, 2020
bf43d3c
Update app.py
JMante1 Apr 23, 2020
7811249
added comments to sankey_graph
JMante1 Apr 23, 2020
48565a1
Update app.py
JMante1 Apr 23, 2020
03c270f
added comments to toggle bars
JMante1 Apr 23, 2020
f330700
Update app.py
JMante1 Apr 23, 2020
6827ae3
Create uri_to_url.py
JMante1 Apr 23, 2020
1dd299c
Update uri_to_url.py
JMante1 Apr 23, 2020
f2c2d3d
add comments and reduce use to uri_to_url.py
JMante1 Apr 23, 2020
f86a925
updated spoofing response
JMante1 Apr 23, 2020
724622d
added spoofing function to most_used_by_type_bar.py
JMante1 Apr 23, 2020
24df9e6
Update uri_to_url.py
JMante1 Apr 23, 2020
6d78653
sankey.py got spoof function
JMante1 Apr 23, 2020
a95f0d6
most_used_by_type_bar removed all bars
JMante1 Apr 23, 2020
1a0cb42
Update requirements.txt
JMante1 May 13, 2020
8192ae0
Update uri_to_url.py
JMante1 May 13, 2020
d73fde9
Create DockerFile
JMante1 May 14, 2020
5db89b1
Rename DockerFile to Dockerfile
JMante1 May 14, 2020
d9486a5
Update uri_to_url.py
JMante1 May 14, 2020
8d4d007
Update Dockerfile
JMante1 May 14, 2020
b278741
docker nonsense
3ach May 14, 2020
3e70c4b
Add push automation
3ach May 14, 2020
febbe4c
Update README.md
JMante1 May 18, 2020
19488f0
Update README.md
JMante1 May 18, 2020
c42e56d
Update README.md
JMante1 May 18, 2020
f96a092
updater requirements for security patch
JMante1 May 18, 2020
fbfd466
Update requirements.txt
JMante1 Jul 8, 2020
735f1c5
Update Dockerfile
JMante1 Jul 8, 2020
5a05eee
Update release.yml
JMante1 Jul 15, 2020
f343ecd
Update README.md
JMante1 Jul 18, 2020
415d72a
Update app.py
JMante1 Jul 18, 2020
c4bf7c9
Update README.md
JMante1 Jul 18, 2020
a4f08e6
Update app.py
JMante1 Jul 18, 2020
fd97091
Fixed issues
JMante1 Sep 11, 2020
179c478
delete wsgi
JMante1 Sep 11, 2020
13da1ed
change json_normalize import
JMante1 Sep 11, 2020
0c24a36
Update Dockerfile
JMante1 Nov 8, 2021
1a4ceef
Update requirements.txt
JMante1 Nov 8, 2021
cd9bb64
Update release.yml
JMante1 Nov 8, 2021
6b83b50
Update requirements.txt
JMante1 Nov 8, 2021
52c2b88
Update README.md
cjmyers Nov 29, 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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build and push docker images

on:
push:
branches: [main]

jobs:
build-and-push:
name: Build image and push to Docker Hub
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
name: Checkout source code
- name: Build the Docker image
run: |
repo_name_lower=$(echo ${{ github.event.repository.name }}| tr [:upper:] [:lower:])
tag="synbiohub/${repo_name_lower}:snapshot"
echo $tag
docker build . --tag $tag
- uses: azure/docker-login@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push the image to Docker Hub
run: |
repo_name_lower=$(echo ${{ github.event.repository.name }}| tr [:upper:] [:lower:])
tag="synbiohub/${repo_name_lower}:snapshot"
echo $tag
docker push $tag
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
__pycache__
venv
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM synbiohub/docker-base-python:snapshot

COPY . .

EXPOSE 5000

RUN pip3 install -r requirements.txt

ENV FLASK_APP=app.py

CMD ["waitress-serve", "--port=5000", "app:app" ]
29 changes: 29 additions & 0 deletions Input_Query.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX sbh: <http://wiki.synbiohub.org/wiki/Terms/synbiohub#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX sbol: <http://sbols.org/v2#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX purl: <http://purl.obolibrary.org/obo/>

SELECT
?def
?displayId
?title
(count(?def) as ?count)
?role
WHERE {
FILTER regex(?role, "identifiers")
?s sbol:component ?comp .
?comp sbol:definition <https://synbiohub.org/public/igem/BBa_B0012/1> .
?s sbol:component ?comp2 .
?comp2 sbol:definition ?def .
OPTIONAL {?def sbol:role ?role} .
OPTIONAL {?def sbol:displayId ?displayId} .
OPTIONAL {?def dcterms:title ?title} .
}
ORDER BY DESC (?count)

#OFFSET 0 LIMIT 50
25 changes: 25 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
BSD 2-Clause License

Copyright (c) 2020, Zach Zundel
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 changes: 0 additions & 34 deletions Looking

This file was deleted.

27 changes: 27 additions & 0 deletions Most_Used_By_Type_Query.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX sbh: <http://wiki.synbiohub.org/wiki/Terms/synbiohub#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX sbol: <http://sbols.org/v2#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX purl: <http://purl.obolibrary.org/obo/>

SELECT
?def
?displayId
?title
(count(?def) as ?count)
?role
WHERE {
FILTER (?role = <http://identifiers.org/so/SO:0000167>) .
?s sbol:component ?comp .
?comp sbol:definition ?def .
OPTIONAL {?def sbol:role ?role} .
OPTIONAL {?def sbol:displayId ?displayId} .
OPTIONAL {?def dcterms:title ?title} .
}
ORDER BY DESC (?count)

#OFFSET 0 LIMIT 50
27 changes: 27 additions & 0 deletions Most_Used_Query.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX sbh: <http://wiki.synbiohub.org/wiki/Terms/synbiohub#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX sbol: <http://sbols.org/v2#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX purl: <http://purl.obolibrary.org/obo/>

SELECT
?def
?displayId
?title
(count(?def) as ?count)
?role
WHERE {
?s sbol:component ?comp .
?comp sbol:definition ?def .
filter (regex(?role, 'http://identifiers.org/so/SO:')) .
OPTIONAL {?def sbol:role ?role} .
OPTIONAL {?def sbol:displayId ?displayId} .
OPTIONAL {?def dcterms:title ?title} .
}
ORDER BY DESC (?count)

#OFFSET 0 LIMIT 50
49 changes: 49 additions & 0 deletions Preceding_Percent_Query.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX sbh: <http://wiki.synbiohub.org/wiki/Terms/synbiohub#>
PREFIX prov: <http://www.w3.org/ns/prov#>
PREFIX sbol: <http://sbols.org/v2#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX purl: <http://purl.obolibrary.org/obo/>

select
#?s
?def2
(COUNT(?def2) AS ?count)
?role
?title
?displayId
(AVG(xsd:integer(?preceeding)) AS ?average_preceeding) # 1 means all preceeding, 0 means all following, is percentage preceeding
#?preceeding #if negative then component ends before start of queried component
#?start
#?end
#?startb
#?endb
#?def
where {
?s sbol:component ?comp .
?s sbol:component ?comp2 .
?comp sbol:definition ?def .
?comp2 sbol:definition ?def2 .
?s sbol:sequenceAnnotation ?sa .
?sa sbol:component ?comp2 .
?sa sbol:location ?loc .
#?loc sbol:start ?start .
?loc sbol:end ?end .
?s sbol:sequenceAnnotation ?sb .
?sb sbol:component ?comp .
?sb sbol:location ?locb .
?locb sbol:start ?startb .
#?locb sbol:end ?endb .
OPTIONAL {?def2 sbol:role ?role} .
OPTIONAL {?def2 dcterms:title ?title} .
OPTIONAL {?def2 sbol:displayId ?displayId} .
BIND(if(xsd:integer(?end)-xsd:integer(?startb) < 0, "0", "1") AS ?preceeding) .
filter(?def = <https://synbiohub.org/public/igem/BBa_E0040/1>) .
filter(?def2 != <https://synbiohub.org/public/igem/BBa_E0040/1>) .
filter (regex(?role, 'http://identifiers.org/so/SO:')) .
#filter (?role = <http://identifiers.org/so/SO:0000167> || (?role = <http://identifiers.org/so/SO:0000139>)|| (?role = <http://identifiers.org/so/SO:0000316>)|| (?role = <http://identifiers.org/so/SO:0000141>)) .
}
ORDER BY DESC(?count)
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# INSTALL
## Docker
Run `docker run --publish 8080:5000 --detach --name component-use-plug synbiohub/plugin-visual-component-use` Check it is up using localhost:8080/sankey/status

## Python
Using python run `pip install -r requirements.txt` to install the requirements.
Then run `FLASK_APP=app python -m flask run`.
A flask module will run at localhost:5000/sankey/.
39 changes: 39 additions & 0 deletions Toggle_Switch_html.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<html>

<body>
<input type="checkbox" name="type" id="bytype" /><label for="bytype">Type Matters</label>

<div id="type">
<h2>By type</h2>
</div>

<div id="notype">
<h2>Frequency</h2>
</div>

<script type="text/javascript">
document.getElementById('type').style.display = 'none';
document.getElementById('notype').style.display = 'block';

var inputs = document.getElementsByTagName('input');

function dispp() {
if (bytype.checked) {
document.getElementById('type').style.display = 'block';
document.getElementById('notype').style.display = 'none';
}
else {
document.getElementById('type').style.display = 'none';
document.getElementById('notype').style.display = 'block';
}
}

for (i = 0; i < inputs.length; i++) {
if (inputs[i].type.toLowerCase() == 'checkbox') {
inputs[i].onchange = dispp;
}
}
</script>
</body>

</html>
Loading