├── askomics ├── __init__.py ├── api │ ├── __init__.py │ ├── catch_url.py │ ├── view.py │ ├── data.py │ └── ontology.py ├── libaskomics │ ├── __init__.py │ ├── FilesUtils.py │ ├── Params.py │ ├── Start.py │ ├── Mailer.py │ └── RdfGraph.py ├── static │ ├── welcome.html │ ├── favicon.png │ └── about.html ├── react │ └── src │ │ ├── components │ │ ├── template.jsx │ │ └── waiting.jsx │ │ ├── index.jsx │ │ ├── contact.jsx │ │ ├── routes │ │ ├── about │ │ │ └── about.jsx │ │ ├── form │ │ │ └── entity.jsx │ │ ├── login │ │ │ └── logout.jsx │ │ ├── query │ │ │ ├── ontolinkview.jsx │ │ │ └── graphfilters.js │ │ ├── form_edit │ │ │ └── entity.jsx │ │ ├── sparql │ │ │ ├── advancedsparql.jsx │ │ │ └── resultstable.jsx │ │ ├── account │ │ │ ├── account.jsx │ │ │ ├── update_apikey.jsx │ │ │ ├── update_galaxy.jsx │ │ │ ├── update_password.jsx │ │ │ └── update_profile.jsx │ │ ├── integration │ │ │ ├── advancedoptions.jsx │ │ │ └── integration.jsx │ │ ├── datasets │ │ │ └── datasets.jsx │ │ ├── upload │ │ │ ├── uploadurlform.jsx │ │ │ └── uploadmodal.jsx │ │ ├── error │ │ │ └── error.jsx │ │ ├── admin │ │ │ └── filestable.jsx │ │ └── data │ │ │ └── data.jsx │ │ ├── footer.jsx │ │ └── classes │ │ └── utils.jsx ├── middleware.py └── templates │ └── index.html ├── requirements.txt ├── .coveragerc ├── .coveralls.yml ├── test-data ├── malformed.tsv ├── linked_uris.csv ├── qtl.tsv ├── uris.csv ├── gene.tsv ├── abstraction.ttl ├── abstraction.xml ├── transcripts_chunk1.tsv ├── transcripts_chunk2.tsv ├── gene.bed ├── de.tsv ├── transcripts_chunk3.tsv ├── abstraction.nt ├── transcripts.tsv ├── gene.gff3 └── agro_min.ttl ├── askomics.png ├── docs ├── img │ ├── gff.png │ ├── tsv.png │ ├── faldo.png │ ├── form.png │ ├── minus.png │ ├── navbar.png │ ├── query.png │ ├── sparql.png │ ├── union.png │ ├── datasets.png │ ├── filters.png │ ├── num_attr.png │ ├── preview.png │ ├── template.png │ ├── askogalaxy.png │ ├── askograph.png │ ├── attributes.png │ ├── csv_convert.png │ ├── files_table.png │ ├── form_edit.png │ ├── gff_preview.png │ ├── name_attr.png │ ├── qtl_preview.png │ ├── startpoint.png │ ├── attribute_box.png │ ├── complex_query.png │ ├── custom_nodes.png │ ├── form_example.png │ ├── linked_query.png │ ├── login_button.png │ ├── navbar_files.png │ ├── ontology_link.png │ ├── query_builder.png │ ├── results_table.png │ ├── abstraction_2d.png │ ├── abstraction_3d.png │ ├── account_button.png │ ├── ontology_graph.png │ ├── preview_results.png │ ├── union_duplicated.png │ ├── uri_label_attr.png │ ├── de_results_preview.png │ ├── galaxy_execute_it.png │ ├── galaxy_input_data.png │ ├── galaxy_search_tool.png │ ├── integrate_external.png │ ├── external_startpoint.png │ ├── galaxy_askomics_files.png │ ├── galaxy_history_result.png │ ├── ontology_autocomplete.png │ ├── ontology_integration.png │ ├── galaxy_import_from_galaxy.png │ └── symbol_to_ensembl_preview.png ├── requirements.txt ├── docs.md ├── prefixes.md ├── cli.md ├── ci.md ├── abstraction-overview.md ├── style.css ├── dev-deployment.md ├── contribute.md ├── index.md ├── console.md ├── federation.md ├── results.md ├── ontologies.md ├── galaxy.md ├── production-deployment.md └── manage.md ├── cli ├── clear_cache.sh ├── update_base_url.sh ├── set_config.sh ├── config_updater.py ├── set_user.sh ├── clear_cache.py ├── update_base_url.py └── add_user.py ├── .babelrc ├── tests ├── results │ ├── result.csv │ ├── results_admin.json │ ├── preview_malformed_files.json │ ├── results_uri.json │ ├── results_linked_uri.json │ ├── query.sparql │ ├── sparql_preview.json │ ├── preview.json │ ├── data_public.json │ ├── data_full.json │ ├── init.json │ ├── sparql_query.json │ └── startpoints.json ├── __init__.py ├── data │ ├── startpoints.json │ └── uri_query.json ├── test_uri.py ├── test_api_data.py ├── test_api_ontology.py └── test_cleanup.py ├── app.py ├── .dockerignore ├── .eslintrc.yml ├── docker ├── DockerfileCelery ├── Dockerfile ├── start_all.sh └── DockerfileAll ├── .readthedocs.yml ├── Pipfile ├── webpack.config.js ├── setup.py ├── README.md ├── mkdocs.yml ├── .github └── workflows │ ├── github-publish-flaskomics.yml │ ├── github-publish-celery-flaskomics.yml │ └── lint_test.yml └── package.json /askomics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pipenv -------------------------------------------------------------------------------- /askomics/api/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /askomics/libaskomics/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.coveragerc: -------------------------------------------------------------------------------- 1 | [run] 2 | omit = venv/* 3 | -------------------------------------------------------------------------------- /.coveralls.yml: -------------------------------------------------------------------------------- 1 | repo_token: 5OBT9Dq2n5pQfhOV9gJNu8THW8O1qUxdg -------------------------------------------------------------------------------- /test-data/malformed.tsv: -------------------------------------------------------------------------------- 1 | column2 column3 2 | val1 val2 val3 3 | -------------------------------------------------------------------------------- /askomics/static/welcome.html: -------------------------------------------------------------------------------- 1 |
2 |

Ask!

3 |
4 |
-------------------------------------------------------------------------------- /askomics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/askomics.png -------------------------------------------------------------------------------- /docs/img/gff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/gff.png -------------------------------------------------------------------------------- /docs/img/tsv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/tsv.png -------------------------------------------------------------------------------- /docs/requirements.txt: -------------------------------------------------------------------------------- 1 | mkdocs==1.6.0 2 | markdown-captions==2.1.2 3 | jinja2==3.1.4 4 | -------------------------------------------------------------------------------- /docs/img/faldo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/faldo.png -------------------------------------------------------------------------------- /docs/img/form.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/form.png -------------------------------------------------------------------------------- /docs/img/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/minus.png -------------------------------------------------------------------------------- /docs/img/navbar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/navbar.png -------------------------------------------------------------------------------- /docs/img/query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/query.png -------------------------------------------------------------------------------- /docs/img/sparql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/sparql.png -------------------------------------------------------------------------------- /docs/img/union.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/union.png -------------------------------------------------------------------------------- /cli/clear_cache.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | python3 cli/clear_cache.py -c config/askomics.ini 4 | -------------------------------------------------------------------------------- /docs/img/datasets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/datasets.png -------------------------------------------------------------------------------- /docs/img/filters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/filters.png -------------------------------------------------------------------------------- /docs/img/num_attr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/num_attr.png -------------------------------------------------------------------------------- /docs/img/preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/preview.png -------------------------------------------------------------------------------- /docs/img/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/template.png -------------------------------------------------------------------------------- /docs/img/askogalaxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/askogalaxy.png -------------------------------------------------------------------------------- /docs/img/askograph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/askograph.png -------------------------------------------------------------------------------- /docs/img/attributes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/attributes.png -------------------------------------------------------------------------------- /docs/img/csv_convert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/csv_convert.png -------------------------------------------------------------------------------- /docs/img/files_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/files_table.png -------------------------------------------------------------------------------- /docs/img/form_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/form_edit.png -------------------------------------------------------------------------------- /docs/img/gff_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/gff_preview.png -------------------------------------------------------------------------------- /docs/img/name_attr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/name_attr.png -------------------------------------------------------------------------------- /docs/img/qtl_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/qtl_preview.png -------------------------------------------------------------------------------- /docs/img/startpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/startpoint.png -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-react" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /docs/img/attribute_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/attribute_box.png -------------------------------------------------------------------------------- /docs/img/complex_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/complex_query.png -------------------------------------------------------------------------------- /docs/img/custom_nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/custom_nodes.png -------------------------------------------------------------------------------- /docs/img/form_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/form_example.png -------------------------------------------------------------------------------- /docs/img/linked_query.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/linked_query.png -------------------------------------------------------------------------------- /docs/img/login_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/login_button.png -------------------------------------------------------------------------------- /docs/img/navbar_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/navbar_files.png -------------------------------------------------------------------------------- /docs/img/ontology_link.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/ontology_link.png -------------------------------------------------------------------------------- /docs/img/query_builder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/query_builder.png -------------------------------------------------------------------------------- /docs/img/results_table.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/results_table.png -------------------------------------------------------------------------------- /askomics/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/askomics/static/favicon.png -------------------------------------------------------------------------------- /docs/img/abstraction_2d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/abstraction_2d.png -------------------------------------------------------------------------------- /docs/img/abstraction_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/abstraction_3d.png -------------------------------------------------------------------------------- /docs/img/account_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/account_button.png -------------------------------------------------------------------------------- /docs/img/ontology_graph.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/ontology_graph.png -------------------------------------------------------------------------------- /docs/img/preview_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/preview_results.png -------------------------------------------------------------------------------- /docs/img/union_duplicated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/union_duplicated.png -------------------------------------------------------------------------------- /docs/img/uri_label_attr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/uri_label_attr.png -------------------------------------------------------------------------------- /docs/img/de_results_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/de_results_preview.png -------------------------------------------------------------------------------- /docs/img/galaxy_execute_it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_execute_it.png -------------------------------------------------------------------------------- /docs/img/galaxy_input_data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_input_data.png -------------------------------------------------------------------------------- /docs/img/galaxy_search_tool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_search_tool.png -------------------------------------------------------------------------------- /docs/img/integrate_external.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/integrate_external.png -------------------------------------------------------------------------------- /docs/img/external_startpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/external_startpoint.png -------------------------------------------------------------------------------- /docs/img/galaxy_askomics_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_askomics_files.png -------------------------------------------------------------------------------- /docs/img/galaxy_history_result.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_history_result.png -------------------------------------------------------------------------------- /docs/img/ontology_autocomplete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/ontology_autocomplete.png -------------------------------------------------------------------------------- /docs/img/ontology_integration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/ontology_integration.png -------------------------------------------------------------------------------- /test-data/linked_uris.csv: -------------------------------------------------------------------------------- 1 | linked_uri,link@test_uri 2 | luri1,https://myuri.com/myuri 3 | luri2,rdf:myuri2 4 | luri3,:myuri3 5 | -------------------------------------------------------------------------------- /test-data/qtl.tsv: -------------------------------------------------------------------------------- 1 | QTL ref start end 2 | qtl_1 At3 3200000 4500000 3 | qtl_2 At1 21000000 21200000 4 | qtl_3 At5 13000000 13500000 -------------------------------------------------------------------------------- /docs/img/galaxy_import_from_galaxy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/galaxy_import_from_galaxy.png -------------------------------------------------------------------------------- /docs/img/symbol_to_ensembl_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/askomics/flaskomics/HEAD/docs/img/symbol_to_ensembl_preview.png -------------------------------------------------------------------------------- /test-data/uris.csv: -------------------------------------------------------------------------------- 1 | test_uri,mydata 2 | https://myuri.com/myuri,data1 3 | rdf:myuri2,data2 4 | :myuri3,data3 5 | wrongprefix:myuri4,data4 -------------------------------------------------------------------------------- /tests/results/result.csv: -------------------------------------------------------------------------------- 1 | Gene1_Label 2 | AT001 3 | AT001 4 | AT002 5 | AT002 6 | AT003 7 | AT003 8 | AT004 9 | AT004 10 | AT005 11 | AT005 12 | BN001 13 | BN001 14 | BN002 15 | BN002 16 | BN003 17 | BN003 18 | -------------------------------------------------------------------------------- /app.py: -------------------------------------------------------------------------------- 1 | from askomics.app import create_app, create_celery 2 | 3 | application = create_app(config='config/askomics.ini') 4 | celery = create_celery(application) 5 | 6 | if __name__ == '__main__': 7 | application.run() 8 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | askomics/static/js/askomics.js 2 | askomics.egg-info 3 | askomics.png 4 | docs 5 | LICENSE 6 | mkdocs.yml 7 | node_modules 8 | __pycache__ 9 | README.md 10 | test-data 11 | tests 12 | venv 13 | .coveralls.yml 14 | .dockerignore 15 | .eslintrc.yml 16 | .git 17 | .gitignore 18 | .pytest_cache 19 | .readthedocs.yml 20 | .travis.yml 21 | -------------------------------------------------------------------------------- /.eslintrc.yml: -------------------------------------------------------------------------------- 1 | env: 2 | browser: true 3 | es6: true 4 | extends: 'plugin:react/recommended' 5 | globals: 6 | Atomics: readonly 7 | SharedArrayBuffer: readonly 8 | parserOptions: 9 | ecmaFeatures: 10 | jsx: true 11 | ecmaVersion: 2018 12 | sourceType: module 13 | plugins: 14 | - react 15 | rules: {} 16 | settings: 17 | react: 18 | version: detect 19 | parser: babel-eslint -------------------------------------------------------------------------------- /tests/__init__.py: -------------------------------------------------------------------------------- 1 | from deepdiff import DeepDiff 2 | 3 | 4 | class AskomicsTestCase(): 5 | """AskOmics test case""" 6 | 7 | @staticmethod 8 | def equal_objects(obj1, obj2): 9 | """Compare 2 objects""" 10 | ddiff = DeepDiff(obj1, obj2, ignore_order=True, report_repetition=True) 11 | if not ddiff == {}: 12 | print(ddiff) 13 | 14 | return True if ddiff == {} else False 15 | -------------------------------------------------------------------------------- /test-data/gene.tsv: -------------------------------------------------------------------------------- 1 | Gene organism chromosome strand start end 2 | AT001 Arabidopsis thaliana AT1 plus 1 40000 3 | AT002 Arabidopsis thaliana AT1 plus 50000 80000 4 | AT003 Arabidopsis thaliana AT2 plus 200 6000 5 | AT004 Arabidopsis thaliana AT3 minus 1000 60000 6 | AT005 Arabidopsis thaliana AT3 plus 90000 110000 7 | BN001 Brassica napus BN1 plus 700 90000 8 | BN002 Brassica napus BN2 plus 60 4000 9 | BN003 Brassica napus BN2 plus 7000 10000 -------------------------------------------------------------------------------- /askomics/react/src/components/template.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import PropTypes from 'prop-types' 3 | 4 | export default class Template extends Component { 5 | 6 | constructor(props) { 7 | super(props) 8 | } 9 | 10 | render() { 11 | return
12 | } 13 | } 14 | 15 | Template.propTypes = { 16 | template: PropTypes.string.isRequired 17 | } 18 | -------------------------------------------------------------------------------- /tests/results/results_admin.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": false, 3 | "errorMessage": "", 4 | "queries": [ 5 | { 6 | "description": "###DESC###", 7 | "end": ###END###, 8 | "execTime": ###EXECTIME###, 9 | "id": ###ID###, 10 | "nrows": 13, 11 | "public": ###PUBLIC###, 12 | "size": ###SIZE###, 13 | "start": ###START###, 14 | "status": "success", 15 | "user": "jsmith" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /docker/DockerfileCelery: -------------------------------------------------------------------------------- 1 | FROM quay.io/askomics/flaskomics-base:4.6.0-alpine3.19 AS builder 2 | MAINTAINER "Xavier Garnier " 3 | 4 | COPY . /askomics 5 | WORKDIR /askomics 6 | 7 | RUN make clean-config fast-install 8 | 9 | # Final image 10 | FROM alpine:3.19 11 | 12 | WORKDIR /askomics 13 | RUN apk add --no-cache make python3 bash git libc-dev libstdc++ openldap-dev 14 | COPY --from=builder /askomics . 15 | 16 | CMD make serve-celery 17 | -------------------------------------------------------------------------------- /docker/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/askomics/flaskomics-base:4.6.0-alpine3.19 AS builder 2 | MAINTAINER "Xavier Garnier " 3 | 4 | COPY . /askomics 5 | WORKDIR /askomics 6 | 7 | RUN make clean-config fast-install build 8 | 9 | # Final image 10 | FROM alpine:3.19 11 | 12 | WORKDIR /askomics 13 | RUN apk add --no-cache make python3 bash git libc-dev libstdc++ nodejs-current npm openldap-dev 14 | COPY --from=builder /askomics . 15 | 16 | EXPOSE 5000 17 | CMD make serve-askomics 18 | -------------------------------------------------------------------------------- /askomics/api/catch_url.py: -------------------------------------------------------------------------------- 1 | """Catch_all route 2 | """ 3 | from flask import Blueprint, redirect 4 | 5 | catch_url_bp = Blueprint('catch_url', __name__, url_prefix='/') 6 | 7 | 8 | @catch_url_bp.route('/') 9 | def catch_all(path): 10 | """Return all routes to home 11 | 12 | Parameters 13 | ---------- 14 | path : str 15 | Original path 16 | 17 | Returns 18 | ------- 19 | redirect 20 | Redirect to route / 21 | """ 22 | 23 | return redirect('/?path={}'.format(path)) 24 | -------------------------------------------------------------------------------- /test-data/abstraction.ttl: -------------------------------------------------------------------------------- 1 | @prefix askomics: . 2 | @prefix ns1: . 3 | @prefix rdfs: . 4 | @prefix xsd: . 5 | 6 | a askomics:AskomicsRelation, 7 | ; 8 | rdfs:label "absorption max" ; 9 | rdfs:domain ; 10 | rdfs:range . 11 | -------------------------------------------------------------------------------- /askomics/middleware.py: -------------------------------------------------------------------------------- 1 | class PrefixMiddleware(object): 2 | 3 | def __init__(self, app, prefix=''): 4 | self.app = app 5 | self.prefix = prefix 6 | 7 | def __call__(self, environ, start_response): 8 | if self.prefix is not None: 9 | environ['SCRIPT_NAME'] = self.prefix 10 | path_info = environ['PATH_INFO'] 11 | if path_info.startswith(self.prefix): 12 | environ['PATH_INFO'] = path_info[len(self.prefix):] 13 | return self.app(environ, start_response) 14 | -------------------------------------------------------------------------------- /docs/docs.md: -------------------------------------------------------------------------------- 1 | All the documentation (including what you are reading) can be found [here](https://flaskomics.readthedocs.io). Files are on the [AskOmics repository](https://github.com/askomics/flaskomics/tree/master/docs). 2 | 3 | # Serve the documentation locally 4 | 5 | First, [install askomics in dev mode](/dev-deployment/#install-askomics). 6 | 7 | Then, run 8 | 9 | ```bash 10 | make serve-doc 11 | ``` 12 | The documentation will be available at [localhost:8000](localhost:8000) 13 | 14 | To change the port, use `make serve-doc DOCPORT=8001` 15 | -------------------------------------------------------------------------------- /test-data/abstraction.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /cli/update_base_url.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | echo "This script will update the base url in all graphs." 4 | echo "You can specify either a base url (http://askomics.org/), or a full endpoint (http://askomics.org/data/)" 5 | echo "Make sure to write a valid url (starting with either http:// or https://, and ending with a trailing /)" 6 | echo "" 7 | read -p "Old base url (ex: http://askomics.org/data/) : " OLD_URL 8 | read -p "New base url (ex: http://my_new_url.com/data/) : " NEW_URL 9 | 10 | python3 cli/update_base_url.py -c config/askomics.ini --old_url $OLD_URL --new_url $NEW_URL 11 | -------------------------------------------------------------------------------- /test-data/transcripts_chunk1.tsv: -------------------------------------------------------------------------------- 1 | transcript taxon featureName chromosomeName start end featureType strand biotype description date 2 | AT3G10490 Arabidopsis_thaliana ANAC052 At3 3267835 3270883 gene plus protein_coding NAC_domain_containing_protein_52_[Source:TAIR%3BAcc:AT3G10490] 01/01/2000 3 | AT3G13660 Arabidopsis_thaliana DIR22 At3 4464908 4465586 gene plus protein_coding Dirigent_protein_22_[Source:UniProtKB/Swiss-Prot%3BAcc:Q66GI2] 02/01/20 4 | AT3G51470 Arabidopsis_thaliana na At3 19097787 19099275 gene minus protein_coding Probable_protein_phosphatase_2C_47_[Source:UniProtKB/Swiss-Prot%3BAcc:Q9SD02] 03/01/20 5 | -------------------------------------------------------------------------------- /test-data/transcripts_chunk2.tsv: -------------------------------------------------------------------------------- 1 | AT3G10460 Arabidopsis_thaliana na At3 3255800 3256439 gene plus protein_coding Plant_self-incompatibility_protein_S1_family_[Source:TAIR%3BAcc:AT3G10460] 04/01/2000 2 | AT3G22640 Arabidopsis_thaliana PAP85 At3 8011724 8013902 gene minus protein_coding cupin_family_protein_[Source:TAIR%3BAcc:AT3G22640] 05/01/2000 3 | AT1G33615 Arabidopsis_thaliana na At1 12193325 12194374 ncRNA_gene minus ncRNA other_RNA_[Source:TAIR%3BAcc:AT1G33615] 06/01/2000 4 | AT5G41905 Arabidopsis_thaliana MIR166E At5 16775524 16775658 miRNA_gene minus miRNA MIR166/MIR166E%3B_miRNA_[Source:TAIR%3BAcc:AT5G41905] 07/01/2000 5 | -------------------------------------------------------------------------------- /.readthedocs.yml: -------------------------------------------------------------------------------- 1 | # .readthedocs.yml 2 | # Read the Docs configuration file 3 | # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details 4 | 5 | # Required 6 | version: 2 7 | 8 | build: 9 | os: ubuntu-22.04 10 | tools: 11 | python: "3.12" 12 | 13 | # Build documentation with MkDocs 14 | mkdocs: 15 | configuration: mkdocs.yml 16 | 17 | # Optionally build your docs in additional formats such as PDF and ePub 18 | formats: all 19 | 20 | # Optionally set the version of Python and requirements required to build your docs 21 | python: 22 | install: 23 | - requirements: docs/requirements.txt 24 | -------------------------------------------------------------------------------- /docs/prefixes.md: -------------------------------------------------------------------------------- 1 | Starting for the 4.4 release, custom prefixes can be added in the administration UI. 2 | These prefixes can be used by non-admin users when integrating CSV files (for specifying URIs, for instance) 3 | 4 | # Registering a prefix (admin-only) 5 | 6 | You can head to Prefixes in the user tab. There, you will be able to create and delete custom prefixes. 7 | 8 | ## Creating a custom prefix 9 | 10 | Simply fill out the desired prefix (ex: *wikibase*), and namespace: (ex: *http://wikiba.se/ontology#*). 11 | Users will be able to fill out data using the wikibase:XXX format. 12 | -------------------------------------------------------------------------------- /tests/results/preview_malformed_files.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": false, 3 | "errorMessage": "", 4 | "previewFiles": [ 5 | { 6 | "data": { 7 | "columns_type": [ 8 | "start_entity", 9 | "text", 10 | "text" 11 | ], 12 | "content_preview": [], 13 | "header": [ 14 | "", 15 | "column2", 16 | "column3" 17 | ] 18 | }, 19 | "id": 6, 20 | "name": "malformed.tsv", 21 | "type": "csv/tsv", 22 | "error": true, 23 | "error_message": "Malformated CSV/TSV (Empty column in header)" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /askomics/react/src/index.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import ReactDOM from 'react-dom' 3 | import * as Sentry from '@sentry/browser' 4 | import packageJson from '../../../package.json'; 5 | 6 | import Routes from './routes' 7 | 8 | class App extends React.Component { 9 | render () { 10 | 11 | return ( 12 | 13 | ) 14 | } 15 | } 16 | 17 | let sentry = document.getElementById('sentry').getAttribute('sentry') 18 | if (sentry != "") { 19 | Sentry.init({ 20 | dsn: sentry, 21 | release: packageJson.name + "@" + packageJson.version 22 | }); 23 | } 24 | 25 | ReactDOM.render(, document.getElementById('app')) 26 | -------------------------------------------------------------------------------- /tests/results/results_uri.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": false, 3 | "errorMessage": "", 4 | "headerPreview": [ 5 | "test_uri1_uri", 6 | "test_uri1_Label" 7 | ], 8 | "resultsPreview": [ 9 | { 10 | "test_uri1_Label": "myuri", 11 | "test_uri1_uri": "https://myuri.com/myuri" 12 | }, 13 | { 14 | "test_uri1_Label": "myuri2", 15 | "test_uri1_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#myuri2" 16 | }, 17 | { 18 | "test_uri1_Label": "myuri3", 19 | "test_uri1_uri": "http://askomics.org/test/data/myuri3" 20 | }, 21 | { 22 | "test_uri1_Label": "myuri4", 23 | "test_uri1_uri": "http://askomics.org/test/data/wrongprefix%3Amyuri4" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /tests/results/results_linked_uri.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": false, 3 | "errorMessage": "", 4 | "headerPreview": [ 5 | "linked_uri1_Label", 6 | "test_uri4_uri", 7 | "test_uri1_Label" 8 | ], 9 | "resultsPreview": [ 10 | { 11 | "linked_uri1_Label": "luri1", 12 | "test_uri1_Label": "myuri", 13 | "test_uri4_uri": "https://myuri.com/myuri" 14 | }, 15 | { 16 | "linked_uri1_Label": "luri2", 17 | "test_uri1_Label": "myuri2", 18 | "test_uri4_uri": "http://www.w3.org/1999/02/22-rdf-syntax-ns#myuri2" 19 | }, 20 | { 21 | "linked_uri1_Label": "luri3", 22 | "test_uri1_Label": "myuri3", 23 | "test_uri4_uri": "http://askomics.org/test/data/myuri3" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /tests/results/query.sparql: -------------------------------------------------------------------------------- 1 | PREFIX : 2 | PREFIX askomics: 3 | PREFIX dc: 4 | PREFIX faldo: 5 | PREFIX owl: 6 | PREFIX prov: 7 | PREFIX rdf: 8 | PREFIX rdfs: 9 | PREFIX xsd: 10 | 11 | SELECT DISTINCT ?transcript1_Label 12 | WHERE { 13 | 14 | ?transcript1_uri rdf:type . 15 | ?transcript1_uri rdfs:label ?transcript1_Label . 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test-data/gene.bed: -------------------------------------------------------------------------------- 1 | browser position chr7:127471196-127495720 2 | track name="TilingArray" description="TilingArray demonstration" visibility=2 useScore=1 height=30 3 | 7 127471196 127472363 Pos1 700 + 127471196 127472363 255,0,0 4 | 7 127472363 127473530 Pos2 800 + 127472363 127473530 255,0,0 5 | 7 127473530 127474697 Pos3 900 + 127473530 127474697 255,0,0 6 | 7 127474697 127475864 Pos4 100 + 127474697 127475864 255,0,0 7 | 7 127475864 127477031 Neg1 500 - 127475864 127477031 0,0,255 8 | 7 127477031 127478198 Neg2 400 - 127477031 127478198 0,0,255 9 | 7 127478198 127479365 Neg3 300 - 127478198 127479365 0,0,255 10 | 7 127479365 127480532 Pos5 1000 + 127479365 127480532 255,0,0 11 | 7 127480532 127481699 Neg4 0 . 127480532 127481699 0,0,255 12 | -------------------------------------------------------------------------------- /askomics/react/src/contact.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react' 2 | import { Link } from 'react-router-dom' 3 | import { Collapse, Navbar, NavbarBrand, Nav, NavItem } from 'reactstrap' 4 | import PropTypes from 'prop-types' 5 | import Template from './components/template' 6 | 7 | export default class Contact extends Component { 8 | constructor (props) { 9 | super(props) 10 | console.log("test") 11 | } 12 | 13 | render () { 14 | return ( 15 |
16 |

Contact

17 |
18 |
19 |