aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/PULL_REQUEST_TEMPLATE.md19
-rw-r--r--.github/workflows/python-app.yml35
-rw-r--r--.guix_deploy8
-rw-r--r--.pylintrc8
-rw-r--r--README.md37
-rw-r--r--gn3/api/async_commands.py16
-rw-r--r--gn3/api/correlation.py73
-rw-r--r--gn3/api/ctl.py24
-rw-r--r--gn3/api/general.py7
-rw-r--r--gn3/api/heatmaps.py21
-rw-r--r--gn3/api/rqtl.py2
-rw-r--r--gn3/app.py4
-rw-r--r--gn3/authentication.py20
-rw-r--r--gn3/commands.py34
-rw-r--r--gn3/computations/correlations.py58
-rw-r--r--gn3/computations/correlations2.py36
-rw-r--r--gn3/computations/ctl.py30
-rw-r--r--gn3/computations/diff.py2
-rw-r--r--gn3/computations/gemma.py2
-rw-r--r--gn3/computations/parsers.py2
-rw-r--r--gn3/computations/partial_correlations.py628
-rw-r--r--gn3/computations/partial_correlations_optimised.py244
-rw-r--r--gn3/computations/pca.py189
-rw-r--r--gn3/computations/qtlreaper.py16
-rw-r--r--gn3/computations/rqtl.py5
-rw-r--r--gn3/computations/wgcna.py28
-rw-r--r--gn3/csvcmp.py146
-rw-r--r--gn3/data_helpers.py28
-rw-r--r--gn3/db/correlations.py234
-rw-r--r--gn3/db/datasets.py152
-rw-r--r--gn3/db/genotypes.py44
-rw-r--r--gn3/db/partial_correlations.py791
-rw-r--r--gn3/db/sample_data.py365
-rw-r--r--gn3/db/species.py17
-rw-r--r--gn3/db/traits.py195
-rw-r--r--gn3/db_utils.py7
-rw-r--r--gn3/fs_helpers.py7
-rw-r--r--gn3/heatmaps.py36
-rw-r--r--gn3/responses/__init__.py0
-rw-r--r--gn3/responses/pcorrs_responses.py24
-rw-r--r--gn3/settings.py12
-rw-r--r--guix-system.scm121
-rw-r--r--guix.scm52
-rw-r--r--mypy.ini18
-rw-r--r--pytest.ini8
-rw-r--r--requirements.txt2
-rw-r--r--scripts/ctl_analysis.R217
-rw-r--r--scripts/laminar/gn3-lint.sh4
-rw-r--r--scripts/laminar/gn3-mypy.sh4
-rw-r--r--scripts/laminar/gn3-unittest.sh4
-rwxr-xr-xscripts/partial_correlations.py59
-rw-r--r--scripts/rqtl_wrapper.R20
-rw-r--r--scripts/wgcna_analysis.R7
-rw-r--r--setup.cfg4
-rw-r--r--setup.py14
-rw-r--r--setup_commands/__init__.py3
-rw-r--r--setup_commands/run_tests.py40
-rw-r--r--sheepdog/worker.py48
-rwxr-xr-xsql/map-database.sh15
-rw-r--r--sql/schema-from-in-db-documentation.org1817
-rw-r--r--sql/schema-original.sql2334
-rw-r--r--sql/schema.pngbin1412091 -> 0 bytes
-rw-r--r--sql/schema.sql2406
-rw-r--r--sql/schema.svg1430
-rw-r--r--sql/update/json_diff_update.sql22
-rw-r--r--tests/integration/conftest.py24
-rw-r--r--tests/integration/test_correlation.py8
-rw-r--r--tests/integration/test_gemma.py14
-rw-r--r--tests/integration/test_general.py8
-rw-r--r--tests/integration/test_partial_correlations.py225
-rw-r--r--tests/integration/test_wgcna.py3
-rw-r--r--tests/performance/perf_query.py20
-rw-r--r--tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.txt1009
-rw-r--r--tests/unit/computations/test_correlation.py80
-rw-r--r--tests/unit/computations/test_diff.py3
-rw-r--r--tests/unit/computations/test_gemma.py10
-rw-r--r--tests/unit/computations/test_parsers.py4
-rw-r--r--tests/unit/computations/test_partial_correlations.py147
-rw-r--r--tests/unit/computations/test_pca.py101
-rw-r--r--tests/unit/computations/test_qtlreaper.py4
-rw-r--r--tests/unit/computations/test_rqtl.py2
-rw-r--r--tests/unit/computations/test_slink.py13
-rw-r--r--tests/unit/computations/test_wgcna.py8
-rw-r--r--tests/unit/db/test_audit.py3
-rw-r--r--tests/unit/db/test_correlation.py100
-rw-r--r--tests/unit/db/test_datasets.py35
-rw-r--r--tests/unit/db/test_db.py8
-rw-r--r--tests/unit/db/test_genotypes.py6
-rw-r--r--tests/unit/db/test_genotypes2.py13
-rw-r--r--tests/unit/db/test_sample_data.py188
-rw-r--r--tests/unit/db/test_species.py5
-rw-r--r--tests/unit/db/test_traits.py60
-rw-r--r--tests/unit/test_authentication.py9
-rw-r--r--tests/unit/test_commands.py22
-rw-r--r--tests/unit/test_csvcmp.py170
-rw-r--r--tests/unit/test_data_helpers.py37
-rw-r--r--tests/unit/test_db_utils.py7
-rw-r--r--tests/unit/test_file_utils.py14
-rw-r--r--tests/unit/test_heatmaps.py14
99 files changed, 5837 insertions, 8792 deletions
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index e9a2425..0000000
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,19 +0,0 @@
-Please fill out the template below, and delete items not applicable to your pull request.
-
-#### Description
-<!--Brief description of the PR. What does this PR do? -->
-
-#### How should this be tested?
-<!-- What should you do to test this PR? Is there any manual quality
-assurance checks that should be done. What are the expectations -->
-
-#### Any background context you want to provide?
-<!-- Anything the reviewer should be aware of ahead of testing -->
-
-#### What are the relevant pivotal tracker stories?
-<!-- Does this PR track anything anywhere? -->
-
-#### Screenshots (if appropriate)
-
-#### Questions
-<!-- Are there any questions for the reviewer -->
diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml
deleted file mode 100644
index 2304e35..0000000
--- a/.github/workflows/python-app.yml
+++ /dev/null
@@ -1,35 +0,0 @@
-# This workflow will install Python dependencies, run tests and lint with a single version of Python
-# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
-
-name: Python application
-
-on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
-
-jobs:
- build:
-
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python 3.8
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip
- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- - name: Type check with mypy
- run: |
- mypy .
- - name: Lint with pylint
- run: |
- pylint *py tests gn3
- - name: Run unittests
- run: |
- python -m unittest discover -v
diff --git a/.guix_deploy b/.guix_deploy
new file mode 100644
index 0000000..c7bbb5b
--- /dev/null
+++ b/.guix_deploy
@@ -0,0 +1,8 @@
+# Deploy script on tux01
+#
+# echo Run tests:
+# echo python -m unittest discover -v
+# echo Run service (single process):
+# echo flask run --port=8080
+
+/home/wrk/opt/guix-pull/bin/guix shell -L /home/wrk/guix-bioinformatics/ --expose=$HOME/production/genotype_files/ -C -N -Df guix.scm
diff --git a/.pylintrc b/.pylintrc
index 0bdef23..de3f51a 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,3 +1,9 @@
[SIMILARITIES]
-ignore-imports=yes \ No newline at end of file
+ignore-imports=yes
+
+[MESSAGES CONTROL]
+
+disable=
+ fixme,
+ duplicate-code \ No newline at end of file
diff --git a/README.md b/README.md
index 84e5fb9..1466075 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,11 @@
# genenetwork3
+
+[![GeneNetwork3 CI
+badge](https://ci.genenetwork.org/badge/genenetwork3.svg)](https://ci.genenetwork.org/jobs/genenetwork3)
+[![GeneNetwork3 pylint CI
+badge](https://ci.genenetwork.org/badge/genenetwork3-pylint.svg)](https://ci.genenetwork.org/jobs/genenetwork3-pylint)
+[![GeneNetwork3 mypy CI badge](https://ci.genenetwork.org/badge/genenetwork3-mypy.svg)](https://ci.genenetwork.org/jobs/genenetwork3-mypy)
+
GeneNetwork3 REST API for data science and machine learning
## Installation
@@ -9,8 +16,8 @@ Install GNU Guix - this can be done on every running Linux system.
There are at least three ways to start GeneNetwork3 with GNU Guix:
-1. Create an environment with `guix environment`
-2. Create a container with `guix environment -C`
+1. Create an environment with `guix shell`
+2. Create a container with `guix shell -C`
3. Use a profile and shell settings with `source ~/opt/genenetwork3/etc/profile`
#### Create an environment:
@@ -18,13 +25,13 @@ There are at least three ways to start GeneNetwork3 with GNU Guix:
Simply load up the environment (for development purposes):
```bash
-guix environment --load=guix.scm
+guix shell -Df guix.scm
```
Also, make sure you have the [guix-bioinformatics](https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics) channel set up.
```bash
-guix environment --expose=$HOME/genotype_files/ --load=guix.scm
+guix shell --expose=$HOME/genotype_files/ -Df guix.scm
python3
import redis
```
@@ -32,10 +39,9 @@ python3
#### Run a Guix container
```
-guix environment -C --network --expose=$HOME/genotype_files/ --load=guix.scm
+guix shell -C --network --expose=$HOME/genotype_files/ -Df guix.scm
```
-
#### Using a Guix profile (or rolling back)
Create a new profile with
@@ -81,7 +87,13 @@ See also instructions in [.guix.scm](.guix.scm).
To run tests:
```bash
-python -m unittest discover -v
+pytest
+```
+
+To specify unit-tests:
+
+```bash
+pytest -k unit_test
```
Running pylint:
@@ -125,6 +137,8 @@ And for the scalable production version run
gunicorn --bind 0.0.0.0:8080 --workers 8 --keep-alive 6000 --max-requests 10 --max-requests-jitter 5 --timeout 1200 wsgi:app
```
+(see also the [.guix_deploy](./.guix_deploy) script)
+
## Using python-pip
IMPORTANT NOTE: we do not recommend using pip tools, use Guix instead
@@ -193,3 +207,12 @@ T2 6.4471 6.7191 5.98015 6.68051 ...
```
It is very important that the column header names for the strains correspond to the genotype file used.
+
+## Partial Correlations
+
+The partial correlations feature depends on the following external systems to run correctly:
+
+- Redis: Acts as a communications broker between the webserver and external processes
+- `sheepdog/worker.py`: Actually runs the external processes that do the computations
+
+These two systems should be running in the background for the partial correlations feature to work correctly.
diff --git a/gn3/api/async_commands.py b/gn3/api/async_commands.py
new file mode 100644
index 0000000..c0cf4bb
--- /dev/null
+++ b/gn3/api/async_commands.py
@@ -0,0 +1,16 @@
+"""Endpoints and functions concerning commands run in external processes."""
+import redis
+from flask import jsonify, Blueprint
+
+async_commands = Blueprint("async_commands", __name__)
+
+@async_commands.route("/state/<command_id>")
+def command_state(command_id):
+ """Respond with the current state of command identified by `command_id`."""
+ with redis.Redis(decode_responses=True) as rconn:
+ state = rconn.hgetall(name=command_id)
+ if not state:
+ return jsonify(
+ status=404,
+ error="The command id provided does not exist.")
+ return jsonify(dict(state.items()))
diff --git a/gn3/api/correlation.py b/gn3/api/correlation.py
index 46121f8..7eb7cd6 100644
--- a/gn3/api/correlation.py
+++ b/gn3/api/correlation.py
@@ -1,13 +1,21 @@
"""Endpoints for running correlations"""
+import sys
+from functools import reduce
+
+import redis
from flask import jsonify
from flask import Blueprint
from flask import request
+from flask import current_app
-from gn3.computations.correlations import compute_all_sample_correlation
-from gn3.computations.correlations import compute_all_lit_correlation
-from gn3.computations.correlations import compute_tissue_correlation
-from gn3.computations.correlations import map_shared_keys_to_values
+from gn3.settings import SQL_URI
+from gn3.commands import queue_cmd, compose_pcorrs_command
from gn3.db_utils import database_connector
+from gn3.responses.pcorrs_responses import build_response
+from gn3.computations.correlations import map_shared_keys_to_values
+from gn3.computations.correlations import compute_tissue_correlation
+from gn3.computations.correlations import compute_all_lit_correlation
+from gn3.computations.correlations import compute_all_sample_correlation
correlation = Blueprint("correlation", __name__)
@@ -58,17 +66,15 @@ def compute_lit_corr(species=None, gene_id=None):
might be needed for actual computing of the correlation results
"""
- conn, _cursor_object = database_connector()
- target_traits_gene_ids = request.get_json()
- target_trait_gene_list = list(target_traits_gene_ids.items())
+ with database_connector() as conn:
+ target_traits_gene_ids = request.get_json()
+ target_trait_gene_list = list(target_traits_gene_ids.items())
- lit_corr_results = compute_all_lit_correlation(
- conn=conn, trait_lists=target_trait_gene_list,
- species=species, gene_id=gene_id)
+ lit_corr_results = compute_all_lit_correlation(
+ conn=conn, trait_lists=target_trait_gene_list,
+ species=species, gene_id=gene_id)
- conn.close()
-
- return jsonify(lit_corr_results)
+ return jsonify(lit_corr_results)
@correlation.route("/tissue_corr/<string:corr_method>", methods=["POST"])
@@ -83,3 +89,44 @@ def compute_tissue_corr(corr_method="pearson"):
corr_method=corr_method)
return jsonify(results)
+
+@correlation.route("/partial", methods=["POST"])
+def partial_correlation():
+ """API endpoint for partial correlations."""
+ def trait_fullname(trait):
+ return f"{trait['dataset']}::{trait['trait_name']}"
+
+ def __field_errors__(args):
+ def __check__(acc, field):
+ if args.get(field) is None:
+ return acc + (f"Field '{field}' missing",)
+ return acc
+ return __check__
+
+ def __errors__(request_data, fields):
+ errors = tuple()
+ if request_data is None:
+ return ("No request data",)
+
+ return reduce(__field_errors__(request_data), fields, errors)
+
+ args = request.get_json()
+ request_errors = __errors__(
+ args, ("primary_trait", "control_traits", "target_db", "method"))
+ if request_errors:
+ return build_response({
+ "status": "error",
+ "messages": request_errors,
+ "error_type": "Client Error"})
+ return build_response({
+ "status": "success",
+ "results": queue_cmd(
+ conn=redis.Redis(),
+ cmd=compose_pcorrs_command(
+ trait_fullname(args["primary_trait"]),
+ tuple(
+ trait_fullname(trait) for trait in args["control_traits"]),
+ args["method"], args["target_db"],
+ int(args.get("criteria", 500))),
+ job_queue=current_app.config.get("REDIS_JOB_QUEUE"),
+ env = {"PYTHONPATH": ":".join(sys.path), "SQL_URI": SQL_URI})})
diff --git a/gn3/api/ctl.py b/gn3/api/ctl.py
new file mode 100644
index 0000000..ac33d63
--- /dev/null
+++ b/gn3/api/ctl.py
@@ -0,0 +1,24 @@
+"""module contains endpoints for ctl"""
+
+from flask import Blueprint
+from flask import request
+from flask import jsonify
+
+from gn3.computations.ctl import call_ctl_script
+
+ctl = Blueprint("ctl", __name__)
+
+
+@ctl.route("/run_ctl", methods=["POST"])
+def run_ctl():
+ """endpoint to run ctl
+ input: request form object
+ output:json object enum::(response,error)
+
+ """
+ ctl_data = request.json
+
+ (cmd_results, response) = call_ctl_script(ctl_data)
+ return (jsonify({
+ "results": response
+ }), 200) if response is not None else (jsonify({"error": str(cmd_results)}), 401)
diff --git a/gn3/api/general.py b/gn3/api/general.py
index 69ec343..e0bfc81 100644
--- a/gn3/api/general.py
+++ b/gn3/api/general.py
@@ -7,7 +7,7 @@ from flask import request
from gn3.fs_helpers import extract_uploaded_file
from gn3.commands import run_cmd
-
+from gn3.db import datasets
general = Blueprint("general", __name__)
@@ -68,3 +68,8 @@ def run_r_qtl(geno_filestr, pheno_filestr):
cmd = (f"Rscript {rqtl_wrapper} "
f"{geno_filestr} {pheno_filestr}")
return jsonify(run_cmd(cmd)), 201
+
+@general.route("/dataset/<accession_id>")
+def dataset_metadata(accession_id):
+ """Return info as JSON for dataset with ACCESSION_ID."""
+ return jsonify(datasets.dataset_metadata(accession_id))
diff --git a/gn3/api/heatmaps.py b/gn3/api/heatmaps.py
index 633a061..80c8ca8 100644
--- a/gn3/api/heatmaps.py
+++ b/gn3/api/heatmaps.py
@@ -24,15 +24,14 @@ def clustered_heatmaps():
return jsonify({
"message": "You need to provide at least two trait names."
}), 400
- conn, _cursor = database_connector()
- def parse_trait_fullname(trait):
- name_parts = trait.split(":")
- return "{dataset_name}::{trait_name}".format(
- dataset_name=name_parts[1], trait_name=name_parts[0])
- traits_fullnames = [parse_trait_fullname(trait) for trait in traits_names]
+ with database_connector() as conn:
+ def parse_trait_fullname(trait):
+ name_parts = trait.split(":")
+ return f"{name_parts[1]}::{name_parts[0]}"
+ traits_fullnames = [parse_trait_fullname(trait) for trait in traits_names]
- with io.StringIO() as io_str:
- figure = build_heatmap(traits_fullnames, conn, vertical=vertical)
- figure.write_json(io_str)
- fig_json = io_str.getvalue()
- return fig_json, 200
+ with io.StringIO() as io_str:
+ figure = build_heatmap(traits_fullnames, conn, vertical=vertical)
+ figure.write_json(io_str)
+ fig_json = io_str.getvalue()
+ return fig_json, 200
diff --git a/gn3/api/rqtl.py b/gn3/api/rqtl.py
index 85b2460..70ebe12 100644
--- a/gn3/api/rqtl.py
+++ b/gn3/api/rqtl.py
@@ -25,7 +25,7 @@ run the rqtl_wrapper script and return the results as JSON
raise FileNotFoundError
# Split kwargs by those with values and boolean ones that just convert to True/False
- kwargs = ["model", "method", "nperm", "scale", "control_marker"]
+ kwargs = ["covarstruct", "model", "method", "nperm", "scale", "control_marker"]
boolean_kwargs = ["addcovar", "interval", "pstrata", "pairscan"]
all_kwargs = kwargs + boolean_kwargs
diff --git a/gn3/app.py b/gn3/app.py
index 3d68b3f..790e87c 100644
--- a/gn3/app.py
+++ b/gn3/app.py
@@ -14,6 +14,8 @@ from gn3.api.heatmaps import heatmaps
from gn3.api.correlation import correlation
from gn3.api.data_entry import data_entry
from gn3.api.wgcna import wgcna
+from gn3.api.ctl import ctl
+from gn3.api.async_commands import async_commands
def create_app(config: Union[Dict, str, None] = None) -> Flask:
"""Create a new flask object"""
@@ -45,4 +47,6 @@ def create_app(config: Union[Dict, str, None] = None) -> Flask:
app.register_blueprint(correlation, url_prefix="/api/correlation")
app.register_blueprint(data_entry, url_prefix="/api/dataentry")
app.register_blueprint(wgcna, url_prefix="/api/wgcna")
+ app.register_blueprint(ctl, url_prefix="/api/ctl")
+ app.register_blueprint(async_commands, url_prefix="/api/async_commands")
return app
diff --git a/gn3/authentication.py b/gn3/authentication.py
index 6719631..d0b35bc 100644
--- a/gn3/authentication.py
+++ b/gn3/authentication.py
@@ -113,9 +113,9 @@ def get_groups_by_user_uid(user_uid: str, conn: Redis) -> Dict:
"""
admin = []
member = []
- for uuid, group_info in conn.hgetall("groups").items():
+ for group_uuid, group_info in conn.hgetall("groups").items():
group_info = json.loads(group_info)
- group_info["uuid"] = uuid
+ group_info["uuid"] = group_uuid
if user_uid in group_info.get('admins'):
admin.append(group_info)
if user_uid in group_info.get('members'):
@@ -130,11 +130,10 @@ def get_user_info_by_key(key: str, value: str,
conn: Redis) -> Optional[Dict]:
"""Given a key, get a user's information if value is matched"""
if key != "user_id":
- for uuid, user_info in conn.hgetall("users").items():
+ for user_uuid, user_info in conn.hgetall("users").items():
user_info = json.loads(user_info)
- if (key in user_info and
- user_info.get(key) == value):
- user_info["user_id"] = uuid
+ if (key in user_info and user_info.get(key) == value):
+ user_info["user_id"] = user_uuid
return user_info
elif key == "user_id":
if user_info := conn.hget("users", value):
@@ -145,9 +144,13 @@ def get_user_info_by_key(key: str, value: str,
def create_group(conn: Redis, group_name: Optional[str],
- admin_user_uids: List = [],
- member_user_uids: List = []) -> Optional[Dict]:
+ admin_user_uids: List = None,
+ member_user_uids: List = None) -> Optional[Dict]:
"""Create a group given the group name, members and admins of that group."""
+ if admin_user_uids is None:
+ admin_user_uids = []
+ if member_user_uids is None:
+ member_user_uids = []
if group_name and bool(admin_user_uids + member_user_uids):
timestamp = datetime.datetime.utcnow().strftime('%b %d %Y %I:%M%p')
group = {
@@ -160,3 +163,4 @@ def create_group(conn: Redis, group_name: Optional[str],
}
conn.hset("groups", group_id, json.dumps(group))
return group
+ return None
diff --git a/gn3/commands.py b/gn3/commands.py
index 7d42ced..e622068 100644
--- a/gn3/commands.py
+++ b/gn3/commands.py
@@ -1,5 +1,8 @@
"""Procedures used to work with the various bio-informatics cli
commands"""
+import os
+import sys
+import json
import subprocess
from datetime import datetime
@@ -7,6 +10,8 @@ from typing import Dict
from typing import List
from typing import Optional
from typing import Tuple
+from typing import Union
+from typing import Sequence
from uuid import uuid4
from redis.client import Redis # Used only in type hinting
@@ -46,10 +51,21 @@ def compose_rqtl_cmd(rqtl_wrapper_cmd: str,
return cmd
+def compose_pcorrs_command(
+ primary_trait: str, control_traits: Tuple[str, ...], method: str,
+ target_database: str, criteria: int = 500):
+ """Compose the command to run partias correlations"""
+ rundir = os.path.abspath(".")
+ return (
+ f"{sys.executable}", f"{rundir}/scripts/partial_correlations.py",
+ primary_trait, ",".join(control_traits), f'"{method}"',
+ f"{target_database}", f"--criteria={criteria}")
+
def queue_cmd(conn: Redis,
job_queue: str,
- cmd: str,
- email: Optional[str] = None) -> str:
+ cmd: Union[str, Sequence[str]],
+ email: Optional[str] = None,
+ env: Optional[dict] = None) -> str:
"""Given a command CMD; (optional) EMAIL; and a redis connection CONN, queue
it in Redis with an initial status of 'queued'. The following status codes
are supported:
@@ -68,17 +84,23 @@ Returns the name of the specific redis hash for the specific task.
f"{datetime.now().strftime('%Y-%m-%d%H-%M%S-%M%S-')}"
f"{str(uuid4())}")
conn.rpush(job_queue, unique_id)
- for key, value in {"cmd": cmd, "result": "", "status": "queued"}.items():
+ for key, value in {
+ "cmd": json.dumps(cmd), "result": "", "status": "queued"}.items():
conn.hset(name=unique_id, key=key, value=value)
if email:
conn.hset(name=unique_id, key="email", value=email)
+ if env:
+ conn.hset(name=unique_id, key="env", value=json.dumps(env))
return unique_id
-def run_cmd(cmd: str, success_codes: Tuple = (0,)) -> Dict:
+def run_cmd(cmd: str, success_codes: Tuple = (0,), env: str = None) -> Dict:
"""Run CMD and return the CMD's status code and output as a dict"""
- results = subprocess.run(cmd, capture_output=True, shell=True,
- check=False)
+ parsed_cmd = json.loads(cmd)
+ parsed_env = (json.loads(env) if env is not None else None)
+ results = subprocess.run(
+ parsed_cmd, capture_output=True, shell=isinstance(parsed_cmd, str),
+ check=False, env=parsed_env)
out = str(results.stdout, 'utf-8')
if results.returncode not in success_codes: # Error!
out = str(results.stderr, 'utf-8')
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index c5c56db..a0da2c4 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -7,6 +7,7 @@ from typing import List
from typing import Tuple
from typing import Optional
from typing import Callable
+from typing import Generator
import scipy.stats
import pingouin as pg
@@ -38,20 +39,15 @@ def map_shared_keys_to_values(target_sample_keys: List,
return target_dataset_data
-def normalize_values(a_values: List,
- b_values: List) -> Tuple[List[float], List[float], int]:
- """Trim two lists of values to contain only the values they both share Given
- two lists of sample values, trim each list so that it contains only the
- samples that contain a value in both lists. Also returns the number of
- such samples.
-
- >>> normalize_values([2.3, None, None, 3.2, 4.1, 5],
- [3.4, 7.2, 1.3, None, 6.2, 4.1])
- ([2.3, 4.1, 5], [3.4, 6.2, 4.1], 3)
-
+def normalize_values(a_values: List, b_values: List) -> Generator:
+ """
+ :param a_values: list of primary strain values
+ :param b_values: a list of target strain values
+ :return: yield 2 values if none of them is none
"""
+
for a_val, b_val in zip(a_values, b_values):
- if (a_val and b_val is not None):
+ if (a_val is not None) and (b_val is not None):
yield a_val, b_val
@@ -79,15 +75,18 @@ def compute_sample_r_correlation(trait_name, corr_method, trait_vals,
"""
- sanitized_traits_vals, sanitized_target_vals = list(
- zip(*list(normalize_values(trait_vals, target_samples_vals))))
- num_overlap = len(sanitized_traits_vals)
+ try:
+ normalized_traits_vals, normalized_target_vals = list(
+ zip(*list(normalize_values(trait_vals, target_samples_vals))))
+ num_overlap = len(normalized_traits_vals)
+ except ValueError:
+ return None
if num_overlap > 5:
(corr_coefficient, p_value) =\
- compute_corr_coeff_p_value(primary_values=sanitized_traits_vals,
- target_values=sanitized_target_vals,
+ compute_corr_coeff_p_value(primary_values=normalized_traits_vals,
+ target_values=normalized_target_vals,
corr_method=corr_method)
if corr_coefficient is not None and not math.isnan(corr_coefficient):
@@ -108,7 +107,7 @@ package :not packaged in guix
def filter_shared_sample_keys(this_samplelist,
- target_samplelist) -> Tuple[List, List]:
+ target_samplelist) -> Generator:
"""Given primary and target sample-list for two base and target trait select
filter the values using the shared keys
@@ -134,9 +133,16 @@ def fast_compute_all_sample_correlation(this_trait,
for target_trait in target_dataset:
trait_name = target_trait.get("trait_id")
target_trait_data = target_trait["trait_sample_data"]
- processed_values.append((trait_name, corr_method,
- list(zip(*list(filter_shared_sample_keys(
- this_trait_samples, target_trait_data))))))
+
+ try:
+ this_vals, target_vals = list(zip(*list(filter_shared_sample_keys(
+ this_trait_samples, target_trait_data))))
+
+ processed_values.append(
+ (trait_name, corr_method, this_vals, target_vals))
+ except ValueError:
+ continue
+
with closing(multiprocessing.Pool()) as pool:
results = pool.starmap(compute_sample_r_correlation, processed_values)
@@ -168,8 +174,14 @@ def compute_all_sample_correlation(this_trait,
for target_trait in target_dataset:
trait_name = target_trait.get("trait_id")
target_trait_data = target_trait["trait_sample_data"]
- this_vals, target_vals = list(zip(*list(filter_shared_sample_keys(
- this_trait_samples, target_trait_data))))
+
+ try:
+ this_vals, target_vals = list(zip(*list(filter_shared_sample_keys(
+ this_trait_samples, target_trait_data))))
+
+ except ValueError:
+ # case where no matching strain names
+ continue
sample_correlation = compute_sample_r_correlation(
trait_name=trait_name,
diff --git a/gn3/computations/correlations2.py b/gn3/computations/correlations2.py
index 93db3fa..d0222ae 100644
--- a/gn3/computations/correlations2.py
+++ b/gn3/computations/correlations2.py
@@ -6,45 +6,21 @@ FUNCTIONS:
compute_correlation:
TODO: Describe what the function does..."""
-from math import sqrt
-from functools import reduce
+from scipy import stats
## From GN1: mostly for clustering and heatmap generation
def __items_with_values(dbdata, userdata):
"""Retains only corresponding items in the data items that are not `None` values.
This should probably be renamed to something sensible"""
- def both_not_none(item1, item2):
- """Check that both items are not the value `None`."""
- if (item1 is not None) and (item2 is not None):
- return (item1, item2)
- return None
- def split_lists(accumulator, item):
- """Separate the 'x' and 'y' items."""
- return [accumulator[0] + [item[0]], accumulator[1] + [item[1]]]
- return reduce(
- split_lists,
- filter(lambda x: x is not None, map(both_not_none, dbdata, userdata)),
- [[], []])
+ filtered = [x for x in zip(dbdata, userdata) if x[0] is not None and x[1] is not None]
+ return tuple(zip(*filtered)) if filtered else ([], [])
def compute_correlation(dbdata, userdata):
- """Compute some form of correlation.
+ """Compute the Pearson correlation coefficient.
This is extracted from
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/utility/webqtlUtil.py#L622-L647
"""
x_items, y_items = __items_with_values(dbdata, userdata)
- if len(x_items) < 6:
- return (0.0, len(x_items))
- meanx = sum(x_items)/len(x_items)
- meany = sum(y_items)/len(y_items)
- def cal_corr_vals(acc, item):
- xitem, yitem = item
- return [
- acc[0] + ((xitem - meanx) * (yitem - meany)),
- acc[1] + ((xitem - meanx) * (xitem - meanx)),
- acc[2] + ((yitem - meany) * (yitem - meany))]
- xyd, sxd, syd = reduce(cal_corr_vals, zip(x_items, y_items), [0.0, 0.0, 0.0])
- try:
- return ((xyd/(sqrt(sxd)*sqrt(syd))), len(x_items))
- except ZeroDivisionError:
- return(0, len(x_items))
+ correlation = stats.pearsonr(x_items, y_items)[0] if len(x_items) >= 6 else 0
+ return (correlation, len(x_items))
diff --git a/gn3/computations/ctl.py b/gn3/computations/ctl.py
new file mode 100644
index 0000000..f881410
--- /dev/null
+++ b/gn3/computations/ctl.py
@@ -0,0 +1,30 @@
+"""module contains code to process ctl analysis data"""
+import json
+from gn3.commands import run_cmd
+
+from gn3.computations.wgcna import dump_wgcna_data
+from gn3.computations.wgcna import compose_wgcna_cmd
+from gn3.computations.wgcna import process_image
+
+from gn3.settings import TMPDIR
+
+
+def call_ctl_script(data):
+ """function to call ctl script"""
+ data["imgDir"] = TMPDIR
+ temp_file_name = dump_wgcna_data(data)
+ cmd = compose_wgcna_cmd("ctl_analysis.R", temp_file_name)
+
+ cmd_results = run_cmd(cmd)
+ with open(temp_file_name, "r", encoding="utf-8") as outputfile:
+ if cmd_results["code"] != 0:
+ return (cmd_results, None)
+ output_file_data = json.load(outputfile)
+
+ output_file_data["image_data"] = process_image(
+ output_file_data["image_loc"]).decode("ascii")
+
+ output_file_data["ctl_plots"] = [process_image(ctl_plot).decode("ascii") for
+ ctl_plot in output_file_data["ctl_plots"]]
+
+ return (cmd_results, output_file_data)
diff --git a/gn3/computations/diff.py b/gn3/computations/diff.py
index af02f7f..0b6edd6 100644
--- a/gn3/computations/diff.py
+++ b/gn3/computations/diff.py
@@ -6,7 +6,7 @@ from gn3.commands import run_cmd
def generate_diff(data: str, edited_data: str) -> Optional[str]:
"""Generate the diff between 2 files"""
- results = run_cmd(f"diff {data} {edited_data}", success_codes=(1, 2))
+ results = run_cmd(f'"diff {data} {edited_data}"', success_codes=(1, 2))
if results.get("code", -1) > 0:
return results.get("output")
return None
diff --git a/gn3/computations/gemma.py b/gn3/computations/gemma.py
index 0b22d3c..8036a7b 100644
--- a/gn3/computations/gemma.py
+++ b/gn3/computations/gemma.py
@@ -31,7 +31,7 @@ def generate_pheno_txt_file(trait_filename: str,
# Early return if this already exists!
if os.path.isfile(f"{tmpdir}/gn2/{trait_filename}"):
return f"{tmpdir}/gn2/{trait_filename}"
- with open(f"{tmpdir}/gn2/{trait_filename}", "w") as _file:
+ with open(f"{tmpdir}/gn2/{trait_filename}", "w", encoding="utf-8") as _file:
for value in values:
if value == "x":
_file.write("NA\n")
diff --git a/gn3/computations/parsers.py b/gn3/computations/parsers.py
index 1af35d6..79e3955 100644
--- a/gn3/computations/parsers.py
+++ b/gn3/computations/parsers.py
@@ -15,7 +15,7 @@ def parse_genofile(file_path: str) -> Tuple[List[str],
'u': None,
}
genotypes, samples = [], []
- with open(file_path, "r") as _genofile:
+ with open(file_path, "r", encoding="utf-8") as _genofile:
for line in _genofile:
line = line.strip()
if line.startswith(("#", "@")):
diff --git a/gn3/computations/partial_correlations.py b/gn3/computations/partial_correlations.py
index 07dc16d..5017796 100644
--- a/gn3/computations/partial_correlations.py
+++ b/gn3/computations/partial_correlations.py
@@ -5,12 +5,32 @@ It is an attempt to migrate over the partial correlations feature from
GeneNetwork1.
"""
-from functools import reduce
-from typing import Any, Tuple, Sequence
+import math
+import warnings
+from functools import reduce, partial
+from typing import Any, Tuple, Union, Sequence
+
+import numpy
+import pandas
+import pingouin
from scipy.stats import pearsonr, spearmanr
from gn3.settings import TEXTDIR
+from gn3.random import random_string
+from gn3.function_helpers import compose
from gn3.data_helpers import parse_csv_line
+from gn3.db.traits import export_informative
+from gn3.db.datasets import retrieve_trait_dataset
+from gn3.db.partial_correlations import traits_info, traits_data
+from gn3.db.species import species_name, translate_to_mouse_gene_id
+from gn3.db.correlations import (
+ get_filename,
+ fetch_all_database_data,
+ check_for_literature_info,
+ fetch_tissue_correlations,
+ fetch_literature_correlations,
+ check_symbol_for_tissue_correlation,
+ fetch_gene_symbol_tissue_value_dict_for_trait)
def control_samples(controls: Sequence[dict], sampleslist: Sequence[str]):
"""
@@ -40,7 +60,7 @@ def control_samples(controls: Sequence[dict], sampleslist: Sequence[str]):
__process_sample__, sampleslist, (tuple(), tuple(), tuple()))
return reduce(
- lambda acc, item: (
+ lambda acc, item: (# type: ignore[arg-type, return-value]
acc[0] + (item[0],),
acc[1] + (item[1],),
acc[2] + (item[2],),
@@ -49,22 +69,6 @@ def control_samples(controls: Sequence[dict], sampleslist: Sequence[str]):
[__process_control__(trait_data) for trait_data in controls],
(tuple(), tuple(), tuple(), tuple()))
-def dictify_by_samples(samples_vals_vars: Sequence[Sequence]) -> Sequence[dict]:
- """
- Build a sequence of dictionaries from a sequence of separate sequences of
- samples, values and variances.
-
- This is a partial migration of
- `web.webqtl.correlation.correlationFunction.fixStrains` function in GN1.
- This implementation extracts code that will find common use, and that will
- find use in more than one place.
- """
- return tuple(
- {
- sample: {"sample_name": sample, "value": val, "variance": var}
- for sample, val, var in zip(*trait_line)
- } for trait_line in zip(*(samples_vals_vars[0:3])))
-
def fix_samples(primary_trait: dict, control_traits: Sequence[dict]) -> Sequence[Sequence[Any]]:
"""
Corrects sample_names, values and variance such that they all contain only
@@ -108,7 +112,7 @@ def find_identical_traits(
return acc + ident[1]
def __dictify_controls__(acc, control_item):
- ckey = "{:.3f}".format(control_item[0])
+ ckey = tuple(f"{item:.3f}" for item in control_item[0])
return {**acc, ckey: acc.get(ckey, tuple()) + (control_item[1],)}
return (reduce(## for identical control traits
@@ -148,11 +152,11 @@ def tissue_correlation(
assert len(primary_trait_values) == len(target_trait_values), (
"The lengths of the `primary_trait_values` and `target_trait_values` "
"must be equal")
- assert method in method_fns.keys(), (
- "Method must be one of: {}".format(",".join(method_fns.keys())))
+ assert method in method_fns, (
+ "Method must be one of: {','.join(method_fns.keys())}")
corr, pvalue = method_fns[method](primary_trait_values, target_trait_values)
- return (round(corr, 10), round(pvalue, 10))
+ return (corr, pvalue)
def batch_computed_tissue_correlation(
primary_trait_values: Tuple[float, ...], target_traits_dict: dict,
@@ -196,33 +200,19 @@ def good_dataset_samples_indexes(
samples_from_file.index(good) for good in
set(samples).intersection(set(samples_from_file))))
-def determine_partials(
- primary_vals, control_vals, all_target_trait_names,
- all_target_trait_values, method):
- """
- This **WILL** be a migration of
- `web.webqtl.correlation.correlationFunction.determinePartialsByR` function
- in GeneNetwork1.
-
- The function in GeneNetwork1 contains code written in R that is then used to
- compute the partial correlations.
- """
- ## This function is not implemented at this stage
- return tuple(
- primary_vals, control_vals, all_target_trait_names,
- all_target_trait_values, method)
-
-def compute_partial_correlations_fast(# pylint: disable=[R0913, R0914]
+def partial_correlations_fast(# pylint: disable=[R0913, R0914]
samples, primary_vals, control_vals, database_filename,
fetched_correlations, method: str, correlation_type: str) -> Tuple[
- float, Tuple[float, ...]]:
+ int, Tuple[float, ...]]:
"""
+ Computes partial correlation coefficients using data from a CSV file.
+
This is a partial migration of the
`web.webqtl.correlation.PartialCorrDBPage.getPartialCorrelationsFast`
function in GeneNetwork1.
"""
assert method in ("spearman", "pearson")
- with open(f"{TEXTDIR}/{database_filename}", "r") as dataset_file:
+ with open(database_filename, "r", encoding="utf-8") as dataset_file: # pytest: disable=[W1514]
dataset = tuple(dataset_file.readlines())
good_dataset_samples = good_dataset_samples_indexes(
@@ -245,7 +235,7 @@ def compute_partial_correlations_fast(# pylint: disable=[R0913, R0914]
all_target_trait_names: Tuple[str, ...] = processed_trait_names_values[0]
all_target_trait_values: Tuple[float, ...] = processed_trait_names_values[1]
- all_correlations = determine_partials(
+ all_correlations = compute_partial(
primary_vals, control_vals, all_target_trait_names,
all_target_trait_values, method)
## Line 772 to 779 in GN1 are the cause of the weird complexity in the
@@ -254,36 +244,544 @@ def compute_partial_correlations_fast(# pylint: disable=[R0913, R0914]
## `correlation_type` parameter
return len(all_correlations), tuple(
corr + (
- (fetched_correlations[corr[0]],) if correlation_type == "literature"
- else fetched_correlations[corr[0]][0:2])
+ (fetched_correlations[corr[0]],) # type: ignore[index]
+ if correlation_type == "literature"
+ else fetched_correlations[corr[0]][0:2]) # type: ignore[index]
for idx, corr in enumerate(all_correlations))
-def partial_correlation_matrix(
+def build_data_frame(
xdata: Tuple[float, ...], ydata: Tuple[float, ...],
- zdata: Tuple[float, ...], method: str = "pearsons",
- omit_nones: bool = True) -> float:
+ zdata: Union[
+ Tuple[float, ...],
+ Tuple[Tuple[float, ...], ...]]) -> pandas.DataFrame:
+ """
+ Build a pandas DataFrame object from xdata, ydata and zdata
+ """
+ x_y_df = pandas.DataFrame({"x": xdata, "y": ydata})
+ if isinstance(zdata[0], float):
+ return x_y_df.join(pandas.DataFrame({"z": zdata}))
+ interm_df = x_y_df.join(pandas.DataFrame(
+ {f"z{i}": val for i, val in enumerate(zdata)}))
+ if interm_df.shape[1] == 3:
+ return interm_df.rename(columns={"z0": "z"})
+ return interm_df
+
+def compute_trait_info(primary_vals, control_vals, target, method):
"""
- Computes the partial correlation coefficient using the
- 'variance-covariance matrix' method
+ Compute the correlation values for the given arguments.
+ """
+ targ_vals = target[0]
+ targ_name = target[1]
+ primary = [
+ prim for targ, prim in zip(targ_vals, primary_vals)
+ if targ is not None]
+
+ if len(primary) < 3:
+ return None
+
+ def __remove_controls_for_target_nones(cont_targ):
+ return tuple(cont for cont, targ in cont_targ if targ is not None)
+
+ datafrm = build_data_frame(
+ primary,
+ [targ for targ in targ_vals if targ is not None],
+ [__remove_controls_for_target_nones(tuple(zip(control, targ_vals)))
+ for control in control_vals])
+ covariates = "z" if datafrm.shape[1] == 3 else [
+ col for col in datafrm.columns if col not in ("x", "y")]
+ ppc = pingouin.partial_corr(
+ data=datafrm, x="x", y="y", covar=covariates, method=(
+ "pearson" if "pearson" in method.lower() else "spearman"))
+ pc_coeff = ppc["r"][0]
+
+ zero_order_corr = pingouin.corr(
+ datafrm["x"], datafrm["y"], method=(
+ "pearson" if "pearson" in method.lower() else "spearman"))
+
+ if math.isnan(pc_coeff):
+ return (
+ targ_name, len(primary), pc_coeff, 1, zero_order_corr["r"][0],
+ zero_order_corr["p-val"][0])
+ return (
+ targ_name, len(primary), pc_coeff,
+ (ppc["p-val"][0] if not math.isnan(ppc["p-val"][0]) else (
+ 0 if (abs(pc_coeff - 1) < 0.0000001) else 1)),
+ zero_order_corr["r"][0], zero_order_corr["p-val"][0])
+
+def compute_partial(
+ primary_vals, control_vals, target_vals, target_names,
+ method: str) -> Tuple[
+ Union[
+ Tuple[str, int, float, float, float, float], None],
+ ...]:
+ """
+ Compute the partial correlations.
- This is a partial migration of the
- `web.webqtl.correlation.correlationFunction.determinPartialsByR` function in
- GeneNetwork1, specifically the `pcor.mat` function written in the R
- programming language.
+ This is a re-implementation of the
+ `web.webqtl.correlation.correlationFunction.determinePartialsByR` function
+ in GeneNetwork1.
+
+ This implementation reworks the child function `compute_partial` which will
+ then be used in the place of `determinPartialsByR`.
+ """
+ return tuple(
+ result for result in (
+ compute_trait_info(
+ primary_vals, control_vals, (tvals, tname), method)
+ for tvals, tname in zip(target_vals, target_names))
+ if result is not None)
+
+def partial_correlations_normal(# pylint: disable=R0913
+ primary_vals, control_vals, input_trait_gene_id, trait_database,
+ data_start_pos: int, db_type: str, method: str) -> Tuple[
+ int, Tuple[Union[
+ Tuple[str, int, float, float, float, float], None],
+ ...]]:#Tuple[float, ...]
"""
- return 0
+ Computes the correlation coefficients.
-def partial_correlation_recursive(
- xdata: Tuple[float, ...], ydata: Tuple[float, ...],
- zdata: Tuple[float, ...], method: str = "pearsons",
- omit_nones: bool = True) -> float:
+ This is a migration of the
+ `web.webqtl.correlation.PartialCorrDBPage.getPartialCorrelationsNormal`
+ function in GeneNetwork1.
"""
- Computes the partial correlation coefficient using the 'recursive formula'
- method
+ def __add_lit_and_tiss_corr__(item):
+ if method.lower() == "sgo literature correlation":
+ # if method is 'SGO Literature Correlation', `compute_partial`
+ # would give us LitCorr in the [1] position
+ return tuple(item) + trait_database[1]
+ if method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho"):
+ # if method is 'Tissue Correlation, *', `compute_partial` would give
+ # us Tissue Corr in the [1] position and Tissue Corr P Value in the
+ # [2] position
+ return tuple(item) + (trait_database[1], trait_database[2])
+ return item
+
+ target_trait_names, target_trait_vals = reduce(# type: ignore[var-annotated]
+ lambda acc, item: (acc[0]+(item[0],), acc[1]+(item[data_start_pos:],)),
+ trait_database, (tuple(), tuple()))
+
+ all_correlations = compute_partial(
+ primary_vals, control_vals, target_trait_vals, target_trait_names,
+ method)
+
+ if (input_trait_gene_id and db_type == "ProbeSet" and method.lower() in (
+ "sgo literature correlation", "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho")):
+ return (
+ len(trait_database),
+ tuple(
+ __add_lit_and_tiss_corr__(item)
+ for idx, item in enumerate(all_correlations)))
+
+ return len(trait_database), all_correlations
+
+def partial_corrs(# pylint: disable=[R0913]
+ conn, samples, primary_vals, control_vals, return_number, species,
+ input_trait_geneid, input_trait_symbol, tissue_probeset_freeze_id,
+ method, dataset, database_filename):
+ """
+ Compute the partial correlations, selecting the fast or normal method
+ depending on the existence of the database text file.
This is a partial migration of the
- `web.webqtl.correlation.correlationFunction.determinPartialsByR` function in
- GeneNetwork1, specifically the `pcor.rec` function written in the R
- programming language.
+ `web.webqtl.correlation.PartialCorrDBPage.__init__` function in
+ GeneNetwork1.
+ """
+ if database_filename:
+ return partial_correlations_fast(
+ samples, primary_vals, control_vals, database_filename,
+ (
+ fetch_literature_correlations(
+ species, input_trait_geneid, dataset, return_number, conn)
+ if "literature" in method.lower() else
+ fetch_tissue_correlations(
+ dataset, input_trait_symbol, tissue_probeset_freeze_id,
+ method, return_number, conn)),
+ method,
+ ("literature" if method.lower() == "sgo literature correlation"
+ else ("tissue" if "tissue" in method.lower() else "genetic")))
+
+ trait_database, data_start_pos = fetch_all_database_data(
+ conn, species, input_trait_geneid, input_trait_symbol, samples, dataset,
+ method, return_number, tissue_probeset_freeze_id)
+ return partial_correlations_normal(
+ primary_vals, control_vals, input_trait_geneid, trait_database,
+ data_start_pos, dataset, method)
+
+def literature_correlation_by_list(
+ conn: Any, species: str, trait_list: Tuple[dict]) -> Tuple[dict, ...]:
+ """
+ This is a migration of the
+ `web.webqtl.correlation.CorrelationPage.getLiteratureCorrelationByList`
+ function in GeneNetwork1.
+ """
+ if any((lambda t: (
+ bool(t.get("tissue_corr")) and
+ bool(t.get("tissue_p_value"))))(trait)
+ for trait in trait_list):
+ temporary_table_name = f"LITERATURE{random_string(8)}"
+ query1 = (
+ f"CREATE TEMPORARY TABLE {temporary_table_name} "
+ "(GeneId1 INT(12) UNSIGNED, GeneId2 INT(12) UNSIGNED PRIMARY KEY, "
+ "value DOUBLE)")
+ query2 = (
+ f"INSERT INTO {temporary_table_name}(GeneId1, GeneId2, value) "
+ "SELECT GeneId1, GeneId2, value FROM LCorrRamin3 "
+ "WHERE GeneId1=%(geneid)s")
+ query3 = (
+ "INSERT INTO {temporary_table_name}(GeneId1, GeneId2, value) "
+ "SELECT GeneId2, GeneId1, value FROM LCorrRamin3 "
+ "WHERE GeneId2=%s AND GeneId1 != %(geneid)s")
+
+ def __set_mouse_geneid__(trait):
+ if trait.get("geneid"):
+ return {
+ **trait,
+ "mouse_geneid": translate_to_mouse_gene_id(
+ species, trait.get("geneid"), conn)
+ }
+ return {**trait, "mouse_geneid": 0}
+
+ def __retrieve_lcorr__(cursor, geneids):
+ cursor.execute(
+ f"SELECT GeneId2, value FROM {temporary_table_name} "
+ "WHERE GeneId2 IN %(geneids)s",
+ geneids=geneids)
+ return dict(cursor.fetchall())
+
+ with conn.cursor() as cursor:
+ cursor.execute(query1)
+ cursor.execute(query2)
+ cursor.execute(query3)
+
+ traits = tuple(__set_mouse_geneid__(trait) for trait in trait_list)
+ lcorrs = __retrieve_lcorr__(
+ cursor, (
+ trait["mouse_geneid"] for trait in traits
+ if (trait["mouse_geneid"] != 0 and
+ trait["mouse_geneid"].find(";") < 0)))
+ return tuple(
+ {**trait, "l_corr": lcorrs.get(trait["mouse_geneid"], None)}
+ for trait in traits)
+
+ return trait_list
+ return trait_list
+
+def tissue_correlation_by_list(
+ conn: Any, primary_trait_symbol: str, tissue_probeset_freeze_id: int,
+ method: str, trait_list: Tuple[dict]) -> Tuple[dict, ...]:
+ """
+ This is a migration of the
+ `web.webqtl.correlation.CorrelationPage.getTissueCorrelationByList`
+ function in GeneNetwork1.
+ """
+ def __add_tissue_corr__(trait, primary_trait_values, trait_values):
+ result = pingouin.corr(
+ primary_trait_values, trait_values,
+ method=("spearman" if "spearman" in method.lower() else "pearson"))
+ return {
+ **trait,
+ "tissue_corr": result["r"],
+ "tissue_p_value": result["p-val"]
+ }
+
+ if any((lambda t: bool(t.get("l_corr")))(trait) for trait in trait_list):
+ prim_trait_symbol_value_dict = fetch_gene_symbol_tissue_value_dict_for_trait(
+ (primary_trait_symbol,), tissue_probeset_freeze_id, conn)
+ if primary_trait_symbol.lower() in prim_trait_symbol_value_dict:
+ primary_trait_value = prim_trait_symbol_value_dict[
+ primary_trait_symbol.lower()]
+ gene_symbol_list = tuple(
+ trait["symbol"] for trait in trait_list if "symbol" in trait.keys())
+ symbol_value_dict = fetch_gene_symbol_tissue_value_dict_for_trait(
+ gene_symbol_list, tissue_probeset_freeze_id, conn)
+ return tuple(
+ __add_tissue_corr__(
+ trait, primary_trait_value,
+ symbol_value_dict[trait["symbol"].lower()])
+ for trait in trait_list
+ if ("symbol" in trait and
+ bool(trait["symbol"]) and
+ trait["symbol"].lower() in symbol_value_dict))
+ return tuple({
+ **trait,
+ "tissue_corr": None,
+ "tissue_p_value": None
+ } for trait in trait_list)
+ return trait_list
+
+def trait_for_output(trait):
+ """
+ Process a trait for output.
+
+ Removes a lot of extraneous data from the trait, that is not needed for
+ the display of partial correlation results.
+ This function also removes all key-value pairs, for which the value is
+ `None`, because it is a waste of network resources to transmit the key-value
+ pair just to indicate it does not exist.
+ """
+ def __nan_to_none__(val):
+ if val is None:
+ return None
+ if math.isnan(val) or numpy.isnan(val):
+ return None
+ return val
+
+ trait = {
+ "trait_type": trait["db"]["dataset_type"],
+ "dataset_name": trait["db"]["dataset_name"],
+ "dataset_type": trait["db"]["dataset_type"],
+ "group": trait["db"]["group"],
+ "trait_fullname": trait["trait_fullname"],
+ "trait_name": trait["trait_name"],
+ "symbol": trait.get("symbol"),
+ "description": trait.get("description"),
+ "pre_publication_description": trait.get("Pre_publication_description"),
+ "post_publication_description": trait.get(
+ "Post_publication_description"),
+ "original_description": trait.get("Original_description"),
+ "authors": trait.get("Authors"),
+ "year": trait.get("Year"),
+ "probe_target_description": trait.get("Probe_target_description"),
+ "chr": trait.get("chr"),
+ "mb": trait.get("mb"),
+ "geneid": trait.get("geneid"),
+ "homologeneid": trait.get("homologeneid"),
+ "noverlap": trait.get("noverlap"),
+ "partial_corr": __nan_to_none__(trait.get("partial_corr")),
+ "partial_corr_p_value": __nan_to_none__(
+ trait.get("partial_corr_p_value")),
+ "corr": __nan_to_none__(trait.get("corr")),
+ "corr_p_value": __nan_to_none__(trait.get("corr_p_value")),
+ "rank_order": __nan_to_none__(trait.get("rank_order")),
+ "delta": (
+ None if trait.get("partial_corr") is None
+ else (trait.get("partial_corr") - trait.get("corr"))),
+ "l_corr": __nan_to_none__(trait.get("l_corr")),
+ "tissue_corr": __nan_to_none__(trait.get("tissue_corr")),
+ "tissue_p_value": __nan_to_none__(trait.get("tissue_p_value"))
+ }
+ return {key: val for key, val in trait.items() if val is not None}
+
+def partial_correlations_entry(# pylint: disable=[R0913, R0914, R0911]
+ conn: Any, primary_trait_name: str,
+ control_trait_names: Tuple[str, ...], method: str,
+ criteria: int, target_db_name: str) -> dict:
+ """
+ This is the 'ochestration' function for the partial-correlation feature.
+
+ This function will dispatch the functions doing data fetches from the
+ database (and various other places) and feed that data to the functions
+ doing the conversions and computations. It will then return the results of
+ all of that work.
+
+ This function is doing way too much. Look into splitting out the
+ functionality into smaller functions that do fewer things.
"""
- return 0
+ threshold = 0
+ corr_min_informative = 4
+
+ all_traits = traits_info(
+ conn, threshold, (primary_trait_name,) + control_trait_names)
+ all_traits_data = traits_data(conn, all_traits)
+
+ primary_trait = tuple(
+ trait for trait in all_traits
+ if trait["trait_fullname"] == primary_trait_name)[0]
+ if not primary_trait["haveinfo"]:
+ return {
+ "status": "not-found",
+ "message": f"Could not find primary trait {primary_trait['trait_fullname']}"
+ }
+ cntrl_traits = tuple(
+ trait for trait in all_traits
+ if trait["trait_fullname"] != primary_trait_name)
+ if not any(trait["haveinfo"] for trait in cntrl_traits):
+ return {
+ "status": "not-found",
+ "message": "None of the requested control traits were found."}
+ for trait in cntrl_traits:
+ if trait["haveinfo"] is False:
+ warnings.warn(
+ (f"Control traits {trait['trait_fullname']} was not found "
+ "- continuing without it."),
+ category=UserWarning)
+
+ group = primary_trait["db"]["group"]
+ primary_trait_data = all_traits_data[primary_trait["trait_name"]]
+ primary_samples, primary_values, _primary_variances = export_informative(
+ primary_trait_data)
+
+ cntrl_traits_data = tuple(
+ data for trait_name, data in all_traits_data.items()
+ if trait_name != primary_trait["trait_name"])
+ species = species_name(conn, group)
+
+ (cntrl_samples,
+ cntrl_values,
+ _cntrl_variances,
+ _cntrl_ns) = control_samples(cntrl_traits_data, primary_samples)
+
+ common_primary_control_samples = primary_samples
+ fixed_primary_vals = primary_values
+ fixed_control_vals = cntrl_values
+ if not all(cnt_smp == primary_samples for cnt_smp in cntrl_samples):
+ (common_primary_control_samples,
+ fixed_primary_vals,
+ fixed_control_vals,
+ _primary_variances,
+ _cntrl_variances) = fix_samples(primary_trait, cntrl_traits)
+
+ if len(common_primary_control_samples) < corr_min_informative:
+ return {
+ "status": "error",
+ "message": (
+ f"Fewer than {corr_min_informative} samples data entered for "
+ f"{group} dataset. No calculation of correlation has been "
+ "attempted."),
+ "error_type": "Inadequate Samples"}
+
+ identical_traits_names = find_identical_traits(
+ primary_trait_name, primary_values, control_trait_names, cntrl_values)
+ if len(identical_traits_names) > 0:
+ return {
+ "status": "error",
+ "message": (
+ f"{identical_traits_names[0]} and {identical_traits_names[1]} "
+ "have the same values for the {len(fixed_primary_vals)} "
+ "samples that will be used to compute the partial correlation "
+ "(common for all primary and control traits). In such cases, "
+ "partial correlation cannot be computed. Please re-select your "
+ "traits."),
+ "error_type": "Identical Traits"}
+
+ input_trait_geneid = primary_trait.get("geneid", 0)
+ input_trait_symbol = primary_trait.get("symbol", "")
+ input_trait_mouse_geneid = translate_to_mouse_gene_id(
+ species, input_trait_geneid, conn)
+
+ tissue_probeset_freeze_id = 1
+ db_type = primary_trait["db"]["dataset_type"]
+
+ if db_type == "ProbeSet" and method.lower() in (
+ "sgo literature correlation",
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho"):
+ return {
+ "status": "error",
+ "message": (
+ "Wrong correlation type: It is not possible to compute the "
+ f"{method} between your trait and data in the {target_db_name} "
+ "database. Please try again after selecting another type of "
+ "correlation."),
+ "error_type": "Correlation Type"}
+
+ if (method.lower() == "sgo literature correlation" and (
+ bool(input_trait_geneid) is False or
+ check_for_literature_info(conn, input_trait_mouse_geneid))):
+ return {
+ "status": "error",
+ "message": (
+ "No Literature Information: This gene does not have any "
+ "associated Literature Information."),
+ "error_type": "Literature Correlation"}
+
+ if (
+ method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho")
+ and bool(input_trait_symbol) is False):
+ return {
+ "status": "error",
+ "message": (
+ "No Tissue Correlation Information: This gene does not have "
+ "any associated Tissue Correlation Information."),
+ "error_type": "Tissue Correlation"}
+
+ if (
+ method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho")
+ and check_symbol_for_tissue_correlation(
+ conn, tissue_probeset_freeze_id, input_trait_symbol)):
+ return {
+ "status": "error",
+ "message": (
+ "No Tissue Correlation Information: This gene does not have "
+ "any associated Tissue Correlation Information."),
+ "error_type": "Tissue Correlation"}
+
+ target_dataset = retrieve_trait_dataset(
+ ("Temp" if "Temp" in target_db_name else
+ ("Publish" if "Publish" in target_db_name else
+ "Geno" if "Geno" in target_db_name else "ProbeSet")),
+ {"db": {"dataset_name": target_db_name}, "trait_name": "_"},
+ threshold,
+ conn)
+
+ database_filename = get_filename(conn, target_db_name, TEXTDIR)
+ _total_traits, all_correlations = partial_corrs(
+ conn, common_primary_control_samples, fixed_primary_vals,
+ fixed_control_vals, len(fixed_primary_vals), species,
+ input_trait_geneid, input_trait_symbol, tissue_probeset_freeze_id,
+ method, {**target_dataset, "dataset_type": target_dataset["type"]}, database_filename)
+
+
+ def __make_sorter__(method):
+ def __by_lit_or_tiss_corr_then_p_val__(row):
+ return (row[6], row[3])
+
+ def __by_partial_corr_p_value__(row):
+ return row[3]
+
+ if (("literature" in method.lower()) or ("tissue" in method.lower())):
+ return __by_lit_or_tiss_corr_then_p_val__
+
+ return __by_partial_corr_p_value__
+
+ add_lit_corr_and_tiss_corr = compose(
+ partial(literature_correlation_by_list, conn, species),
+ partial(
+ tissue_correlation_by_list, conn, input_trait_symbol,
+ tissue_probeset_freeze_id, method))
+
+ selected_results = sorted(
+ all_correlations,
+ key=__make_sorter__(method))[:criteria]
+ traits_list_corr_info = {
+ f"{target_dataset['dataset_name']}::{item[0]}": {
+ "noverlap": item[1],
+ "partial_corr": item[2],
+ "partial_corr_p_value": item[3],
+ "corr": item[4],
+ "corr_p_value": item[5],
+ "rank_order": (1 if "spearman" in method.lower() else 0),
+ **({
+ "tissue_corr": item[6],
+ "tissue_p_value": item[7]}
+ if len(item) == 8 else {}),
+ **({"l_corr": item[6]}
+ if len(item) == 7 else {})
+ } for item in selected_results}
+
+ trait_list = add_lit_corr_and_tiss_corr(tuple(
+ {**trait, **traits_list_corr_info.get(trait["trait_fullname"], {})}
+ for trait in traits_info(
+ conn, threshold,
+ tuple(
+ f"{target_dataset['dataset_name']}::{item[0]}"
+ for item in selected_results))))
+
+ return {
+ "status": "success",
+ "results": {
+ "primary_trait": trait_for_output(primary_trait),
+ "control_traits": tuple(
+ trait_for_output(trait) for trait in cntrl_traits),
+ "correlations": tuple(
+ trait_for_output(trait) for trait in trait_list),
+ "dataset_type": target_dataset["type"],
+ "method": "spearman" if "spearman" in method.lower() else "pearson"
+ }}
diff --git a/gn3/computations/partial_correlations_optimised.py b/gn3/computations/partial_correlations_optimised.py
new file mode 100644
index 0000000..601289c
--- /dev/null
+++ b/gn3/computations/partial_correlations_optimised.py
@@ -0,0 +1,244 @@
+"""
+This contains an optimised version of the
+ `gn3.computations.partial_correlations.partial_correlations_entry`
+function.
+"""
+from functools import partial
+from typing import Any, Tuple
+
+from gn3.settings import TEXTDIR
+from gn3.function_helpers import compose
+from gn3.db.partial_correlations import traits_info, traits_data
+from gn3.db.species import species_name, translate_to_mouse_gene_id
+from gn3.db.traits import export_informative, retrieve_trait_dataset
+from gn3.db.correlations import (
+ get_filename,
+ check_for_literature_info,
+ check_symbol_for_tissue_correlation)
+from gn3.computations.partial_correlations import (
+ fix_samples,
+ partial_corrs,
+ control_samples,
+ trait_for_output,
+ find_identical_traits,
+ tissue_correlation_by_list,
+ literature_correlation_by_list)
+
+def partial_correlations_entry(# pylint: disable=[R0913, R0914, R0911]
+ conn: Any, primary_trait_name: str,
+ control_trait_names: Tuple[str, ...], method: str,
+ criteria: int, target_db_name: str) -> dict:
+ """
+ This is the 'ochestration' function for the partial-correlation feature.
+
+ This function will dispatch the functions doing data fetches from the
+ database (and various other places) and feed that data to the functions
+ doing the conversions and computations. It will then return the results of
+ all of that work.
+
+ This function is doing way too much. Look into splitting out the
+ functionality into smaller functions that do fewer things.
+ """
+ threshold = 0
+ corr_min_informative = 4
+
+ all_traits = traits_info(
+ conn, threshold, (primary_trait_name,) + control_trait_names)
+ all_traits_data = traits_data(conn, all_traits)
+
+ # primary_trait = retrieve_trait_info(threshold, primary_trait_name, conn)
+ primary_trait = tuple(
+ trait for trait in all_traits
+ if trait["trait_fullname"] == primary_trait_name)[0]
+ group = primary_trait["db"]["group"]
+ # primary_trait_data = retrieve_trait_data(primary_trait, conn)
+ primary_trait_data = all_traits_data[primary_trait["trait_name"]]
+ primary_samples, primary_values, _primary_variances = export_informative(
+ primary_trait_data)
+
+ # cntrl_traits = tuple(
+ # retrieve_trait_info(threshold, trait_full_name, conn)
+ # for trait_full_name in control_trait_names)
+ # cntrl_traits_data = tuple(
+ # retrieve_trait_data(cntrl_trait, conn)
+ # for cntrl_trait in cntrl_traits)
+ cntrl_traits = tuple(
+ trait for trait in all_traits
+ if trait["trait_fullname"] != primary_trait_name)
+ cntrl_traits_data = tuple(
+ data for trait_name, data in all_traits_data.items()
+ if trait_name != primary_trait["trait_name"])
+ species = species_name(conn, group)
+
+ (cntrl_samples,
+ cntrl_values,
+ _cntrl_variances,
+ _cntrl_ns) = control_samples(cntrl_traits_data, primary_samples)
+
+ common_primary_control_samples = primary_samples
+ fixed_primary_vals = primary_values
+ fixed_control_vals = cntrl_values
+ if not all(cnt_smp == primary_samples for cnt_smp in cntrl_samples):
+ (common_primary_control_samples,
+ fixed_primary_vals,
+ fixed_control_vals,
+ _primary_variances,
+ _cntrl_variances) = fix_samples(primary_trait, cntrl_traits)
+
+ if len(common_primary_control_samples) < corr_min_informative:
+ return {
+ "status": "error",
+ "message": (
+ f"Fewer than {corr_min_informative} samples data entered for "
+ f"{group} dataset. No calculation of correlation has been "
+ "attempted."),
+ "error_type": "Inadequate Samples"}
+
+ identical_traits_names = find_identical_traits(
+ primary_trait_name, primary_values, control_trait_names, cntrl_values)
+ if len(identical_traits_names) > 0:
+ return {
+ "status": "error",
+ "message": (
+ f"{identical_traits_names[0]} and {identical_traits_names[1]} "
+ "have the same values for the {len(fixed_primary_vals)} "
+ "samples that will be used to compute the partial correlation "
+ "(common for all primary and control traits). In such cases, "
+ "partial correlation cannot be computed. Please re-select your "
+ "traits."),
+ "error_type": "Identical Traits"}
+
+ input_trait_geneid = primary_trait.get("geneid", 0)
+ input_trait_symbol = primary_trait.get("symbol", "")
+ input_trait_mouse_geneid = translate_to_mouse_gene_id(
+ species, input_trait_geneid, conn)
+
+ tissue_probeset_freeze_id = 1
+ db_type = primary_trait["db"]["dataset_type"]
+
+ if db_type == "ProbeSet" and method.lower() in (
+ "sgo literature correlation",
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho"):
+ return {
+ "status": "error",
+ "message": (
+ "Wrong correlation type: It is not possible to compute the "
+ f"{method} between your trait and data in the {target_db_name} "
+ "database. Please try again after selecting another type of "
+ "correlation."),
+ "error_type": "Correlation Type"}
+
+ if (method.lower() == "sgo literature correlation" and (
+ bool(input_trait_geneid) is False or
+ check_for_literature_info(conn, input_trait_mouse_geneid))):
+ return {
+ "status": "error",
+ "message": (
+ "No Literature Information: This gene does not have any "
+ "associated Literature Information."),
+ "error_type": "Literature Correlation"}
+
+ if (
+ method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho")
+ and bool(input_trait_symbol) is False):
+ return {
+ "status": "error",
+ "message": (
+ "No Tissue Correlation Information: This gene does not have "
+ "any associated Tissue Correlation Information."),
+ "error_type": "Tissue Correlation"}
+
+ if (
+ method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho")
+ and check_symbol_for_tissue_correlation(
+ conn, tissue_probeset_freeze_id, input_trait_symbol)):
+ return {
+ "status": "error",
+ "message": (
+ "No Tissue Correlation Information: This gene does not have "
+ "any associated Tissue Correlation Information."),
+ "error_type": "Tissue Correlation"}
+
+ target_dataset = retrieve_trait_dataset(
+ ("Temp" if "Temp" in target_db_name else
+ ("Publish" if "Publish" in target_db_name else
+ "Geno" if "Geno" in target_db_name else "ProbeSet")),
+ {"db": {"dataset_name": target_db_name}, "trait_name": "_"},
+ threshold,
+ conn)
+
+ database_filename = get_filename(conn, target_db_name, TEXTDIR)
+ _total_traits, all_correlations = partial_corrs(
+ conn, common_primary_control_samples, fixed_primary_vals,
+ fixed_control_vals, len(fixed_primary_vals), species,
+ input_trait_geneid, input_trait_symbol, tissue_probeset_freeze_id,
+ method, {**target_dataset, "dataset_type": target_dataset["type"]}, database_filename)
+
+
+ def __make_sorter__(method):
+ def __sort_6__(row):
+ return row[6]
+
+ def __sort_3__(row):
+ return row[3]
+
+ if "literature" in method.lower():
+ return __sort_6__
+
+ if "tissue" in method.lower():
+ return __sort_6__
+
+ return __sort_3__
+
+ # sorted_correlations = sorted(
+ # all_correlations, key=__make_sorter__(method))
+
+ add_lit_corr_and_tiss_corr = compose(
+ partial(literature_correlation_by_list, conn, species),
+ partial(
+ tissue_correlation_by_list, conn, input_trait_symbol,
+ tissue_probeset_freeze_id, method))
+
+ selected_results = sorted(
+ all_correlations,
+ key=__make_sorter__(method))[:min(criteria, len(all_correlations))]
+ traits_list_corr_info = {
+ "{target_dataset['dataset_name']}::{item[0]}": {
+ "noverlap": item[1],
+ "partial_corr": item[2],
+ "partial_corr_p_value": item[3],
+ "corr": item[4],
+ "corr_p_value": item[5],
+ "rank_order": (1 if "spearman" in method.lower() else 0),
+ **({
+ "tissue_corr": item[6],
+ "tissue_p_value": item[7]}
+ if len(item) == 8 else {}),
+ **({"l_corr": item[6]}
+ if len(item) == 7 else {})
+ } for item in selected_results}
+
+ trait_list = add_lit_corr_and_tiss_corr(tuple(
+ {**trait, **traits_list_corr_info.get(trait["trait_fullname"], {})}
+ for trait in traits_info(
+ conn, threshold,
+ tuple(
+ f"{target_dataset['dataset_name']}::{item[0]}"
+ for item in selected_results))))
+
+ return {
+ "status": "success",
+ "results": {
+ "primary_trait": trait_for_output(primary_trait),
+ "control_traits": tuple(
+ trait_for_output(trait) for trait in cntrl_traits),
+ "correlations": tuple(
+ trait_for_output(trait) for trait in trait_list),
+ "dataset_type": target_dataset["type"],
+ "method": "spearman" if "spearman" in method.lower() else "pearson"
+ }}
diff --git a/gn3/computations/pca.py b/gn3/computations/pca.py
new file mode 100644
index 0000000..35c9f03
--- /dev/null
+++ b/gn3/computations/pca.py
@@ -0,0 +1,189 @@
+"""module contains pca implementation using python"""
+
+
+from typing import Any
+from scipy import stats
+
+from sklearn.decomposition import PCA
+from sklearn import preprocessing
+
+import numpy as np
+import redis
+
+
+from typing_extensions import TypeAlias
+
+fArray: TypeAlias = list[float]
+
+
+def compute_pca(array: list[fArray]) -> dict[str, Any]:
+ """
+ computes the principal component analysis
+
+ Parameters:
+
+ array(list[list]):a list of lists contains data to perform pca
+
+
+ Returns:
+ pca_dict(dict):dict contains the pca_object,pca components,pca scores
+
+
+ """
+
+ corr_matrix = np.array(array)
+
+ pca_obj = PCA()
+ scaled_data = preprocessing.scale(corr_matrix)
+
+ pca_obj.fit(scaled_data)
+
+ return {
+ "pca": pca_obj,
+ "components": pca_obj.components_,
+ "scores": pca_obj.transform(scaled_data)
+ }
+
+
+def generate_scree_plot_data(variance_ratio: fArray) -> tuple[list, fArray]:
+ """
+ generates the scree data for plotting
+
+ Parameters:
+
+ variance_ratio(list[floats]):ratios for contribution of each pca
+
+ Returns:
+
+ coordinates(list[(x_coor,y_coord)])
+
+
+ """
+
+ perc_var = [round(ratio*100, 1) for ratio in variance_ratio]
+
+ x_coordinates = [f"PC{val}" for val in range(1, len(perc_var)+1)]
+
+ return (x_coordinates, perc_var)
+
+
+def generate_pca_traits_vals(trait_data_array: list[fArray],
+ corr_array: list[fArray]) -> list[list[Any]]:
+ """
+ generates datasets from zscores of the traits and eigen_vectors\
+ of correlation matrix
+
+ Parameters:
+
+ trait_data_array(list[floats]):an list of the traits
+ corr_array(list[list]): list of arrays for computing eigen_vectors
+
+ Returns:
+
+ pca_vals[list[list]]:
+
+
+ """
+
+ trait_zscores = stats.zscore(trait_data_array)
+
+ if len(trait_data_array[0]) < 10:
+ trait_zscores = trait_data_array
+
+ (eigen_values, corr_eigen_vectors) = np.linalg.eig(np.array(corr_array))
+ idx = eigen_values.argsort()[::-1]
+
+ return np.dot(corr_eigen_vectors[:, idx], trait_zscores)
+
+
+def process_factor_loadings_tdata(factor_loadings, traits_num: int):
+ """
+
+ transform loadings for tables visualization
+
+ Parameters:
+ factor_loading(numpy.ndarray)
+ traits_num(int):number of traits
+
+ Returns:
+ tabular_loadings(list[list[float]])
+ """
+
+ target_columns = 3 if traits_num > 2 else 2
+
+ trait_loadings = list(factor_loadings.T)
+
+ return [list(trait_loading[:target_columns])
+ for trait_loading in trait_loadings]
+
+
+def generate_pca_temp_traits(
+ species: str,
+ group: str,
+ traits_data: list[fArray],
+ corr_array: list[fArray],
+ dataset_samples: list[str],
+ shared_samples: list[str],
+ create_time: str
+) -> dict[str, list[Any]]:
+ """
+
+
+ generate pca temp datasets
+
+ """
+
+ # pylint: disable=too-many-arguments
+
+ pca_trait_dict = {}
+
+ pca_vals = generate_pca_traits_vals(traits_data, corr_array)
+
+ for (idx, pca_trait) in enumerate(list(pca_vals)):
+
+ trait_id = f"PCA{str(idx+1)}_{species}_{group}_{create_time}"
+ sample_vals = []
+
+ pointer = 0
+
+ for sample in dataset_samples:
+ if sample in shared_samples:
+
+ sample_vals.append(str(pca_trait[pointer]))
+ pointer += 1
+
+ else:
+ sample_vals.append("x")
+
+ pca_trait_dict[trait_id] = sample_vals
+
+ return pca_trait_dict
+
+
+def cache_pca_dataset(redis_conn: Any, exp_days: int,
+ pca_trait_dict: dict[str, list[Any]]):
+ """
+
+ caches pca dataset to redis
+
+ Parameters:
+
+ redis_conn(object)
+ exp_days(int): fo redis cache
+ pca_trait_dict(Dict): contains traits and traits vals to cache
+
+ Returns:
+
+ boolean(True if correct conn object False incase of exception)
+
+
+ """
+
+ try:
+ for trait_id, sample_data in pca_trait_dict.items():
+ samples_str = " ".join([str(x) for x in sample_data])
+ redis_conn.set(trait_id, samples_str, ex=exp_days)
+ return True
+
+ except (redis.ConnectionError, AttributeError):
+ return False
diff --git a/gn3/computations/qtlreaper.py b/gn3/computations/qtlreaper.py
index d1ff4ac..b61bdae 100644
--- a/gn3/computations/qtlreaper.py
+++ b/gn3/computations/qtlreaper.py
@@ -27,7 +27,7 @@ def generate_traits_file(samples, trait_values, traits_filename):
["{}\t{}".format(
len(trait_values), "\t".join([str(i) for i in t]))
for t in trait_values[-1:]])
- with open(traits_filename, "w") as outfile:
+ with open(traits_filename, "w", encoding="utf8") as outfile:
outfile.writelines(data)
def create_output_directory(path: str):
@@ -68,13 +68,13 @@ def run_reaper(
The function will raise a `subprocess.CalledProcessError` exception in case
of any errors running the `qtlreaper` command.
"""
- create_output_directory("{}/qtlreaper".format(output_dir))
- output_filename = "{}/qtlreaper/main_output_{}.txt".format(
- output_dir, random_string(10))
+ create_output_directory(f"{output_dir}/qtlreaper")
+ output_filename = (
+ f"{output_dir}/qtlreaper/main_output_{random_string(10)}.txt")
output_list = ["--main_output", output_filename]
if separate_nperm_output:
- permu_output_filename: Union[None, str] = "{}/qtlreaper/permu_output_{}.txt".format(
- output_dir, random_string(10))
+ permu_output_filename: Union[None, str] = (
+ f"{output_dir}/qtlreaper/permu_output_{random_string(10)}.txt")
output_list = output_list + [
"--permu_output", permu_output_filename] # type: ignore[list-item]
else:
@@ -135,7 +135,7 @@ def parse_reaper_main_results(results_file):
"""
Parse the results file of running QTLReaper into a list of dicts.
"""
- with open(results_file, "r") as infile:
+ with open(results_file, "r", encoding="utf8") as infile:
lines = infile.readlines()
def __parse_column_float_value(value):
@@ -164,7 +164,7 @@ def parse_reaper_permutation_results(results_file):
"""
Parse the results QTLReaper permutations into a list of values.
"""
- with open(results_file, "r") as infile:
+ with open(results_file, "r", encoding="utf8") as infile:
lines = infile.readlines()
return [float(line.strip()) for line in lines]
diff --git a/gn3/computations/rqtl.py b/gn3/computations/rqtl.py
index e81aba3..65ee6de 100644
--- a/gn3/computations/rqtl.py
+++ b/gn3/computations/rqtl.py
@@ -53,7 +53,7 @@ def process_rqtl_mapping(file_name: str) -> List:
# Later I should probably redo this using csv.read to avoid the
# awkwardness with removing quotes with [1:-1]
with open(os.path.join(current_app.config.get("TMPDIR", "/tmp"),
- "output", file_name), "r") as the_file:
+ "output", file_name), "r", encoding="utf-8") as the_file:
for line in the_file:
line_items = line.split(",")
if line_items[1][1:-1] == "chr" or not line_items:
@@ -118,7 +118,6 @@ def pairscan_for_figure(file_name: str) -> Dict:
return figure_data
-
def get_marker_list(map_file: str) -> List:
"""
Open the map file with the list of markers/pseudomarkers and create list of marker obs
@@ -255,7 +254,7 @@ def process_perm_output(file_name: str) -> Tuple[List, float, float]:
perm_results = []
with open(os.path.join(current_app.config.get("TMPDIR", "/tmp"),
- "output", "PERM_" + file_name), "r") as the_file:
+ "output", "PERM_" + file_name), "r", encoding="utf-8") as the_file:
for i, line in enumerate(the_file):
if i == 0:
# Skip header line
diff --git a/gn3/computations/wgcna.py b/gn3/computations/wgcna.py
index ab12fe7..c985491 100644
--- a/gn3/computations/wgcna.py
+++ b/gn3/computations/wgcna.py
@@ -19,7 +19,7 @@ def dump_wgcna_data(request_data: dict):
request_data["TMPDIR"] = TMPDIR
- with open(temp_file_path, "w") as output_file:
+ with open(temp_file_path, "w", encoding="utf-8") as output_file:
json.dump(request_data, output_file)
return temp_file_path
@@ -31,20 +31,18 @@ def stream_cmd_output(socketio, request_data, cmd: str):
socketio.emit("output", {"data": f"calling you script {cmd}"},
namespace="/", room=request_data["socket_id"])
- results = subprocess.Popen(
- cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
+ with subprocess.Popen(
+ cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True) as results:
+ if results.stdout is not None:
+ for line in iter(results.stdout.readline, b""):
+ socketio.emit("output",
+ {"data": line.decode("utf-8").rstrip()},
+ namespace="/", room=request_data["socket_id"])
- if results.stdout is not None:
-
- for line in iter(results.stdout.readline, b""):
- socketio.emit("output",
- {"data": line.decode("utf-8").rstrip()},
- namespace="/", room=request_data["socket_id"])
-
- socketio.emit(
- "output", {"data":
- "parsing the output results"}, namespace="/",
- room=request_data["socket_id"])
+ socketio.emit(
+ "output", {"data":
+ "parsing the output results"}, namespace="/",
+ room=request_data["socket_id"])
def process_image(image_loc: str) -> bytes:
@@ -75,7 +73,7 @@ def call_wgcna_script(rscript_path: str, request_data: dict):
run_cmd_results = run_cmd(cmd)
- with open(generated_file, "r") as outputfile:
+ with open(generated_file, "r", encoding="utf-8") as outputfile:
if run_cmd_results["code"] != 0:
return run_cmd_results
diff --git a/gn3/csvcmp.py b/gn3/csvcmp.py
new file mode 100644
index 0000000..8db89ca
--- /dev/null
+++ b/gn3/csvcmp.py
@@ -0,0 +1,146 @@
+"""This module contains functions for manipulating and working with csv
+texts"""
+from typing import Any, List
+
+import json
+import os
+import uuid
+from gn3.commands import run_cmd
+
+
+def extract_strain_name(csv_header, data, seek="Strain Name") -> str:
+ """Extract a strain's name given a csv header"""
+ for column, value in zip(csv_header.split(","), data.split(",")):
+ if seek in column:
+ return value
+ return ""
+
+
+def create_dirs_if_not_exists(dirs: list) -> None:
+ """Create directories from a list"""
+ for dir_ in dirs:
+ if not os.path.exists(dir_):
+ os.makedirs(dir_)
+
+
+def remove_insignificant_edits(diff_data, epsilon=0.001):
+ """Remove or ignore edits that are not within ε"""
+ __mod = []
+ if diff_data.get("Modifications"):
+ for mod in diff_data.get("Modifications"):
+ original = mod.get("Original").split(",")
+ current = mod.get("Current").split(",")
+ for i, (_x, _y) in enumerate(zip(original, current)):
+ if (
+ _x.replace(".", "").isdigit()
+ and _y.replace(".", "").isdigit()
+ and abs(float(_x) - float(_y)) < epsilon
+ ):
+ current[i] = _x
+ if not (__o := ",".join(original)) == (__c := ",".join(current)):
+ __mod.append(
+ {
+ "Original": __o,
+ "Current": __c,
+ }
+ )
+ diff_data["Modifications"] = __mod
+ return diff_data
+
+
+def clean_csv_text(csv_text: str) -> str:
+ """Remove extra white space elements in all elements of the CSV file"""
+ _csv_text = []
+ for line in csv_text.strip().split("\n"):
+ _csv_text.append(
+ ",".join([el.strip() for el in line.split(",")]))
+ return "\n".join(_csv_text)
+
+
+def csv_diff(base_csv, delta_csv, tmp_dir="/tmp") -> dict:
+ """Diff 2 csv strings"""
+ base_csv = clean_csv_text(base_csv)
+ delta_csv = clean_csv_text(delta_csv)
+ base_csv_list = base_csv.split("\n")
+ delta_csv_list = delta_csv.split("\n")
+
+ base_csv_header, delta_csv_header = "", ""
+ for i, line in enumerate(base_csv_list):
+ if line.startswith("Strain Name,Value,SE,Count"):
+ base_csv_header, delta_csv_header = line, delta_csv_list[i]
+ break
+ longest_header = max(base_csv_header, delta_csv_header)
+
+ if base_csv_header != delta_csv_header:
+ if longest_header != base_csv_header:
+ base_csv = base_csv.replace("Strain Name,Value,SE,Count",
+ longest_header, 1)
+ else:
+ delta_csv = delta_csv.replace(
+ "Strain Name,Value,SE,Count", longest_header, 1
+ )
+ file_name1 = os.path.join(tmp_dir, str(uuid.uuid4()))
+ file_name2 = os.path.join(tmp_dir, str(uuid.uuid4()))
+
+ with open(file_name1, "w", encoding="utf-8") as _f:
+ _l = len(longest_header.split(","))
+ _f.write(fill_csv(csv_text=base_csv, width=_l))
+ with open(file_name2, "w", encoding="utf-8") as _f:
+ _f.write(fill_csv(delta_csv, width=_l))
+
+ # Now we can run the diff!
+ _r = run_cmd(cmd=('"csvdiff '
+ f"{file_name1} {file_name2} "
+ '--format json"'))
+ if _r.get("code") == 0:
+ _r = json.loads(_r.get("output", ""))
+ if any(_r.values()):
+ _r["Columns"] = max(base_csv_header, delta_csv_header)
+ else:
+ _r = {}
+
+ # Clean Up!
+ if os.path.exists(file_name1):
+ os.remove(file_name1)
+ if os.path.exists(file_name2):
+ os.remove(file_name2)
+ return _r
+
+
+def fill_csv(csv_text, width, value="x"):
+ """Fill a csv text with 'value' if it's length is less than width"""
+ data = []
+ for line in csv_text.strip().split("\n"):
+ if line.startswith("Strain") or line.startswith("#"):
+ data.append(line)
+ elif line:
+ _n = line.split(",")
+ for i, val in enumerate(_n):
+ if not val.strip():
+ _n[i] = value
+ data.append(",".join(_n + [value] * (width - len(_n))))
+ return "\n".join(data)
+
+
+def get_allowable_sampledata_headers(conn: Any) -> List:
+ """Get a list of all the case-attributes stored in the database"""
+ attributes = ["Strain Name", "Value", "SE", "Count"]
+ with conn.cursor() as cursor:
+ cursor.execute("SELECT Name from CaseAttribute")
+ attributes += [attributes[0] for attributes in
+ cursor.fetchall()]
+ return attributes
+
+
+def extract_invalid_csv_headers(allowed_headers: List, csv_text: str) -> List:
+ """Check whether a csv text's columns contains valid headers"""
+ csv_header = []
+ for line in csv_text.split("\n"):
+ if line.startswith("Strain Name"):
+ csv_header = [_l.strip() for _l in line.split(",")]
+ break
+ invalid_headers = []
+ for header in csv_header:
+ if header not in allowed_headers:
+ invalid_headers.append(header)
+ return invalid_headers
diff --git a/gn3/data_helpers.py b/gn3/data_helpers.py
index d3f942b..268a0bb 100644
--- a/gn3/data_helpers.py
+++ b/gn3/data_helpers.py
@@ -5,9 +5,9 @@ data structures.
from math import ceil
from functools import reduce
-from typing import Any, Tuple, Sequence, Optional
+from typing import Any, Tuple, Sequence, Optional, Generator
-def partition_all(num: int, items: Sequence[Any]) -> Tuple[Tuple[Any, ...], ...]:
+def partition_all(num: int, items: Sequence[Any]) -> Generator:
"""
Given a sequence `items`, return a new sequence of the same type as `items`
with the data partitioned into sections of `n` items per partition.
@@ -19,10 +19,24 @@ def partition_all(num: int, items: Sequence[Any]) -> Tuple[Tuple[Any, ...], ...]
return acc + ((start, start + num),)
iterations = range(ceil(len(items) / num))
- return tuple([# type: ignore[misc]
- tuple(items[start:stop]) for start, stop # type: ignore[has-type]
- in reduce(
- __compute_start_stop__, iterations, tuple())])
+ for start, stop in reduce(# type: ignore[misc]
+ __compute_start_stop__, iterations, tuple()):
+ yield tuple(items[start:stop]) # type: ignore[has-type]
+
+def partition_by(partition_fn, items):
+ """
+ Given a sequence `items`, return a tuple of tuples, each of which contain
+ the values in `items` partitioned such that the first item in each internal
+ tuple, when passed to `partition_function` returns True.
+
+ This is an approximation of Clojure's `partition-by` function.
+ """
+ def __partitioner__(accumulator, item):
+ if partition_fn(item):
+ return accumulator + ((item,),)
+ return accumulator[:-1] + (accumulator[-1] + (item,),)
+
+ return reduce(__partitioner__, items, tuple())
def parse_csv_line(
line: str, delimiter: str = ",",
@@ -34,4 +48,4 @@ def parse_csv_line(
function in GeneNetwork1.
"""
return tuple(
- col.strip("{} \t\n".format(quoting)) for col in line.split(delimiter))
+ col.strip(f"{quoting} \t\n") for col in line.split(delimiter))
diff --git a/gn3/db/correlations.py b/gn3/db/correlations.py
index 06b3310..3ae66ca 100644
--- a/gn3/db/correlations.py
+++ b/gn3/db/correlations.py
@@ -2,17 +2,16 @@
This module will hold functions that are used in the (partial) correlations
feature to access the database to retrieve data needed for computations.
"""
-
+import os
from functools import reduce
-from typing import Any, Dict, Tuple
+from typing import Any, Dict, Tuple, Union
from gn3.random import random_string
from gn3.data_helpers import partition_all
from gn3.db.species import translate_to_mouse_gene_id
-from gn3.computations.partial_correlations import correlations_of_all_tissue_traits
-
-def get_filename(target_db_name: str, conn: Any) -> str:
+def get_filename(conn: Any, target_db_name: str, text_files_dir: str) -> Union[
+ str, bool]:
"""
Retrieve the name of the reference database file with which correlations are
computed.
@@ -23,18 +22,23 @@ def get_filename(target_db_name: str, conn: Any) -> str:
"""
with conn.cursor() as cursor:
cursor.execute(
- "SELECT Id, FullName from ProbeSetFreeze WHERE Name-%s",
- target_db_name)
+ "SELECT Id, FullName from ProbeSetFreeze WHERE Name=%s",
+ (target_db_name,))
result = cursor.fetchone()
if result:
- return "ProbeSetFreezeId_{tid}_FullName_{fname}.txt".format(
- tid=result[0],
- fname=result[1].replace(' ', '_').replace('/', '_'))
+ filename = (
+ f"ProbeSetFreezeId_{result[0]}_FullName_"
+ f"{result[1].replace(' ', '_').replace('/', '_')}.txt")
+ full_filename = f"{text_files_dir}/{filename}"
+ return (
+ os.path.exists(full_filename) and
+ (filename in os.listdir(text_files_dir)) and
+ full_filename)
- return ""
+ return False
def build_temporary_literature_table(
- species: str, gene_id: int, return_number: int, conn: Any) -> str:
+ conn: Any, species: str, gene_id: int, return_number: int) -> str:
"""
Build and populate a temporary table to hold the literature correlation data
to be used in computations.
@@ -49,7 +53,7 @@ def build_temporary_literature_table(
query = {
"rat": "SELECT rat FROM GeneIDXRef WHERE mouse=%s",
"human": "SELECT human FROM GeneIDXRef WHERE mouse=%d"}
- if species in query.keys():
+ if species in query:
cursor.execute(query[species], row[1])
record = cursor.fetchone()
if record:
@@ -128,7 +132,7 @@ def fetch_literature_correlations(
GeneNetwork1.
"""
temp_table = build_temporary_literature_table(
- species, gene_id, return_number, conn)
+ conn, species, gene_id, return_number)
query_fns = {
"Geno": fetch_geno_literature_correlations,
# "Temp": fetch_temp_literature_correlations,
@@ -156,11 +160,14 @@ def fetch_symbol_value_pair_dict(
symbol: data_id_dict.get(symbol) for symbol in symbol_list
if data_id_dict.get(symbol) is not None
}
- query = "SELECT Id, value FROM TissueProbeSetData WHERE Id IN %(data_ids)s"
+ data_ids_fields = (f"%(id{i})s" for i in range(len(data_ids.values())))
+ query = (
+ "SELECT Id, value FROM TissueProbeSetData "
+ f"WHERE Id IN ({','.join(data_ids_fields)})")
with conn.cursor() as cursor:
cursor.execute(
query,
- data_ids=tuple(data_ids.values()))
+ **{f"id{i}": did for i, did in enumerate(data_ids.values())})
value_results = cursor.fetchall()
return {
key: tuple(row[1] for row in value_results if row[0] == key)
@@ -234,8 +241,10 @@ def fetch_tissue_probeset_xref_info(
"INNER JOIN TissueProbeSetXRef AS t ON t.Symbol = x.Symbol "
"AND t.Mean = x.maxmean")
cursor.execute(
- query, probeset_freeze_id=probeset_freeze_id,
- symbols=tuple(gene_name_list))
+ query, {
+ "probeset_freeze_id": probeset_freeze_id,
+ "symbols": tuple(gene_name_list)
+ })
results = cursor.fetchall()
@@ -268,8 +277,8 @@ def fetch_gene_symbol_tissue_value_dict_for_trait(
return {}
def build_temporary_tissue_correlations_table(
- trait_symbol: str, probeset_freeze_id: int, method: str,
- return_number: int, conn: Any) -> str:
+ conn: Any, trait_symbol: str, probeset_freeze_id: int, method: str,
+ return_number: int) -> str:
"""
Build a temporary table to hold the tissue correlations data.
@@ -279,6 +288,16 @@ def build_temporary_tissue_correlations_table(
# We should probably pass the `correlations_of_all_tissue_traits` function
# as an argument to this function and get rid of the one call immediately
# following this comment.
+ from gn3.computations.partial_correlations import (#pylint: disable=[C0415, R0401]
+ correlations_of_all_tissue_traits)
+ # This import above is necessary within the function to avoid
+ # circular-imports.
+ #
+ #
+ # This import above is indicative of convoluted code, with the computation
+ # being interwoven with the data retrieval. This needs to be changed, such
+ # that the function being imported here is no longer necessary, or have the
+ # imported function passed to this function as an argument.
symbol_corr_dict, symbol_p_value_dict = correlations_of_all_tissue_traits(
fetch_gene_symbol_tissue_value_dict_for_trait(
(trait_symbol,), probeset_freeze_id, conn),
@@ -320,7 +339,7 @@ def fetch_tissue_correlations(# pylint: disable=R0913
GeneNetwork1.
"""
temp_table = build_temporary_tissue_correlations_table(
- trait_symbol, probeset_freeze_id, method, return_number, conn)
+ conn, trait_symbol, probeset_freeze_id, method, return_number)
with conn.cursor() as cursor:
cursor.execute(
(
@@ -379,3 +398,176 @@ def check_symbol_for_tissue_correlation(
return True
return False
+
+def fetch_sample_ids(
+ conn: Any, sample_names: Tuple[str, ...], species_name: str) -> Tuple[
+ int, ...]:
+ """
+ Given a sequence of sample names, and a species name, return the sample ids
+ that correspond to both.
+
+ This is a partial migration of the
+ `web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in
+ GeneNetwork1.
+ """
+ samples_fields = (f"%(s{i})s" for i in range(len(sample_names)))
+ query = (
+ "SELECT Strain.Id FROM Strain, Species "
+ f"WHERE Strain.Name IN ({','.join(samples_fields)}) "
+ "AND Strain.SpeciesId=Species.Id "
+ "AND Species.name=%(species_name)s")
+ with conn.cursor() as cursor:
+ cursor.execute(
+ query,
+ {
+ **{f"s{i}": sname for i, sname in enumerate(sample_names)},
+ "species_name": species_name
+ })
+ return tuple(row[0] for row in cursor.fetchall())
+
+def build_query_sgo_lit_corr(
+ db_type: str, temp_table: str, sample_id_columns: str,
+ joins: Tuple[str, ...]) -> Tuple[str, int]:
+ """
+ Build query for `SGO Literature Correlation` data, when querying the given
+ `temp_table` temporary table.
+
+ This is a partial migration of the
+ `web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in
+ GeneNetwork1.
+ """
+ return (
+ (f"SELECT {db_type}.Name, {temp_table}.value, " +
+ sample_id_columns +
+ f" FROM ({db_type}, {db_type}XRef, {db_type}Freeze) " +
+ f"LEFT JOIN {temp_table} ON {temp_table}.GeneId2=ProbeSet.GeneId " +
+ " ".join(joins) +
+ " WHERE ProbeSet.GeneId IS NOT NULL " +
+ f"AND {temp_table}.value IS NOT NULL " +
+ f"AND {db_type}XRef.{db_type}FreezeId = {db_type}Freeze.Id " +
+ f"AND {db_type}Freeze.Name = %(db_name)s " +
+ f"AND {db_type}.Id = {db_type}XRef.{db_type}Id " +
+ f"ORDER BY {db_type}.Id"),
+ 2)
+
+def build_query_tissue_corr(db_type, temp_table, sample_id_columns, joins):
+ """
+ Build query for `Tissue Correlation` data, when querying the given
+ `temp_table` temporary table.
+
+ This is a partial migration of the
+ `web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in
+ GeneNetwork1.
+ """
+ return (
+ (f"SELECT {db_type}.Name, {temp_table}.Correlation, " +
+ f"{temp_table}.PValue, " +
+ sample_id_columns +
+ f" FROM ({db_type}, {db_type}XRef, {db_type}Freeze) " +
+ f"LEFT JOIN {temp_table} ON {temp_table}.Symbol=ProbeSet.Symbol " +
+ " ".join(joins) +
+ " WHERE ProbeSet.Symbol IS NOT NULL " +
+ f"AND {temp_table}.Correlation IS NOT NULL " +
+ f"AND {db_type}XRef.{db_type}FreezeId = {db_type}Freeze.Id " +
+ f"AND {db_type}Freeze.Name = %(db_name)s " +
+ f"AND {db_type}.Id = {db_type}XRef.{db_type}Id "
+ f"ORDER BY {db_type}.Id"),
+ 3)
+
+def fetch_all_database_data(# pylint: disable=[R0913, R0914]
+ conn: Any, species: str, gene_id: int, trait_symbol: str,
+ samples: Tuple[str, ...], dataset: dict, method: str,
+ return_number: int, probeset_freeze_id: int) -> Tuple[
+ Tuple[float], int]:
+ """
+ This is a migration of the
+ `web.webqtl.correlation.CorrelationPage.fetchAllDatabaseData` function in
+ GeneNetwork1.
+ """
+ db_type = dataset["dataset_type"]
+ db_name = dataset["dataset_name"]
+ def __build_query__(sample_ids, temp_table):
+ sample_id_columns = ", ".join(f"T{smpl}.value" for smpl in sample_ids)
+ if db_type == "Publish":
+ joins = tuple(
+ (f"LEFT JOIN PublishData AS T{item} "
+ f"ON T{item}.Id = PublishXRef.DataId "
+ f"AND T{item}.StrainId = %(T{item}_sample_id)s")
+ for item in sample_ids)
+ return (
+ ("SELECT PublishXRef.Id, " +
+ sample_id_columns +
+ " FROM (PublishXRef, PublishFreeze) " +
+ " ".join(joins) +
+ " WHERE PublishXRef.InbredSetId = PublishFreeze.InbredSetId "
+ "AND PublishFreeze.Name = %(db_name)s"),
+ 1)
+ if temp_table is not None:
+ joins = tuple(
+ (f"LEFT JOIN {db_type}Data AS T{item} "
+ f"ON T{item}.Id = {db_type}XRef.DataId "
+ f"AND T{item}.StrainId=%(T{item}_sample_id)s")
+ for item in sample_ids)
+ if method.lower() == "sgo literature correlation":
+ return build_query_sgo_lit_corr(
+ sample_ids, temp_table, sample_id_columns, joins)
+ if method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho"):
+ return build_query_tissue_corr(
+ sample_ids, temp_table, sample_id_columns, joins)
+ joins = tuple(
+ (f"LEFT JOIN {db_type}Data AS T{item} "
+ f"ON T{item}.Id = {db_type}XRef.DataId "
+ f"AND T{item}.StrainId = %(T{item}_sample_id)s")
+ for item in sample_ids)
+ return (
+ (
+ f"SELECT {db_type}.Name, " +
+ sample_id_columns +
+ f" FROM ({db_type}, {db_type}XRef, {db_type}Freeze) " +
+ " ".join(joins) +
+ f" WHERE {db_type}XRef.{db_type}FreezeId = {db_type}Freeze.Id " +
+ f"AND {db_type}Freeze.Name = %(db_name)s " +
+ f"AND {db_type}.Id = {db_type}XRef.{db_type}Id " +
+ f"ORDER BY {db_type}.Id"),
+ 1)
+
+ def __fetch_data__(sample_ids, temp_table):
+ query, data_start_pos = __build_query__(sample_ids, temp_table)
+ with conn.cursor() as cursor:
+ cursor.execute(
+ query,
+ {"db_name": db_name,
+ **{f"T{item}_sample_id": item for item in sample_ids}})
+ return (cursor.fetchall(), data_start_pos)
+
+ sample_ids = tuple(
+ # look into graduating this to an argument and removing the `samples`
+ # and `species` argument: function currying and compositions might help
+ # with this
+ f"{sample_id}" for sample_id in
+ fetch_sample_ids(conn, samples, species))
+
+ temp_table = None
+ if gene_id and db_type == "probeset":
+ if method.lower() == "sgo literature correlation":
+ temp_table = build_temporary_literature_table(
+ conn, species, gene_id, return_number)
+ if method.lower() in (
+ "tissue correlation, pearson's r",
+ "tissue correlation, spearman's rho"):
+ temp_table = build_temporary_tissue_correlations_table(
+ conn, trait_symbol, probeset_freeze_id, method, return_number)
+
+ trait_database = tuple(
+ item for sublist in
+ (__fetch_data__(ssample_ids, temp_table)
+ for ssample_ids in partition_all(25, sample_ids))
+ for item in sublist)
+
+ if temp_table:
+ with conn.cursor() as cursor:
+ cursor.execute(f"DROP TEMPORARY TABLE {temp_table}")
+
+ return (trait_database[0], trait_database[1])
diff --git a/gn3/db/datasets.py b/gn3/db/datasets.py
index 6c328f5..b19db53 100644
--- a/gn3/db/datasets.py
+++ b/gn3/db/datasets.py
@@ -1,7 +1,11 @@
"""
This module contains functions relating to specific trait dataset manipulation
"""
-from typing import Any
+import re
+from string import Template
+from typing import Any, Dict, List, Optional
+from SPARQLWrapper import JSON, SPARQLWrapper
+from gn3.settings import SPARQL_ENDPOINT
def retrieve_probeset_trait_dataset_name(
threshold: int, name: str, connection: Any):
@@ -22,10 +26,13 @@ def retrieve_probeset_trait_dataset_name(
"threshold": threshold,
"name": name
})
- return dict(zip(
- ["dataset_id", "dataset_name", "dataset_fullname",
- "dataset_shortname", "dataset_datascale"],
- cursor.fetchone()))
+ res = cursor.fetchone()
+ if res:
+ return dict(zip(
+ ["dataset_id", "dataset_name", "dataset_fullname",
+ "dataset_shortname", "dataset_datascale"],
+ res))
+ return {"dataset_id": None, "dataset_name": name, "dataset_fullname": name}
def retrieve_publish_trait_dataset_name(
threshold: int, name: str, connection: Any):
@@ -75,33 +82,8 @@ def retrieve_geno_trait_dataset_name(
"dataset_shortname"],
cursor.fetchone()))
-def retrieve_temp_trait_dataset_name(
- threshold: int, name: str, connection: Any):
- """
- Get the ID, DataScale and various name formats for a `Temp` trait.
- """
- query = (
- "SELECT Id, Name, FullName, ShortName "
- "FROM TempFreeze "
- "WHERE "
- "public > %(threshold)s "
- "AND "
- "(Name = %(name)s OR FullName = %(name)s OR ShortName = %(name)s)")
- with connection.cursor() as cursor:
- cursor.execute(
- query,
- {
- "threshold": threshold,
- "name": name
- })
- return dict(zip(
- ["dataset_id", "dataset_name", "dataset_fullname",
- "dataset_shortname"],
- cursor.fetchone()))
-
def retrieve_dataset_name(
- trait_type: str, threshold: int, trait_name: str, dataset_name: str,
- conn: Any):
+ trait_type: str, threshold: int, dataset_name: str, conn: Any):
"""
Retrieve the name of a trait given the trait's name
@@ -113,9 +95,7 @@ def retrieve_dataset_name(
"ProbeSet": retrieve_probeset_trait_dataset_name,
"Publish": retrieve_publish_trait_dataset_name,
"Geno": retrieve_geno_trait_dataset_name,
- "Temp": retrieve_temp_trait_dataset_name}
- if trait_type == "Temp":
- return retrieve_temp_trait_dataset_name(threshold, trait_name, conn)
+ "Temp": lambda threshold, dataset_name, conn: {}}
return fn_map[trait_type](threshold, dataset_name, conn)
@@ -203,7 +183,6 @@ def retrieve_temp_trait_dataset():
"""
Retrieve the dataset that relates to `Temp` traits
"""
- # pylint: disable=[C0330]
return {
"searchfield": ["name", "description"],
"disfield": ["name", "description"],
@@ -217,7 +196,6 @@ def retrieve_geno_trait_dataset():
"""
Retrieve the dataset that relates to `Geno` traits
"""
- # pylint: disable=[C0330]
return {
"searchfield": ["name", "chr"],
"disfield": ["name", "chr", "mb", "source2", "sequence"],
@@ -228,7 +206,6 @@ def retrieve_publish_trait_dataset():
"""
Retrieve the dataset that relates to `Publish` traits
"""
- # pylint: disable=[C0330]
return {
"searchfield": [
"name", "post_publication_description", "abstract", "title",
@@ -247,7 +224,6 @@ def retrieve_probeset_trait_dataset():
"""
Retrieve the dataset that relates to `ProbeSet` traits
"""
- # pylint: disable=[C0330]
return {
"searchfield": [
"name", "description", "probe_target_description", "symbol",
@@ -278,8 +254,7 @@ def retrieve_trait_dataset(trait_type, trait, threshold, conn):
"dataset_id": None,
"dataset_name": trait["db"]["dataset_name"],
**retrieve_dataset_name(
- trait_type, threshold, trait["trait_name"],
- trait["db"]["dataset_name"], conn)
+ trait_type, threshold, trait["db"]["dataset_name"], conn)
}
group = retrieve_group_fields(
trait_type, trait["trait_name"], dataset_name_info, conn)
@@ -289,3 +264,100 @@ def retrieve_trait_dataset(trait_type, trait, threshold, conn):
**dataset_fns[trait_type](),
**group
}
+
+def sparql_query(query: str) -> List[Dict[str, Any]]:
+ """Run a SPARQL query and return the bound variables."""
+ sparql = SPARQLWrapper(SPARQL_ENDPOINT)
+ sparql.setQuery(query)
+ sparql.setReturnFormat(JSON)
+ return sparql.queryAndConvert()['results']['bindings']
+
+def dataset_metadata(accession_id: str) -> Optional[Dict[str, Any]]:
+ """Return info about dataset with ACCESSION_ID."""
+ # Check accession_id to protect against query injection.
+ # TODO: This function doesn't yet return the names of the actual dataset files.
+ pattern = re.compile(r'GN\d+', re.ASCII)
+ if not pattern.fullmatch(accession_id):
+ return None
+ # KLUDGE: We split the SPARQL query because virtuoso is very slow on a
+ # single large query.
+ queries = ["""
+PREFIX gn: <http://genenetwork.org/>
+SELECT ?name ?dataset_group ?status ?title ?geo_series
+WHERE {
+ ?dataset gn:accessionId "$accession_id" ;
+ rdf:type gn:dataset ;
+ gn:name ?name .
+ OPTIONAL { ?dataset gn:datasetGroup ?dataset_group } .
+ # FIXME: gn:datasetStatus should not be optional. But, some records don't
+ # have it.
+ OPTIONAL { ?dataset gn:datasetStatus ?status } .
+ OPTIONAL { ?dataset gn:title ?title } .
+ OPTIONAL { ?dataset gn:geoSeries ?geo_series } .
+}
+""",
+ """
+PREFIX gn: <http://genenetwork.org/>
+SELECT ?platform_name ?normalization_name ?species_name ?inbred_set_name ?tissue_name
+WHERE {
+ ?dataset gn:accessionId "$accession_id" ;
+ rdf:type gn:dataset ;
+ gn:normalization / gn:name ?normalization_name ;
+ gn:datasetOfSpecies / gn:menuName ?species_name ;
+ gn:datasetOfInbredSet / gn:name ?inbred_set_name .
+ OPTIONAL { ?dataset gn:datasetOfTissue / gn:name ?tissue_name } .
+ OPTIONAL { ?dataset gn:datasetOfPlatform / gn:name ?platform_name } .
+}
+""",
+ """
+PREFIX gn: <http://genenetwork.org/>
+SELECT ?specifics ?summary ?about_cases ?about_tissue ?about_platform
+ ?about_data_processing ?notes ?experiment_design ?contributors
+ ?citation ?acknowledgment
+WHERE {
+ ?dataset gn:accessionId "$accession_id" ;
+ rdf:type gn:dataset .
+ OPTIONAL { ?dataset gn:specifics ?specifics . }
+ OPTIONAL { ?dataset gn:summary ?summary . }
+ OPTIONAL { ?dataset gn:aboutCases ?about_cases . }
+ OPTIONAL { ?dataset gn:aboutTissue ?about_tissue . }
+ OPTIONAL { ?dataset gn:aboutPlatform ?about_platform . }
+ OPTIONAL { ?dataset gn:aboutDataProcessing ?about_data_processing . }
+ OPTIONAL { ?dataset gn:notes ?notes . }
+ OPTIONAL { ?dataset gn:experimentDesign ?experiment_design . }
+ OPTIONAL { ?dataset gn:contributors ?contributors . }
+ OPTIONAL { ?dataset gn:citation ?citation . }
+ OPTIONAL { ?dataset gn:acknowledgment ?acknowledgment . }
+}
+"""]
+ result: Dict[str, Any] = {'accession_id': accession_id,
+ 'investigator': {}}
+ query_result = {}
+ for query in queries:
+ if sparql_result := sparql_query(Template(query).substitute(accession_id=accession_id)):
+ query_result.update(sparql_result[0])
+ else:
+ return None
+ for key, value in query_result.items():
+ result[key] = value['value']
+ investigator_query_result = sparql_query(Template("""
+PREFIX gn: <http://genenetwork.org/>
+SELECT ?name ?address ?city ?state ?zip ?phone ?email ?country ?homepage
+WHERE {
+ ?dataset gn:accessionId "$accession_id" ;
+ rdf:type gn:dataset ;
+ gn:datasetOfInvestigator ?investigator .
+ OPTIONAL { ?investigator foaf:name ?name . }
+ OPTIONAL { ?investigator gn:address ?address . }
+ OPTIONAL { ?investigator gn:city ?city . }
+ OPTIONAL { ?investigator gn:state ?state . }
+ OPTIONAL { ?investigator gn:zipCode ?zip . }
+ OPTIONAL { ?investigator foaf:phone ?phone . }
+ OPTIONAL { ?investigator foaf:mbox ?email . }
+ OPTIONAL { ?investigator gn:country ?country . }
+ OPTIONAL { ?investigator foaf:homepage ?homepage . }
+}
+""").substitute(accession_id=accession_id))[0]
+ for key, value in investigator_query_result.items():
+ result['investigator'][key] = value['value']
+ return result
diff --git a/gn3/db/genotypes.py b/gn3/db/genotypes.py
index 8f18cac..6f867c7 100644
--- a/gn3/db/genotypes.py
+++ b/gn3/db/genotypes.py
@@ -2,7 +2,6 @@
import os
import gzip
-from typing import Union, TextIO
from gn3.settings import GENOTYPE_FILES
@@ -10,7 +9,7 @@ def build_genotype_file(
geno_name: str, base_dir: str = GENOTYPE_FILES,
extension: str = "geno"):
"""Build the absolute path for the genotype file."""
- return "{}/{}.{}".format(os.path.abspath(base_dir), geno_name, extension)
+ return f"{os.path.abspath(base_dir)}/{geno_name}.{extension}"
def load_genotype_samples(genotype_filename: str, file_type: str = "geno"):
"""
@@ -44,22 +43,23 @@ def __load_genotype_samples_from_geno(genotype_filename: str):
Loads samples from '.geno' files.
"""
- gzipped_filename = "{}.gz".format(genotype_filename)
+ def __remove_comments_and_empty_lines__(rows):
+ return(
+ line for line in rows
+ if line and not line.startswith(("#", "@")))
+
+ gzipped_filename = f"{genotype_filename}.gz"
if os.path.isfile(gzipped_filename):
- genofile: Union[TextIO, gzip.GzipFile] = gzip.open(gzipped_filename)
+ with gzip.open(gzipped_filename) as gz_genofile:
+ rows = __remove_comments_and_empty_lines__(gz_genofile.readlines())
else:
- genofile = open(genotype_filename)
-
- for row in genofile:
- line = row.strip()
- if (not line) or (line.startswith(("#", "@"))): # type: ignore[arg-type]
- continue
- break
+ with open(genotype_filename, encoding="utf8") as genofile:
+ rows = __remove_comments_and_empty_lines__(genofile.readlines())
- headers = line.split("\t") # type: ignore[arg-type]
+ headers = next(rows).split() # type: ignore[arg-type]
if headers[3] == "Mb":
- return headers[4:]
- return headers[3:]
+ return tuple(headers[4:])
+ return tuple(headers[3:])
def __load_genotype_samples_from_plink(genotype_filename: str):
"""
@@ -67,8 +67,8 @@ def __load_genotype_samples_from_plink(genotype_filename: str):
Loads samples from '.plink' files.
"""
- genofile = open(genotype_filename)
- return [line.split(" ")[1] for line in genofile]
+ with open(genotype_filename, encoding="utf8") as genofile:
+ return tuple(line.split()[1] for line in genofile)
def parse_genotype_labels(lines: list):
"""
@@ -129,7 +129,7 @@ def parse_genotype_marker(line: str, geno_obj: dict, parlist: tuple):
alleles = marker_row[start_pos:]
genotype = tuple(
- (geno_table[allele] if allele in geno_table.keys() else "U")
+ (geno_table[allele] if allele in geno_table else "U")
for allele in alleles)
if len(parlist) > 0:
genotype = (-1, 1) + genotype
@@ -164,7 +164,7 @@ def parse_genotype_file(filename: str, parlist: tuple = tuple()):
"""
Parse the provided genotype file into a usable pytho3 data structure.
"""
- with open(filename, "r") as infile:
+ with open(filename, "r", encoding="utf8") as infile:
contents = infile.readlines()
lines = tuple(line for line in contents if
@@ -175,10 +175,10 @@ def parse_genotype_file(filename: str, parlist: tuple = tuple()):
data_lines = tuple(line for line in lines if not line.startswith("@"))
header = parse_genotype_header(data_lines[0], parlist)
geno_obj = dict(labels + header)
- markers = tuple(
- [parse_genotype_marker(line, geno_obj, parlist)
- for line in data_lines[1:]])
+ markers = (
+ parse_genotype_marker(line, geno_obj, parlist)
+ for line in data_lines[1:])
chromosomes = tuple(
dict(chromosome) for chromosome in
- build_genotype_chromosomes(geno_obj, markers))
+ build_genotype_chromosomes(geno_obj, tuple(markers)))
return {**geno_obj, "chromosomes": chromosomes}
diff --git a/gn3/db/partial_correlations.py b/gn3/db/partial_correlations.py
new file mode 100644
index 0000000..72dbf1a
--- /dev/null
+++ b/gn3/db/partial_correlations.py
@@ -0,0 +1,791 @@
+"""
+This module contains the code and queries for fetching data from the database,
+that relates to partial correlations.
+
+It is intended to replace the functions in `gn3.db.traits` and `gn3.db.datasets`
+modules with functions that fetch the data enmasse, rather than one at a time.
+
+This module is part of the optimisation effort for the partial correlations.
+"""
+
+from functools import reduce, partial
+from typing import Any, Dict, Tuple, Union, Sequence
+
+from MySQLdb.cursors import DictCursor
+
+from gn3.function_helpers import compose
+from gn3.db.traits import (
+ build_trait_name,
+ with_samplelist_data_setup,
+ without_samplelist_data_setup)
+
+def organise_trait_data_by_trait(
+ traits_data_rows: Tuple[Dict[str, Any], ...]) -> Dict[
+ str, Dict[str, Any]]:
+ """
+ Organise the trait data items by their trait names.
+ """
+ def __organise__(acc, row):
+ trait_name = row["trait_name"]
+ return {
+ **acc,
+ trait_name: acc.get(trait_name, tuple()) + ({
+ key: val for key, val in row.items() if key != "trait_name"},)
+ }
+ if traits_data_rows:
+ return reduce(__organise__, traits_data_rows, {})
+ return {}
+
+def temp_traits_data(conn, traits):
+ """
+ Retrieve trait data for `Temp` traits.
+ """
+ query = (
+ "SELECT "
+ "Temp.Name AS trait_name, Strain.Name AS sample_name, TempData.value, "
+ "TempData.SE AS se_error, TempData.NStrain AS nstrain, "
+ "TempData.Id AS id "
+ "FROM TempData, Temp, Strain "
+ "WHERE TempData.StrainId = Strain.Id "
+ "AND TempData.Id = Temp.DataId "
+ f"AND Temp.name IN ({', '.join(['%s'] * len(traits))}) "
+ "ORDER BY Strain.Name")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(trait["trait_name"] for trait in traits))
+ return organise_trait_data_by_trait(cursor.fetchall())
+ return {}
+
+def publish_traits_data(conn, traits):
+ """
+ Retrieve trait data for `Publish` traits.
+ """
+ dataset_ids = tuple(set(
+ trait["db"]["dataset_id"] for trait in traits
+ if trait["db"].get("dataset_id") is not None))
+ query = (
+ "SELECT "
+ "PublishXRef.Id AS trait_name, Strain.Name AS sample_name, "
+ "PublishData.value, PublishSE.error AS se_error, "
+ "NStrain.count AS nstrain, PublishData.Id AS id "
+ "FROM (PublishData, Strain, PublishXRef, PublishFreeze) "
+ "LEFT JOIN PublishSE "
+ "ON (PublishSE.DataId = PublishData.Id "
+ "AND PublishSE.StrainId = PublishData.StrainId) "
+ "LEFT JOIN NStrain "
+ "ON (NStrain.DataId = PublishData.Id "
+ "AND NStrain.StrainId = PublishData.StrainId) "
+ "WHERE PublishXRef.InbredSetId = PublishFreeze.InbredSetId "
+ "AND PublishData.Id = PublishXRef.DataId "
+ f"AND PublishXRef.Id IN ({', '.join(['%s'] * len(traits))}) "
+ "AND PublishFreeze.Id IN "
+ f"({', '.join(['%s'] * len(dataset_ids))}) "
+ "AND PublishData.StrainId = Strain.Id "
+ "ORDER BY Strain.Name")
+ if len(dataset_ids) > 0:
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(trait["trait_name"] for trait in traits) +
+ tuple(dataset_ids))
+ return organise_trait_data_by_trait(cursor.fetchall())
+ return {}
+
+def cellid_traits_data(conn, traits):
+ """
+ Retrieve trait data for `Probe Data` types.
+ """
+ cellids = tuple(trait["cellid"] for trait in traits)
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ query = (
+ "SELECT "
+ "ProbeSet.Name AS trait_name, Strain.Name AS sample_name, "
+ "ProbeData.value, ProbeSE.error AS se_error, ProbeData.Id AS id "
+ "FROM (ProbeData, ProbeFreeze, ProbeSetFreeze, ProbeXRef, Strain, "
+ "Probe, ProbeSet) "
+ "LEFT JOIN ProbeSE "
+ "ON (ProbeSE.DataId = ProbeData.Id "
+ "AND ProbeSE.StrainId = ProbeData.StrainId) "
+ f"WHERE Probe.Name IN ({', '.join(['%s'] * len(cellids))}) "
+ f"AND ProbeSet.Name IN ({', '.join(['%s'] * len(traits))}) "
+ "AND Probe.ProbeSetId = ProbeSet.Id "
+ "AND ProbeXRef.ProbeId = Probe.Id "
+ "AND ProbeXRef.ProbeFreezeId = ProbeFreeze.Id "
+ "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id "
+ f"AND ProbeSetFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))}) "
+ "AND ProbeXRef.DataId = ProbeData.Id "
+ "AND ProbeData.StrainId = Strain.Id "
+ "ORDER BY Strain.Name")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ cellids + tuple(trait["trait_name"] for trait in traits) +
+ tuple(dataset_names))
+ return organise_trait_data_by_trait(cursor.fetchall())
+ return {}
+
+def probeset_traits_data(conn, traits):
+ """
+ Retrieve trait data for `ProbeSet` traits.
+ """
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ query = (
+ "SELECT ProbeSet.Name AS trait_name, Strain.Name AS sample_name, "
+ "ProbeSetData.value, ProbeSetSE.error AS se_error, "
+ "ProbeSetData.Id AS id "
+ "FROM (ProbeSetData, ProbeSetFreeze, Strain, ProbeSet, ProbeSetXRef) "
+ "LEFT JOIN ProbeSetSE ON "
+ "(ProbeSetSE.DataId = ProbeSetData.Id "
+ "AND ProbeSetSE.StrainId = ProbeSetData.StrainId) "
+ f"WHERE ProbeSet.Name IN ({', '.join(['%s'] * len(traits))})"
+ "AND ProbeSetXRef.ProbeSetId = ProbeSet.Id "
+ "AND ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id "
+ f"AND ProbeSetFreeze.Name IN ({', '.join(['%s']*len(dataset_names))}) "
+ "AND ProbeSetXRef.DataId = ProbeSetData.Id "
+ "AND ProbeSetData.StrainId = Strain.Id "
+ "ORDER BY Strain.Name")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(trait["trait_name"] for trait in traits) +
+ tuple(dataset_names))
+ return organise_trait_data_by_trait(cursor.fetchall())
+ return {}
+
+def species_ids(conn, traits):
+ """
+ Retrieve the IDS of the related species from the given list of traits.
+ """
+ groups = tuple(set(
+ trait["db"]["group"] for trait in traits
+ if trait["db"].get("group") is not None))
+ query = (
+ "SELECT Name AS `group`, SpeciesId AS species_id "
+ "FROM InbredSet "
+ f"WHERE Name IN ({', '.join(['%s'] * len(groups))})")
+ if len(groups) > 0:
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, groups)
+ return tuple(row for row in cursor.fetchall())
+ return tuple()
+
+def geno_traits_data(conn, traits):
+ """
+ Retrieve trait data for `Geno` traits.
+ """
+ sp_ids = tuple(item["species_id"] for item in species_ids(conn, traits))
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ query = (
+ "SELECT Geno.Name AS trait_name, Strain.Name AS sample_name, "
+ "GenoData.value, GenoSE.error AS se_error, GenoData.Id AS id "
+ "FROM (GenoData, GenoFreeze, Strain, Geno, GenoXRef) "
+ "LEFT JOIN GenoSE ON "
+ "(GenoSE.DataId = GenoData.Id AND GenoSE.StrainId = GenoData.StrainId) "
+ f"WHERE Geno.SpeciesId IN ({', '.join(['%s'] * len(sp_ids))}) "
+ f"AND Geno.Name IN ({', '.join(['%s'] * len(traits))}) "
+ "AND GenoXRef.GenoId = Geno.Id "
+ "AND GenoXRef.GenoFreezeId = GenoFreeze.Id "
+ f"AND GenoFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))}) "
+ "AND GenoXRef.DataId = GenoData.Id "
+ "AND GenoData.StrainId = Strain.Id "
+ "ORDER BY Strain.Name")
+ if len(sp_ids) > 0 and len(dataset_names) > 0:
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ sp_ids +
+ tuple(trait["trait_name"] for trait in traits) +
+ tuple(dataset_names))
+ return organise_trait_data_by_trait(cursor.fetchall())
+ return {}
+
+def traits_data(
+ conn: Any, traits: Tuple[Dict[str, Any], ...],
+ samplelist: Tuple[str, ...] = tuple()) -> Dict[str, Dict[str, Any]]:
+ """
+ Retrieve trait data for multiple `traits`
+
+ This is a rework of the `gn3.db.traits.retrieve_trait_data` function.
+ """
+ def __organise__(acc, trait):
+ dataset_type = trait["db"]["dataset_type"]
+ if dataset_type == "Temp":
+ return {**acc, "Temp": acc.get("Temp", tuple()) + (trait,)}
+ if dataset_type == "Publish":
+ return {**acc, "Publish": acc.get("Publish", tuple()) + (trait,)}
+ if trait.get("cellid"):
+ return {**acc, "cellid": acc.get("cellid", tuple()) + (trait,)}
+ if dataset_type == "ProbeSet":
+ return {**acc, "ProbeSet": acc.get("ProbeSet", tuple()) + (trait,)}
+ return {**acc, "Geno": acc.get("Geno", tuple()) + (trait,)}
+
+ def __setup_samplelist__(data):
+ if samplelist:
+ return tuple(
+ item for item in
+ map(with_samplelist_data_setup(samplelist), data)
+ if item is not None)
+ return tuple(
+ item for item in
+ map(without_samplelist_data_setup(), data)
+ if item is not None)
+
+ def __process_results__(results):
+ flattened = reduce(lambda acc, res: {**acc, **res}, results)
+ return {
+ trait_name: {"data": dict(map(
+ lambda item: (
+ item["sample_name"],
+ {
+ key: val for key, val in item.items()
+ if item != "sample_name"
+ }),
+ __setup_samplelist__(data)))}
+ for trait_name, data in flattened.items()}
+
+ traits_data_fns = {
+ "Temp": temp_traits_data,
+ "Publish": publish_traits_data,
+ "cellid": cellid_traits_data,
+ "ProbeSet": probeset_traits_data,
+ "Geno": geno_traits_data
+ }
+ return __process_results__(tuple(# type: ignore[var-annotated]
+ traits_data_fns[key](conn, vals)
+ for key, vals in reduce(__organise__, traits, {}).items()))
+
+def merge_traits_and_info(traits, info_results):
+ """
+ Utility to merge trait info retrieved from the database with the given traits.
+ """
+ if info_results:
+ results = {
+ str(trait["trait_name"]): trait for trait in info_results
+ }
+ return tuple(
+ {
+ **trait,
+ **results.get(trait["trait_name"], {}),
+ "haveinfo": bool(results.get(trait["trait_name"]))
+ } for trait in traits)
+ return tuple({**trait, "haveinfo": False} for trait in traits)
+
+def publish_traits_info(
+ conn: Any, traits: Tuple[Dict[str, Any], ...]) -> Tuple[
+ Dict[str, Any], ...]:
+ """
+ Retrieve trait information for type `Publish` traits.
+
+ This is a rework of `gn3.db.traits.retrieve_publish_trait_info` function:
+ this one fetches multiple items in a single query, unlike the original that
+ fetches one item per query.
+ """
+ trait_dataset_ids = set(
+ trait["db"]["dataset_id"] for trait in traits
+ if trait["db"].get("dataset_id") is not None)
+ columns = (
+ "PublishXRef.Id, Publication.PubMed_ID, "
+ "Phenotype.Pre_publication_description, "
+ "Phenotype.Post_publication_description, "
+ "Phenotype.Original_description, "
+ "Phenotype.Pre_publication_abbreviation, "
+ "Phenotype.Post_publication_abbreviation, "
+ "Phenotype.Lab_code, Phenotype.Submitter, Phenotype.Owner, "
+ "Phenotype.Authorized_Users, "
+ "CAST(Publication.Authors AS BINARY) AS Authors, Publication.Title, "
+ "Publication.Abstract, Publication.Journal, Publication.Volume, "
+ "Publication.Pages, Publication.Month, Publication.Year, "
+ "PublishXRef.Sequence, Phenotype.Units, PublishXRef.comments")
+ query = (
+ "SELECT "
+ f"PublishXRef.Id AS trait_name, {columns} "
+ "FROM "
+ "PublishXRef, Publication, Phenotype, PublishFreeze "
+ "WHERE "
+ f"PublishXRef.Id IN ({', '.join(['%s'] * len(traits))}) "
+ "AND Phenotype.Id = PublishXRef.PhenotypeId "
+ "AND Publication.Id = PublishXRef.PublicationId "
+ "AND PublishXRef.InbredSetId = PublishFreeze.InbredSetId "
+ "AND PublishFreeze.Id IN "
+ f"({', '.join(['%s'] * len(trait_dataset_ids))})")
+ if trait_dataset_ids:
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ (
+ tuple(trait["trait_name"] for trait in traits) +
+ tuple(trait_dataset_ids)))
+ return merge_traits_and_info(traits, cursor.fetchall())
+ return tuple({**trait, "haveinfo": False} for trait in traits)
+
+def probeset_traits_info(
+ conn: Any, traits: Tuple[Dict[str, Any], ...]):
+ """
+ Retrieve information for the probeset traits
+ """
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ columns = ", ".join(
+ [f"ProbeSet.{x}" for x in
+ ("name", "symbol", "description", "probe_target_description", "chr",
+ "mb", "alias", "geneid", "genbankid", "unigeneid", "omim",
+ "refseq_transcriptid", "blatseq", "targetseq", "chipid", "comments",
+ "strand_probe", "strand_gene", "probe_set_target_region", "proteinid",
+ "probe_set_specificity", "probe_set_blat_score",
+ "probe_set_blat_mb_start", "probe_set_blat_mb_end",
+ "probe_set_strand", "probe_set_note_by_rw", "flag")])
+ query = (
+ f"SELECT ProbeSet.Name AS trait_name, {columns} "
+ "FROM ProbeSet INNER JOIN ProbeSetXRef "
+ "ON ProbeSetXRef.ProbeSetId = ProbeSet.Id "
+ "INNER JOIN ProbeSetFreeze "
+ "ON ProbeSetFreeze.Id = ProbeSetXRef.ProbeSetFreezeId "
+ "WHERE ProbeSetFreeze.Name IN "
+ f"({', '.join(['%s'] * len(dataset_names))}) "
+ f"AND ProbeSet.Name IN ({', '.join(['%s'] * len(traits))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(dataset_names) + tuple(
+ trait["trait_name"] for trait in traits))
+ return merge_traits_and_info(traits, cursor.fetchall())
+ return tuple({**trait, "haveinfo": False} for trait in traits)
+
+def geno_traits_info(
+ conn: Any, traits: Tuple[Dict[str, Any], ...]):
+ """
+ Retrieve trait information for type `Geno` traits.
+
+ This is a rework of the `gn3.db.traits.retrieve_geno_trait_info` function.
+ """
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ columns = ", ".join([
+ f"Geno.{x}" for x in ("name", "chr", "mb", "source2", "sequence")])
+ query = (
+ "SELECT "
+ f"Geno.Name AS trait_name, {columns} "
+ "FROM "
+ "Geno INNER JOIN GenoXRef ON GenoXRef.GenoId = Geno.Id "
+ "INNER JOIN GenoFreeze ON GenoFreeze.Id = GenoXRef.GenoFreezeId "
+ f"WHERE GenoFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))}) "
+ f"AND Geno.Name IN ({', '.join(['%s'] * len(traits))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(dataset_names) + tuple(
+ trait["trait_name"] for trait in traits))
+ return merge_traits_and_info(traits, cursor.fetchall())
+ return tuple({**trait, "haveinfo": False} for trait in traits)
+
+def temp_traits_info(
+ conn: Any, traits: Tuple[Dict[str, Any], ...]):
+ """
+ Retrieve trait information for type `Temp` traits.
+
+ A rework of the `gn3.db.traits.retrieve_temp_trait_info` function.
+ """
+ query = (
+ "SELECT Name as trait_name, name, description FROM Temp "
+ f"WHERE Name IN ({', '.join(['%s'] * len(traits))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(trait["trait_name"] for trait in traits))
+ return merge_traits_and_info(traits, cursor.fetchall())
+ return tuple({**trait, "haveinfo": False} for trait in traits)
+
+def publish_datasets_names(
+ conn: Any, threshold: int, dataset_names: Tuple[str, ...]):
+ """
+ Get the ID, DataScale and various name formats for a `Publish` trait.
+
+ Rework of the `gn3.db.datasets.retrieve_publish_trait_dataset_name`
+ """
+ query = (
+ "SELECT DISTINCT "
+ "Id AS dataset_id, Name AS dataset_name, FullName AS dataset_fullname, "
+ "ShortName AS dataset_shortname "
+ "FROM PublishFreeze "
+ "WHERE "
+ "public > %s "
+ "AND "
+ "(Name IN ({names}) OR FullName IN ({names}) OR ShortName IN ({names}))")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query.format(names=", ".join(["%s"] * len(dataset_names))),
+ (threshold,) +(dataset_names * 3))
+ return {ds["dataset_name"]: ds for ds in cursor.fetchall()}
+ return {}
+
+def set_bxd(group_info):
+ """Set the group value to BXD if it is 'BXD300'."""
+ return {
+ **group_info,
+ "group": (
+ "BXD" if group_info.get("Name") == "BXD300"
+ else group_info.get("Name", "")),
+ "groupid": group_info["Id"]
+ }
+
+def organise_groups_by_dataset(
+ group_rows: Union[Sequence[Dict[str, Any]], None]) -> Dict[str, Any]:
+ """Utility: Organise given groups by their datasets."""
+ if group_rows:
+ return {
+ row["dataset_name"]: set_bxd({
+ key: val for key, val in row.items()
+ if key != "dataset_name"
+ }) for row in group_rows
+ }
+ return {}
+
+def publish_datasets_groups(conn: Any, dataset_names: Tuple[str]):
+ """
+ Retrieve the Group, and GroupID values for various Publish trait types.
+
+ Rework of `gn3.db.datasets.retrieve_publish_group_fields` function.
+ """
+ query = (
+ "SELECT PublishFreeze.Name AS dataset_name, InbredSet.Name, "
+ "InbredSet.Id "
+ "FROM InbredSet, PublishFreeze "
+ "WHERE PublishFreeze.InbredSetId = InbredSet.Id "
+ f"AND PublishFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, tuple(dataset_names))
+ return organise_groups_by_dataset(cursor.fetchall())
+ return {}
+
+def publish_traits_datasets(conn: Any, threshold, traits: Tuple[Dict]):
+ """Retrieve datasets for 'Publish' traits."""
+ dataset_names = tuple(set(trait["db"]["dataset_name"] for trait in traits))
+ dataset_names_info = publish_datasets_names(conn, threshold, dataset_names)
+ dataset_groups = publish_datasets_groups(conn, dataset_names) # type: ignore[arg-type]
+ return tuple({
+ **trait,
+ "db": {
+ **trait["db"],
+ **dataset_names_info.get(trait["db"]["dataset_name"], {}),
+ **dataset_groups.get(trait["db"]["dataset_name"], {})
+ }
+ } for trait in traits)
+
+def probeset_datasets_names(conn: Any, threshold: int, dataset_names: Tuple[str, ...]):
+ """
+ Get the ID, DataScale and various name formats for a `ProbeSet` trait.
+ """
+ query = (
+ "SELECT Id AS dataset_id, Name AS dataset_name, "
+ "FullName AS dataset_fullname, ShortName AS dataset_shortname, "
+ "DataScale AS dataset_datascale "
+ "FROM ProbeSetFreeze "
+ "WHERE "
+ "public > %s "
+ "AND "
+ "(Name IN ({names}) OR FullName IN ({names}) OR ShortName IN ({names}))")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query.format(names=", ".join(["%s"] * len(dataset_names))),
+ (threshold,) +(dataset_names * 3))
+ return {ds["dataset_name"]: ds for ds in cursor.fetchall()}
+ return {}
+
+def probeset_datasets_groups(conn, dataset_names):
+ """
+ Retrieve the Group, and GroupID values for various ProbeSet trait types.
+ """
+ query = (
+ "SELECT ProbeSetFreeze.Name AS dataset_name, InbredSet.Name, "
+ "InbredSet.Id "
+ "FROM InbredSet, ProbeSetFreeze, ProbeFreeze "
+ "WHERE ProbeFreeze.InbredSetId = InbredSet.Id "
+ "AND ProbeFreeze.Id = ProbeSetFreeze.ProbeFreezeId "
+ f"AND ProbeSetFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, tuple(dataset_names))
+ return organise_groups_by_dataset(cursor.fetchall())
+ return {}
+
+def probeset_traits_datasets(conn: Any, threshold, traits: Tuple[Dict]):
+ """Retrive datasets for 'ProbeSet' traits."""
+ dataset_names = tuple(set(trait["db"]["dataset_name"] for trait in traits))
+ dataset_names_info = probeset_datasets_names(conn, threshold, dataset_names)
+ dataset_groups = probeset_datasets_groups(conn, dataset_names)
+ return tuple({
+ **trait,
+ "db": {
+ **trait["db"],
+ **dataset_names_info.get(trait["db"]["dataset_name"], {}),
+ **dataset_groups.get(trait["db"]["dataset_name"], {})
+ }
+ } for trait in traits)
+
+def geno_datasets_names(conn, threshold, dataset_names):
+ """
+ Get the ID, DataScale and various name formats for a `Geno` trait.
+ """
+ query = (
+ "SELECT Id AS dataset_id, Name AS dataset_name, "
+ "FullName AS dataset_fullname, ShortName AS dataset_short_name "
+ "FROM GenoFreeze "
+ "WHERE "
+ "public > %s "
+ "AND "
+ "(Name IN ({names}) OR FullName IN ({names}) OR ShortName IN ({names}))")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query.format(names=", ".join(["%s"] * len(dataset_names))),
+ (threshold,) + (tuple(dataset_names) * 3))
+ return {ds["dataset_name"]: ds for ds in cursor.fetchall()}
+ return {}
+
+def geno_datasets_groups(conn, dataset_names):
+ """
+ Retrieve the Group, and GroupID values for various Geno trait types.
+ """
+ query = (
+ "SELECT GenoFreeze.Name AS dataset_name, InbredSet.Name, InbredSet.Id "
+ "FROM InbredSet, GenoFreeze "
+ "WHERE GenoFreeze.InbredSetId = InbredSet.Id "
+ f"AND GenoFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, tuple(dataset_names))
+ return organise_groups_by_dataset(cursor.fetchall())
+ return {}
+
+def geno_traits_datasets(conn: Any, threshold: int, traits: Tuple[Dict]):
+ """Retrieve datasets for 'Geno' traits."""
+ dataset_names = tuple(set(trait["db"]["dataset_name"] for trait in traits))
+ dataset_names_info = geno_datasets_names(conn, threshold, dataset_names)
+ dataset_groups = geno_datasets_groups(conn, dataset_names)
+ return tuple({
+ **trait,
+ "db": {
+ **trait["db"],
+ **dataset_names_info.get(trait["db"]["dataset_name"], {}),
+ **dataset_groups.get(trait["db"]["dataset_name"], {})
+ }
+ } for trait in traits)
+
+def temp_datasets_groups(conn, dataset_names):
+ """
+ Retrieve the Group, and GroupID values for `Temp` trait types.
+ """
+ query = (
+ "SELECT Temp.Name AS dataset_name, InbredSet.Name, InbredSet.Id "
+ "FROM InbredSet, Temp "
+ "WHERE Temp.InbredSetId = InbredSet.Id "
+ f"AND Temp.Name IN ({', '.join(['%s'] * len(dataset_names))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, tuple(dataset_names))
+ return organise_groups_by_dataset(cursor.fetchall())
+ return {}
+
+def temp_traits_datasets(conn: Any, threshold: int, traits: Tuple[Dict]): #pylint: disable=[W0613]
+ """
+ Retrieve datasets for 'Temp' traits.
+ """
+ dataset_names = tuple(set(trait["db"]["dataset_name"] for trait in traits))
+ dataset_groups = temp_datasets_groups(conn, dataset_names)
+ return tuple({
+ **trait,
+ "db": {
+ **trait["db"],
+ **dataset_groups.get(trait["db"]["dataset_name"], {})
+ }
+ } for trait in traits)
+
+def set_confidential(traits):
+ """
+ Set the confidential field for traits of type `Publish`.
+ """
+ return tuple({
+ **trait,
+ "confidential": (
+ True if (# pylint: disable=[R1719]
+ trait.get("pre_publication_description")
+ and not trait.get("pubmed_id"))
+ else False)
+ } for trait in traits)
+
+def query_qtl_info(conn, query, traits, dataset_ids):
+ """
+ Utility: Run the `query` to get the QTL information for the given `traits`.
+ """
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ tuple(trait["trait_name"] for trait in traits) + dataset_ids)
+ results = {
+ row["trait_name"]: {
+ key: val for key, val in row if key != "trait_name"
+ } for row in cursor.fetchall()
+ }
+ return tuple(
+ {**trait, **results.get(trait["trait_name"], {})}
+ for trait in traits)
+
+def set_publish_qtl_info(conn, qtl, traits):
+ """
+ Load extra QTL information for `Publish` traits
+ """
+ if qtl:
+ dataset_ids = set(trait["db"]["dataset_id"] for trait in traits)
+ query = (
+ "SELECT PublishXRef.Id AS trait_name, PublishXRef.Locus, "
+ "PublishXRef.LRS, PublishXRef.additive "
+ "FROM PublishXRef, PublishFreeze "
+ f"WHERE PublishXRef.Id IN ({', '.join(['%s'] * len(traits))}) "
+ "AND PublishXRef.InbredSetId = PublishFreeze.InbredSetId "
+ f"AND PublishFreeze.Id IN ({', '.join(['%s'] * len(dataset_ids))})")
+ return query_qtl_info(conn, query, traits, tuple(dataset_ids))
+ return traits
+
+def set_probeset_qtl_info(conn, qtl, traits):
+ """
+ Load extra QTL information for `ProbeSet` traits
+ """
+ if qtl:
+ dataset_ids = tuple(set(trait["db"]["dataset_id"] for trait in traits))
+ query = (
+ "SELECT ProbeSet.Name AS trait_name, ProbeSetXRef.Locus, "
+ "ProbeSetXRef.LRS, ProbeSetXRef.pValue, "
+ "ProbeSetXRef.mean, ProbeSetXRef.additive "
+ "FROM ProbeSetXRef, ProbeSet "
+ "WHERE ProbeSetXRef.ProbeSetId = ProbeSet.Id "
+ f"AND ProbeSet.Name IN ({', '.join(['%s'] * len(traits))}) "
+ "AND ProbeSetXRef.ProbeSetFreezeId IN "
+ f"({', '.join(['%s'] * len(dataset_ids))})")
+ return query_qtl_info(conn, query, traits, tuple(dataset_ids))
+ return traits
+
+def set_sequence(conn, traits):
+ """
+ Retrieve 'ProbeSet' traits sequence information
+ """
+ dataset_names = set(trait["db"]["dataset_name"] for trait in traits)
+ query = (
+ "SELECT ProbeSet.Name as trait_name, ProbeSet.BlatSeq "
+ "FROM ProbeSet, ProbeSetFreeze, ProbeSetXRef "
+ "WHERE ProbeSet.Id=ProbeSetXRef.ProbeSetId "
+ "AND ProbeSetFreeze.Id = ProbeSetXRef.ProbeSetFreezeId "
+ f"AND ProbeSet.Name IN ({', '.join(['%s'] * len(traits))}) "
+ f"AND ProbeSetFreeze.Name IN ({', '.join(['%s'] * len(dataset_names))})")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(
+ query,
+ (tuple(trait["trait_name"] for trait in traits) +
+ tuple(dataset_names)))
+ results = {
+ row["trait_name"]: {
+ key: val for key, val in row.items() if key != "trait_name"
+ } for row in cursor.fetchall()
+ }
+ return tuple(
+ {
+ **trait,
+ **results.get(trait["trait_name"], {})
+ } for trait in traits)
+ return traits
+
+def set_homologene_id(conn, traits):
+ """
+ Retrieve and set the 'homologene_id' values for ProbeSet traits.
+ """
+ geneids = set(trait.get("geneid") for trait in traits if trait["haveinfo"])
+ groups = set(
+ trait["db"].get("group") for trait in traits if trait["haveinfo"])
+ if len(geneids) > 1 and len(groups) > 1:
+ query = (
+ "SELECT InbredSet.Name AS `group`, Homologene.GeneId AS geneid, "
+ "HomologeneId "
+ "FROM Homologene, Species, InbredSet "
+ f"WHERE Homologene.GeneId IN ({', '.join(['%s'] * len(geneids))}) "
+ f"AND InbredSet.Name IN ({', '.join(['%s'] * len(groups))}) "
+ "AND InbredSet.SpeciesId = Species.Id "
+ "AND Species.TaxonomyId = Homologene.TaxonomyId")
+ with conn.cursor(cursorclass=DictCursor) as cursor:
+ cursor.execute(query, (tuple(geneids) + tuple(groups)))
+ results = {
+ row["group"]: {
+ row["geneid"]: {
+ key: val for key, val in row.items()
+ if key not in ("group", "geneid")
+ }
+ } for row in cursor.fetchall()
+ }
+ return tuple(
+ {
+ **trait, **results.get(
+ trait["db"]["group"], {}).get(trait["geneid"], {})
+ } for trait in traits)
+ return traits
+
+def traits_datasets(conn, threshold, traits):
+ """
+ Retrieve datasets for various `traits`.
+ """
+ dataset_fns = {
+ "Temp": temp_traits_datasets,
+ "Geno": geno_traits_datasets,
+ "Publish": publish_traits_datasets,
+ "ProbeSet": probeset_traits_datasets
+ }
+ def __organise_by_type__(acc, trait):
+ dataset_type = trait["db"]["dataset_type"]
+ return {
+ **acc,
+ dataset_type: acc.get(dataset_type, tuple()) + (trait,)
+ }
+ with_datasets = {
+ trait["trait_fullname"]: trait for trait in (
+ item for sublist in (
+ dataset_fns[dtype](conn, threshold, ttraits)
+ for dtype, ttraits
+ in reduce(__organise_by_type__, traits, {}).items())
+ for item in sublist)}
+ return tuple(
+ {**trait, **with_datasets.get(trait["trait_fullname"], {})}
+ for trait in traits)
+
+def traits_info(
+ conn: Any, threshold: int, traits_fullnames: Tuple[str, ...],
+ qtl=None) -> Tuple[Dict[str, Any], ...]:
+ """
+ Retrieve basic trait information for multiple `traits`.
+
+ This is a rework of the `gn3.db.traits.retrieve_trait_info` function.
+ """
+ def __organise_by_dataset_type__(acc, trait):
+ dataset_type = trait["db"]["dataset_type"]
+ return {
+ **acc,
+ dataset_type: acc.get(dataset_type, tuple()) + (trait,)
+ }
+ traits = traits_datasets(
+ conn, threshold,
+ tuple(build_trait_name(trait) for trait in traits_fullnames))
+ traits_fns = {
+ "Publish": compose(
+ set_confidential, partial(set_publish_qtl_info, conn, qtl),
+ partial(publish_traits_info, conn),
+ partial(publish_traits_datasets, conn, threshold)),
+ "ProbeSet": compose(
+ partial(set_sequence, conn),
+ partial(set_probeset_qtl_info, conn, qtl),
+ partial(set_homologene_id, conn),
+ partial(probeset_traits_info, conn),
+ partial(probeset_traits_datasets, conn, threshold)),
+ "Geno": compose(
+ partial(geno_traits_info, conn),
+ partial(geno_traits_datasets, conn, threshold)),
+ "Temp": compose(
+ partial(temp_traits_info, conn),
+ partial(temp_traits_datasets, conn, threshold))
+ }
+ return tuple(
+ trait for sublist in (# type: ignore[var-annotated]
+ traits_fns[dataset_type](traits)
+ for dataset_type, traits
+ in reduce(__organise_by_dataset_type__, traits, {}).items())
+ for trait in sublist)
diff --git a/gn3/db/sample_data.py b/gn3/db/sample_data.py
new file mode 100644
index 0000000..f73954f
--- /dev/null
+++ b/gn3/db/sample_data.py
@@ -0,0 +1,365 @@
+"""Module containing functions that work with sample data"""
+from typing import Any, Tuple, Dict, Callable
+
+import MySQLdb
+
+from gn3.csvcmp import extract_strain_name
+
+
+_MAP = {
+ "PublishData": ("StrainId", "Id", "value"),
+ "PublishSE": ("StrainId", "DataId", "error"),
+ "NStrain": ("StrainId", "DataId", "count"),
+}
+
+
+def __extract_actions(original_data: str,
+ updated_data: str,
+ csv_header: str) -> Dict:
+ """Return a dictionary containing elements that need to be deleted, inserted,
+or updated.
+
+ """
+ result: Dict[str, Any] = {
+ "delete": {"data": [], "csv_header": []},
+ "insert": {"data": [], "csv_header": []},
+ "update": {"data": [], "csv_header": []},
+ }
+ strain_name = ""
+ for _o, _u, _h in zip(original_data.strip().split(","),
+ updated_data.strip().split(","),
+ csv_header.strip().split(",")):
+ if _h == "Strain Name":
+ strain_name = _o
+ if _o == _u: # No change
+ continue
+ if _o and _u == "x": # Deletion
+ result["delete"]["data"].append(_o)
+ result["delete"]["csv_header"].append(_h)
+ elif _o == "x" and _u: # Insert
+ result["insert"]["data"].append(_u)
+ result["insert"]["csv_header"].append(_h)
+ elif _o and _u: # Update
+ result["update"]["data"].append(_u)
+ result["update"]["csv_header"].append(_h)
+ for key, val in result.items():
+ if not val["data"]:
+ result[key] = None
+ else:
+ result[key]["data"] = (f"{strain_name}," +
+ ",".join(result[key]["data"]))
+ result[key]["csv_header"] = ("Strain Name," +
+ ",".join(result[key]["csv_header"]))
+ return result
+
+
+def get_trait_csv_sample_data(conn: Any,
+ trait_name: int, phenotype_id: int) -> str:
+ """Fetch a trait and return it as a csv string"""
+ __query = ("SELECT concat(st.Name, ',', ifnull(pd.value, 'x'), ',', "
+ "ifnull(ps.error, 'x'), ',', ifnull(ns.count, 'x')) as 'Data' "
+ ",ifnull(ca.Name, 'x') as 'CaseAttr', "
+ "ifnull(cxref.value, 'x') as 'Value' "
+ "FROM PublishFreeze pf "
+ "JOIN PublishXRef px ON px.InbredSetId = pf.InbredSetId "
+ "JOIN PublishData pd ON pd.Id = px.DataId "
+ "JOIN Strain st ON pd.StrainId = st.Id "
+ "LEFT JOIN PublishSE ps ON ps.DataId = pd.Id "
+ "AND ps.StrainId = pd.StrainId "
+ "LEFT JOIN NStrain ns ON ns.DataId = pd.Id "
+ "AND ns.StrainId = pd.StrainId "
+ "LEFT JOIN CaseAttributeXRefNew cxref ON "
+ "(cxref.InbredSetId = px.InbredSetId AND "
+ "cxref.StrainId = st.Id) "
+ "LEFT JOIN CaseAttribute ca ON ca.Id = cxref.CaseAttributeId "
+ "WHERE px.Id = %s AND px.PhenotypeId = %s ORDER BY st.Name")
+ case_attr_columns = set()
+ csv_data: Dict = {}
+ with conn.cursor() as cursor:
+ cursor.execute(__query, (trait_name, phenotype_id))
+ for data in cursor.fetchall():
+ if data[1] == "x":
+ csv_data[data[0]] = None
+ else:
+ sample, case_attr, value = data[0], data[1], data[2]
+ if not csv_data.get(sample):
+ csv_data[sample] = {}
+ csv_data[sample][case_attr] = None if value == "x" else value
+ case_attr_columns.add(case_attr)
+ if not case_attr_columns:
+ return ("Strain Name,Value,SE,Count\n" +
+ "\n".join(csv_data.keys()))
+ columns = sorted(case_attr_columns)
+ csv = ("Strain Name,Value,SE,Count," +
+ ",".join(columns) + "\n")
+ for key, value in csv_data.items():
+ if not value:
+ csv += (key + (len(case_attr_columns) * ",x") + "\n")
+ else:
+ vals = [str(value.get(column, "x")) for column in columns]
+ csv += (key + "," + ",".join(vals) + "\n")
+ return csv
+ return "No Sample Data Found"
+
+
+def get_sample_data_ids(conn: Any, publishxref_id: int,
+ phenotype_id: int,
+ strain_name: str) -> Tuple:
+ """Get the strain_id, publishdata_id and inbredset_id for a given strain"""
+ strain_id, publishdata_id, inbredset_id = None, None, None
+ with conn.cursor() as cursor:
+ cursor.execute("SELECT st.id, pd.Id, pf.InbredSetId "
+ "FROM PublishData pd "
+ "JOIN Strain st ON pd.StrainId = st.Id "
+ "JOIN PublishXRef px ON px.DataId = pd.Id "
+ "JOIN PublishFreeze pf ON pf.InbredSetId "
+ "= px.InbredSetId WHERE px.Id = %s "
+ "AND px.PhenotypeId = %s AND st.Name = %s",
+ (publishxref_id, phenotype_id, strain_name))
+ if _result := cursor.fetchone():
+ strain_id, publishdata_id, inbredset_id = _result
+ if not all([strain_id, publishdata_id, inbredset_id]):
+ # Applies for data to be inserted:
+ cursor.execute("SELECT DataId, InbredSetId FROM PublishXRef "
+ "WHERE Id = %s AND PhenotypeId = %s",
+ (publishxref_id, phenotype_id))
+ publishdata_id, inbredset_id = cursor.fetchone()
+ cursor.execute("SELECT Id FROM Strain WHERE Name = %s",
+ (strain_name,))
+ strain_id = cursor.fetchone()[0]
+ return (strain_id, publishdata_id, inbredset_id)
+
+
+# pylint: disable=[R0913, R0914]
+def update_sample_data(conn: Any,
+ trait_name: str,
+ original_data: str,
+ updated_data: str,
+ csv_header: str,
+ phenotype_id: int) -> int:
+ """Given the right parameters, update sample-data from the relevant
+ table."""
+ def __update_data(conn, table, value):
+ if value and value != "x":
+ with conn.cursor() as cursor:
+ sub_query = (" = %s AND ".join(_MAP.get(table)[:2]) +
+ " = %s")
+ _val = _MAP.get(table)[-1]
+ cursor.execute((f"UPDATE {table} SET {_val} = %s "
+ f"WHERE {sub_query}"),
+ (value, strain_id, data_id))
+ return cursor.rowcount
+ return 0
+
+ def __update_case_attribute(conn, value, strain_id,
+ case_attr, inbredset_id):
+ if value != "x":
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "UPDATE CaseAttributeXRefNew "
+ "SET Value = %s "
+ "WHERE StrainId = %s AND CaseAttributeId = "
+ "(SELECT CaseAttributeId FROM "
+ "CaseAttribute WHERE Name = %s) "
+ "AND InbredSetId = %s",
+ (value, strain_id, case_attr, inbredset_id))
+ return cursor.rowcount
+ return 0
+
+ strain_id, data_id, inbredset_id = get_sample_data_ids(
+ conn=conn, publishxref_id=int(trait_name),
+ phenotype_id=phenotype_id,
+ strain_name=extract_strain_name(csv_header, original_data))
+
+ none_case_attrs: Dict[str, Callable] = {
+ "Strain Name": lambda x: 0,
+ "Value": lambda x: __update_data(conn, "PublishData", x),
+ "SE": lambda x: __update_data(conn, "PublishSE", x),
+ "Count": lambda x: __update_data(conn, "NStrain", x),
+ }
+ count = 0
+ try:
+ __actions = __extract_actions(original_data=original_data,
+ updated_data=updated_data,
+ csv_header=csv_header)
+ if __actions.get("update"):
+ _csv_header = __actions["update"]["csv_header"]
+ _data = __actions["update"]["data"]
+ # pylint: disable=[E1101]
+ for header, value in zip(_csv_header.split(","),
+ _data.split(",")):
+ header = header.strip()
+ value = value.strip()
+ if header in none_case_attrs:
+ count += none_case_attrs[header](value)
+ else:
+ count += __update_case_attribute(
+ conn=conn,
+ value=none_case_attrs[header](value),
+ strain_id=strain_id,
+ case_attr=header,
+ inbredset_id=inbredset_id)
+ if __actions.get("delete"):
+ _rowcount = delete_sample_data(
+ conn=conn,
+ trait_name=trait_name,
+ data=__actions["delete"]["data"],
+ csv_header=__actions["delete"]["csv_header"],
+ phenotype_id=phenotype_id)
+ if _rowcount:
+ count += 1
+ if __actions.get("insert"):
+ _rowcount = insert_sample_data(
+ conn=conn,
+ trait_name=trait_name,
+ data=__actions["insert"]["data"],
+ csv_header=__actions["insert"]["csv_header"],
+ phenotype_id=phenotype_id)
+ if _rowcount:
+ count += 1
+ except Exception as _e:
+ conn.rollback()
+ raise MySQLdb.Error(_e) from _e
+ conn.commit()
+ return count
+
+
+def delete_sample_data(conn: Any,
+ trait_name: str,
+ data: str,
+ csv_header: str,
+ phenotype_id: int) -> int:
+ """Given the right parameters, delete sample-data from the relevant
+ tables."""
+ def __delete_data(conn, table):
+ sub_query = (" = %s AND ".join(_MAP.get(table)[:2]) + " = %s")
+ with conn.cursor() as cursor:
+ cursor.execute((f"DELETE FROM {table} "
+ f"WHERE {sub_query}"),
+ (strain_id, data_id))
+ return cursor.rowcount
+
+ def __delete_case_attribute(conn, strain_id,
+ case_attr, inbredset_id):
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "DELETE FROM CaseAttributeXRefNew "
+ "WHERE StrainId = %s AND CaseAttributeId = "
+ "(SELECT CaseAttributeId FROM "
+ "CaseAttribute WHERE Name = %s) "
+ "AND InbredSetId = %s",
+ (strain_id, case_attr, inbredset_id))
+ return cursor.rowcount
+
+ strain_id, data_id, inbredset_id = get_sample_data_ids(
+ conn=conn, publishxref_id=int(trait_name),
+ phenotype_id=phenotype_id,
+ strain_name=extract_strain_name(csv_header, data))
+
+ none_case_attrs: Dict[str, Any] = {
+ "Strain Name": lambda: 0,
+ "Value": lambda: __delete_data(conn, "PublishData"),
+ "SE": lambda: __delete_data(conn, "PublishSE"),
+ "Count": lambda: __delete_data(conn, "NStrain"),
+ }
+ count = 0
+
+ try:
+ for header in csv_header.split(","):
+ header = header.strip()
+ if header in none_case_attrs:
+ count += none_case_attrs[header]()
+ else:
+ count += __delete_case_attribute(
+ conn=conn,
+ strain_id=strain_id,
+ case_attr=header,
+ inbredset_id=inbredset_id)
+ except Exception as _e:
+ conn.rollback()
+ raise MySQLdb.Error(_e) from _e
+ conn.commit()
+ return count
+
+
+# pylint: disable=[R0913, R0914]
+def insert_sample_data(conn: Any,
+ trait_name: str,
+ data: str,
+ csv_header: str,
+ phenotype_id: int) -> int:
+ """Given the right parameters, insert sample-data to the relevant table.
+
+ """
+ def __insert_data(conn, table, value):
+ if value and value != "x":
+ with conn.cursor() as cursor:
+ columns = ", ".join(_MAP.get(table))
+ cursor.execute((f"INSERT INTO {table} "
+ f"({columns}) "
+ f"VALUES (%s, %s, %s)"),
+ (strain_id, data_id, value))
+ return cursor.rowcount
+ return 0
+
+ def __insert_case_attribute(conn, case_attr, value):
+ if value != "x":
+ with conn.cursor() as cursor:
+ cursor.execute("SELECT Id FROM "
+ "CaseAttribute WHERE Name = %s",
+ (case_attr,))
+ if case_attr_id := cursor.fetchone():
+ case_attr_id = case_attr_id[0]
+ cursor.execute("SELECT StrainId FROM "
+ "CaseAttributeXRefNew WHERE StrainId = %s "
+ "AND CaseAttributeId = %s "
+ "AND InbredSetId = %s",
+ (strain_id, case_attr_id, inbredset_id))
+ if (not cursor.fetchone()) and case_attr_id:
+ cursor.execute(
+ "INSERT INTO CaseAttributeXRefNew "
+ "(StrainId, CaseAttributeId, Value, InbredSetId) "
+ "VALUES (%s, %s, %s, %s)",
+ (strain_id, case_attr_id, value, inbredset_id))
+ row_count = cursor.rowcount
+ return row_count
+ return 0
+
+ strain_id, data_id, inbredset_id = get_sample_data_ids(
+ conn=conn, publishxref_id=int(trait_name),
+ phenotype_id=phenotype_id,
+ strain_name=extract_strain_name(csv_header, data))
+
+ none_case_attrs: Dict[str, Any] = {
+ "Strain Name": lambda _: 0,
+ "Value": lambda x: __insert_data(conn, "PublishData", x),
+ "SE": lambda x: __insert_data(conn, "PublishSE", x),
+ "Count": lambda x: __insert_data(conn, "NStrain", x),
+ }
+
+ try:
+ count = 0
+
+ # Check if the data already exists:
+ with conn.cursor() as cursor:
+ cursor.execute(
+ "SELECT Id FROM PublishData where Id = %s "
+ "AND StrainId = %s",
+ (data_id, strain_id))
+ if cursor.fetchone(): # Data already exists
+ return count
+
+ for header, value in zip(csv_header.split(","), data.split(",")):
+ header = header.strip()
+ value = value.strip()
+ if header in none_case_attrs:
+ count += none_case_attrs[header](value)
+ else:
+ count += __insert_case_attribute(
+ conn=conn,
+ case_attr=header,
+ value=value)
+ return count
+ except Exception as _e:
+ conn.rollback()
+ raise MySQLdb.Error(_e) from _e
diff --git a/gn3/db/species.py b/gn3/db/species.py
index 702a9a8..5b8e096 100644
--- a/gn3/db/species.py
+++ b/gn3/db/species.py
@@ -57,3 +57,20 @@ def translate_to_mouse_gene_id(species: str, geneid: int, conn: Any) -> int:
return translated_gene_id[0]
return 0 # default if all else fails
+
+def species_name(conn: Any, group: str) -> str:
+ """
+ Retrieve the name of the species, given the group (RISet).
+
+ This is a migration of the
+ `web.webqtl.dbFunction.webqtlDatabaseFunction.retrieveSpecies` function in
+ GeneNetwork1.
+ """
+ with conn.cursor() as cursor:
+ cursor.execute(
+ ("SELECT Species.Name FROM Species, InbredSet "
+ "WHERE InbredSet.Name = %(group_name)s "
+ "AND InbredSet.SpeciesId = Species.Id"),
+ {"group_name": group})
+ return cursor.fetchone()[0]
+ return None
diff --git a/gn3/db/traits.py b/gn3/db/traits.py
index 1c6aaa7..f722e24 100644
--- a/gn3/db/traits.py
+++ b/gn3/db/traits.py
@@ -1,7 +1,7 @@
"""This class contains functions relating to trait data manipulation"""
import os
from functools import reduce
-from typing import Any, Dict, Union, Sequence
+from typing import Any, Dict, Sequence
from gn3.settings import TMPDIR
from gn3.random import random_string
@@ -67,7 +67,7 @@ def export_trait_data(
return accumulator + (trait_data["data"][sample]["ndata"], )
if dtype == "all":
return accumulator + __export_all_types(trait_data["data"], sample)
- raise KeyError("Type `%s` is incorrect" % dtype)
+ raise KeyError(f"Type `{dtype}` is incorrect")
if var_exists and n_exists:
return accumulator + (None, None, None)
if var_exists or n_exists:
@@ -76,80 +76,6 @@ def export_trait_data(
return reduce(__exporter, samplelist, tuple())
-def get_trait_csv_sample_data(conn: Any,
- trait_name: int, phenotype_id: int):
- """Fetch a trait and return it as a csv string"""
- sql = ("SELECT DISTINCT Strain.Id, PublishData.Id, Strain.Name, "
- "PublishData.value, "
- "PublishSE.error, NStrain.count FROM "
- "(PublishData, Strain, PublishXRef, PublishFreeze) "
- "LEFT JOIN PublishSE ON "
- "(PublishSE.DataId = PublishData.Id AND "
- "PublishSE.StrainId = PublishData.StrainId) "
- "LEFT JOIN NStrain ON (NStrain.DataId = PublishData.Id AND "
- "NStrain.StrainId = PublishData.StrainId) WHERE "
- "PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND "
- "PublishData.Id = PublishXRef.DataId AND "
- "PublishXRef.Id = %s AND PublishXRef.PhenotypeId = %s "
- "AND PublishData.StrainId = Strain.Id Order BY Strain.Name")
- csv_data = ["Strain Id,Strain Name,Value,SE,Count"]
- publishdata_id = ""
- with conn.cursor() as cursor:
- cursor.execute(sql, (trait_name, phenotype_id,))
- for record in cursor.fetchall():
- (strain_id, publishdata_id,
- strain_name, value, error, count) = record
- csv_data.append(
- ",".join([str(val) if val else "x"
- for val in (strain_id, strain_name,
- value, error, count)]))
- return f"# Publish Data Id: {publishdata_id}\n\n" + "\n".join(csv_data)
-
-
-def update_sample_data(conn: Any,
- strain_name: str,
- strain_id: int,
- publish_data_id: int,
- value: Union[int, float, str],
- error: Union[int, float, str],
- count: Union[int, str]):
- """Given the right parameters, update sample-data from the relevant
- table."""
- # pylint: disable=[R0913, R0914, C0103]
- STRAIN_ID_SQL: str = "UPDATE Strain SET Name = %s WHERE Id = %s"
- PUBLISH_DATA_SQL: str = ("UPDATE PublishData SET value = %s "
- "WHERE StrainId = %s AND Id = %s")
- PUBLISH_SE_SQL: str = ("UPDATE PublishSE SET error = %s "
- "WHERE StrainId = %s AND DataId = %s")
- N_STRAIN_SQL: str = ("UPDATE NStrain SET count = %s "
- "WHERE StrainId = %s AND DataId = %s")
-
- updated_strains: int = 0
- updated_published_data: int = 0
- updated_se_data: int = 0
- updated_n_strains: int = 0
-
- with conn.cursor() as cursor:
- # Update the Strains table
- cursor.execute(STRAIN_ID_SQL, (strain_name, strain_id))
- updated_strains = cursor.rowcount
- # Update the PublishData table
- cursor.execute(PUBLISH_DATA_SQL,
- (None if value == "x" else value,
- strain_id, publish_data_id))
- updated_published_data = cursor.rowcount
- # Update the PublishSE table
- cursor.execute(PUBLISH_SE_SQL,
- (None if error == "x" else error,
- strain_id, publish_data_id))
- updated_se_data = cursor.rowcount
- # Update the NStrain table
- cursor.execute(N_STRAIN_SQL,
- (None if count == "x" else count,
- strain_id, publish_data_id))
- updated_n_strains = cursor.rowcount
- return (updated_strains, updated_published_data,
- updated_se_data, updated_n_strains)
def retrieve_publish_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"""Retrieve trait information for type `Publish` traits.
@@ -177,24 +103,24 @@ def retrieve_publish_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"PublishXRef.comments")
query = (
"SELECT "
- "{columns} "
+ f"{columns} "
"FROM "
- "PublishXRef, Publication, Phenotype, PublishFreeze "
+ "PublishXRef, Publication, Phenotype "
"WHERE "
"PublishXRef.Id = %(trait_name)s AND "
"Phenotype.Id = PublishXRef.PhenotypeId AND "
"Publication.Id = PublishXRef.PublicationId AND "
- "PublishXRef.InbredSetId = PublishFreeze.InbredSetId AND "
- "PublishFreeze.Id =%(trait_dataset_id)s").format(columns=columns)
+ "PublishXRef.InbredSetId = %(trait_dataset_id)s")
with conn.cursor() as cursor:
cursor.execute(
query,
{
- k:v for k, v in trait_data_source.items()
+ k: v for k, v in trait_data_source.items()
if k in ["trait_name", "trait_dataset_id"]
})
return dict(zip([k.lower() for k in keys], cursor.fetchone()))
+
def set_confidential_field(trait_type, trait_info):
"""Post processing function for 'Publish' trait types.
@@ -207,6 +133,7 @@ def set_confidential_field(trait_type, trait_info):
and not trait_info.get("pubmed_id", None)) else 0}
return trait_info
+
def retrieve_probeset_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"""Retrieve trait information for type `ProbeSet` traits.
@@ -219,67 +146,68 @@ def retrieve_probeset_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"probe_set_specificity", "probe_set_blat_score",
"probe_set_blat_mb_start", "probe_set_blat_mb_end", "probe_set_strand",
"probe_set_note_by_rw", "flag")
+ columns = (f"ProbeSet.{x}" for x in keys)
query = (
- "SELECT "
- "{columns} "
+ f"SELECT {', '.join(columns)} "
"FROM "
"ProbeSet, ProbeSetFreeze, ProbeSetXRef "
"WHERE "
"ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id AND "
"ProbeSetXRef.ProbeSetId = ProbeSet.Id AND "
"ProbeSetFreeze.Name = %(trait_dataset_name)s AND "
- "ProbeSet.Name = %(trait_name)s").format(
- columns=", ".join(["ProbeSet.{}".format(x) for x in keys]))
+ "ProbeSet.Name = %(trait_name)s")
with conn.cursor() as cursor:
cursor.execute(
query,
{
- k:v for k, v in trait_data_source.items()
+ k: v for k, v in trait_data_source.items()
if k in ["trait_name", "trait_dataset_name"]
})
return dict(zip(keys, cursor.fetchone()))
+
def retrieve_geno_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"""Retrieve trait information for type `Geno` traits.
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlTrait.py#L438-L449"""
keys = ("name", "chr", "mb", "source2", "sequence")
+ columns = ", ".join(f"Geno.{x}" for x in keys)
query = (
- "SELECT "
- "{columns} "
+ f"SELECT {columns} "
"FROM "
- "Geno, GenoFreeze, GenoXRef "
+ "Geno INNER JOIN GenoXRef ON GenoXRef.GenoId = Geno.Id "
+ "INNER JOIN GenoFreeze ON GenoFreeze.Id = GenoXRef.GenoFreezeId "
"WHERE "
- "GenoXRef.GenoFreezeId = GenoFreeze.Id AND GenoXRef.GenoId = Geno.Id AND "
"GenoFreeze.Name = %(trait_dataset_name)s AND "
- "Geno.Name = %(trait_name)s").format(
- columns=", ".join(["Geno.{}".format(x) for x in keys]))
+ "Geno.Name = %(trait_name)s")
with conn.cursor() as cursor:
cursor.execute(
query,
{
- k:v for k, v in trait_data_source.items()
+ k: v for k, v in trait_data_source.items()
if k in ["trait_name", "trait_dataset_name"]
})
return dict(zip(keys, cursor.fetchone()))
+
def retrieve_temp_trait_info(trait_data_source: Dict[str, Any], conn: Any):
"""Retrieve trait information for type `Temp` traits.
https://github.com/genenetwork/genenetwork1/blob/master/web/webqtl/base/webqtlTrait.py#L450-452"""
keys = ("name", "description")
query = (
- "SELECT {columns} FROM Temp "
- "WHERE Name = %(trait_name)s").format(columns=", ".join(keys))
+ f"SELECT {', '.join(keys)} FROM Temp "
+ "WHERE Name = %(trait_name)s")
with conn.cursor() as cursor:
cursor.execute(
query,
{
- k:v for k, v in trait_data_source.items()
+ k: v for k, v in trait_data_source.items()
if k in ["trait_name"]
})
return dict(zip(keys, cursor.fetchone()))
+
def set_haveinfo_field(trait_info):
"""
Common postprocessing function for all trait types.
@@ -287,6 +215,7 @@ def set_haveinfo_field(trait_info):
Sets the value for the 'haveinfo' field."""
return {**trait_info, "haveinfo": 1 if trait_info else 0}
+
def set_homologene_id_field_probeset(trait_info, conn):
"""
Postprocessing function for 'ProbeSet' traits.
@@ -302,7 +231,7 @@ def set_homologene_id_field_probeset(trait_info, conn):
cursor.execute(
query,
{
- k:v for k, v in trait_info.items()
+ k: v for k, v in trait_info.items()
if k in ["geneid", "group"]
})
res = cursor.fetchone()
@@ -310,12 +239,13 @@ def set_homologene_id_field_probeset(trait_info, conn):
return {**trait_info, "homologeneid": res[0]}
return {**trait_info, "homologeneid": None}
+
def set_homologene_id_field(trait_type, trait_info, conn):
"""
Common postprocessing function for all trait types.
Sets the value for the 'homologene' key."""
- set_to_null = lambda ti: {**ti, "homologeneid": None}
+ def set_to_null(ti): return {**ti, "homologeneid": None} # pylint: disable=[C0103, C0321]
functions_table = {
"Temp": set_to_null,
"Geno": set_to_null,
@@ -324,6 +254,7 @@ def set_homologene_id_field(trait_type, trait_info, conn):
}
return functions_table[trait_type](trait_info)
+
def load_publish_qtl_info(trait_info, conn):
"""
Load extra QTL information for `Publish` traits
@@ -344,6 +275,7 @@ def load_publish_qtl_info(trait_info, conn):
return dict(zip(["locus", "lrs", "additive"], cursor.fetchone()))
return {"locus": "", "lrs": "", "additive": ""}
+
def load_probeset_qtl_info(trait_info, conn):
"""
Load extra QTL information for `ProbeSet` traits
@@ -366,6 +298,7 @@ def load_probeset_qtl_info(trait_info, conn):
["locus", "lrs", "pvalue", "mean", "additive"], cursor.fetchone()))
return {"locus": "", "lrs": "", "pvalue": "", "mean": "", "additive": ""}
+
def load_qtl_info(qtl, trait_type, trait_info, conn):
"""
Load extra QTL information for traits
@@ -389,11 +322,12 @@ def load_qtl_info(qtl, trait_type, trait_info, conn):
"Publish": load_publish_qtl_info,
"ProbeSet": load_probeset_qtl_info
}
- if trait_info["name"] not in qtl_info_functions.keys():
+ if trait_info["name"] not in qtl_info_functions:
return trait_info
return qtl_info_functions[trait_type](trait_info, conn)
+
def build_trait_name(trait_fullname):
"""
Initialises the trait's name, and other values from the search data provided
@@ -408,7 +342,7 @@ def build_trait_name(trait_fullname):
return "ProbeSet"
name_parts = trait_fullname.split("::")
- assert len(name_parts) >= 2, "Name format error"
+ assert len(name_parts) >= 2, f"Name format error: '{trait_fullname}'"
dataset_name = name_parts[0]
dataset_type = dataset_type(dataset_name)
return {
@@ -420,6 +354,7 @@ def build_trait_name(trait_fullname):
"cellid": name_parts[2] if len(name_parts) == 3 else ""
}
+
def retrieve_probeset_sequence(trait, conn):
"""
Retrieve a 'ProbeSet' trait's sequence information
@@ -441,6 +376,7 @@ def retrieve_probeset_sequence(trait, conn):
seq = cursor.fetchone()
return {**trait, "sequence": seq[0] if seq else ""}
+
def retrieve_trait_info(
threshold: int, trait_full_name: str, conn: Any,
qtl=None):
@@ -496,6 +432,7 @@ def retrieve_trait_info(
}
return trait_info
+
def retrieve_temp_trait_data(trait_info: dict, conn: Any):
"""
Retrieve trait data for `Temp` traits.
@@ -514,10 +451,12 @@ def retrieve_temp_trait_data(trait_info: dict, conn: Any):
query,
{"trait_name": trait_info["trait_name"]})
return [dict(zip(
- ["sample_name", "value", "se_error", "nstrain", "id"], row))
+ ["sample_name", "value", "se_error", "nstrain", "id"],
+ row))
for row in cursor.fetchall()]
return []
+
def retrieve_species_id(group, conn: Any):
"""
Retrieve a species id given the Group value
@@ -529,6 +468,7 @@ def retrieve_species_id(group, conn: Any):
return cursor.fetchone()[0]
return None
+
def retrieve_geno_trait_data(trait_info: Dict, conn: Any):
"""
Retrieve trait data for `Geno` traits.
@@ -552,11 +492,14 @@ def retrieve_geno_trait_data(trait_info: Dict, conn: Any):
"dataset_name": trait_info["db"]["dataset_name"],
"species_id": retrieve_species_id(
trait_info["db"]["group"], conn)})
- return [dict(zip(
- ["sample_name", "value", "se_error", "id"], row))
- for row in cursor.fetchall()]
+ return [
+ dict(zip(
+ ["sample_name", "value", "se_error", "id"],
+ row))
+ for row in cursor.fetchall()]
return []
+
def retrieve_publish_trait_data(trait_info: Dict, conn: Any):
"""
Retrieve trait data for `Publish` traits.
@@ -565,17 +508,16 @@ def retrieve_publish_trait_data(trait_info: Dict, conn: Any):
"SELECT "
"Strain.Name, PublishData.value, PublishSE.error, NStrain.count, "
"PublishData.Id "
- "FROM (PublishData, Strain, PublishXRef, PublishFreeze) "
+ "FROM (PublishData, Strain, PublishXRef) "
"LEFT JOIN PublishSE ON "
"(PublishSE.DataId = PublishData.Id "
"AND PublishSE.StrainId = PublishData.StrainId) "
"LEFT JOIN NStrain ON "
"(NStrain.DataId = PublishData.Id "
"AND NStrain.StrainId = PublishData.StrainId) "
- "WHERE PublishXRef.InbredSetId = PublishFreeze.InbredSetId "
- "AND PublishData.Id = PublishXRef.DataId "
+ "WHERE PublishData.Id = PublishXRef.DataId "
"AND PublishXRef.Id = %(trait_name)s "
- "AND PublishFreeze.Id = %(dataset_id)s "
+ "AND PublishXRef.InbredSetId = %(dataset_id)s "
"AND PublishData.StrainId = Strain.Id "
"ORDER BY Strain.Name")
with conn.cursor() as cursor:
@@ -583,11 +525,13 @@ def retrieve_publish_trait_data(trait_info: Dict, conn: Any):
query,
{"trait_name": trait_info["trait_name"],
"dataset_id": trait_info["db"]["dataset_id"]})
- return [dict(zip(
- ["sample_name", "value", "se_error", "nstrain", "id"], row))
- for row in cursor.fetchall()]
+ return [
+ dict(zip(
+ ["sample_name", "value", "se_error", "nstrain", "id"], row))
+ for row in cursor.fetchall()]
return []
+
def retrieve_cellid_trait_data(trait_info: Dict, conn: Any):
"""
Retrieve trait data for `Probe Data` types.
@@ -616,11 +560,13 @@ def retrieve_cellid_trait_data(trait_info: Dict, conn: Any):
{"cellid": trait_info["cellid"],
"trait_name": trait_info["trait_name"],
"dataset_id": trait_info["db"]["dataset_id"]})
- return [dict(zip(
- ["sample_name", "value", "se_error", "id"], row))
- for row in cursor.fetchall()]
+ return [
+ dict(zip(
+ ["sample_name", "value", "se_error", "id"], row))
+ for row in cursor.fetchall()]
return []
+
def retrieve_probeset_trait_data(trait_info: Dict, conn: Any):
"""
Retrieve trait data for `ProbeSet` traits.
@@ -645,11 +591,13 @@ def retrieve_probeset_trait_data(trait_info: Dict, conn: Any):
query,
{"trait_name": trait_info["trait_name"],
"dataset_name": trait_info["db"]["dataset_name"]})
- return [dict(zip(
- ["sample_name", "value", "se_error", "id"], row))
- for row in cursor.fetchall()]
+ return [
+ dict(zip(
+ ["sample_name", "value", "se_error", "id"], row))
+ for row in cursor.fetchall()]
return []
+
def with_samplelist_data_setup(samplelist: Sequence[str]):
"""
Build function that computes the trait data from provided list of samples.
@@ -676,6 +624,7 @@ def with_samplelist_data_setup(samplelist: Sequence[str]):
return None
return setup_fn
+
def without_samplelist_data_setup():
"""
Build function that computes the trait data.
@@ -696,6 +645,7 @@ def without_samplelist_data_setup():
return None
return setup_fn
+
def retrieve_trait_data(trait: dict, conn: Any, samplelist: Sequence[str] = tuple()):
"""
Retrieve trait data
@@ -735,14 +685,16 @@ def retrieve_trait_data(trait: dict, conn: Any, samplelist: Sequence[str] = tupl
"data": dict(map(
lambda x: (
x["sample_name"],
- {k:v for k, v in x.items() if x != "sample_name"}),
+ {k: v for k, v in x.items() if x != "sample_name"}),
data))}
return {}
+
def generate_traits_filename(base_path: str = TMPDIR):
"""Generate a unique filename for use with generated traits files."""
- return "{}/traits_test_file_{}.txt".format(
- os.path.abspath(base_path), random_string(10))
+ return (
+ f"{os.path.abspath(base_path)}/traits_test_file_{random_string(10)}.txt")
+
def export_informative(trait_data: dict, inc_var: bool = False) -> tuple:
"""
@@ -765,5 +717,6 @@ def export_informative(trait_data: dict, inc_var: bool = False) -> tuple:
return acc
return reduce(
__exporter__,
- filter(lambda td: td["value"] is not None, trait_data["data"].values()),
+ filter(lambda td: td["value"] is not None,
+ trait_data["data"].values()),
(tuple(), tuple(), tuple()))
diff --git a/gn3/db_utils.py b/gn3/db_utils.py
index 7263705..3b72d28 100644
--- a/gn3/db_utils.py
+++ b/gn3/db_utils.py
@@ -14,10 +14,7 @@ def parse_db_url() -> Tuple:
parsed_db.password, parsed_db.path[1:])
-def database_connector() -> Tuple:
+def database_connector() -> mdb.Connection:
"""function to create db connector"""
host, user, passwd, db_name = parse_db_url()
- conn = mdb.connect(host, user, passwd, db_name)
- cursor = conn.cursor()
-
- return (conn, cursor)
+ return mdb.connect(host, user, passwd, db_name)
diff --git a/gn3/fs_helpers.py b/gn3/fs_helpers.py
index 73f6567..f313086 100644
--- a/gn3/fs_helpers.py
+++ b/gn3/fs_helpers.py
@@ -41,7 +41,7 @@ def get_dir_hash(directory: str) -> str:
def jsonfile_to_dict(json_file: str) -> Dict:
"""Give a JSON_FILE, return a python dict"""
- with open(json_file) as _file:
+ with open(json_file, encoding="utf-8") as _file:
data = json.load(_file)
return data
raise FileNotFoundError
@@ -71,9 +71,8 @@ contents to TARGET_DIR/<dir-hash>.
os.mkdir(os.path.join(target_dir, token))
gzipped_file.save(tar_target_loc)
# Extract to "tar_target_loc/token"
- tar = tarfile.open(tar_target_loc)
- tar.extractall(path=os.path.join(target_dir, token))
- tar.close()
+ with tarfile.open(tar_target_loc) as tar:
+ tar.extractall(path=os.path.join(target_dir, token))
# pylint: disable=W0703
except Exception:
return {"status": 128, "error": "gzip failed to unpack file"}
diff --git a/gn3/heatmaps.py b/gn3/heatmaps.py
index bf9dfd1..91437bb 100644
--- a/gn3/heatmaps.py
+++ b/gn3/heatmaps.py
@@ -40,16 +40,15 @@ def trait_display_name(trait: Dict):
if trait["db"]["dataset_type"] == "Temp":
desc = trait["description"]
if desc.find("PCA") >= 0:
- return "%s::%s" % (
- trait["db"]["displayname"],
- desc[desc.rindex(':')+1:].strip())
- return "%s::%s" % (
- trait["db"]["displayname"],
- desc[:desc.index('entered')].strip())
- prefix = "%s::%s" % (
- trait["db"]["dataset_name"], trait["trait_name"])
+ return (
+ f'{trait["db"]["displayname"]}::'
+ f'{desc[desc.rindex(":")+1:].strip()}')
+ return (
+ f'{trait["db"]["displayname"]}::'
+ f'{desc[:desc.index("entered")].strip()}')
+ prefix = f'{trait["db"]["dataset_name"]}::{trait["trait_name"]}'
if trait["cellid"]:
- return "%s::%s" % (prefix, trait["cellid"])
+ return '{prefix}::{trait["cellid"]}'
return prefix
return trait["description"]
@@ -64,11 +63,7 @@ def cluster_traits(traits_data_list: Sequence[Dict]):
def __compute_corr(tdata_i, tdata_j):
if tdata_i[0] == tdata_j[0]:
return 0.0
- corr_vals = compute_correlation(tdata_i[1], tdata_j[1])
- corr = corr_vals[0]
- if (1 - corr) < 0:
- return 0.0
- return 1 - corr
+ return 1 - compute_correlation(tdata_i[1], tdata_j[1])[0]
def __cluster(tdata_i):
return tuple(
@@ -136,8 +131,7 @@ def build_heatmap(
traits_order = compute_traits_order(slinked)
samples_and_values = retrieve_samples_and_values(
traits_order, samples, exported_traits_data_list)
- traits_filename = "{}/traits_test_file_{}.txt".format(
- TMPDIR, random_string(10))
+ traits_filename = f"{TMPDIR}/traits_test_file_{random_string(10)}.txt"
generate_traits_file(
samples_and_values[0][1],
[t[2] for t in samples_and_values],
@@ -314,7 +308,7 @@ def clustered_heatmap(
vertical_spacing=0.010,
horizontal_spacing=0.001,
subplot_titles=["" if vertical else x_axis["label"]] + [
- "Chromosome: {}".format(chromo) if vertical else chromo
+ f"Chromosome: {chromo}" if vertical else chromo
for chromo in x_axis_data],#+ x_axis_data,
figure=ff.create_dendrogram(
np.array(clustering_data),
@@ -336,7 +330,7 @@ def clustered_heatmap(
col=(1 if vertical else (i + 2)))
axes_layouts = {
- "{axis}axis{count}".format(
+ "{axis}axis{count}".format( # pylint: disable=[C0209]
axis=("y" if vertical else "x"),
count=(i+1 if i > 0 else "")): {
"mirror": False,
@@ -345,12 +339,10 @@ def clustered_heatmap(
}
for i in range(num_plots)}
- print("vertical?: {} ==> {}".format("T" if vertical else "F", axes_layouts))
-
fig.update_layout({
"width": 800 if vertical else 4000,
"height": 4000 if vertical else 800,
- "{}axis".format("x" if vertical else "y"): {
+ "{}axis".format("x" if vertical else "y"): { # pylint: disable=[C0209]
"mirror": False,
"ticks": "",
"side": "top" if vertical else "left",
@@ -358,7 +350,7 @@ def clustered_heatmap(
"tickangle": 90 if vertical else 0,
"ticklabelposition": "outside top" if vertical else "outside left"
},
- "{}axis".format("y" if vertical else "x"): {
+ "{}axis".format("y" if vertical else "x"): { # pylint: disable=[C0209]
"mirror": False,
"showgrid": True,
"title": "Distance",
diff --git a/gn3/responses/__init__.py b/gn3/responses/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/gn3/responses/__init__.py
diff --git a/gn3/responses/pcorrs_responses.py b/gn3/responses/pcorrs_responses.py
new file mode 100644
index 0000000..d6fd9d7
--- /dev/null
+++ b/gn3/responses/pcorrs_responses.py
@@ -0,0 +1,24 @@
+"""Functions and classes that deal with responses and conversion to JSON."""
+import json
+
+from flask import make_response
+
+class OutputEncoder(json.JSONEncoder):
+ """
+ Class to encode output into JSON, for objects which the default
+ json.JSONEncoder class does not have default encoding for.
+ """
+ def default(self, o):
+ if isinstance(o, bytes):
+ return str(o, encoding="utf-8")
+ return json.JSONEncoder.default(self, o)
+
+def build_response(data):
+ """Build the responses for the API"""
+ status_codes = {
+ "error": 400, "not-found": 404, "success": 200, "exception": 500}
+ response = make_response(
+ json.dumps(data, cls=OutputEncoder),
+ status_codes[data["status"]])
+ response.headers["Content-Type"] = "application/json"
+ return response
diff --git a/gn3/settings.py b/gn3/settings.py
index 57c63df..6eec2a1 100644
--- a/gn3/settings.py
+++ b/gn3/settings.py
@@ -13,11 +13,13 @@ REDIS_JOB_QUEUE = "GN3::job-queue"
TMPDIR = os.environ.get("TMPDIR", tempfile.gettempdir())
RQTL_WRAPPER = "rqtl_wrapper.R"
+# SPARQL endpoint
+SPARQL_ENDPOINT = "http://localhost:8891/sparql"
+
# SQL confs
SQL_URI = os.environ.get(
"SQL_URI", "mysql://webqtlout:webqtlout@localhost/db_webqtl")
SECRET_KEY = "password"
-SQLALCHEMY_TRACK_MODIFICATIONS = False
# gn2 results only used in fetching dataset info
GN2_BASE_URL = "http://www.genenetwork.org/"
@@ -25,11 +27,11 @@ GN2_BASE_URL = "http://www.genenetwork.org/"
# wgcna script
WGCNA_RSCRIPT = "wgcna_analysis.R"
# qtlreaper command
-REAPER_COMMAND = "{}/bin/qtlreaper".format(os.environ.get("GUIX_ENVIRONMENT"))
+REAPER_COMMAND = f"{os.environ.get('GUIX_ENVIRONMENT')}/bin/qtlreaper"
# genotype files
GENOTYPE_FILES = os.environ.get(
- "GENOTYPE_FILES", "{}/genotype_files/genotype".format(os.environ.get("HOME")))
+ "GENOTYPE_FILES", f"{os.environ.get('HOME')}/genotype_files/genotype")
# CROSS-ORIGIN SETUP
def parse_env_cors(default):
@@ -53,3 +55,7 @@ CORS_HEADERS = [
GNSHARE = os.environ.get("GNSHARE", "/gnshare/gn/")
TEXTDIR = f"{GNSHARE}/web/ProbeSetFreeze_DataMatrix"
+
+ROUND_TO = 10
+
+MULTIPROCESSOR_PROCS = 6 # Number of processes to spawn
diff --git a/guix-system.scm b/guix-system.scm
new file mode 100644
index 0000000..7142cea
--- /dev/null
+++ b/guix-system.scm
@@ -0,0 +1,121 @@
+(use-modules (gnu)
+ (gn services databases)
+ (gnu packages admin)
+ (gnu services shepherd)
+ (guix derivations)
+ (guix monads)
+ (guix profiles)
+ (guix search-paths)
+ (guix records)
+ (guix store)
+ (ice-9 match))
+
+(define genenetwork3
+ (load "guix.scm"))
+
+(define (packages->profile packages)
+ "Return profile with PACKAGES."
+ (with-store store
+ (run-with-store store
+ (mlet* %store-monad ((prof-drv (profile-derivation
+ (packages->manifest packages)))
+ (profile -> (derivation->output-path prof-drv)))
+ (mbegin %store-monad
+ (built-derivations (list prof-drv))
+ (return profile))))))
+
+(define (packages->environment-variables packages)
+ "Return environment variables of a profile with PACKAGES. Return value is an
+association list mapping the names of environment variables to their values."
+ (map (match-lambda
+ ((search-path . value)
+ (cons (search-path-specification-variable search-path)
+ value)))
+ (profile-search-paths (packages->profile packages))))
+
+(define (packages->profile-environment packages)
+ "Return environment of a profile with PACKAGES. Return value is a
+list of environment variables suitable as input to the environ
+function."
+ (map (match-lambda
+ ((search-path . value)
+ (string-append (search-path-specification-variable search-path)
+ "=" value)))
+ (profile-search-paths (packages->profile packages))))
+
+(define-record-type* <genenetwork3-configuration>
+ genenetwork3-configuration make-genenetwork3-configuration
+ genenetwork3-configuration?
+ (package genenetwork3-configuration-package
+ (default genenetwork3))
+ (port genenetwork3-configuration-port
+ (default 5000)))
+
+(define %genenetwork3-accounts
+ (list (user-group (name "genenetwork3")
+ (system? #t))
+ (user-account
+ (name "genenetwork3")
+ (group "genenetwork3")
+ (system? #t)
+ (comment "GeneNetwork 3 user")
+ (home-directory "/var/empty")
+ (shell (file-append shadow "/sbin/nologin")))))
+
+;; FIXME: Factorize this service into two. We should have a gunicorn
+;; service that is extended by the genenetwork service. This way, the
+;; app is better decoupled from the deployment.
+(define genenetwork3-shepherd-service
+ (match-lambda
+ (($ <genenetwork3-configuration> package port)
+ (shepherd-service
+ (documentation "Run GeneNetwork 3.")
+ (provision '(genenetwork3))
+ (requirement '(networking virtuoso))
+ (start #~(begin
+ ;; Reference the profile.
+ #$(packages->profile (list package))
+ ;; Start the gunicorn process.
+ (make-forkexec-constructor
+ (list #$(file-append gunicorn "/bin/gunicorn")
+ "-b" #$(string-append "127.0.0.1:" (number->string port))
+ "gn3.app:create_app()")
+ #:user "genenetwork3"
+ #:group "genenetwork3"
+ #:environment-variables
+ '#$(packages->profile-environment (list package)))))
+ (stop #~(make-kill-destructor))))))
+
+(define genenetwork3-service-type
+ (service-type
+ (name 'genenetwork3)
+ (description "Run GeneNetwork 3.")
+ (extensions
+ (list (service-extension account-service-type
+ (const %genenetwork3-accounts))
+ (service-extension shepherd-root-service-type
+ (compose list genenetwork3-shepherd-service))))
+ (default-value (genenetwork3-configuration))))
+
+(operating-system
+ (host-name "genenetwork3")
+ (timezone "UTC")
+ (locale "en_US.utf8")
+ (bootloader (bootloader-configuration
+ (bootloader grub-bootloader)
+ (targets (list "/dev/sdX"))))
+ (file-systems (cons (file-system
+ (device "root")
+ (mount-point "/")
+ (type "ext4"))
+ %base-file-systems))
+ (users %base-user-accounts)
+ (packages %base-packages)
+ (services (cons*
+ ;; (service virtuoso-service-type
+ ;; (virtuoso-configuration
+ ;; (http-server-port 8891)))
+ (service genenetwork3-service-type
+ (genenetwork3-configuration
+ (port 5000)))
+ %base-services)))
diff --git a/guix.scm b/guix.scm
index a48b05a..943c80e 100644
--- a/guix.scm
+++ b/guix.scm
@@ -17,16 +17,13 @@
;;; You should have received a copy of the GNU General Public License
;;; along with genenetwork3. If not, see https://www.gnu.org/licenses/.
-;; To use this file to build HEAD of gemma:
-;;
-;; env GUIX_PACKAGE_PATH=~/guix-bioinformatics/ guix build -f guix.scm
-;;
-;; After checking out the git repo
-;; cd ~ ; git clone https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics
+;; Make sure you have the
+;; https://git.genenetwork.org/guix-bioinformatics/guix-bioinformatics channel
+;; set up.
;;
;; To get a development container (e.g., run in emacs shell).
;;
-;; env GUIX_PACKAGE_PATH=~/guix-bioinformatics/ guix environment -C -l guix.scm
+;; guix shell -C -Df guix.scm
(use-modules (gn packages gemma)
(gn packages python)
@@ -45,6 +42,7 @@
(gnu packages python-web)
(gnu packages python-xyz)
(gnu packages python-science)
+ (gnu packages rdf)
((guix build utils) #:select (with-directory-excursion))
(guix build-system python)
(guix gexp)
@@ -54,44 +52,8 @@
(define %source-dir (dirname (current-filename)))
-
(package
- (name "genenetwork3.git")
- (version "0.1.0")
+ (inherit genenetwork3)
(source (local-file %source-dir "genenetwork3-checkout"
#:recursive? #t
- #:select? (git-predicate %source-dir)))
- (propagated-inputs `(("coreutils" ,coreutils)
- ("gemma-wrapper" ,gemma-wrapper)
- ("gunicorn" ,gunicorn)
- ("python" ,python-wrapper)
- ("python-bcrypt" ,python-bcrypt)
- ("python-flask" ,python-flask)
- ("python-flask-cors" ,python-flask-cors)
- ("python-ipfshttpclient" ,python-ipfshttpclient)
- ("python-mypy" ,python-mypy)
- ("python-mypy-extensions" ,python-mypy-extensions)
- ("python-mysqlclient" ,python-mysqlclient)
- ("python-numpy" ,python-numpy)
- ("python-plotly" ,python-plotly)
- ("python-pylint" ,python-pylint)
- ("python-redis" ,python-redis)
- ("python-requests" ,python-requests)
- ("python-scipy" ,python-scipy)
- ("python-flask-socketio" ,python-flask-socketio)
- ("python-sqlalchemy-stubs"
- ,python-sqlalchemy-stubs)
- ("r-optparse" ,r-optparse)
- ("r-qtl" ,r-qtl)
- ("r-stringi" ,r-stringi)
- ("r-wgcna" ,r-wgcna)
- ("r-rjson" ,r-rjson)
- ("python-plotly" ,python-plotly)
- ("python-pandas" ,python-pandas)
- ("python-pingouin" ,python-pingouin)
- ("rust-qtlreaper" ,rust-qtlreaper)))
- (build-system python-build-system)
- (home-page "https://github.com/genenetwork/genenetwork3")
- (synopsis "GeneNetwork3 API for data science and machine learning.")
- (description "GeneNetwork3 API for data science and machine learning.")
- (license agpl3+))
+ #:select? (git-predicate %source-dir))))
diff --git a/mypy.ini b/mypy.ini
index b0c48df..7497c17 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -19,4 +19,22 @@ ignore_missing_imports = True
ignore_missing_imports = True
[mypy-requests.*]
+ignore_missing_imports = True
+
+[mypy-flask.*]
+ignore_missing_imports = True
+
+[mypy-werkzeug.*]
+ignore_missing_imports = True
+
+[mypy-SPARQLWrapper.*]
+ignore_missing_imports = True
+
+[mypy-pandas.*]
+ignore_missing_imports = True
+
+[mypy-pytest.*]
+ignore_missing_imports = True
+
+[mypy-sklearn.*]
ignore_missing_imports = True \ No newline at end of file
diff --git a/pytest.ini b/pytest.ini
new file mode 100644
index 0000000..3fc29c6
--- /dev/null
+++ b/pytest.ini
@@ -0,0 +1,8 @@
+[pytest]
+addopts = --strict-markers
+markers =
+ slow
+ unit_test
+ integration_test
+ performance_test
+ under_dev \ No newline at end of file
diff --git a/requirements.txt b/requirements.txt
index 54c04a6..e268674 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -35,4 +35,4 @@ Werkzeug==1.0.1
wrapt==1.12.1
plotly==4.14.3
flask-cors==3.0.9
-pingouin==0.3.12
+pingouin
diff --git a/scripts/ctl_analysis.R b/scripts/ctl_analysis.R
new file mode 100644
index 0000000..e06ac25
--- /dev/null
+++ b/scripts/ctl_analysis.R
@@ -0,0 +1,217 @@
+
+library(ctl)
+library(stringi);
+library(rjson)
+
+options(stringsAsFactors = FALSE);
+
+args = commandArgs(trailingOnly=TRUE)
+
+imgDir = Sys.getenv("GENERATED_IMAGE_DIR")
+
+if (length(args)==0) {
+ stop("Argument for the data file", call.=FALSE)
+} else {
+
+ json_file_path = args[1]
+}
+
+json_file_path
+# add validation for the files
+input <- fromJSON(file = json_file_path)
+
+
+cat("The input data is \n")
+
+
+genoData <- input$genoData
+phenoData <- input$phenoData
+
+parametric <- switch(
+ input$parametric,
+ "True" = TRUE,
+ "False" = FALSE
+
+ )
+# create the matixes
+
+# genotypes Matrix of genotypes. (individuals x markers)
+# phenotypes Matrix of phenotypes. (individuals x phenotypes)
+
+geno_matrix = t(matrix(unlist(genoData$genotypes),
+ nrow=length(genoData$markernames), ncol=length(genoData$individuals),
+ dimnames=list(genoData$markernames, genoData$individuals), byrow=TRUE))
+
+
+pheno_matrix = t(matrix(as.numeric(unlist(phenoData$traits)), nrow=length(phenoData$trait_db_list), ncol=length(
+ phenoData$individuals), dimnames= list(phenoData$trait_db_list, phenoData$individuals), byrow=TRUE))
+
+ctls <- CTLscan(geno_matrix,pheno_matrix,nperm=input$nperm,strategy=input$strategy,parametric=parametric,nthreads=3,verbose=TRUE)
+
+genImageRandStr <- function(prefix){
+
+ randStr <- paste(prefix,stri_rand_strings(1, 9, pattern = "[A-Za-z0-9]"),sep="_")
+
+ return(paste(randStr,".png",sep=""))
+}
+
+
+genRandomFileName <- function(prefix,file_ext=".png"){
+
+ randStr = paste(prefix,stri_rand_strings(1, 9, pattern = "[A-Za-z0-9]"),sep="_")
+
+ return(paste(randStr,file_ext,sep=""))
+}
+
+
+# #output matrix significant CTL interactions with 4 columns: trait, marker, trait, lod
+ctl_significant <- CTLsignificant(ctls,significance = input$significance)
+
+colnames(ctl_significant) = c("trait","marker","trait_2","LOD","dcor")
+
+
+
+imageLoc = file.path(input$imgDir,genRandomFileName("CTLline"))
+
+png(imageLoc,width=1000,height=600,type='cairo-png')
+
+# Create the lineplot
+ctl.lineplot(ctls,significance = input$significance, gap = 50,
+col = "orange", bg.col = "lightgray", cex = 1, verbose = FALSE)
+
+dev.off()
+
+
+n = 2
+ctl_plots = c()
+
+for (trait in phenoData$trait_db_list)
+{
+ image_loc = file.path(input$imgDir,genRandomFileName(paste("CTL",n,sep="")))
+ png(image_loc,width=1000, height=600, type='cairo-png')
+ plot.CTLobject(ctls,n-1,significance= input$significance, main=paste("Phenotype",trait,sep=""))
+
+ ctl_plots = append(ctl_plots,image_loc)
+
+ dev.off()
+ n = n + 1
+
+}
+
+
+
+network_file_name = paste("ctlnet",stri_rand_strings(1, 9, pattern = "[A-Za-z0-9]"),sep="_")
+netfile = file.path(input$imgDir,paste(network_file_name,".sif",sep=""))
+
+nodefile = file.path(input$imgDir,paste(network_file_name,".nodes",sep=""))
+
+# fn overrides ctlnetwork function to target gn2 use case
+
+CTLnetworkGn<- function(CTLobject, mapinfo, significance = 0.05, LODdrop = 2, what = c("names","ids"), short = FALSE, add.qtls = FALSE,verbose = TRUE){
+ if(missing(CTLobject) || is.null(CTLobject)) stop("argument 'CTLobject' is missing, with no default")
+ if("CTLscan" %in% class(CTLobject)) CTLobject = list(CTLobject)
+ if(length(what) > 1) what = what[1]
+
+ results <- NULL
+ significant <- CTLsignificant(CTLobject, significance, what = "ids")
+ if(!is.null(significant)){
+ all_m <- NULL; all_p <- NULL;
+
+
+ cat("",file=netfile); cat("",file=nodefile);
+ if(verbose) cat("NETWORK.SIF\n")
+ edges <- NULL
+ for(x in 1:nrow(significant)){
+ data <- as.numeric(significant[x,])
+ CTLscan <- CTLobject[[data[1]]]
+ markern <- rownames(CTLscan$dcor)
+ traitsn <- colnames(CTLscan$dcor)
+ name <- ctl.name(CTLscan)
+ if(what=="ids"){
+ tid <- which(traitsn %in% ctl.name(CTLobject[[data[1]]]))
+ name <- paste("P",tid,sep="")
+ markern <- paste("M",1:nrow(CTLobject[[data[1]]]$dcor), sep="")
+ traitsn <- paste("P", 1:ncol(CTLobject[[data[1]]]$dcor), sep="")
+ }
+ if(add.qtls){ # Add QTL to the output SIF
+ bfc <- length(CTLscan$qtl)
+ above <- which(CTLscan$qtl > -log10(significance))
+ qtlnms <- names(above); qtlmid <- 1
+ for(m in above){
+ cat(name,"\tQTL\t",markern[m],"\tQTL\t",CTLscan$qtl[m],"\n",sep="",file=netfile,append=TRUE)
+ all_m <- CTLnetwork.addmarker(all_m, mapinfo, markern[data[2]], qtlnms[qtlmid])
+ qtlmid <- qtlmid+1
+ }
+ }
+ lod <- CTLscan$ctl[data[2],data[3]]
+ qlod1 <- CTLscan$qtl[data[2]]
+ qlod2 <- qlod1
+ edgetype <- NA
+ if(length(CTLobject) >= data[3]){ # Edge type based on QTL LOD scores
+ qlod2 <- CTLobject[[data[3]]]$qtl[data[2]]
+ if((qlod1-qlod2) > LODdrop){
+ edgetype <- 1
+ }else if((qlod1-qlod2) < -LODdrop){
+ edgetype <- -1
+ }else{ edgetype <- 0; }
+ } else {
+ cat("Warning: Phenotype", data[3], "from", data[1], "no CTL/QTL information\n")
+ qlod2 <- NA;
+ }
+ #Store the results
+ results <- rbind(results, c(data[1], data[2], data[3], lod, edgetype, qlod1, qlod2))
+
+ if(nodefile == "" && !verbose){ }else{
+ if(short){
+ edge <- paste(name,traitsn[data[3]])
+ edgeI <- paste(traitsn[data[3]],name)
+ if(!edge %in% edges && !edgeI %in% edges){
+ cat(name, "\t", markern[data[2]],"\t", traitsn[data[3]],"\n",file=netfile, append=TRUE,sep="")
+ edges <- c(edges,edge)
+ }
+ }else{
+ cat(name, "\t", "CTL_", data[1],"_",data[3], "\t", markern[data[2]],file=netfile, append=TRUE,sep="")
+ cat("\tCTL\t", lod, "\n", file=netfile, append=TRUE,sep="")
+ cat(markern[data[2]], "\t", "CTL_", data[1],"_",data[3], "\t",file=netfile, append=TRUE,sep="")
+ cat(traitsn[data[3]],"\tCTL\t", lod, "\n", file=netfile,append=TRUE,sep="")
+ }
+ }
+ all_m <- CTLnetwork.addmarker(all_m, mapinfo, markern[data[2]], rownames(CTLscan$dcor)[data[2]])
+ all_p <- unique(c(all_p, name, traitsn[data[3]]))
+ }
+ colnames(results) <- c("TRAIT1","MARKER","TRAIT2","LOD_C","CAUSAL","LOD_T1","LOD_T2")
+ if(verbose) cat("NODE.DESCRIPTION\n")
+ if(nodefile == "" && !verbose){ }else{
+ for(m in all_m){ cat(m,"\n", sep="", file=nodefile, append=TRUE); }
+ for(p in all_p){ cat(p,"\tPHENOTYPE\n", sep="", file=nodefile, append=TRUE); }
+ }
+ }
+ if(!is.null(results)){
+ class(results) <- c(class(results),"CTLnetwork")
+ }
+ invisible(results)
+}
+
+CTLnetwork.addmarker <- function(markers, mapinfo, name, realname){
+ if(!missing(mapinfo)){
+ id <- which(rownames(mapinfo) %in% realname)
+ fname <- paste(name,"\tMARKER\t",mapinfo[id,1],"\t",mapinfo[id,2],sep="")
+ markers <- unique(c(markers, fname))
+ }
+ return(markers)
+}
+
+
+# generating network
+
+
+ctl_network = CTLnetworkGn(ctls, significance = input$significance, LODdrop = 2,short = FALSE, add.qtls = FALSE, verbose = TRUE)
+
+
+
+json_data <- list(phenotypes = input$phenoData$trait_db_list,significance_data = ctl_significant,image_loc = imageLoc,ctl_plots=ctl_plots,network_file_name = network_file_name)
+
+json_data <- toJSON(json_data)
+
+write(json_data,file= json_file_path)
+
diff --git a/scripts/laminar/gn3-lint.sh b/scripts/laminar/gn3-lint.sh
index b6f0c89..1299a96 100644
--- a/scripts/laminar/gn3-lint.sh
+++ b/scripts/laminar/gn3-lint.sh
@@ -4,7 +4,7 @@ set -e # Abort on first error
CUR_DIR=$PWD
GN3_CI_DIR=$HOME/CI/genenetwork3/
-cd $GN3_CI_DIR
+cd "${GN3_CI_DIR}"
git pull
# Run Pylint
@@ -12,4 +12,4 @@ env GUIX_PACKAGE_PATH="$HOME/guix-bioinformatics:$HOME/guix-past/modules" \
guix environment --load=guix.scm -- pylint sheepdog/worker.py gn3/ tests
echo Done Running Pylint!
-cd $CUR_DIR
+cd "${CUR_DIR}"
diff --git a/scripts/laminar/gn3-mypy.sh b/scripts/laminar/gn3-mypy.sh
index a2a9782..6d04c35 100644
--- a/scripts/laminar/gn3-mypy.sh
+++ b/scripts/laminar/gn3-mypy.sh
@@ -4,7 +4,7 @@ set -e # Abort on first error
CUR_DIR=$PWD
GN3_CI_DIR=$HOME/CI/genenetwork3/
-cd $GN3_CI_DIR
+cd "${GN3_CI_DIR}"
git pull
# Run Pylint
@@ -12,4 +12,4 @@ env GUIX_PACKAGE_PATH="$HOME/guix-bioinformatics:$HOME/guix-past/modules" \
guix environment --load=guix.scm -- mypy .
echo Done Running MyPy!
-cd $CUR_DIR
+cd "${CUR_DIR}"
diff --git a/scripts/laminar/gn3-unittest.sh b/scripts/laminar/gn3-unittest.sh
index 41dafe5..d18d5de 100644
--- a/scripts/laminar/gn3-unittest.sh
+++ b/scripts/laminar/gn3-unittest.sh
@@ -4,7 +4,7 @@ set -e # Abort on first error
CUR_DIR=$PWD
GN3_CI_DIR=$HOME/CI/genenetwork3/
-cd $GN3_CI_DIR
+cd "${GN3_CI_DIR}"
git pull
# Run Pylint
@@ -12,4 +12,4 @@ env GUIX_PACKAGE_PATH="$HOME/guix-bioinformatics:$HOME/guix-past/modules" \
guix environment --load=guix.scm -- python -m unittest discover
echo Done Running Unittests!
-cd $CUR_DIR
+cd "${CUR_DIR}"
diff --git a/scripts/partial_correlations.py b/scripts/partial_correlations.py
new file mode 100755
index 0000000..f203daa
--- /dev/null
+++ b/scripts/partial_correlations.py
@@ -0,0 +1,59 @@
+import sys
+import json
+import traceback
+from argparse import ArgumentParser
+
+from gn3.db_utils import database_connector
+from gn3.responses.pcorrs_responses import OutputEncoder
+from gn3.computations.partial_correlations import partial_correlations_entry
+
+def process_cli_arguments():
+ parser = ArgumentParser()
+ parser.add_argument(
+ "primary_trait",
+ help="The primary trait's full name",
+ type=str)
+ parser.add_argument(
+ "control_traits",
+ help="A comma-separated list of traits' full names",
+ type=str)
+ parser.add_argument(
+ "method",
+ help="The correlation method to use",
+ type=str)
+ parser.add_argument(
+ "target_database",
+ help="The target database to run the partial correlations against",
+ type=str)
+ parser.add_argument(
+ "--criteria",
+ help="Number of results to return",
+ type=int, default=500)
+ return parser.parse_args()
+
+def cleanup_string(the_str):
+ return the_str.strip('"\t\n\r ')
+
+def run_partial_corrs(args):
+ with database_connector() as conn:
+ try:
+ return partial_correlations_entry(
+ conn, cleanup_string(args.primary_trait),
+ tuple(cleanup_string(args.control_traits).split(",")),
+ cleanup_string(args.method), args.criteria,
+ cleanup_string(args.target_database))
+ except Exception as exc:
+ print(traceback.format_exc(), file=sys.stderr)
+ return {
+ "status": "exception",
+ "message": traceback.format_exc()
+ }
+
+def enter():
+ args = process_cli_arguments()
+ print(json.dumps(
+ run_partial_corrs(process_cli_arguments()),
+ cls = OutputEncoder))
+
+if __name__ == "__main__":
+ enter()
diff --git a/scripts/rqtl_wrapper.R b/scripts/rqtl_wrapper.R
index eb660b5..ea2c345 100644
--- a/scripts/rqtl_wrapper.R
+++ b/scripts/rqtl_wrapper.R
@@ -172,7 +172,10 @@ verbose_print('Generating cross object\n')
cross_object = geno_to_csvr(geno_file, trait_names, trait_vals, cross_file, type)
# Calculate genotype probabilities
-if (!is.null(opt$interval)) {
+if (!is.null(opt$pairscan)) {
+ verbose_print('Calculating genotype probabilities for pair-scan\n')
+ cross_object <- calc.genoprob(cross_object, step=10)
+} else if (!is.null(opt$interval)) {
verbose_print('Calculating genotype probabilities with interval mapping\n')
cross_object <- calc.genoprob(cross_object, step=5, stepwidth="max")
} else if (!is.null(opt$pairscan)) {
@@ -207,14 +210,19 @@ if (!is.null(opt$addcovar)) {
name <- paste0("T_", covarDescr[x, 1]) # The covar description file doesn't have T_ in trait names (the cross object does)
type <- covarDescr[x, 2]
if(type == "categorical"){
- if(length(table(covars[,name])) > 2){ # More then 2 levels create the model matrix for the factor
- mdata <- data.frame(toExpand = as.factor(covars[, name]))
+ verbose_print('Binding covars to covars\n')
+ if (nrow(covarDescr) < 2){
+ this_covar = covars
+ } else {
+ this_covar = covars[,name]
+ }
+ if(length(table(this_covar)) > 2){ # More then 2 levels create the model matrix for the factor
+ mdata <- data.frame(toExpand = as.factor(this_covar))
options(na.action='na.pass')
modelmatrix <- model.matrix(~ toExpand + 0, mdata)[,-1]
covars <- cbind(covars, modelmatrix)
}else{ # 2 levels? just bind the trait as covar
- verbose_print('Binding covars to covars\n')
- covars <- cbind(covars, covars[,name])
+ covars <- cbind(covars, this_covar)
}
}
}
@@ -236,10 +244,12 @@ if (!is.null(opt$control)) {
}
if (!is.null(opt$pairscan)) {
+ verbose_print("Running scantwo")
scan_func <- function(...){
scantwo(...)
}
} else {
+ verbose_print("Running scanone")
scan_func <- function(...){
scanone(...)
}
diff --git a/scripts/wgcna_analysis.R b/scripts/wgcna_analysis.R
index b0d25a9..d368013 100644
--- a/scripts/wgcna_analysis.R
+++ b/scripts/wgcna_analysis.R
@@ -25,6 +25,7 @@ if (length(args)==0) {
inputData <- fromJSON(file = json_file_path)
imgDir = inputData$TMPDIR
+inputData
trait_sample_data <- do.call(rbind, inputData$trait_sample_data)
@@ -51,10 +52,8 @@ names(dataExpr) = inputData$trait_names
# Allow multi-threading within WGCNA
enableWGCNAThreads()
-# choose softthreshhold (Calculate soft threshold)
-# xtodo allow users to pass args
-
-powers <- c(c(1:10), seq(from = 12, to=20, by=2))
+# powers <- c(c(1:10), seq(from = 12, to=20, by=2))
+powers <- unlist(c(inputData$SoftThresholds))
sft <- pickSoftThreshold(dataExpr, powerVector = powers, verbose = 5)
# check the power estimate
diff --git a/setup.cfg b/setup.cfg
new file mode 100644
index 0000000..41d118e
--- /dev/null
+++ b/setup.cfg
@@ -0,0 +1,4 @@
+[aliases]
+run_unit_tests = run_tests --type=unit
+run_integration_tests = run_tests --type=integration
+run_performance_tests = run_tests --type=performance
diff --git a/setup.py b/setup.py
index 98a076f..9396f59 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,12 @@
#!/usr/bin/env python
"""Basic setup script for gn3"""
from setuptools import setup # type: ignore
+from setup_commands import RunTests
+def long_description():
+ """Retrieve long description from the README file."""
+ with open('README.md', encoding="utf-8") as readme:
+ return readme.read()
setup(author='Bonface M. K.',
author_email='me@bonfacemunyoki.com',
@@ -19,12 +24,11 @@ setup(author='Bonface M. K.',
"redis==3.5.3"
"requests==2.25.1"
"scipy==1.6.0"
- "sqlalchemy-stubs==0.4"
"plotly==4.14.3"
"flask-cors==3.0.9"
],
license='GPLV3',
- long_description=open('README.md').read(),
+ long_description=long_description(),
long_description_content_type='text/markdown',
name='gn3',
packages=[
@@ -35,4 +39,8 @@ setup(author='Bonface M. K.',
'tests'
],
url='https://github.com/genenetwork/genenetwork3',
- version='0.1')
+ version='0.1',
+ tests_require=["pytest", "hypothesis"],
+ cmdclass={
+ "run_tests": RunTests ## testing
+ })
diff --git a/setup_commands/__init__.py b/setup_commands/__init__.py
new file mode 100644
index 0000000..967bb11
--- /dev/null
+++ b/setup_commands/__init__.py
@@ -0,0 +1,3 @@
+"""Module for custom setup commands."""
+
+from .run_tests import RunTests
diff --git a/setup_commands/run_tests.py b/setup_commands/run_tests.py
new file mode 100644
index 0000000..1bb5dab
--- /dev/null
+++ b/setup_commands/run_tests.py
@@ -0,0 +1,40 @@
+import os
+import sys
+from distutils.core import Command
+
+class RunTests(Command):
+ """
+ A custom command to run tests.
+ """
+ description = "Run the tests"
+ test_types = (
+ "all", "unit", "integration", "performance")
+ user_options = [
+ ("type=", None,
+ f"""Specify the type of tests to run.
+ Valid types are {tuple(test_types)}.
+ Default is `all`.""")]
+
+ def __init__(self, dist):
+ """Initialise the command."""
+ super().__init__(dist)
+ self.command = "pytest"
+
+ def initialize_options(self):
+ """Initialise the default values of all the options."""
+ self.type = "all"
+
+ def finalize_options(self):
+ """Set final value of all the options once they are processed."""
+ if self.type not in RunTests.test_types:
+ raise Exception(f"""
+ Invalid test type (self.type) requested!
+ Valid types are
+ {tuple(RunTests.test_types)}""")
+
+ if self.type != "all":
+ self.command = f"pytest -m {self.type}_test"
+ def run(self):
+ """Run the chosen tests"""
+ print(f"Running {self.type} tests")
+ os.system(self.command)
diff --git a/sheepdog/worker.py b/sheepdog/worker.py
index 4e3610e..cf28b74 100644
--- a/sheepdog/worker.py
+++ b/sheepdog/worker.py
@@ -5,9 +5,36 @@ import time
import redis
import redis.connection
-# Enable importing from one dir up since gn3 isn't installed as a globally
-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+# Enable importing from one dir up: put as first to override any other globally
+# accessible GN3
+sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
+def update_status(conn, cmd_id, status):
+ """Helper to update command status"""
+ conn.hset(name=f"{cmd_id}", key="status", value=f"{status}")
+
+def make_incremental_backoff(init_val: float=0.1, maximum: int=420):
+ """
+ Returns a closure that can be used to increment the returned value up to
+ `maximum` or reset it to `init_val`.
+ """
+ current = init_val
+
+ def __increment_or_reset__(command: str, value: float=0.1):
+ nonlocal current
+ if command == "reset":
+ current = init_val
+ return current
+
+ if command == "increment":
+ current = current + abs(value)
+ if current > maximum:
+ current = maximum
+ return current
+
+ return current
+
+ return __increment_or_reset__
def run_jobs(conn):
"""Process the redis using a redis connection, CONN"""
@@ -17,16 +44,21 @@ def run_jobs(conn):
if bool(cmd_id):
cmd = conn.hget(name=cmd_id, key="cmd")
if cmd and (conn.hget(cmd_id, "status") == b"queued"):
- result = run_cmd(cmd.decode("utf-8"))
+ update_status(conn, cmd_id, "running")
+ result = run_cmd(
+ cmd.decode("utf-8"), env=conn.hget(name=cmd_id, key="env"))
conn.hset(name=cmd_id, key="result", value=result.get("output"))
if result.get("code") == 0: # Success
- conn.hset(name=cmd_id, key="status", value="success")
+ update_status(conn, cmd_id, "success")
else:
- conn.hset(name=cmd_id, key="status", value="error")
-
+ update_status(conn, cmd_id, "error")
+ return cmd_id
if __name__ == "__main__":
redis_conn = redis.Redis()
+ sleep_time = make_incremental_backoff()
while True: # Daemon that keeps running forever:
- run_jobs(redis_conn)
- time.sleep(0.1)
+ if run_jobs(redis_conn):
+ time.sleep(sleep_time("reset"))
+ continue
+ time.sleep(sleep_time("increment", sleep_time("return_current")))
diff --git a/sql/map-database.sh b/sql/map-database.sh
deleted file mode 100755
index 2e4d1d7..0000000
--- a/sql/map-database.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#! /bin/sh -e
-
-# This scripts visualizes schema.sql into schema.png and schema.svg. It uses
-# sqlt-graph from the perl-sql-transform package. Sadly, perl-sql-transform is
-# not packaged for Guix yet. We will likely deprecate this script in favor of
-# a custom scheme script that does not depend on perl-sql-transform.
-
-skip_tables=AvgMethod,CeleraINFO_mm6,Chr_Length,DatasetMapInvestigator,DatasetStatus,Dataset_mbat,EnsemblProbe,EnsemblProbeLocation,GORef,GeneCategory,GeneIDXRef,GeneList_rn3,GeneList_rn33,GeneMap_cuiyan,GeneRIFXRef,GenoCode,GenoFile,GenoSE,H2,InfoFiles,InfoFilesUser_md5,LCorrRamin3,RatSnpPattern,Sample,SampleXRef,SnpAllRat,SnpAllele_to_be_deleted,SnpPattern,SnpSource,Vlookup,metadata_audit,pubmedsearch,temporary
-
-clusters="Others=AccessLog,Docs,Investigators,MachineAccessLog,News,Organizations,TableComments,TableFieldAnnotation,User,UserPrivilege,login,role,roles_users,user,user_collection,user_openids"
-
-flags="--db MySQL --skip-tables $skip_tables --cluster $clusters"
-
-sqlt-graph $flags --output-type png --output schema.png schema.sql
-sqlt-graph $flags --output-type svg --output schema.svg schema.sql
diff --git a/sql/schema-from-in-db-documentation.org b/sql/schema-from-in-db-documentation.org
deleted file mode 100644
index 6ed7579..0000000
--- a/sql/schema-from-in-db-documentation.org
+++ /dev/null
@@ -1,1817 +0,0 @@
-This is a description of the GeneNetwork database extracted from the tables
-/TableFieldAnnotation/ and /TableComments/.
-
-* Vlookup
-It's been used by Arthur for annotation updates.
-** alias
-** AlignID
-** assembly
-** AvgMethodId
-** BlatSeq
-** CAS_number
-** cdsEnd
-** cdsStart
-** ChEBI_ID
-** ChEMBL_ID
-** ChemSpider_ID
-** Chr
-** DatasetId
-** description
-** EC_number
-** exonCount
-** exonEnds
-** exonStarts
-** Full_Description
-** GeneChipId
-** GeneId
-** GN_AccesionId
-** HMDB_ID
-** Id
-** InbredSetId
-** InfoFileId
-** InfoPageName
-** KEGG_ID
-** kgID
-** Mb
-** Molecular_Weight
-** Name
-** NM_ID
-** Nugowiki_ID
-** Position
-** Probe_set_Blat_Mb_end
-** Probe_set_Blat_Mb_start
-** ProteinID
-** PubChem_ID
-** SnpName
-** SpeciesId
-** Strand
-** Symbol
-** TissueId
-** TxEnd
-** TxStart
-** UNII_ID
-** VLBlatSeq
-** VLProbeSetId
-
-* user_openids
-TO BE IMPLEMENTED (maybe). Table to link to OpenID. Probably not needed.
-** openid_url
-** user_id
-
-* user_collection
-GN2 user collection of traits.
-** changed_timestamp
-** created_timestamp
-** id
-** members
-** name
-** user
-
-* UserPrivilege
-Used to define if an Assay data set (old "ProbeSetFreeze") can be opened and downloaded.
-** download_result_priv
-** ProbeSetFreezeId
-** UserId
-
-* USER
-GN2 only.
-
-Comment on User type and password.
-This table has 47 users in GN2 as of Mar 2016.
-** active
-** confirmed
-** createtime
-** disable
-** email
-** email_address
-** full_name
-** grpName
-** id
-** lastlogin
-** name
-** organization
-** password
-this is a hash value of user's password
-** privilege
-** registration_info
-** superuser
-** user_ip
-
-* TissueProbeSetData
-These 'Tissue' tables are used by the Tissue Correlation tool in GN1. Not implemented yet in GN2. Mainly Illumina Mouse version 6.1 data.
-** Id
-** TissueID
-** value
-
-* TissueProbeFreeze
-These 'Tissue' tables are used by the Tissue Correlation tool in GN1. Not implemented yet in GN2.
-** ChipId
-** CreateTime
-** FullName
-** Id
-** InbredSetId
-** Name
-** ShortName
-** StrainId
-
-* Tissue
-(RWW Nov 2007): A small table that may be used to build pull-down menus in GN1 and GN2. This table contains simple one to three word terms describing the tissue, cell, organ, or other biological material used in the microarray experiment. This table is used in conjunction with the FIND RECORDS "Type" field.
-
-As of Nov 2007 this table contained only 15 rows:
-As of Mar 2016 this table contains 158 rows.
-
-Whole Brain
-Cerebellum
-Hematopoietic Cells
-Liver
-etc.
-
-How is this table used? Probably to create menu fields. Talk with Chris Mungall and colleagues about controlled vocabulary for APIs.
-
-** BIRN_lex_ID
-Need to get official IDs for tissues, cells, etc.
-** BIRN_lex_Name
-Need to get official IDs for tissues, cells, etc.
-** Id
-Incremented integer uniquely identifies the record.
-** Name
-Name of the biological material used in the experiment.
-** Short_Name
-** TissueId
-** TissueName
-
-* temporary
-This is probably the content of the user's collection. Lost at end of user's session.
-** GeneID
-** HomoloGene
-** OMIM
-** Other_GeneID
-** Symbol
-** tax_id
-
-* TempData
-
-** Id
-** NStrain
-** SE
-** StrainId
-** value
-
-* Temp
-
-** createtime
-** DataId
-** description
-** Id
-** InbredSetId
-** IP
-** Name
-
-* StrainXRef
-RENAME something like "SubjectXRef". This table links the information in the Strain table with InbredSet and provides order for the strains in the mapping population.
-** InbredSetId
-Foreign key to InbredSet:Id
-The Id of the mapping population in the InbredSet table.
-** OrderId
-Order of the strains in the Genotype file or mapping population, follows the pattern 10, 20 rather than 1,2.
-** PedigreeStatus
-** StrainId
-Foreign key to Strain:Id
-The Id of the mapping population strain in Strain table.
-** Used_for_mapping
-
-* Strain
-RENAME "SubjectDescription" . This table to keep track of case/subject identifiers (cases or F2 or strains). But we have the problem that there may be multiple observation per subject or the time series data for one case, (multiple ages for one strain, etc). Generic sample/case identifiers here.
-Contains 14,000 rows as of March 2016. We really need a new table "ObservationOfSubject" (RWW 2016)
-
-Apurva would like to extend this table to include "DateOfBirth" and "BatchNumber".
-
-
-** Alias
-** Id
-GN internal identifier for the strain
-** Name
-official strain name/symbol
-** Name2
-** SpeciesId
-Foreign key to Species:Id
-species of strain
-** Symbol
-short strain symbol used in graphs and tables
-
-* Species
-Contains the internal Ids and names for various species.
-** Id
-internal GeneNetwork species identifier
-** Name
-the common name of the species
-
-* Source
-This table contains one record for every SNP dataset represented in the Snp table.
-[Created by Robert Crowell, August 18, 2005. Annotation of table, Robert Crowell, Aug 22, 2005.]
-
-<b>See also:</b>
-<a href="/cgi-bin/beta/schema.py#Snp">Snp</a>
-** DateAdded
-date when the data source was added to our database
-** DateCreated
-date when the data source was produced
-** Name
-name of this source
-** SourceId
-internal GeneNetwork identifier for the source dataset
-
-* SNP_perlegen
-DEPRECATED: use the Snp table instead.
-
-The complete perlegen dataset. This table is deprecated.
-Created by Robert Crowell, 2005.
-** Id
-** mb
-** A_J
-** AKR_J
-** BALB_CBYJ
-** BTBR_T_TF_J
-** C3H_HEJ
-** C57BL_6J
-** DBA_2J
-** FVB_NJ
-** KK_H1J
-** MOLF_EIJ
-** NOD_LTJ
-** NZW_LACJ
-** PWD_PHJ
-** WSB_EIJ
-** 129S1_SVIMJ
-** chr
-** B6_D2
-** B6_AJ
-** D2_AJ
-** old
-old=1 SNPs belong to the Flint dataset (chr2 only)
-** source
-** nes
-** nc
-** length
-** 5_flanking
-** 5_assay
-** observed
-** 3_assay
-** 3_flanking
-** sequence
-** strand
-** score
-** fraction
-** major_count
-** minor_count
-** n_count
-** state_string
-** CAST_EIJ
-** Score_Blat
-** chr_Blat
-** Mb_Blat
-
-* SNP_mpd
-The complete MPD dataset. This table is soon to be deprecated.
-** id
-** chr
-** mb
-** class
-** function
-** 129S1_SvImJ
-** 129X1_SvJ
-** A_HeJ
-** A_J
-** AKR_J
-** ALR_LtJ
-** ALS_LtJ
-** D2_Hc_0_H2_d_H2_T18_c_oSnJ
-** BALB_cByJ
-** BALB_cJ
-** BPH_2J
-** BPN_3J
-** BTBR_T_tf_J
-** BUB_BnJ
-** C3H_HeJ
-** C3HeB_FeJ
-** C57BL_10J
-** C57BL_6J
-** C57BR_cdJ
-** C57L_J
-** C58_J
-** CAST_EiJ
-** CBA_CaJ
-** CBA_J
-** CE_J
-** CZECHII_EiJ
-** DBA_1J
-** DBA_2J
-** FVB_NJ
-** I_LnJ
-** KK_HlJ
-** LG_J
-** LP_J
-** MA_MyJ
-** MRL_MpJ
-** NOD_LtJ
-** NON_LtJ
-** NZB_BlNJ
-** NZW_LacJ
-** PERA_EiJ
-** PL_J
-** RF_J
-** RIIIS_J
-** SB_LeJ
-** SEA_GnJ
-** SJL_J
-** SM_J
-** SPRET_EiJ
-** ST_bJ
-** SWR_J
-** WSB_EiJ
-** ZALENDE_EiJ
-** source
-** ss
-** ss_orientation
-** rs
-** nmappings
-** snpID
-** insertions
-** B6_D2
-** B6_AJ
-** D2_AJ
-
-* SnpPattern
-Data used by SNP Browser. Variant browser needs to be redone from scratch using a decent architecture. 80 million SNPs in this table from sequence data of 2011 (Keane et al. Nature) but imputed to many other strains.
-** 129P2/OlaHsd
-** 129S1/SvImJ
-** 129S2/SvHsd
-** 129S4/SvJae
-** 129S5/SvEvBrd
-** 129S6/SvEv
-** 129T2/SvEmsJ
-** 129X1/SvJ
-** A/J
-** AKR/J
-** B6A6_Esline_Regeneron
-** BALB/cByJ
-** BALB/cJ
-** BPH/2J
-** BPL/1J
-** BPN/3J
-** BTBRT<+>tf/J
-** BUB/BnJ
-** C2T1_Esline_Nagy
-** C3H/HeJ
-** C3HeB/FeJ
-** C57BL/10J
-** C57BL/6ByJ
-** C57BL/6J
-** C57BL/6JBomTac
-** C57BL/6JCrl
-** C57BL/6JOlaHsd
-** C57BL/6NCrl
-** C57BL/6NHsd
-** C57BL/6NJ
-** C57BL/6NNIH
-** C57BL/6NTac
-** C57BLKS/J
-** C57BR/cdJ
-** C57L/J
-** C58/J
-** CALB/RkJ
-** CAST/EiJ
-** CBA/J
-** CE/J
-** CZECHII/EiJ
-** DBA/1J
-** DBA/2J
-** DDK/Pas
-** DDY/JclSidSeyFrkJ
-** EL/SuzSeyFrkJ
-** Fline
-** FVB/NJ
-** HTG/GoSfSnJ
-** I/LnJ
-** ILS/IbgTejJ
-** IS/CamRkJ
-** ISS/IbgTejJ
-** JF1/Ms
-** KK/HlJ
-** LEWES/EiJ
-** LG/J
-** Lline
-** LP/J
-** MA/MyJ
-** MAI/Pas
-** MOLF/EiJ
-** MOLG/DnJ
-** MRL/MpJ
-** MSM/Ms
-** NOD/ShiLtJ
-** NON/LtJ
-** NOR/LtJ
-** NZB/BlNJ
-** NZL/LtJ
-** NZO/HlLtJ
-** NZW/LacJ
-** O20
-** P/J
-** PERA/EiJ
-** PERC/EiJ
-** PL/J
-** PWD/PhJ
-** PWK/PhJ
-** Qsi5
-** RBA/DnJ
-** RF/J
-** RIIIS/J
-** SEA/GnJ
-** SEG/Pas
-** SJL/J
-** SKIVE/EiJ
-** SM/J
-** SnpId
-** SOD1/EiJ
-** SPRET/EiJ
-** ST/bJ
-** SWR/J
-** TALLYHO/JngJ
-** WSB/EiJ
-** ZALENDE/EiJ
-
-* SnpAllele_to_be_deleted
-OK, delete this then. (RWW March 2016)
-** Base
-** Id
-** Info
-
-* SnpAll
-CHECK, UPDATE or DELETE. Antique data that may be used by SNP Browser or by SNP displays in GN1 maps (single chromosome views). Probably only data for mouse in the table although structured for other species too.
-** 3Prime_UTR
-** 5Prime_UTR
-** Alleles
-** BlatScore
-** Chromosome
-** Class
-** conservation
-** ConservationScore
-** Domain
-** Downstream
-** Exon
-** Flanking3
-** Flanking5
-** Function
-** Gene
-** Id
-** Intergenic
-** Intron
-** Mb
-** MbCelera
-** Mb_mm6
-** ncbi
-** Non_Splice_Site
-** Non_Synonymous_Coding
-** Position
-** Rs
-** SnpName
-** Source
-** SourceId
-** SpeciesId
-** Splice_Site
-** Ss
-** Start_Gained
-** Start_Lost
-** Stop_Gained
-** Stop_Lost
-** Strand
-** Synonymous_Coding
-** Type
-** Unknown_Effect_In_Exon
-** Upstream
-
-* Snp
-This table contains a record for every SNP available in GN. To locate SNPs at a certain location, first query the SNP table. Using the Id values, the Allele table can be queried to obtain the allele calls for all strains for this SNP.
-[Created by Robert Crowell, August 18, 2005. Annotation of table, Robert Crowell, Aug 24, 2005.]
-
-<b>See also:</b>
-<a href="/cgi-bin/beta/schema.py#Allele">Allele</a>
-<a href="/cgi-bin/beta/schema.py#Source">Source</a>
-** BlatScore
-score of the BLAT alignment
-** Chromosome
-chromosome from the UCSC Genome Brower; for mouse SNPs we have used mm6 BLAT analysis or other source
-** Class
-if a singleton occurs in a wild strain Class is 0, otherwise it is the same as MinorCount
-** Flanking3
-100 base sequence on the 3' side of this SNP
-** Flanking5
-100 base sequence on the 5' side of this SNP
-** Function
-function class annotation using conventions of Mouse Phenome project SNP display
-** Id
-internal GeneNetwork identifier for this SNP
-** MajorAllele
-the more common allele for all strains in this SNP
-** MajorCount
-number of strains in the dataset containing this SNP's major allele (see MajorAllele below)
-** Mb
-position in megabases from the BLAT alignment or other source
-** MbCelera
-position in megabases given by Celera (obsolete field)
-** MinorAllele
-the less common allele for all strains in this SNP
-** MinorCount
-number of strains in the dataset containing this SNP's minor allele (see MinorAllele below)
-** MissingCount
-number of strains in the dataset without an allele call
-** Rs
-dbSNP rs#
-** SnpId
-commonly used identifier of a SNP from dbSNP, Celera, Perlegen or other source
-** SourceId
-Foreign key to Source.SourceId
-internal GeneNetwork identifier for the source dataset
-** Type
-polymorphism classification using conventions of Mouse Phenome project SNP display
-
-* SE
-This simple but huge table contains Standard Error of the Mean data that matches the "Data" table.
-
-Created by Jintao, March 2003.
-To retrieve or insert the data for an experiment there should be also corresponding entries in the ProbeXRef table for the raw data (references ProbeFreeze) or in the ProbeSetXRef table for transformed data (references ProbeSetFreeze).
-** DataId
-** error
-** StrainId
-
-* SampleXRef
-DEPRECATED. Used only in GN1 from 2004 to 2006 to display CEL files and array scan images for QC.
-** ProbeFreezeId
-** SampleId
-
-* Sample
-DEPRECATED. Only used in GN1 between 2004 and about 2006 to display images of microarray data.
-
-A table that provides access to low-level array data in GeneNetwork. This table is used only from tables embedded in INFO files such as http://www.genenetwork.org/dbdoc/BR_U_1203_MR.html. The table will call an Image URL and CEL file URL, a DAT file URL, etc. This format and table has not been used since about 2005. We should develop a better method to allow access to raw data from GN.
-
-** Age
-** CELURL
-** CHPURL
-** CreateTime
-** DATURL
-** EXPURL
-** FromSrc
-** Id
-** ImageURL
-** Name
-** RPTURL
-** Sex
-** StrainId
-** TissueType
-** TXTURL
-
-* role
-Noble intent table. Can be deleted or implemented. Idea was "administrator", "curator", "owner", "user"
-** description
-** name
-** the_id
-
-* QuickSearch
-Check if needed by GN2 with Zach. If not, then delete (Lei Yan March 2016).
-** result_fields
-** table_name
-** terms
-** the_key
-
-* PValue
-
-** DataId
-** pvalue
-
-* pubmedsearch
-Data table used to find gene symbols associated with authors. Created by Lei Yan for Author search functions in GN1. Check if this works in GN2. This function has alrways been a bit flaky.
-** authorfullname
-** authorshortname
-** geneid
-** id
-** institute
-** pubmedid
-** title
-
-* PublishXRef
-
-** comments
-** DataId
-** Id
-** InbredSetId
-** PhenotypeId
-** PublicationId
-** Sequence
-
-* PublishSE
-Table contains the standard error of the phenotype value.
-** DataId
-** error
-** StrainId
-
-* PublishFreeze
-This is a table of cohorts/populations that have associated Phenotype data in the "Type" menu of the GN "Select and Search" page. As of March 2016 this table has 34 rows corresponding to 34 Published Phenotype data sets for different groups. When we enter a new group (cohort or population or RI set) that will have phenotypes into GeneNetwork, then we need to add data to this table. Be careful, when you add a new "PublishFreeze.Name" here then you must also make sure that the Group name (e.g. "BXD" in the "InbredSet" table) exactly matches the first part of the PublishFreeze.Name" or else the code will generate an error.
-
-** AuthorisedUsers
-** confidentiality
-** CreateTime
-** FullName
-This is the long name that goes into the menu. Order is not controlled yet but this could be added.
-** Id
-Unique integer. Just an integer that unique specifies one of the Published Phenotype data sets. 1 = BXDPublish, 34 = HSNIHPPublish
-** InbredSetId
-** Name
-Must be unique. This is the name of the Published (and unpublished) data associated with a cohort or population. The name here (example "BXDPublish") must match a specific cohort name (e.g. "BXD", also known as an "InbredSet" name).
-** public
-** ShortName
-
-* PublishData
-Data on phenotypes. Equivalent roughly to ProbeSetData. 1 million records as of March 2016. Much of these data are actually not published yet.
-This is really "StandardPhenotypeData". Currently also includes some metagenomic data.
-** Id
-** StrainId
-** value
-
-* Publiction
-Comment
-
-* Publication
-Used by Phenotypes data sets. Each published phenotype is associated with a PubMed ID. All data should ideally be populated automatically from PubMed rather entered by users.
-** Abstract
-** Authors
-** Id
-** Journal
-** Month
-** Pages
-** PubMed_ID
-** Title
-** Volume
-** Year
-
-* ProbeXRef
-
-** DataId
-** ProbeFreezeId
-** ProbeId
-
-* ProbeSetXRef_TEMP
-
-** DataId
-** Locus
-** Locus_old
-** LRS
-** LRS_old
-** mean
-** ProbeSetFreezeId
-** ProbeSetId
-** pValue
-** pValue_old
-** se
-
-* ProbeSetXRef
-This table contains summary data used by the Advanced Search feature in GN1 and GN2 (e.g "mean=(6 20)", for a particular data sets, including information on average expression of probe sets and probes, phenotypes, LRS values of single best QTL, p values of single best QTL, additive effect of single best QTL, locus ID of the marker closest to the single best QTL, etc.
-** additive
-additive effect size from QTL Reaper at highest QTL peak
-** DataId
-** h2
-** Locus
-locus or marker closest to highest QTL peak
-** Locus_old
-** LRS
-LRS from QTL Reaper of highest QTL peak
-** LRS_old
-** mean
-average expression across data set for a particular probe set
-** ProbeSetFreezeId
-** ProbeSetId
-** pValue
-p value based on QTL Reaper of highest QTL peak
-** pValue_old
-** se
-range of expression (not actually SE) across data set for a particular probe set
-
-* ProbeSetSE
-Contains standard error of assays in ProbeSetData. Roughly 0.5 billion rows as of March 2016. Human data do not have error terms usually.
-** DataId
-** error
-** StrainId
-
-* ProbeSetFreeze
-RENAME: AssayDataSet or something more neutral. Delete the word "Freeze" from this table.
-
-ProbeSetFreeze contains the information of the data analysis method used in the processing the microarray experiment data described in the ProbeFreeze table and the confidentiality of the resulting data. New records should be inserted only if the relevant ProbeFreeze and AvgMethod records are in place. The use of the four different name fields effectively containing 4 versions of the same information needs to be clarified. 120 records on Dec 2006. About 700 records March 2016.
-
-The name of a data set in GN is "ProbeSetFreeze.FullName" and is used in several output tables and graphs, for example ClusterMap in this format -- ProbesetID::FullName
-
-
-Comment by PP and RW March 2016: This key table needs to be evaluated and renamed. Was initially designed to hold large microarray data, but now must accommodate any large "omics" data, but not genotypes and not classic phenotypes. Some trait data is ambiguous such as metagenomics. Metagenomics probably should be included here rather than in Phenotypes.
-** AuthorisedUsers
-** AvgID
-Foreign key to AvgMethod:Id
-Links to the method used in the processing of the microarray experiment data (like RMA, MAS etc.). ID1206
-** confidentiality
-0 = not confidential, 1 = confidential. ID1206. confidential means the dataset will appear in the search page, but will be serached only after the user login
-** CreateTime
-now()
-** DataScale
-** FullName
-Similar to ProbeFreeze name (institute tissue chip date)+ the data analysis method used. ID1206
-** Id
-Foreign key to Primary Key
-Incremented integer, uniquely identifies the record. ID1206
-** Name
-Very short abbreviation of the microarray experiment description, the use needs to be clarified. Contains tissue abbreviaton_chip abbreviation_date_processing method abbreviation. ID1206
-** Name2
-The same as in Name, only a bit longer - tissue_chip_method_date. The use needs to be clarified. ID1206
-** OrderList
-** ProbeFreezeId
-Foreign key to ProbeFreeze:Id
-Links to the microarray experiment description in ProbeFreeze table. ID1206
-** public
-1 = beta data, 2 = available in GeneNetwork. ID1206. beta means the dataset will not appear in the search page if the user does not login
-** ShortName
-Similar to FullName with random items abbreviated. ID1206
-
-* ProbeSetData
-Almost all important molecular assay data is in this table including probe set data, RNA-seq data, proteomic data, and metabolomic data. 2.5 billion rows March 2016. In comparison, ProbeData contains data only for Affymetrix probe level data (e.g. Exon array probes and M430 probes).
-
-
-"StrainId" should be "CaseId" or "SampleId".
-
-"ProbeSetData" should probably be "AssayData" or something more neutral.
-** Id
-** StrainId
-** value
-
-* ProbeSet
-PLEASE CHANGE TABLE NAME and rework fields carefully. This is a terrible table but it works well (RWW March 2016). It is used in combination with the crucial TRAIT DATA and ANALYSIS pages in GN1 and GN2. It is also used by annotators using the UPDATE INFO AND DATA web form to correct and update annotation. It is used by Arthur to enter new annotation files and metadata for arrays, genes, proteins, metabolites. The main problem with this table is that it is doing too much work.
-
-Initially (2003) this table contained only Affymetrix ProbeSet data for mouse (U74aV2 initially). Many other array platforms for different species were added. At least four other major categories of molecular assays have been added since about 2010.
-
-1. RNA-seq annotation and sequence data for transcripts using ENSEMBL identifiers or NCBI NM_XXXXX and NR_XXXXX type identifiers
-
-2. Protein and peptide annotation and sequence data (see BXD Liver Proteome data, SRM and SWATH type data) with identifiers such as "abcb10_q9ji39_t311" for SRM data and "LLGNMIVIVLGHHLGKDFTPAAQAA" for SWATH data where the latter is just the peptide fragment that has been quantified. Data first entered in 2015 for work by Rudi Aebersold and colleagues.
-
-3. Metabolite annotation and metadata (see BXD Liver Metabolome data) with identifiers that are usually Mass charge ratios such as "149.0970810_MZ"
-
-4. Epigenomic and methylome data (e.g. Human CANDLE Methylation data with identifiers such as "cg24523000")
-
-It would make good sense to break this table into four or more types of molecular assay metadata or annotation tables) (AssayRNA_Anno, AssayProtein_Anno, AssayMetabolite_Anno, AssayEpigenome_Anno, AssayMetagenome_Anno), since these assays will have many differences in annotation content compared to RNAs.
-
-Some complex logic is used to update contents of this table when annotators modify and correct the information (for example, updating gene symbols). These features requested by Rob so that annotating one gene symbol in one species would annotate all gene symbols in the same species based on common NCBI GeneID number. For example, changing the gene alias for one ProbeSet.Id will changing the list of aliases in all instances with the same gene symbol.
-
-If the ProbeSet.BlatSeq (or is this ProbSetTargetSeq) is identical between different ProbeSet.Ids then annotation is forced to be the same even if the symbol or geneID is different. This "feature" was implemented when we found many probe sets with identical sequence but different annotations and identifiers.
-
-Annotation by Rob Williams, Aug 19, 2005. Created by Jintao Wang, 2003. This annotation updated March 22, 2016 by Rob.
-** alias
-gene aliases and old symbols associated with the gene assigned to the probe set or probe (editable using Update page interface)
-** alias_H
-official human gene description from NCBI ftp site (Build 35)
-** Biotype_ENS
-** BlatSeq
-probe sequence or concatenated probe set sequence ( trimmed of overlap) used for BLAT alignment to genome (viewable but not editable from Update page)
-** CAS_number
-** ChEBI_ID
-** ChEMBL_ID
-** ChemSpider_ID
-** ChipId
-identifier of the array type
-** Chr
-chromosome assigned to the probe set or probe (editable using Update page interface)
-** chromosome_H
-official human gene description from UCSC ftp site (Build 35)
-** Chr_mm8
-** chr_num
-the numerical value of chromosomes, for example, X is 20 or 21 depending on species
-** comments
-record of modification time and person making modifications. Used to prevent overwriting of modified records.
-** Confidence
-** description
-gene description assigned to the probe set or probe (editable using Update page interface)
-** description_H
-official human gene description from NCBI ftp site (Build 35)
-** EC_number
-** flag
-a status flag on the probe set: 0=mismatch between blat results and affy symbols (Problem!!!!); 1=match between blat results and affy symbols (Excellent); 2=symbols from TIGR or replaced by Blat symbols (The original affy symbols have "///" or "_predicted") (ok); 3: symbols from BLAT (ok); 4. symbols from Affy (not bad) or no symbol (sad); 5. symbols from target sequence blating (??); 6. symbols from genebank sequence blating (???); 7=symbols from blating to mouse genome(????)
-** Flybase_Id
-** GenbankId
-GenBank ID assigned to the probe set or probe as given to us by Affymetrix or Agilent (not editable from Update page)
-** GeneId
-Entrez gene ID assigned to the probe set or probe (editable using Update page interface)
-** GeneId_H
-official human gene description from NCBI ftp site (Build 35)
-** HMDB_ID
-** HomoloGeneID
-** Id
-internal identifer used by GeneNetwork
-** KEGG_ID
-** Mb
-** MB_H
-Converted from ProbeSet.Mb_mm6 by Batch Coordinate Conversion
-** Mb_mm6
-megabase position assigned to the probe set or probe (editable using Update page interface). The most proximal Mb was used irrespective of whether this was 3' or 5' end. mm6 refers to a particular mouse assembly (perhaps inappropriate)
-** Mb_mm8
-** Molecular_Weight
-** Name
-Affymetrix probe set identifier or Agilent probe identifier
-** name_num
-the numerical value of Affymetrix probe set identifier or Agilent probe identifier
-** Nugowiki_ID
-** OMIM
-OMIM identifier assigned to the probe set or probe (editable using Update page interface)
-** PeptideSequence
-** PrimaryName
-** Probe_set_Blat_Mb_end
-the distal (high) megabase position matched by the probe set sequence (5' or 3' end)
-** Probe_set_Blat_Mb_end_mm8
-** Probe_set_Blat_Mb_start
-the proximal (low) megabase position matched by the probe set sequence (3' or 5' end)
-** Probe_set_Blat_Mb_start_mm8
-** Probe_set_BLAT_score
-the BLAT score generated by the concatenated probe set (or probe) sequence for the correct target mRNA. This will usually be the highest BLAT score, but in some cases a non-trasncribed genomic sequence may match better than the actual transcribed mRNA target sequence.
-** Probe_set_Note_by_JG
-notes on the probe set by Jing Gu
-** Probe_set_Note_by_RW
-notes of the probe set by Robert Williams
-** Probe_set_specificity
-the BLAT score of the correct probe set target mRNA divided by the best or next best BLAT score
-** Probe_set_strand
-the DNA strand (+ or -) that is identical to the probe set nucleotide sequence. By convention, correctly directed probe sets have the same direction as the gene.
-** Probe_set_target_region
-DO NOT USE. Unknown use. May want to delete this field after review of possible use.
-** Probe_Target_Description
-description of the region of the gene and transcript targetted by the probe set or probe (this text is displayed after the semicolon in Search Results; this is a searchable field)
-** ProteinID
-** ProteinName
-** PubChem_ID
-** RefSeq_TranscriptId
-the reference sequence of the mRNA associated with the probe set. These are always receded with "NM_". This field was added to allow easier linkage from the UCSC Genome Browser to GN.
-** SecondaryNames
-** SNP
-unknown use
-** Strand_Gene
-the DNA strand (+ or -) of the gene assigned to the probe set or probe (editable using Update page interface)
-** Strand_Probe
-unknown use (redundant with Probe_set_strand ?) (editable using Update page interface)
-** symbol
-gene symbol assigned to the probe set or probe (editable using Update page interface)
-** symbol_H
-official human gene symbol from UCSC ftp site (hg17)
-** TargetId
-** TargetSeq
-target sequence as given to us by Affymetrix (viewable but not editable from Update page)
-** Tissue
-** Type
-** UniGeneId
-chromosome assigned to the probe set or probe (viewable but not editable from Update page)
-** UNII_ID
-
-* ProbeH2
-DEPRECATED. Will not be used in GN2. Please compare to H2. Used only for some the heritability of probes shown in the Probe table.
-** h2
-** ProbeFreezeId
-** ProbeId
-** weight
-
-* ProbeFreeze
-About the Name: ProbeFreeze is a stupid (historic) name for this table. The table should be renamed to more general and sensible such as "Data_Set_Group_Info" table and ProbeSetFreeze should be changed to something like "Data_Set_Info" table. At present, every ProbeSetFreeze record needs a parent ProbeFreeze record, even when the relation is 1-to-1.
-
-About This Table: The ProbeFreeze table provides information about the overall set of microarray hybridization experiments - a meaningful name that identifies the experiment, the link to the microarray chip name, the link to tissue, organ or other generic biological material name, the link to the mapping population, inbred strain set name or similar used in the experiment.
-
-A ProbeFreeze may have a subset of ProbeSetFreezes (one ProbeFreeze to many ProbeSetFreezes) to which it belongs as children data sets (for example, male data only, female data only, RMA data or MAS5 data. The name provides a short description of the experiment. New records in the table should be inserted only after the relevant records in the GeneChip, Tissue and InbredSet are in place. 34 records on Dec14,2006. ID1206
-** ChipId
-Foreign key to GeneChip:Id
-Links to the information about the microarray chip used. ID1206
-** CreateTime
-now()
-** FullName
-Empty field. ID1206
-** Id
-Foreign key to Primary key
-Incremented integer, uniquely idenifies the record. ID1206
-** InbredSetId
-Foreign key to InbredSet:Id
-Links to the information about the cross, mapping population, inbred strain set or similar used in the experiment. ID1206
-** Name
-Abbreviated description that identifies the microarray experiment. The existing records contain institute id, short biological material description, the microarray chip name and date in brackets, but the field can contain any meaningful description of the microarray experiment. ID1206
-** ProbeFreezeId
-** ShortName
-Empty field. ID1206
-** TissueId
-Foreign key to Tissue:Id
-Links to the information about the biological material analysed . ID1206
-
-* ProbeData
-Table with fine-grained probe level Affymetrix data only. Contains 1 billion rows March 2016. This table may be deletable since it is only used by the Probe Table display in GN1. Not used in GN2 (double-check).
-
-In comparison the "ProbeSetData" table contains more molecular assay data, including probe set data, RNA-seq data, proteomic data, and metabolomic data. 2.5 billion rows March 2016. In comparison, ProbeData contains data only for Affymetrix probe level data (e.g. Exon array probes and M430 probes).
-
-
-"ProbeData.StrainId" should be "CaseId" or "SampleId".
-
-"ProbeData" should probably be "AssayData" or something more neutral.
-** Id
-** StrainId
-** value
-
-* Probe
-DEPRECATED. Used only for a few array platforms in GN1. Not used for GN2. This table contains data on the characteristics of individual Affymetrix probes (not probe sets). Data are used to populate the Probe Tables which display sequences of the perfect match and mismatch probes. This table could also contain data on the Agilent 60-mer probes.
-Created by Yanhua Qu and Jintao Wang, 2003.
-** ExonNo
-exon to which the probe sequence corresponds. When a probe straddles two exons we use the format 10*11
-** E_GSB
-the gene-specific binding energy computed using Li Zhang's PDNN method. Data provided by Li Zhang
-** E_NSB
-the non-specific binding energy computed using Li Zhang's PDNN method. Data provided by Li Zhang
-** Id
-internal identifier
-** Name
-six to eight character name (depending on array) XXX coordinate then YYY coordinate with 0 used a buffer
-** ProbeSetId
-Affymetrix probe set identifier to which the probe belongs using the conventional CDF probe-probeset mapping
-** Sequence
-25 nucleotide sequence
-** SerialOrder
-probe order from the most 3' probe to the most 5' probe
-** Tm
-theoretical melting temperature of a DNA-DNA hybrid. The actual probes are cRNA
-
-* Phenotype
-This table contains names, full descriptions, and short symbols for traits and phenotype used primarily in the Published Phenotypes databases.
-
-Contains 10k rows, March 2016, of which 5000 are for the BXDs).
-
-Created by Jintao Wang, March 2003.
-** Abbreviation
-abbreviation of the phenotype
-** Authorized_Users
-** Id
-** Lab_code
-** Name
-description of the phenotype
-** Original_description
-** Owner
-** Post_publication_abbreviation
-** Post_publication_description
-** Pre_publication_abbreviation
-** Pre_publication_description
-** Submitter
-** Units
-units of measurement of the phenotype
-
-* Organizations
-Table generated by Arthur Centeno for INFO files and metadata.
-** OrganizationId
-** OrganizationName
-
-* NStrain
-Merge this table to "PublishSE" and "PublishData". Values are used to track n of cases or n or strains for "published" phenotype values. Move these data to PublishSE and PublishData, phenotype SE, and N strain are three columns shows to users of Published Phenotypes. Unknown function at this time, seems like this contains information which is derived, so looks like it might be unneeded (DA March 2016).
-
-Contains 160,000 rows, March 2016.
-** count
-** DataId
-** StrainId
-
-* MStrain
-Comment
-
-* MappingMethod
-Needs to be updated, but this is used in GN1 to select mapping methods for different cohorts/populations. PLINK is used for map human cohorts in GN1. Happy is not implemented as of March 2016 in either GN1 or GN2. R/qtl implemented by DA in GN2 in 2015. FastMap probably equal pyLMM and should be renamed. QTL Reaper = Haley Knott regression mapping and probably should be renamed HKMap.
-
-QTL Reaper, R/qtl, Happy, PLINK, FastMap
-** Id
-** Name
-
-* MachineAccessLog
-
-** accesstime
-** action
-** data_id
-** db_id
-** id
-** ip_address
-
-* login
-Used by GN2. Just a login file. 277 login in GN2 as of March 2016.
-** assumed_by
-** id
-** ip_address
-** session_id
-** successful
-** timestamp
-** user
-
-* LitCorr
-
-** ProbeSetId1
-** ProbeSetId2
-** value
-
-* LCorrRamin3
-Should be updated in 2016. Literature correlations by Prof Ramin Homayouni (v3) in GN1 and GN2. These are mouse GeneIDs (table starts with GeneId1 = 381629 = the gene with symbol Atraid in mouse. This genes maps to HomoloGene 15412 and to human ATRAID (human GeneId 51374). This table should ideally work for mouse, human, and rat since most genes will have 1-to-1 homologs with matched symbols.
-** GeneId1
-Entrez gene ID values (mouse)
-** GeneId2
-Entrez gene ID values (mouse)
-** value
-Latent sematic index scorel, value between 0 and 1
-
-* LCorr
-
-** GeneId1
-** GeneId2
-** value
-
-* Investigators
-What is this used for? This is part of Arthur Centeno's database for INFO files.
-As of March 2016 has about 86.54 rows.
-** Address
-** City
-** Country
-** Email
-** FirstName
-** InvestigatorId
-** LastName
-** OrganizationId
-** Phone
-** State
-** Url
-** UserDate
-** UserLevel
-** UserName
-** UserPass
-** ZipCode
-
-* InfoFilesUser_md5
-Password information GN1 (unsecure no salt) use SALT !
-Only two users as of March 2016, Rob and Arthur.
-** Password
-** Username
-
-* InfoFiles
-INFO file metadata. INFO files are currently limited to molecular data sets (mRNA, protein, metabolomes). Majority of mRNA transcriptome data sets. This table set up by Arthur 2014-2015. Compare to "Datasets" which appears to be a subset of this table.
-
-"InfoFiles" has 700 rows whereas "Datasets" has only 230 rows (RWW March 2016)
-** About_Array_Platform
-** About_Cases
-** About_Data_Values_Processing
-** About_Download
-** About_Tissue
-** AuthorizedUsers
-** AvgMethodId
-** Citation
-** City
-** Contact_Name
-** Contributor
-** Country
-** DatasetId
-** Data_Source_Acknowledge
-** DB_Name
-** Department
-** Emails
-** Experiment_Type
-** GeneChipId
-** GEO_Series
-** GN_AccesionId
-** InbredSet
-** InbredSetId
-** InfoFileId
-** InfoPageName
-** InfoPageTitle
-** Laboratory
-** Normalization
-** Organism
-** Organism_Id
-** Organization_Name
-** Overall_Design
-** Phone
-** Platforms
-** Progreso
-** QualityControlStatus
-** Samples
-** Species
-** SpeciesId
-** State
-** Status
-** Street
-** Submission_Date
-** Summary
-** Tissue
-** TissueId
-** Title
-** URL
-** ZIP
-
-* IndelXRef
-Just for C57BL/6J and DBA/2J indels with 140,000 rows
-** IndelId
-** StrainId1
-** StrainId2
-
-* IndelAll
-Information about indels (comaprable to the SNP data) used by the Mouse SNP browser GN1 only at this time. Only B6 versus D2 mouse indels have been entered so far. Has 140,000 rows but should have at least twice as many. Probably entered at an early stage of sequence analysis (circa 2010) (DA March 2016)
-** Chromosome
-** Id
-** InDelSequence
-** Mb_end
-** Mb_start
-** Name
-** Size
-** SourceId
-** SpeciesId
-** Strand
-** Type
-
-* InbredSet
-Important table that is used to select appropriate analytic and mapping methods. We should change the name of this table to "Population_Description" or "Sample_Description" (RWW March 2016)
-
-"orderid" is used to set the order of in the pull-down menu.
-** FullName
-** GeneticType
-e.g. intercross
-** Id
-** InbredSetId
-** InbredSetName
-** MappingMethodId
-prefered mapping method to use ??
-** Name
-** orderid
-** public
-** SpeciesId
-
-* HumanGene
-
-** description
-** hLocusId
-** Id
-** mLocusId
-** Name
-** rLocusId
-
-* Homologene
-Coupling genes to other genes using homology between them. (DA March 2016)
-** GeneId
-** HomologeneId
-** TaxonomyId
-
-* H2
-Deprecated or delete this table (RWW March 2016). Compare to "Probe h2" used in Probe Table. Plain "H2" table has 60,000. This could be at the probe set level whereas "Probe h2" is for the individual probes on the probe set. (Danny Arends = DA March 2016)
-** DataId
-** H2SE
-heritability standard error ??
-** HPH2
-** ICH2
-
-* GORef
-Gene Ontology identifiers linked to gene symbols. Only properly implemented for mouse. Note that this table does not have a GORef.species field. GN1 code does return hits even for Drosophila but symbols have mouse format. Check how this happens. (RWW March 2016)
-
- Important and should probably be updated periodically. Used for GO searches in GN1 and GN2. E.g. GO:0045202 searches for synapse-associated genes listed in the Gene Ontology using information in this table.
-** genes
-** goterm
-** id
-
-* GenoXRef
-The table is used to establish links to other tables that contain genotype data. contains the information on which markers should be used for QTL mapping
-** cM
-cM is the centiMorgan location of the marker
-** DataId
-DataID is an identifier for a specific vector of genotypes
-** GenoFreezeId
-The GenoFreezeID is the number that references a single coherent genotype file. For example the first BXDgeno file is 0001.
-** GenoId
-GenoID is an identifier for a specific marker (SNP or other)
-** Used_for_mapping
-Flag used to decide if a marker is used for mapping or not
-
-* GenoSE
-DELETE THIS TABLE. This is to be a stupid table that can be deleted (Rob W, March 2016). Likely to have been added as a parallel table similar to those used from phenotypes and quantitative traits.
-** DataId
-** error
-** StrainId
-
-* GenoFreeze
-Population or cohort description. Links the population or cohort data described here with the genotype information. The entry in this table must be present to enter the genotype data in the GenXRef and Data tables.
-
-As of March 2016 has about 26 rows for mouse, rat, Drosopholia, potatoe, human, etc.
-** AuthorisedUsers
-** confidentiality
-0 = not confidential, 1 = confidential.
-** CreateTime
-now()
-** FullName
-Extended genotype file name for the cohort.
-** Id
-Primary key referenced in GenoXRef.GenoFreezeId.
-** InbredSetId
-Foreign key to InbredSet.Id
-links to the mapping population.
-** Name
-Genotype file for the cohort name.
-** public
-1 = beta data, 2 = available in GeneNetwork.
-** ShortName
-Shortened genotype name.
-
-* GenoData
-This is the table that actually contains genotypes for individuals. Could be renamed "Genotype_Data". The GenoData.value will need to be updated to allow a wider range of values and probabilities to accommodate complex crosses and cohorts. Right now the GenoData.value is labeled as a "float" but most of the code in GN expects to see values of -1, 0, or 1.
-
-As of March 2016 (140 million rows where each row is genotype from individual X at marker Y)
-** Id
-Primary key identifier
-** StrainId
-This field should be renamed SampleID.
-** value
-The actual genotype of the case. Usually -1, 0, 1. U is not allowed yet. No blank allowed.
-
-* GenoCode
-Only has one row as of March 2016 and used exclusively for BXD or B6xD2 crosses.
-May be used for Haplotype Analyst display function in QTL maps. May also be used to determine polarity of effect size (B allele defined as -1 and D allele defined as 1).
-
-Inbred Set 1, AlleleType values mat, pat, het, unk, and AlleleSymbol B, D, H, U, and DatabaseValue -1, 1, 0 or NULL
-
-"InbredSetId" should be renamed "GroupID" or "CohortID"
-** AlleleSymbol
-** AlleleType
-** DatabaseValue
-** InbredSetId
-
-* GenoAssembly
-Small table which identifies the assembly of the genotype markers, or similar, information important for mouse data, where there is more than one assembly per species. The entry in this table must be present before enering the data in GenoPos table. ID1206
-** Comment
-** Disable
-'Y','N' The disabled assemblies are not used in the analysis? Not verified. ID1206
-** Id
-PK referenced in GenoPos.AssemblyId, ProbeSetPos.AssemblyId. ID1206
-** Name
-Name of assembly. ID1206
-** SpeciesId
-Foreign key to Species.Id
-
-* Geno2
-Contains descriptions of markers used in the genotype (.geno file).
-This table looks like abbreviated Geno table. It has the same number of records as Geno and Geno_0609. ID1206
-** Id
-Can reference Geno.Id, Geno_0609.Id and GenoXRef.GenoId. ID1206
-** Name
-Marker name or other identificator
-** Sequence
-Marker sequence, if known.
-** Source
-The provider of the information, could be institute. ID1206
-** Source_Old
-The provider of the information, could be institute. Often the same as Source. ID1206
-** SpeciesId
-Foreign key to Species.Id
-References Species table
-
-* Geno
-Genotype marker information, not the actual genotypes. Should probably be renamed "Marker_Information" or "Genotype_Marker_Info". If genotype data is held in MySQL, then this table is used for updating genotypes and for the production of a new ".GENO" file after an update. Currently, the update feature i used almost exclusively for BXD mouse cohort. Contains 400,000 rows each with sequence data around markers (usually SNPs, but some microsatellites and other weird variants). (RWW March 2016)
-
-This table contains descriptions of markers, the same ones that are used in the corresponding .geno file. This table is exactly the same as Geno_0609, so one of them might be redundant and also has one-to-one relationship with Geno2 table. For some information there is more than one entry (marker name, position) which may lead to inconsistent state. The marker fields look like references to single nucleotide poymorphisms within the marker, but this hasn't been confirmed.
-
-For a few groups, this table can be updated by authorized users using an interface at www.genenetwork.org/manager.html (Update Genotype functions) (comment updated March 14, 2016 by RWW)
-** Chr
-Foreign key to Chr_Length.Name
-** Chr_mm8
-Chromosome name. Should be deleted or updated to mm10 (March2016)
-** chr_num
-Foreign key to Chr_Length.OrderId
-This is a number used to order chromosomes, thus Chr X in mouse = Chr 20, and Chr Y = 21
-** cM
-** Comments
-Comment
-** Id
-Primary key, used in Geno2, GenoXRef
-** Marker_Name
-** Mb
-This may be the genome-wide megabase values that is cumulative. Chr 2 starts at about 200 Mb. (Double check)
-** Mb_mm8
-Megabase position (not bp). Should be deleted or updated to mm10 (March2016)
-** MB_UCSC
-Position, not sure about the units. MB probably. ID1206
-** Name
-Marker name, or other ID used in .geno file
-** Sequence
-The sequence of the marker, if known. Usually 100 nt on each side of the SNP with the SNP is square brackets for BLAT analysis. gctcctaattgctgagatttctctccagctc<br> TGCCTCCCTTTCACACTCTCCTGCCCGTCCC<br> AATCAGAACATTAGAGCTGATAAGATTTACT<br> TATGGAC[CT]GATCTAAAATAGAAGTCCTT<br> TGGAGAACTTTGAGAGCTTTTCCAAGAAGTA<br> AAGTCGGTTAGTTGCTTTTCCAAAGAAATAA<br> AGTTAGTGATTCTCCACA
-** SNP_129x1_SvJ
-** SNP_AJ
-** SNP_B6
-** SNP_BALBc
-** SNP_C3H
-** SNP_DBA2
-** Source
-The provider of the information, could be institute.
-** Source2
-The provider of the information, could be institute, often the same as Source.
-** SpeciesId
-** used_by_geno_file
-This is a flag that determines if a marker is used for mapping. Can be set by authorized users using the "Update Genotype" function. May be redundant with field in GenoXRef.
-
-* GeneRIF_BASIC
-Gene Reference into Function data table from NCBI. Data are updated each night from NCBI and used to perform RIF queries in GN1 and GN2. (RWW March 2016). Probably should be called "GeneRIF_Data_NCBI"
-** comment
-** createtime
-** GeneId
-** PubMed_ID
-** SpeciesId
-** symbol
-** VersionId
-
-* GeneRIFXRef
-Gene RIF link to corresponding NCBI PubMed Reference ID. (RWW March 2016). Odd that there are three primary keys. (RWW March 2016)
-** GeneCategoryId
-** GeneRIFId
-** versionId
-
-* GeneRIF
-This is to be more than just GeneRIF but also includes GeneWIKI fields used to allow users to enter new GeneWiki data sets. Should be renamed GeneWiki_Entry_Data
-** comment
-** createtime
-** display
-** email
-** Id
-** initial
-** PubMed_ID
-** reason
-** SpeciesId
-** symbol
-Official gene symbol taken from NCBI
-** user_ip
-** versionId
-** weburl
-
-* GeneMap_cuiyan
-Deprecated. This is a table used to link from GN1 single chromosome maps to Yan Cui's polyMiRTS database of microRNA binding sites linked to SNPs.
-** GeneID
-** id
-** Symbol
-** TranscriptID
-
-* GeneList_rn3
-This table contains information on recognized genes in Rattus norvegicus (rn) from the rat build 3 (RGSC v3.4 of November 2004; see http://www.ncbi.nlm.nih.gov/genome/guide/rat/release_notes.html). Data are used by the Interval Analyst table in WebQTL. Data originally taken from UCSC ftp site July 2005. Annotation by Rob Williams and Senhua Yu, Aug. 2005. Created by Evan Williams, July 2005.
-** chromosome
-** flag
-Check status of this field. Really a probe set field, not a gene field.
-** genBankID
-GenBank identifier
-** geneDescription
-official gene description
-** geneID
-Entrez gene ID
-** geneSymbol
-official gene symbol
-** id
-** identity
-** kgID
-** ProbeSet
-** qEnd
-** qSize
-** qStart
-** score
-** sequence
-Check status of this field. Really a probe set field, not a gene field.
-** span
-** specificity
-Check status of this field. Really a probe set field, not a gene field.
-** strand
-** txEnd
-** txSize
-** txStart
-** unigenID
-Unigene identifier (Build 144)
-
-* GeneList_mm8
-Annotation by Samina (November 15, 2006)
-** agilentProbeSetID
-** alignID
-** cdsEnd
-End of the coding sequence
-** cdsStart
-Start of the coding sequence
-** chromosome
-Chromosome where the gene is found
-** exonCount
-Number of exons in this gene
-** exonEnds
-Ending position of the exons
-** exonStarts
-Starting position of the exons
-** geneDescription
-Description of the gene
-** geneID
-Gene identifier
-** geneSymbol
-Gene Symbol
-** id
-Internal identifier used by GeneNetwork
-** m430ProbeSetID
-** NM_ID
-** proteinID
-Protein identifier
-** strand
-Sense strand (+) or Antisense strand (-)
-** txEnd
-End position of the gene
-** txStart
-Starting position of the gene
-** u74ProbeSetID
-Affymetrix u74av2 array probe set identifier
-
-* GeneList_mm6
-This table contains the complete dataset from the Mar 2005 (mm6) mouse genome from UCSC.
-** agilentProbeSetID
-** alignID
-** cdsEnd
-** cdsStart
-** chromosome
-** exonCount
-** exonEnds
-** exonStarts
-** geneDescription
-** geneID
-** geneSymbol
-** id
-** m430ProbeSetID
-** NM_ID
-** proteinID
-** strand
-** txEnd
-** txStart
-** u74ProbeSetID
-
-* GeneList_hg17
-
-** alignID
-** cdsEnd
-** cdsStart
-** chromosome
-** exonCount
-** exonEnds
-** exonStarts
-** geneID
-** geneSymbol
-** id
-** isGuess
-** NM_ID
-** proteinID
-** strand
-** txEnd
-** txStart
-
-* GeneList
-Out of date in 2016. May be used by chromosome QTL maps and by SNP Tables. GN would need these data for multiple species. This is apparently meant as a generic table for any species. Should be updated periodically from BioMart or UCSC Genome Browser.
-** AlignID
-** cdsEnd
-This is the end of the coding sequence (cds = protein coding part of mRNA)
-** cdsEnd_mm8
-** cdsStart
-This is the start of the coding sequence (cds = protein coding part of mRNA)
-** cdsStart_mm8
-** Chromosome
-** Chromosome_mm8
-** exonCount
-** exonCount_mm8
-** exonEnds
-This is a concatenated list of exon starts, separated by comma
-** exonEnds_mm8
-** exonStarts
-This is a concatenated list of exon starts, separated by comma
-** exonStarts_mm8
-** GenBankID
-** GeneDescription
-** GeneID
-This is the GeneID which used to be called the LocusLinkID
-** GeneSymbol
-** Id
-** Info_mm9
-** kgID
-** NM_ID
-This is the messenger RNA reference id number (nucleotide Message)
-** ProteinID
-** SpeciesId
-** Strand
-** Strand_mm8
-** TxEnd
-We currently think that this should be the end of the 3' UTR but need to confirm
-** TxEnd_mm8
-** TxStart
-We currently think that this should be the start of the 5' UTR but need to confirm
-** TxStart_mm8
-** UnigenID
-Unigene IDs, often multiple
-
-* GeneChip
-This table lists the array platforms that are used by the GeneNetwork. For example Affymetrix U74Av2, M430A, RAE230A. etc.
-The name 'GeneChip' is much too specific. 'Platform' would be better term.
-
-A new record can be inserted only if the relevant record in Species table is in place. ID1206
-
-Please use the following conventions for naming array platform:
-
-MG_U74AV2 is a good form but
-Affy_U74Av2 would be better
-
-Start with a four letter vendor code (Upper case lower case underscore)
-"Affy_" for Affymetrix
-"Illu_" for Illumina
-"Agil_"
-
-then use the name of the array given by the vendor
-for example: U74AV2, MOE430A, MOE430B, MOE430V2, RAE230A, G4121A, MOUSE6.0, MOUSE6.1, MOUSE6.2
-** GeneChipId
-** GeneChipName
-** GeoPlatform
-** GO_tree_value
-** Id
-internal GN identifier of the array platform
-** Name
-array platform long identifier or name
-** SpeciesId
-Foreign key to Species:Id
-species for which this array was designed to work best (U74Av2 for mouse, RAE230A for rat)
-** Title
-
-* GeneCategory
-DEPRECATED. Used by GeneWiki notes to classify notes. This table has never been used.
-If this table is deleted then please delete all checkboxes associated with GeneWiki data entry. RWW March 2016.
-** Id
-** Name
-
-* Genbank
-DEPRECATED. Apparently only used by the "Probe Tools". This table contains a complete or truncated copy of GenBank sequence data associated with particular Affymetrix Probe sets. When a GenBank sequence entry was long, we took only the most terminal 1000 nt under the assumption that this was the 3' end of the sequence. This assumption will often be incorrect. This table is used primarily in association with Affymetrix Probe sets generated using GenBank sequence. The Probe Tools table in GN is able to BLAT the GenBank sequences provided in this table.
-Created by Yanhua Qu, August 2005. Deprecated by RWW March 2016.
-** GenbankId
-** Id
-conventional GenBank identifier of the sequence
-** Sequence
-up to 1000 nucleotides of sequence
-** SpeciesId
-species identifier used by GenBank and NCBI
-
-* EnsemblChip
-Deprecated and not a function in GN2. For that matter, not even a function of most array data in GN1. One of several tables created by Hongqiang Li to be used with Probe Tool functions for M430 Affymetrix array to show location of probes only in mouse. All locations are equivalent to mm8 in mouse. Xusheng Wang points out that this could be done from UCSC browser.
-
-This table should also be updated at some point.
-
-
-Probe locations were obtained from Ensembl ftp://ftp.ensembl.org/pub/current_mus_musculus/data/mysql/mus_musculus_core_43 by Hongqiang Li. We made use of text files and MySQL tables called:
-
-oligo_feature.txt.table.gz (25774 KB file of 3/1/07 1:53:00 AM)
-oligo_probe.txt.table.gz (24411 KB 3/1/07 1:54:00 AM)
-seq_region.txt.table.gz (383 KB, 3/1/07 1:59:00 AM)
-** Id
-** Name
-** ProbeSetSize
-** Type
-
-* Docs
-Rob suspects that this table is used to track images, PDF, etc, that are uploaded into GN documentation (e.g., References and Glossary). Check with Arthur or Lei. (RWW March 2016)
-** content
-** entry
-** id
-** title
-
-* Description_of_Schema
-<P>This page provides a partial description of the database tables used by The GeneNetwork. This schema is dynamically updated from the MySQL database. Short text annotation at the top of many tables is entered manually. [Implemented by Hongqiang Li, Aug 2005.]
-
-<P><B>Suggested Conventions for Table Names</B>: Please start with an upper case character for each distinct word used to name the table, for example "AccessLog", "AvgMethod", "ProbeFreeze". A mix of upper case and lower case is fine. In general, avoid unscore. However, use of the underscore character is apppropriate for particular freezes or source of data in a table, for example, "GeneList_hg17" and "CeleraInfo_mm6".
-
-<P><B>Suggested Conventions for Field Names</B>: Use of lower case is preferred when possible. Separate words in a field name with underscore: examples: ip_address, allele_B6. Please try to make field names self-explanatory to a bioinformatics expert. Please annotate and describe the field name when you make a new table or add a new field. Avoid cryptic suffixes and prefixes to field names.
-
-<P>Last edited March 21, 2016
-
-* DBType
-
-** Id
-** Name
-
-* DBList
-
-** Code
-** DBTypeId
-** FreezeId
-** Id
-** Name
-
-* Dataset_mbat
-DEPRECATED. What is mbat? Is this associated with 8 tissues and phenotypes of BXD only. Hippocampus, brain, cerebellum, eye, neocortex, NAc, PFC, striatum and phenotypes. All before 2008. (RWW Mar 2016)
-** cross
-** database
-** database_LongName
-** id
-** species
-** switch
-** tissue
-
-* DatasetStatus
-This is the private versus public flag for a large molecular phenotype data sets (aka prior to 2016 as a ProbeSetFreeze) (RWW March 2016). This table probably created by Arthur Centeno in 2014-2015.
-** DatasetStatusId
-** DatasetStatusName
-
-* Datasets
-DEPRECATED in favor of "InfoFiles". Check if this is still needed (March 2016). These are the annotation/metadata fields used to describe molecular phenotypes only (aka ProbeSetFreezes). This table designed by Arthur Centeno and used to generate and modify "INFO" tables. Created in 2014-2015.
-** AboutCases
-** AboutDataProcessing
-** AboutPlatform
-** AboutTissue
-** Acknowledgment
-** Citation
-** Contributors
-** DatasetId
-** DatasetName
-** DatasetStatusId
-** ExperimentDesign
-** GeoSeries
-** InvestigatorId
-** Notes
-** PublicationTitle
-** Summary
-
-* DatasetMapInvestigator
-Dataset owner or creator. Not sure how this is used? Is it used to for data access or password control? Check with Arthur Centeno or Lei Yan if this is used to define private ProbeSetFreeze (RWW Mar 2016). Probably created by Arthur Centeno 2014-2015. Why is the word "Map" in the table name?
-** DatasetId
-** Id
-** InvestigatorId
-
-* Data
-This simple but huge table actually contains the bulk of data in GeneNetwork. Almost all trait data is defined by a data identifier and a case value (e.g., strain or F2 or individual). This table only contains the main value (typically the mean or average) for each case, strain, or individual. The Standard Error of the Mean is kept in the table called "SE".
-
-Created by Jintao, March 2003.
-To retrieve or insert the data for an experiment there should be also corresponding entries in the ProbeXRef table for the raw data (references ProbeFreeze) or in the ProbeSetXRef table for transformed data (references ProbeSetFreeze). ID1206
-** Id
-** StrainId
-Foreign key to InbredStrain:Id
-** value
-
-* Chr_Length_Evan
-This is a table created by Evan Williams, July 2006. Not sure what it is for. [Rob Williams, July 24, 2006)
-** Length
-length of the chromosome, presumably in megabases
-** Name
-name of the chromosome, usually a number but also UN=unknown, X, Y, Mt (mitochondria)
-** OrderId
-Not
-** SpeciesId
-the identifier for the species from NCBI
-
-* Chr_Length_0609
-PLEASE DELETE IF POSSIBLE. May be used by ARCHIVE SITE. This table is identical to Chr_Length table, both structure and records. One of them could be redundant.
-ID1206
-** Length
-** Name
-** OrderId
-** SpeciesId
-Foreign key to Species.Id
-
-* Chr_Length
-This table provides the approximate length of a chromosome in megabases taken from the most recent public genome assemblies of several species. As of Aug. 2005, this table contains lengths for mouse, rat, and Arabidopsis chromosomes. No data for Barley since there is not physical assembly yet. We are usually missing the Y chromosome and the mitochondrial genome (Chr Y and Chr M, respectively).
-
-Some of these fields should be semantically registered (SpeciesId, Chromosome_name).
-Created by Jintao Wang, 2004.
-** Length
-the length of the chromosome in megabase units
-** Name
-At most 3 letter name of the chromosome ID1206
-** OrderId
-the numerical order of chromosomes for purposes of generating whole genome maps (Chr X is 20 in mouse)
-** SpeciesId
-Foreign key to Species.Id
-the identifier for the species. This may be the official NCBI species code or just an internal GN code. Check
-
-* CeleraINFO_mm6
-PLEASE DELETE: DEPRECATED: use the Snp table instead.
-
-CeleraINFO_mm6 provides information on single nucelotide polymorphisms (SNPs) for five strains of mice, C57BL/6J, DBA/2J, A/J, 129S1/SvImJ, and 129X1/SvJ, obtained from Celera Genomics by Alex Williams and Chris Vincent, summer 2003.
-
-"mm6" refers to the megabase positions taken from the sixth build of Mus musculus as presented in UCSC Genome Browser (also known as NCBI Mouse Build 34 that was current from March 2005 through approximately March 2006).
-
-mm6 data were generated by Yanhua Qu by BLAT sequence alignment of ~300 bp of sequence around each SNP. This table was generated by Robert Crowell and Yanhua Qu, June 2005, for use on WebQTL physical maps.
-
-** allele_AJ
-the allele of A/J
-** allele_B6
-the allele of C57BL/6J
-** allele_D2
-the allele of DBA/2J
-** allele_S1
-** allele_X1
-** B6_AJ
-same as above but used for the AXB/BXA cross
-** B6_D2
-a flag (0 or 1) that denotes if B6 and D2 have ths same allele (0) or a different allele (1) that is used in generating SNP tracks on BXD physical maps
-** chromosome
-mouse chromosome from BLAT alignment
-** D2_AJ
-same as above
-** flanking3
-** flanking5
-** id
-** MB_celera
-megabase position given by Celera
-** MB_UCSC
-mouse mm6 position in megabases from the UCSC Genome Brower mm6 BLAT analysis (NCBI Build 34)
-** MB_UCSC_OLD
-the mm5 position values
-** SNPID
-from Celera Genomics
-
-* CeleraINFO_mm5
-OBSOLETE: Replaced by CeleraINFO_mm6
-
-CeleraINFO_mm5 provides information on single nucelotide polymorphisms (SNPs) for three strains of mice--C57BL/6J, DBA/2J, and A/J--obtained from Celera Genomics by Alex Williams and Chris Vincent, summer 2003.
-
-"mm5" refers to the megabase positions taken from the fifth build of Mus musculus as presented in UCSC Genome Browser (also known as NCBI Mouse Build 33 that was current until March 2005).
-
-mm5 values were generated by Yanhua Qu by BLAT sequence alignment of ~300 bp of sequence of about 3 million Celera SNP sequences. This table was generated by Alex Williams and Robert Crowell (?), July-August 2004, for use on WebQTL physical maps.
-
-This table is now replaced by CeleraINFO_mm6.
-
-
-* CeleraINFO
-Obsolete table. Jintao, can we delete this table?
-
-* CaseAttributeXRef
-Table used for handle database metadata. One to one mapping for ProbeSetFreeze etc.
-** CaseAttributeId
-** ProbeSetFreezeId
-** StrainId
-** Value
-
-* CaseAttribute
-This is a new table created by Zach Sloan and Lei Yan in 2014-2015 to allow us to add cofactors and metadata that typically display in the Trait Data and Analysis page along side of the phenotype values for each case/sample. For example, if you review any of the human data sets where GROUP = "Brain, Development: Normal Gene Expression (Yale/Sestan)" you will find CaseAttribute data for the expression data sets such as Sex, PostMortem Interval (PMI), Age, Ethnicity, Tissue, pH.
-
-This table may not really be necessary, since all data here could also be put into the Phenotype data table. But then we need code that would allow the user (or programmer or annotator) to decide what cofactors to show in the Trait Data and Analysis page.
-** Id
-** Name
-The name of the cofactor shown in the Trait Data and Analysis page (e.g. "Ethn.", "pH", "Sex")
-
-* B_D_Tissue_CNS_GI_Merged_Average_Spearman
-This static table was precomputed by Xusheng Wang, Sept 2008. It provides the correlations of gene expression across 23 tissues (combined data from both C57BL/6J (B) male and DBA/2J (D) male). The 23 "tissues" are actually based on data for about 60 samples, but manny of the samples are not independent and were pooled together prior to computing the correlations (for example, many brain regions were combined). The following tissues were included in computing the Spearman rank order Rho correlation. P values were also precomputed by Xusheng. The GeneId1 and GeneId2 are currently all mouse GeneIds. However, we probably should us HomolGene Ids or have ids for multiple species (animals only at this point). This table should be usable for mouse, rat, human, and other vertebrates.
-** Correlation
-** GeneId1
-** GeneId2
-** PValue
-
-* B_D_Tissue_CNS_GI_Merged_Average_Pearson
-This static table was precomputed by Xusheng Wang, Sept 2008. It provides the correlations of gene expression across 23 tissues (combined data from both C57BL/6J (B) male and DBA/2J (D) male). The following tissues were included in computing the Pearson product moment correlations. P values were also precomputed by Xusheng. The GeneId1 and GeneId2 are currently all mouse GeneIds. However, we probably should us HomolGene Ids or have ids for multiple species (animals only at this point). This table should be usable for mouse, rat, human, and other vertebrates.
-** Correlation
-** GeneId1
-** GeneId2
-** PValue
-
-* BXDSnpPosition
-PLEASE CORRECT TALBE AND FIELD NAMES. A table created by Hongqiang (October 2007) to be used to display SNPs on the interval maps for all crosses of mice including BXD, AXB, AKXD and B6D2F2 mouse crosses. Field are not well annotated. All data in this table is taken from the main mouse SNP table. This table should be refreshed every day or week. Hongqiang would need to write a script to do this. Not done yet (Nov 13, 2007). Reviewed by Kev and Rob, July 2008. Evan may have used this table to get SNPs to show up on the BHF2 interval maps. Still needs to be renamed. Needs to handle CXB RI set and LXS RI set.
-** Chr
-Chromosome
-** Mb
-SNP position in megabases rather than basepairs from mm8. Is this really mm8. Should be mm9 up to Mar 2016.
-** StrainId1
-Not sure, Strain identifier (probably C57BL/6J)
-** StrainId2
-Not sure, Strain identifier (probably DBA/2J
-
-* AvgMethod
-Should be deprecated. Used by ProbeSetFreeze (March 2016 by RWW)
-
-A table that simply lists the transformations used to generate microarray probe or probe set data. For example, for the Affymetrix platform MAS5, PDNN, RMA, are common transformation methods. For Illumina, the transform methods included Rank, RankInv, LOESS, LOESS_NB (no background). A single raw data set can be transformed in several ways, giving rise to a family of related data sets. This table was originally set up by Jintao Wang. We should confirm that this table is still used. Possibly a development vestige. "mlratio" was added by Evan Williams June 2008 to describe the Agilent "mean log" method used by Lusis and colleagues.
-The table is referenced in ProbeSetFreeze, so it is still in use on Dec 14,2006. 6 records on Dec14, 2006. ID12065
-** AvgMethodId
-** Id
-internal identifier
-** Name
-name or abbreviation of the method used to generate the probe set consensus estimates of transcript abundance
-** Normalization
-
-* Allele
-This table is one of a group of four tables used by the SNP Viewer component of GeneNetwork. Contains one record for every allele for all SNPs across all datasets.
-[Created by Robert Crowell, August 18, 2005. Annotation of table, RWW, Aug 19, 2005; Robert Crowell, Aug 22, 2005.]
-
-<b>See also:</b>
-<a href="/cgi-bin/beta/schema.py#Snp">Snp</a>
-<a href="/cgi-bin/beta/schema.py#Strain">Strain</a>
-** Id
-internal GeneNetwork identifier for allele
-** SnpId
-Foreign key to Snp.Id
-internal GeneNetwork identifier for this SNP
-** StrainId
-Foreign key to Strain.Id
-internal GeneNetwork identifier for strain
-** Value
-allele nucleotide in strain; conventions: upper case are firm SNPs, lower case imputed, heterozygotes (e.g., A/C), dash (-) used for deletion, w,x,y,z,~ used for deprecated A,C,G,T,- SNPs.
-
-* AccessLog
-This table tracks access time and IP addresses. Used for logging in registered users and tracking cookies.
-Created by Jintao Wang, 2004.
-** accesstime
-time stamp of login
-** id
-internal identifier
-** ip_address
-Internet protocol address
-
diff --git a/sql/schema-original.sql b/sql/schema-original.sql
deleted file mode 100644
index 8803d8a..0000000
--- a/sql/schema-original.sql
+++ /dev/null
@@ -1,2334 +0,0 @@
--- MySQL dump 10.16 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64)
---
--- Host: localhost Database: db_webqtl
--- ------------------------------------------------------
--- Server version 10.5.8-MariaDB-log
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8mb4 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `AccessLog`
---
-
-DROP TABLE IF EXISTS `AccessLog`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `AccessLog` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `accesstime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ip_address` char(20) NOT NULL DEFAULT '0.0.0.0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=1366832 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `AvgMethod`
---
-
-DROP TABLE IF EXISTS `AvgMethod`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `AvgMethod` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `AvgMethodId` int(5) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `Normalization` varchar(30) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `BXDSnpPosition`
---
-
-DROP TABLE IF EXISTS `BXDSnpPosition`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `BXDSnpPosition` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `Chr` char(2) DEFAULT NULL,
- `StrainId1` int(11) DEFAULT NULL,
- `StrainId2` int(11) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `BXDSnpPosition` (`Chr`,`StrainId1`,`StrainId2`,`Mb`)
-) ENGINE=MyISAM AUTO_INCREMENT=7791982 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttribute`
---
-
-DROP TABLE IF EXISTS `CaseAttribute`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttribute` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(30) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttributeXRef`
---
-
-DROP TABLE IF EXISTS `CaseAttributeXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttributeXRef` (
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `CaseAttributeId` smallint(5) NOT NULL DEFAULT 0,
- `Value` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`ProbeSetFreezeId`,`StrainId`,`CaseAttributeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttributeXRefNew`
---
-
-DROP TABLE IF EXISTS `CaseAttributeXRefNew`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttributeXRefNew` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` int(8) unsigned NOT NULL DEFAULT 0,
- `CaseAttributeId` smallint(5) NOT NULL DEFAULT 0,
- `Value` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`InbredSetId`,`StrainId`,`CaseAttributeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CeleraINFO_mm6`
---
-
-DROP TABLE IF EXISTS `CeleraINFO_mm6`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CeleraINFO_mm6` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SNPID` char(14) NOT NULL DEFAULT '',
- `chromosome` char(3) DEFAULT NULL,
- `MB_UCSC` double DEFAULT NULL,
- `MB_celera` double DEFAULT NULL,
- `allele_B6` char(4) DEFAULT NULL,
- `allele_D2` char(4) DEFAULT NULL,
- `allele_AJ` char(4) DEFAULT NULL,
- `B6_D2` char(1) DEFAULT NULL,
- `B6_AJ` char(1) DEFAULT NULL,
- `D2_AJ` char(1) DEFAULT NULL,
- `MB_UCSC_OLD` double DEFAULT NULL,
- `allele_S1` char(4) DEFAULT NULL,
- `allele_X1` char(4) DEFAULT NULL,
- `flanking5` char(100) DEFAULT NULL,
- `flanking3` char(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `celeraIndex` (`chromosome`,`MB_celera`),
- KEY `celeraIndex2` (`chromosome`,`MB_UCSC`),
- KEY `chromosome_2` (`chromosome`,`MB_UCSC`),
- KEY `MB_UCSC_2` (`MB_UCSC`,`chromosome`),
- KEY `SNPID` (`SNPID`)
-) ENGINE=MyISAM AUTO_INCREMENT=3028848 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Chr_Length`
---
-
-DROP TABLE IF EXISTS `Chr_Length`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Chr_Length` (
- `Name` char(3) NOT NULL DEFAULT '',
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `OrderId` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Length` int(10) unsigned NOT NULL DEFAULT 0,
- `Length_2016` int(10) unsigned NOT NULL DEFAULT 0,
- `Length_mm8` int(10) unsigned DEFAULT NULL,
- UNIQUE KEY `nameIdx` (`SpeciesId`,`Name`),
- UNIQUE KEY `SpeciesIdx` (`SpeciesId`,`OrderId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DBList`
---
-
-DROP TABLE IF EXISTS `DBList`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DBList` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `DBTypeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `FreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` char(50) NOT NULL DEFAULT '',
- `Code` char(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Cde` (`Code`),
- KEY `DBIndex` (`DBTypeId`,`FreezeId`)
-) ENGINE=MyISAM AUTO_INCREMENT=907 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DBType`
---
-
-DROP TABLE IF EXISTS `DBType`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DBType` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(30) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DatasetMapInvestigator`
---
-
-DROP TABLE IF EXISTS `DatasetMapInvestigator`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DatasetMapInvestigator` (
- `Id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `DatasetId` int(6) NOT NULL,
- `InvestigatorId` int(6) NOT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=2403 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DatasetStatus`
---
-
-DROP TABLE IF EXISTS `DatasetStatus`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DatasetStatus` (
- `DatasetStatusId` int(5) NOT NULL,
- `DatasetStatusName` varchar(20) DEFAULT NULL,
- UNIQUE KEY `DatasetStatusId` (`DatasetStatusId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Dataset_mbat`
---
-
-DROP TABLE IF EXISTS `Dataset_mbat`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Dataset_mbat` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `switch` int(1) DEFAULT NULL,
- `species` varchar(255) DEFAULT NULL,
- `cross` varchar(255) DEFAULT NULL,
- `tissue` varchar(255) DEFAULT NULL,
- `database` varchar(255) DEFAULT NULL,
- `database_LongName` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Datasets`
---
-
-DROP TABLE IF EXISTS `Datasets`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Datasets` (
- `DatasetId` int(6) NOT NULL AUTO_INCREMENT,
- `DatasetName` varchar(255) DEFAULT NULL,
- `GeoSeries` varchar(30) DEFAULT NULL,
- `PublicationTitle` longtext DEFAULT NULL,
- `Summary` longtext DEFAULT NULL,
- `ExperimentDesign` longtext DEFAULT NULL,
- `AboutCases` longtext DEFAULT NULL,
- `AboutTissue` longtext DEFAULT NULL,
- `AboutPlatform` longtext DEFAULT NULL,
- `AboutDataProcessing` longtext DEFAULT NULL,
- `Contributors` longtext DEFAULT NULL,
- `Citation` longtext DEFAULT NULL,
- `Acknowledgment` longtext DEFAULT NULL,
- `Notes` longtext DEFAULT NULL,
- `InvestigatorId` int(5) NOT NULL,
- `DatasetStatusId` int(5) NOT NULL,
- PRIMARY KEY (`DatasetId`),
- UNIQUE KEY `DatasetId` (`DatasetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=301 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Docs`
---
-
-DROP TABLE IF EXISTS `Docs`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Docs` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `entry` varchar(255) NOT NULL,
- `title` varchar(255) NOT NULL,
- `content` text NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblChip`
---
-
-DROP TABLE IF EXISTS `EnsemblChip`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblChip` (
- `Id` int(11) NOT NULL,
- `ProbeSetSize` int(11) NOT NULL,
- `Name` varchar(40) NOT NULL,
- `Type` enum('AFFY','OLIGO') DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblProbe`
---
-
-DROP TABLE IF EXISTS `EnsemblProbe`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblProbe` (
- `Id` int(11) NOT NULL,
- `ChipId` int(11) NOT NULL,
- `ProbeSet` varchar(40) DEFAULT NULL,
- `Name` varchar(40) DEFAULT NULL,
- `length` int(11) NOT NULL,
- KEY `EnsemblProbeId` (`Id`),
- KEY `EnsemblProbeName` (`Name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblProbeLocation`
---
-
-DROP TABLE IF EXISTS `EnsemblProbeLocation`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblProbeLocation` (
- `Chr` char(2) NOT NULL,
- `Start` int(11) NOT NULL,
- `Start_2016` int(11) DEFAULT NULL,
- `End` int(11) NOT NULL,
- `End_2016` int(11) DEFAULT NULL,
- `Strand` int(11) NOT NULL,
- `MisMataches` int(11) DEFAULT NULL,
- `ProbeId` int(11) NOT NULL,
- KEY `EnsemblLocationProbeId` (`ProbeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GORef`
---
-
-DROP TABLE IF EXISTS `GORef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GORef` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goterm` varchar(255) DEFAULT NULL,
- `genes` text DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=17510 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Genbank`
---
-
-DROP TABLE IF EXISTS `Genbank`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Genbank` (
- `Id` varchar(20) NOT NULL DEFAULT '',
- `Sequence` text DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`Id`),
- KEY `Id` (`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneCategory`
---
-
-DROP TABLE IF EXISTS `GeneCategory`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneCategory` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`),
- KEY `name_idx` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneChip`
---
-
-DROP TABLE IF EXISTS `GeneChip`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneChip` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `GeneChipId` int(5) DEFAULT NULL,
- `GeneChipName` varchar(200) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `GeoPlatform` char(15) DEFAULT NULL,
- `Title` varchar(100) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT 1,
- `GO_tree_value` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneChipEnsemblXRef`
---
-
-DROP TABLE IF EXISTS `GeneChipEnsemblXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneChipEnsemblXRef` (
- `GeneChipId` int(11) NOT NULL,
- `EnsemblChipId` int(11) NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneIDXRef`
---
-
-DROP TABLE IF EXISTS `GeneIDXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneIDXRef` (
- `mouse` int(11) NOT NULL DEFAULT 0,
- `rat` int(11) NOT NULL DEFAULT 0,
- `human` int(11) NOT NULL DEFAULT 0,
- KEY `mouse_index` (`mouse`),
- KEY `rat_index` (`rat`),
- KEY `human_index` (`human`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList`
---
-
-DROP TABLE IF EXISTS `GeneList`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList` (
- `SpeciesId` int(5) unsigned NOT NULL DEFAULT 1,
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `GeneSymbol` varchar(15) DEFAULT NULL,
- `GeneDescription` text DEFAULT NULL,
- `Chromosome` varchar(10) DEFAULT NULL,
- `TxStart` double DEFAULT NULL,
- `TxStart_2016` double DEFAULT NULL,
- `TxEnd` double DEFAULT NULL,
- `TxEnd_2016` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `GeneID` varchar(10) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `GenBankID` varchar(15) DEFAULT NULL,
- `UnigenID` varchar(15) DEFAULT NULL,
- `ProteinID` varchar(15) DEFAULT NULL,
- `AlignID` varchar(10) DEFAULT NULL,
- `exonCount` int(7) NOT NULL DEFAULT 0,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsStart_2016` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `cdsEnd_2016` double DEFAULT NULL,
- `TxStart_mm8` double DEFAULT NULL,
- `TxEnd_mm8` double DEFAULT NULL,
- `Strand_mm8` char(1) DEFAULT NULL,
- `exonCount_mm8` int(7) DEFAULT NULL,
- `exonStarts_mm8` text DEFAULT NULL,
- `exonEnds_mm8` text DEFAULT NULL,
- `cdsStart_mm8` double DEFAULT NULL,
- `cdsEnd_mm8` double DEFAULT NULL,
- `Chromosome_mm8` varchar(10) DEFAULT NULL,
- `Info_mm9` text DEFAULT NULL,
- `RGD_ID` int(10) DEFAULT NULL,
- UNIQUE KEY `geneId` (`SpeciesId`,`Id`),
- KEY `geneSymbol` (`GeneSymbol`),
- KEY `geneSymbol2` (`SpeciesId`,`GeneSymbol`),
- KEY `Loc1` (`SpeciesId`,`Chromosome`,`TxStart`),
- KEY `Loc2` (`SpeciesId`,`Chromosome`,`TxEnd`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList_rn3`
---
-
-DROP TABLE IF EXISTS `GeneList_rn3`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList_rn3` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeSet` varchar(16) DEFAULT NULL,
- `geneSymbol` varchar(15) DEFAULT NULL,
- `geneID` varchar(10) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `geneDescription` text DEFAULT NULL,
- `genBankID` varchar(15) DEFAULT NULL,
- `unigenID` varchar(15) DEFAULT NULL,
- `score` int(4) DEFAULT NULL,
- `qStart` int(3) DEFAULT NULL,
- `qEnd` int(3) DEFAULT NULL,
- `qSize` int(3) DEFAULT NULL,
- `identity` varchar(7) DEFAULT NULL,
- `chromosome` varchar(8) DEFAULT NULL,
- `strand` char(1) DEFAULT NULL,
- `txStart` double DEFAULT NULL,
- `txEnd` double DEFAULT NULL,
- `txSize` double DEFAULT NULL,
- `span` int(7) DEFAULT NULL,
- `specificity` double DEFAULT NULL,
- `sequence` text DEFAULT NULL,
- `flag` int(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `geneSymbol` (`geneSymbol`),
- KEY `Loc1` (`chromosome`,`txStart`),
- KEY `Loc2` (`chromosome`,`txEnd`)
-) ENGINE=MyISAM AUTO_INCREMENT=14917 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList_rn33`
---
-
-DROP TABLE IF EXISTS `GeneList_rn33`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList_rn33` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `geneSymbol` varchar(15) DEFAULT NULL,
- `txStart` double DEFAULT NULL,
- `txEnd` double DEFAULT NULL,
- `exonCount` int(7) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `chromosome` varchar(8) DEFAULT NULL,
- `strand` char(1) DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `geneSymbol` (`geneSymbol`),
- KEY `Loc1` (`chromosome`,`txStart`),
- KEY `Loc2` (`chromosome`,`txEnd`)
-) ENGINE=MyISAM AUTO_INCREMENT=9790 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneMap_cuiyan`
---
-
-DROP TABLE IF EXISTS `GeneMap_cuiyan`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneMap_cuiyan` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `TranscriptID` varchar(255) DEFAULT NULL,
- `GeneID` varchar(255) DEFAULT NULL,
- `Symbol` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=10537 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIF`
---
-
-DROP TABLE IF EXISTS `GeneRIF`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIF` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `versionId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `symbol` varchar(30) NOT NULL DEFAULT '',
- `PubMed_ID` varchar(255) DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `comment` text DEFAULT NULL,
- `email` varchar(50) DEFAULT NULL,
- `createtime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `user_ip` varchar(20) DEFAULT NULL,
- `weburl` varchar(255) DEFAULT NULL,
- `initial` varchar(10) DEFAULT NULL,
- `display` tinyint(4) DEFAULT 1,
- `reason` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`,`versionId`),
- KEY `name_idx` (`symbol`),
- KEY `status` (`display`),
- KEY `timestamp` (`createtime`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIFXRef`
---
-
-DROP TABLE IF EXISTS `GeneRIFXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIFXRef` (
- `GeneRIFId` int(10) unsigned NOT NULL DEFAULT 0,
- `versionId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `GeneCategoryId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`GeneRIFId`,`versionId`,`GeneCategoryId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIF_BASIC`
---
-
-DROP TABLE IF EXISTS `GeneRIF_BASIC`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIF_BASIC` (
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `GeneId` int(10) unsigned NOT NULL DEFAULT 0,
- `symbol` varchar(255) NOT NULL DEFAULT '',
- `PubMed_ID` int(10) unsigned NOT NULL DEFAULT 0,
- `createtime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `comment` text DEFAULT NULL,
- `VersionId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`GeneId`,`SpeciesId`,`createtime`,`PubMed_ID`,`VersionId`),
- KEY `symbol` (`symbol`,`SpeciesId`,`createtime`),
- FULLTEXT KEY `commts` (`comment`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Geno`
---
-
-DROP TABLE IF EXISTS `Geno`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Geno` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `Name` varchar(40) NOT NULL DEFAULT '',
- `Marker_Name` varchar(40) DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `Sequence` text DEFAULT NULL,
- `Source` varchar(40) DEFAULT NULL,
- `chr_num` smallint(5) unsigned DEFAULT NULL,
- `Source2` varchar(40) DEFAULT NULL,
- `Comments` varchar(255) DEFAULT NULL,
- `used_by_geno_file` varchar(40) DEFAULT NULL,
- `Mb_mm8` double DEFAULT NULL,
- `Chr_mm8` char(3) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `species_name` (`SpeciesId`,`Name`),
- KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=716770 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoCode`
---
-
-DROP TABLE IF EXISTS `GenoCode`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoCode` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `AlleleType` char(3) NOT NULL DEFAULT '',
- `AlleleSymbol` char(2) NOT NULL DEFAULT '',
- `DatabaseValue` smallint(5) DEFAULT NULL,
- PRIMARY KEY (`InbredSetId`,`AlleleType`,`AlleleSymbol`),
- UNIQUE KEY `InbredSetId_AlleleType` (`InbredSetId`,`AlleleType`),
- UNIQUE KEY `InbredSetId_AlleleSymbol` (`InbredSetId`,`AlleleSymbol`),
- UNIQUE KEY `InbredSetId_DatabaseValue` (`InbredSetId`,`DatabaseValue`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoData`
---
-
-DROP TABLE IF EXISTS `GenoData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoFile`
---
-
-DROP TABLE IF EXISTS `GenoFile`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoFile` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `server` varchar(100) NOT NULL,
- `InbredSetID` int(11) NOT NULL,
- `location` varchar(255) NOT NULL,
- `title` varchar(255) NOT NULL,
- `sort` int(3) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoFreeze`
---
-
-DROP TABLE IF EXISTS `GenoFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- `confidentiality` tinyint(3) unsigned DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoSE`
---
-
-DROP TABLE IF EXISTS `GenoSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoXRef`
---
-
-DROP TABLE IF EXISTS `GenoXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoXRef` (
- `GenoFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `GenoId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `cM` double DEFAULT 0,
- `Used_for_mapping` char(1) DEFAULT 'N',
- UNIQUE KEY `ProbeSetId` (`GenoFreezeId`,`GenoId`),
- UNIQUE KEY `DataId` (`DataId`),
- KEY `GenoId` (`GenoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `H2`
---
-
-DROP TABLE IF EXISTS `H2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `H2` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `ICH2` double NOT NULL DEFAULT 0,
- `H2SE` double NOT NULL DEFAULT 0,
- `HPH2` double NOT NULL DEFAULT 0,
- UNIQUE KEY `DataId` (`DataId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Homologene`
---
-
-DROP TABLE IF EXISTS `Homologene`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Homologene` (
- `HomologeneId` int(11) DEFAULT NULL,
- `GeneId` int(11) DEFAULT NULL,
- `TaxonomyId` int(11) DEFAULT NULL,
- KEY `GeneId` (`GeneId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InbredSet`
---
-
-DROP TABLE IF EXISTS `InbredSet`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InbredSet` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `InbredSetId` int(5) DEFAULT NULL,
- `InbredSetName` varchar(100) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `FullName` varchar(100) DEFAULT NULL,
- `public` tinyint(3) unsigned DEFAULT 2,
- `MappingMethodId` char(50) DEFAULT '1',
- `GeneticType` varchar(255) DEFAULT NULL,
- `Family` varchar(100) DEFAULT NULL,
- `FamilyOrder` int(5) DEFAULT NULL,
- `MenuOrderId` double NOT NULL,
- `InbredSetCode` varchar(5) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `Name` (`Name`),
- KEY `SpeciesId` (`SpeciesId`),
- KEY `Id` (`Id`),
- KEY `InbredSetCode` (`InbredSetCode`)
-) ENGINE=MyISAM AUTO_INCREMENT=83 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `IndelAll`
---
-
-DROP TABLE IF EXISTS `IndelAll`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `IndelAll` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `SourceId` smallint(5) unsigned DEFAULT NULL,
- `Name` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Mb_start` double DEFAULT NULL,
- `Mb_start_2016` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `Type` char(15) DEFAULT NULL,
- `Mb_end` double DEFAULT NULL,
- `Mb_end_2016` double DEFAULT NULL,
- `Size` double DEFAULT NULL,
- `InDelSequence` char(30) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `SnpId` (`SpeciesId`,`Name`),
- KEY `SnpId2` (`Name`),
- KEY `Position` (`SpeciesId`,`Chromosome`,`Mb_start`) USING BTREE
-) ENGINE=MyISAM AUTO_INCREMENT=142895 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `IndelXRef`
---
-
-DROP TABLE IF EXISTS `IndelXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `IndelXRef` (
- `IndelId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId1` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId2` smallint(5) unsigned DEFAULT NULL,
- PRIMARY KEY (`IndelId`,`StrainId1`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InfoFiles`
---
-
-DROP TABLE IF EXISTS `InfoFiles`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InfoFiles` (
- `DatasetId` int(5) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT NULL,
- `TissueId` int(5) DEFAULT NULL,
- `InbredSetId` int(5) DEFAULT NULL,
- `GeneChipId` int(5) DEFAULT NULL,
- `AvgMethodId` int(5) DEFAULT NULL,
- `InfoFileTitle` longtext DEFAULT NULL,
- `Specifics` longtext DEFAULT NULL,
- `Status` varchar(255) DEFAULT NULL,
- `Title` varchar(255) DEFAULT NULL,
- `Organism` varchar(255) DEFAULT NULL,
- `Experiment_Type` longtext DEFAULT NULL,
- `Summary` longtext DEFAULT NULL,
- `Overall_Design` longtext DEFAULT NULL,
- `Contributor` longtext DEFAULT NULL,
- `Citation` longtext DEFAULT NULL,
- `Submission_Date` varchar(255) DEFAULT NULL,
- `Contact_Name` varchar(255) DEFAULT NULL,
- `Emails` varchar(255) DEFAULT NULL,
- `Phone` varchar(255) DEFAULT NULL,
- `URL` varchar(255) DEFAULT NULL,
- `Organization_Name` varchar(255) DEFAULT NULL,
- `Department` varchar(255) DEFAULT NULL,
- `Laboratory` varchar(255) DEFAULT NULL,
- `Street` varchar(255) DEFAULT NULL,
- `City` varchar(255) DEFAULT NULL,
- `State` varchar(255) DEFAULT NULL,
- `ZIP` varchar(255) DEFAULT NULL,
- `Country` varchar(255) DEFAULT NULL,
- `Platforms` varchar(255) DEFAULT NULL,
- `Samples` longtext DEFAULT NULL,
- `Species` varchar(255) DEFAULT NULL,
- `Normalization` varchar(255) DEFAULT NULL,
- `InbredSet` varchar(255) DEFAULT NULL,
- `InfoPageName` varchar(255) NOT NULL,
- `DB_Name` varchar(255) DEFAULT NULL,
- `Organism_Id` varchar(60) DEFAULT NULL,
- `InfoPageTitle` varchar(255) DEFAULT NULL,
- `GN_AccesionId` int(4) DEFAULT NULL,
- `Tissue` varchar(60) DEFAULT NULL,
- `AuthorizedUsers` varchar(100) DEFAULT NULL,
- `About_Cases` longtext DEFAULT NULL,
- `About_Tissue` longtext DEFAULT NULL,
- `About_Download` longtext DEFAULT NULL,
- `About_Array_Platform` longtext DEFAULT NULL,
- `About_Data_Values_Processing` longtext DEFAULT NULL,
- `Data_Source_Acknowledge` longtext DEFAULT NULL,
- `Progreso` varchar(20) DEFAULT NULL,
- `QualityControlStatus` longtext DEFAULT NULL,
- `InfoFileId` int(6) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`InfoFileId`),
- UNIQUE KEY `InfoPageName` (`InfoPageName`),
- UNIQUE KEY `GN_AccesionId` (`GN_AccesionId`)
-) ENGINE=MyISAM AUTO_INCREMENT=1470 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InfoFilesUser_md5`
---
-
-DROP TABLE IF EXISTS `InfoFilesUser_md5`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InfoFilesUser_md5` (
- `Username` varchar(16) DEFAULT NULL,
- `Password` varchar(32) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Investigators`
---
-
-DROP TABLE IF EXISTS `Investigators`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Investigators` (
- `FirstName` varchar(20) DEFAULT NULL,
- `LastName` varchar(20) DEFAULT NULL,
- `Address` varchar(200) DEFAULT NULL,
- `City` varchar(20) DEFAULT NULL,
- `State` varchar(20) DEFAULT NULL,
- `ZipCode` varchar(20) DEFAULT NULL,
- `Phone` varchar(200) DEFAULT NULL,
- `Email` varchar(200) DEFAULT NULL,
- `Country` varchar(35) DEFAULT NULL,
- `Url` text DEFAULT NULL,
- `UserName` varchar(30) DEFAULT NULL,
- `UserPass` varchar(50) DEFAULT NULL,
- `UserDate` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `UserLevel` int(8) DEFAULT NULL,
- `OrganizationId` int(5) NOT NULL,
- `InvestigatorId` int(5) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`InvestigatorId`)
-) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `LCorrRamin3`
---
-
-DROP TABLE IF EXISTS `LCorrRamin3`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `LCorrRamin3` (
- `GeneId1` int(12) unsigned DEFAULT NULL,
- `GeneId2` int(12) unsigned DEFAULT NULL,
- `value` double DEFAULT NULL,
- KEY `GeneId1` (`GeneId1`),
- KEY `GeneId2` (`GeneId2`),
- KEY `GeneId1_2` (`GeneId1`,`GeneId2`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `MachineAccessLog`
---
-
-DROP TABLE IF EXISTS `MachineAccessLog`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `MachineAccessLog` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `accesstime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ip_address` char(20) NOT NULL DEFAULT '0.0.0.0',
- `db_id` tinyint(3) unsigned NOT NULL DEFAULT 0,
- `data_id` int(10) unsigned DEFAULT NULL,
- `action` char(10) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=514946 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `MappingMethod`
---
-
-DROP TABLE IF EXISTS `MappingMethod`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `MappingMethod` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `NStrain`
---
-
-DROP TABLE IF EXISTS `NStrain`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `NStrain` (
- `DataId` int(10) unsigned DEFAULT NULL,
- `StrainId` smallint(5) unsigned DEFAULT NULL,
- `count` varchar(5) DEFAULT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `News`
---
-
-DROP TABLE IF EXISTS `News`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `News` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `date` date DEFAULT NULL,
- `details` text DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=296 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Organizations`
---
-
-DROP TABLE IF EXISTS `Organizations`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Organizations` (
- `OrganizationId` int(5) NOT NULL AUTO_INCREMENT,
- `OrganizationName` varchar(200) NOT NULL,
- PRIMARY KEY (`OrganizationId`),
- UNIQUE KEY `OrganizationId` (`OrganizationId`),
- UNIQUE KEY `OrganizationName` (`OrganizationName`)
-) ENGINE=MyISAM AUTO_INCREMENT=92 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Phenotype`
---
-
-DROP TABLE IF EXISTS `Phenotype`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Phenotype` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Pre_publication_description` text DEFAULT NULL,
- `Post_publication_description` text DEFAULT NULL,
- `Original_description` text DEFAULT NULL,
- `Units` varchar(100) NOT NULL DEFAULT 'Unknown',
- `Pre_publication_abbreviation` varchar(40) DEFAULT NULL,
- `Post_publication_abbreviation` varchar(40) DEFAULT NULL,
- `Lab_code` varchar(255) DEFAULT NULL,
- `Submitter` varchar(255) DEFAULT NULL,
- `Owner` varchar(255) DEFAULT NULL,
- `Authorized_Users` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `Post_publication_description_Index` (`Post_publication_description`(255)),
- KEY `Pre_publication_description_Index` (`Pre_publication_description`(255)),
- KEY `Pre_publication_abbreviation_Index` (`Pre_publication_abbreviation`),
- KEY `Post_publication_abbreviation_Index` (`Post_publication_abbreviation`),
- KEY `Lab_code` (`Lab_code`),
- FULLTEXT KEY `Post_publication_description` (`Post_publication_description`),
- FULLTEXT KEY `Pre_publication_description` (`Pre_publication_description`),
- FULLTEXT KEY `Pre_publication_abbreviation` (`Pre_publication_abbreviation`),
- FULLTEXT KEY `Post_publication_abbreviation` (`Post_publication_abbreviation`),
- FULLTEXT KEY `Lab_code1` (`Lab_code`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Post_publication_description`,`Pre_publication_description`,`Pre_publication_abbreviation`,`Post_publication_abbreviation`,`Lab_code`)
-) ENGINE=MyISAM AUTO_INCREMENT=29299 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Probe`
---
-
-DROP TABLE IF EXISTS `Probe`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Probe` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeSetId` int(10) unsigned NOT NULL DEFAULT 0,
- `Name` char(20) DEFAULT NULL,
- `Sequence` char(30) DEFAULT NULL,
- `ExonNo` char(7) DEFAULT NULL,
- `SerialOrder` double DEFAULT NULL,
- `Tm` double DEFAULT NULL,
- `E_GSB` double DEFAULT NULL,
- `E_NSB` double DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `ProbeSetId` (`ProbeSetId`,`Name`),
- KEY `SerialOrder` (`ProbeSetId`,`SerialOrder`)
-) ENGINE=MyISAM AUTO_INCREMENT=19054073 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeData`
---
-
-DROP TABLE IF EXISTS `ProbeData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeFreeze`
---
-
-DROP TABLE IF EXISTS `ProbeFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeFreezeId` int(5) DEFAULT NULL,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `TissueId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`),
- KEY `TissueId` (`TissueId`),
- KEY `InbredSetId` (`InbredSetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=416 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeH2`
---
-
-DROP TABLE IF EXISTS `ProbeH2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeH2` (
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeId` int(10) unsigned NOT NULL DEFAULT 0,
- `h2` double DEFAULT NULL,
- `weight` double DEFAULT NULL,
- UNIQUE KEY `ProbeId` (`ProbeFreezeId`,`ProbeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSE`
---
-
-DROP TABLE IF EXISTS `ProbeSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSet`
---
-
-DROP TABLE IF EXISTS `ProbeSet`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSet` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(100) DEFAULT NULL,
- `TargetId` varchar(150) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `description` longtext DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Chr_2016` char(3) DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `alias` longtext DEFAULT NULL,
- `GeneId` varchar(20) DEFAULT NULL,
- `GenbankId` varchar(1000) DEFAULT NULL,
- `SNP` int(2) DEFAULT NULL,
- `BlatSeq` text NOT NULL,
- `TargetSeq` text DEFAULT NULL,
- `UniGeneId` varchar(100) DEFAULT NULL,
- `Strand_Probe` char(1) DEFAULT NULL,
- `Strand_Gene` char(1) DEFAULT NULL,
- `OMIM` varchar(20) DEFAULT NULL,
- `comments` text NOT NULL,
- `Probe_set_target_region` varchar(255) DEFAULT NULL,
- `Probe_set_specificity` double DEFAULT NULL,
- `Probe_set_BLAT_score` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start_2016` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end_2016` double DEFAULT NULL,
- `Probe_set_strand` varchar(255) DEFAULT NULL,
- `Probe_set_Note_by_RW` varchar(255) DEFAULT NULL,
- `flag` char(1) DEFAULT NULL,
- `Symbol_H` varchar(100) DEFAULT NULL,
- `description_H` varchar(255) DEFAULT NULL,
- `chromosome_H` char(3) DEFAULT NULL,
- `MB_H` double DEFAULT NULL,
- `alias_H` varchar(255) DEFAULT NULL,
- `GeneId_H` varchar(20) DEFAULT NULL,
- `chr_num` smallint(5) unsigned DEFAULT 30,
- `name_num` int(10) unsigned DEFAULT 4294967290,
- `Probe_Target_Description` varchar(225) DEFAULT NULL,
- `RefSeq_TranscriptId` varchar(255) DEFAULT NULL,
- `ENSEMBLGeneId` varchar(50) DEFAULT NULL,
- `Chr_mm8` char(3) DEFAULT NULL,
- `Mb_mm8` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start_mm8` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end_mm8` double DEFAULT NULL,
- `HomoloGeneID` varchar(20) DEFAULT NULL,
- `Biotype_ENS` varchar(255) DEFAULT NULL,
- `ProteinID` varchar(50) DEFAULT NULL,
- `ProteinName` varchar(50) DEFAULT NULL,
- `UniProtID` varchar(20) DEFAULT NULL,
- `Flybase_Id` varchar(25) DEFAULT NULL,
- `RGD_ID` int(10) DEFAULT NULL,
- `HMDB_ID` varchar(255) DEFAULT NULL,
- `Confidence` int(5) DEFAULT NULL,
- `ChEBI_ID` int(10) DEFAULT NULL,
- `ChEMBL_ID` varchar(100) DEFAULT NULL,
- `CAS_number` varchar(100) DEFAULT NULL,
- `PubChem_ID` int(10) DEFAULT NULL,
- `ChemSpider_ID` int(10) DEFAULT NULL,
- `UNII_ID` varchar(100) DEFAULT NULL,
- `EC_number` varchar(100) DEFAULT NULL,
- `KEGG_ID` varchar(100) DEFAULT NULL,
- `Molecular_Weight` double DEFAULT NULL,
- `Nugowiki_ID` int(10) DEFAULT NULL,
- `Type` varchar(255) DEFAULT NULL,
- `Tissue` varchar(255) DEFAULT NULL,
- `PrimaryName` varchar(255) DEFAULT NULL,
- `SecondaryNames` longtext DEFAULT NULL,
- `PeptideSequence` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `ProbeSetId` (`ChipId`,`Name`),
- KEY `Name_IDX` (`Name`),
- KEY `symbol_IDX` (`Symbol`),
- KEY `RefSeq_TranscriptId` (`RefSeq_TranscriptId`),
- KEY `GENBANK_IDX` (`GenbankId`),
- KEY `TargetId` (`TargetId`),
- KEY `Position` (`Chr`),
- KEY `GeneId_IDX` (`GeneId`),
- FULLTEXT KEY `SEARCH_GENE_IDX` (`Symbol`,`alias`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Name`,`description`,`Symbol`,`alias`,`GenbankId`,`UniGeneId`,`Probe_Target_Description`),
- FULLTEXT KEY `RefSeq_FULL_IDX` (`RefSeq_TranscriptId`)
-) ENGINE=MyISAM AUTO_INCREMENT=12118724 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetData`
---
-
-DROP TABLE IF EXISTS `ProbeSetData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetFreeze`
---
-
-DROP TABLE IF EXISTS `ProbeSetFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `AvgID` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(40) DEFAULT NULL,
- `Name2` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `OrderList` int(5) DEFAULT NULL,
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `confidentiality` tinyint(4) NOT NULL DEFAULT 0,
- `AuthorisedUsers` varchar(300) NOT NULL,
- `DataScale` varchar(20) NOT NULL DEFAULT 'log2',
- PRIMARY KEY (`Id`),
- UNIQUE KEY `FullName` (`FullName`),
- UNIQUE KEY `Name` (`Name`),
- KEY `NameIndex` (`Name2`),
- KEY `ShortName` (`ShortName`),
- KEY `ProbeFreezeId` (`ProbeFreezeId`),
- KEY `conf_and_public` (`confidentiality`,`public`)
-) ENGINE=MyISAM AUTO_INCREMENT=1006 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetSE`
---
-
-DROP TABLE IF EXISTS `ProbeSetSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetXRef`
---
-
-DROP TABLE IF EXISTS `ProbeSetXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetXRef` (
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeSetId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `Locus_old` char(20) DEFAULT NULL,
- `LRS_old` double DEFAULT NULL,
- `pValue_old` double DEFAULT NULL,
- `mean` double DEFAULT NULL,
- `se` double DEFAULT NULL,
- `Locus` char(20) DEFAULT NULL,
- `LRS` double DEFAULT NULL,
- `pValue` double DEFAULT NULL,
- `additive` double DEFAULT NULL,
- `h2` float DEFAULT NULL,
- UNIQUE KEY `ProbeSetId` (`ProbeSetFreezeId`,`ProbeSetId`),
- UNIQUE KEY `DataId_IDX` (`DataId`),
- KEY `ProbeSetId1` (`ProbeSetId`),
- KEY `Locus` (`Locus`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeXRef`
---
-
-DROP TABLE IF EXISTS `ProbeXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeXRef` (
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- UNIQUE KEY `ProbeId` (`ProbeFreezeId`,`ProbeId`),
- UNIQUE KEY `DataId_IDX` (`DataId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Publication`
---
-
-DROP TABLE IF EXISTS `Publication`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Publication` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `PubMed_ID` int(10) unsigned DEFAULT NULL,
- `Abstract` text DEFAULT NULL,
- `Authors` text NOT NULL,
- `Title` varchar(255) DEFAULT NULL,
- `Journal` varchar(255) DEFAULT NULL,
- `Volume` varchar(255) DEFAULT NULL,
- `Pages` varchar(255) DEFAULT NULL,
- `Month` varchar(255) DEFAULT NULL,
- `Year` varchar(255) NOT NULL DEFAULT '0',
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`PubMed_ID`),
- KEY `PubMed_ID` (`PubMed_ID`),
- FULLTEXT KEY `Abstract1` (`Abstract`),
- FULLTEXT KEY `Title1` (`Title`),
- FULLTEXT KEY `Authors1` (`Authors`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Abstract`,`Title`,`Authors`)
-) ENGINE=MyISAM AUTO_INCREMENT=26076 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishData`
---
-
-DROP TABLE IF EXISTS `PublishData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float(14,6) DEFAULT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishFreeze`
---
-
-DROP TABLE IF EXISTS `PublishFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- `confidentiality` tinyint(3) DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `InbredSetId` (`InbredSetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=60 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishSE`
---
-
-DROP TABLE IF EXISTS `PublishSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishXRef`
---
-
-DROP TABLE IF EXISTS `PublishXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishXRef` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `PhenotypeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `PublicationId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `mean` double DEFAULT NULL,
- `Locus` char(50) DEFAULT NULL,
- `LRS` double DEFAULT NULL,
- `additive` double DEFAULT NULL,
- `Sequence` smallint(5) unsigned NOT NULL DEFAULT 1,
- `comments` text NOT NULL,
- UNIQUE KEY `InbredSet` (`InbredSetId`,`Id`),
- UNIQUE KEY `record` (`InbredSetId`,`PhenotypeId`,`PublicationId`,`Sequence`),
- UNIQUE KEY `PhenotypeId` (`PhenotypeId`),
- UNIQUE KEY `DataId` (`DataId`),
- KEY `InbredSetId` (`InbredSetId`),
- KEY `Locus` (`Locus`),
- KEY `PublicationId` (`PublicationId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `RatSnpPattern`
---
-
-DROP TABLE IF EXISTS `RatSnpPattern`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `RatSnpPattern` (
- `Id` int(12) NOT NULL AUTO_INCREMENT,
- `SnpId` int(12) NOT NULL,
- `BN` char(1) DEFAULT NULL,
- `F344` char(1) DEFAULT NULL,
- `ACI` char(1) DEFAULT NULL,
- `BBDP` char(1) DEFAULT NULL,
- `FHH` char(1) DEFAULT NULL,
- `FHL` char(1) DEFAULT NULL,
- `GK` char(1) DEFAULT NULL,
- `LE` char(1) DEFAULT NULL,
- `LEW` char(1) DEFAULT NULL,
- `LH` char(1) DEFAULT NULL,
- `LL` char(1) DEFAULT NULL,
- `LN` char(1) DEFAULT NULL,
- `MHS` char(1) DEFAULT NULL,
- `MNS` char(1) DEFAULT NULL,
- `SBH` char(1) DEFAULT NULL,
- `SBN` char(1) DEFAULT NULL,
- `SHR` char(1) DEFAULT NULL,
- `SHRSP` char(1) DEFAULT NULL,
- `SR` char(1) DEFAULT NULL,
- `SS` char(1) DEFAULT NULL,
- `WAG` char(1) DEFAULT NULL,
- `WLI` char(1) DEFAULT NULL,
- `WMI` char(1) DEFAULT NULL,
- `WKY` char(1) DEFAULT NULL,
- `ACI_N` char(1) DEFAULT NULL,
- `BN_N` char(1) DEFAULT NULL,
- `BUF_N` char(1) DEFAULT NULL,
- `F344_N` char(1) DEFAULT NULL,
- `M520_N` char(1) DEFAULT NULL,
- `MR_N` char(1) DEFAULT NULL,
- `WKY_N` char(1) DEFAULT NULL,
- `WN_N` char(1) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `SnpId` (`SnpId`)
-) ENGINE=MyISAM AUTO_INCREMENT=4711685 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Sample`
---
-
-DROP TABLE IF EXISTS `Sample`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Sample` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(30) DEFAULT NULL,
- `Age` smallint(6) NOT NULL DEFAULT 0,
- `Sex` enum('F','M') NOT NULL DEFAULT 'F',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `TissueType` varchar(30) DEFAULT NULL,
- `FromSrc` varchar(10) DEFAULT NULL,
- `ImageURL` varchar(100) DEFAULT NULL,
- `CELURL` varchar(120) DEFAULT NULL,
- `DATURL` varchar(100) DEFAULT NULL,
- `CHPURL` varchar(100) DEFAULT NULL,
- `RPTURL` varchar(100) DEFAULT NULL,
- `EXPURL` varchar(100) DEFAULT NULL,
- `TXTURL` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`StrainId`,`Name`,`CreateTime`)
-) ENGINE=MyISAM AUTO_INCREMENT=252 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SampleXRef`
---
-
-DROP TABLE IF EXISTS `SampleXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SampleXRef` (
- `SampleId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`ProbeFreezeId`,`SampleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAll`
---
-
-DROP TABLE IF EXISTS `SnpAll`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAll` (
- `Id` int(20) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `SnpName` char(30) DEFAULT NULL,
- `Rs` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `Position_2016` double DEFAULT NULL,
- `Alleles` char(5) DEFAULT NULL,
- `Source` char(35) DEFAULT NULL,
- `ConservationScore` double DEFAULT NULL,
- `3Prime_UTR` text DEFAULT NULL,
- `5Prime_UTR` text DEFAULT NULL,
- `Upstream` text DEFAULT NULL,
- `Downstream` text DEFAULT NULL,
- `Intron` char(1) DEFAULT NULL,
- `Non_Splice_Site` text DEFAULT NULL,
- `Splice_Site` text DEFAULT NULL,
- `Intergenic` char(1) DEFAULT NULL,
- `Exon` char(1) DEFAULT NULL,
- `Non_Synonymous_Coding` text DEFAULT NULL,
- `Synonymous_Coding` text DEFAULT NULL,
- `Start_Gained` text DEFAULT NULL,
- `Start_Lost` text DEFAULT NULL,
- `Stop_Gained` text DEFAULT NULL,
- `Stop_Lost` text DEFAULT NULL,
- `Unknown_Effect_In_Exon` text DEFAULT NULL,
- `Domain` varchar(50) DEFAULT NULL,
- `Gene` varchar(30) DEFAULT NULL,
- `Transcript` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `SnpName` (`SnpName`),
- KEY `Rs` (`Rs`),
- KEY `Position` (`Chromosome`,`Position`),
- KEY `Source` (`Source`)
-) ENGINE=InnoDB AUTO_INCREMENT=84086331 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAllRat`
---
-
-DROP TABLE IF EXISTS `SnpAllRat`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAllRat` (
- `Id` int(20) NOT NULL AUTO_INCREMENT,
- `SpeciesId` int(5) DEFAULT 2,
- `SnpName` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `Alleles` char(5) DEFAULT NULL,
- `Source` char(35) DEFAULT NULL,
- `ConservationScore` double DEFAULT NULL,
- `Domain` varchar(50) DEFAULT NULL,
- `Gene` varchar(30) DEFAULT NULL,
- `Transcript` varchar(50) DEFAULT NULL,
- `Function` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `SnpName` (`SnpName`),
- KEY `Position` (`Chromosome`,`Position`),
- KEY `Source` (`Source`)
-) ENGINE=MyISAM AUTO_INCREMENT=97663615 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAllele_to_be_deleted`
---
-
-DROP TABLE IF EXISTS `SnpAllele_to_be_deleted`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAllele_to_be_deleted` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Base` char(20) DEFAULT NULL,
- `Info` char(255) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpPattern`
---
-
-DROP TABLE IF EXISTS `SnpPattern`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpPattern` (
- `SnpId` int(10) unsigned NOT NULL DEFAULT 0,
- `129P2/OlaHsd` char(1) DEFAULT NULL,
- `129S1/SvImJ` char(1) DEFAULT NULL,
- `129S5/SvEvBrd` char(1) DEFAULT NULL,
- `AKR/J` char(1) DEFAULT NULL,
- `A/J` char(1) DEFAULT NULL,
- `BALB/cJ` char(1) DEFAULT NULL,
- `C3H/HeJ` char(1) DEFAULT NULL,
- `C57BL/6J` char(1) DEFAULT NULL,
- `CAST/EiJ` char(1) DEFAULT NULL,
- `CBA/J` char(1) DEFAULT NULL,
- `DBA/2J` char(1) DEFAULT NULL,
- `LP/J` char(1) DEFAULT NULL,
- `NOD/ShiLtJ` char(1) DEFAULT NULL,
- `NZO/HlLtJ` char(1) DEFAULT NULL,
- `PWK/PhJ` char(1) DEFAULT NULL,
- `SPRET/EiJ` char(1) DEFAULT NULL,
- `WSB/EiJ` char(1) DEFAULT NULL,
- `PWD/PhJ` char(1) DEFAULT NULL,
- `SJL/J` char(1) DEFAULT NULL,
- `NZL/LtJ` char(1) DEFAULT NULL,
- `CZECHII/EiJ` char(1) DEFAULT NULL,
- `CALB/RkJ` char(1) DEFAULT NULL,
- `ST/bJ` char(1) DEFAULT NULL,
- `ISS/IbgTejJ` char(1) DEFAULT NULL,
- `C57L/J` char(1) DEFAULT NULL,
- `Qsi5` char(1) DEFAULT NULL,
- `B6A6_Esline_Regeneron` char(1) DEFAULT NULL,
- `129T2/SvEmsJ` char(1) DEFAULT NULL,
- `BALB/cByJ` char(1) DEFAULT NULL,
- `NZB/BlNJ` char(1) DEFAULT NULL,
- `P/J` char(1) DEFAULT NULL,
- `I/LnJ` char(1) DEFAULT NULL,
- `PERC/EiJ` char(1) DEFAULT NULL,
- `TALLYHO/JngJ` char(1) DEFAULT NULL,
- `CE/J` char(1) DEFAULT NULL,
- `MRL/MpJ` char(1) DEFAULT NULL,
- `PERA/EiJ` char(1) DEFAULT NULL,
- `IS/CamRkJ` char(1) DEFAULT NULL,
- `ZALENDE/EiJ` char(1) DEFAULT NULL,
- `Fline` char(1) DEFAULT NULL,
- `BTBRT<+>tf/J` char(1) DEFAULT NULL,
- `O20` char(1) DEFAULT NULL,
- `C58/J` char(1) DEFAULT NULL,
- `BPH/2J` char(1) DEFAULT NULL,
- `DDK/Pas` char(1) DEFAULT NULL,
- `C57BL/6NHsd` char(1) DEFAULT NULL,
- `C57BL/6NTac` char(1) DEFAULT NULL,
- `129S4/SvJae` char(1) DEFAULT NULL,
- `BPL/1J` char(1) DEFAULT NULL,
- `BPN/3J` char(1) DEFAULT NULL,
- `PL/J` char(1) DEFAULT NULL,
- `DBA/1J` char(1) DEFAULT NULL,
- `MSM/Ms` char(1) DEFAULT NULL,
- `MA/MyJ` char(1) DEFAULT NULL,
- `NZW/LacJ` char(1) DEFAULT NULL,
- `C57BL/10J` char(1) DEFAULT NULL,
- `C57BL/6ByJ` char(1) DEFAULT NULL,
- `RF/J` char(1) DEFAULT NULL,
- `C57BR/cdJ` char(1) DEFAULT NULL,
- `129S6/SvEv` char(1) DEFAULT NULL,
- `MAI/Pas` char(1) DEFAULT NULL,
- `RIIIS/J` char(1) DEFAULT NULL,
- `C57BL/6NNIH` char(1) DEFAULT NULL,
- `FVB/NJ` char(1) DEFAULT NULL,
- `SEG/Pas` char(1) DEFAULT NULL,
- `MOLF/EiJ` char(1) DEFAULT NULL,
- `C3HeB/FeJ` char(1) DEFAULT NULL,
- `Lline` char(1) DEFAULT NULL,
- `SKIVE/EiJ` char(1) DEFAULT NULL,
- `C57BL/6NCrl` char(1) DEFAULT NULL,
- `KK/HlJ` char(1) DEFAULT NULL,
- `LG/J` char(1) DEFAULT NULL,
- `C57BLKS/J` char(1) DEFAULT NULL,
- `SM/J` char(1) DEFAULT NULL,
- `NOR/LtJ` char(1) DEFAULT NULL,
- `ILS/IbgTejJ` char(1) DEFAULT NULL,
- `C57BL/6JOlaHsd` char(1) DEFAULT NULL,
- `SWR/J` char(1) DEFAULT NULL,
- `C57BL/6JBomTac` char(1) DEFAULT NULL,
- `SOD1/EiJ` char(1) DEFAULT NULL,
- `NON/LtJ` char(1) DEFAULT NULL,
- `JF1/Ms` char(1) DEFAULT NULL,
- `129X1/SvJ` char(1) DEFAULT NULL,
- `C2T1_Esline_Nagy` char(1) DEFAULT NULL,
- `C57BL/6NJ` char(1) DEFAULT NULL,
- `LEWES/EiJ` char(1) DEFAULT NULL,
- `RBA/DnJ` char(1) DEFAULT NULL,
- `DDY/JclSidSeyFrkJ` char(1) DEFAULT NULL,
- `SEA/GnJ` char(1) DEFAULT NULL,
- `C57BL/6JCrl` char(1) DEFAULT NULL,
- `EL/SuzSeyFrkJ` char(1) DEFAULT NULL,
- `HTG/GoSfSnJ` char(1) DEFAULT NULL,
- `129S2/SvHsd` char(1) DEFAULT NULL,
- `MOLG/DnJ` char(1) DEFAULT NULL,
- `BUB/BnJ` char(1) DEFAULT NULL,
- PRIMARY KEY (`SnpId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpSource`
---
-
-DROP TABLE IF EXISTS `SnpSource`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpSource` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(35) DEFAULT NULL,
- `DateCreated` date DEFAULT NULL,
- `DateAdded` date DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Species`
---
-
-DROP TABLE IF EXISTS `Species`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Species` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` int(5) DEFAULT NULL,
- `SpeciesName` varchar(50) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `MenuName` char(50) DEFAULT NULL,
- `FullName` char(100) NOT NULL DEFAULT '',
- `TaxonomyId` int(11) DEFAULT NULL,
- `OrderId` smallint(6) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Strain`
---
-
-DROP TABLE IF EXISTS `Strain`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Strain` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) DEFAULT NULL,
- `Name2` varchar(100) DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Symbol` char(5) DEFAULT NULL,
- `Alias` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`,`SpeciesId`),
- KEY `Symbol` (`Symbol`)
-) ENGINE=MyISAM AUTO_INCREMENT=63438 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `StrainXRef`
---
-
-DROP TABLE IF EXISTS `StrainXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `StrainXRef` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `OrderId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Used_for_mapping` char(1) DEFAULT 'N',
- `PedigreeStatus` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`InbredSetId`,`StrainId`),
- UNIQUE KEY `Orders` (`InbredSetId`,`OrderId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TableComments`
---
-
-DROP TABLE IF EXISTS `TableComments`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TableComments` (
- `TableName` varchar(100) NOT NULL DEFAULT '',
- `Comment` text DEFAULT NULL,
- PRIMARY KEY (`TableName`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TableFieldAnnotation`
---
-
-DROP TABLE IF EXISTS `TableFieldAnnotation`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TableFieldAnnotation` (
- `TableField` varchar(100) NOT NULL DEFAULT '',
- `Foreign_Key` varchar(100) DEFAULT NULL,
- `Annotation` text DEFAULT NULL,
- PRIMARY KEY (`TableField`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Temp`
---
-
-DROP TABLE IF EXISTS `Temp`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Temp` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `dbdisplayname` varchar(255) DEFAULT NULL,
- `Name` varchar(30) DEFAULT NULL,
- `description` text DEFAULT NULL,
- `createtime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '2004-01-01 12:00:00',
- `DataId` int(11) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `IP` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=98608 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TempData`
---
-
-DROP TABLE IF EXISTS `TempData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TempData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` double NOT NULL DEFAULT 0,
- `SE` double DEFAULT NULL,
- `NStrain` smallint(6) DEFAULT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Tissue`
---
-
-DROP TABLE IF EXISTS `Tissue`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Tissue` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `TissueId` int(5) DEFAULT NULL,
- `TissueName` varchar(50) DEFAULT NULL,
- `Name` char(50) DEFAULT NULL,
- `Short_Name` char(30) NOT NULL DEFAULT '',
- `BIRN_lex_ID` char(30) DEFAULT NULL,
- `BIRN_lex_Name` char(30) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Short_Name` (`Short_Name`),
- UNIQUE KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=180 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeFreeze`
---
-
-DROP TABLE IF EXISTS `TissueProbeFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` varchar(100) NOT NULL DEFAULT '0',
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`),
- UNIQUE KEY `FullName` (`FullName`)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetData`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetData` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `TissueID` int(10) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL DEFAULT 0,
- PRIMARY KEY (`Id`,`TissueID`)
-) ENGINE=MyISAM AUTO_INCREMENT=90563 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetFreeze`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `TissueProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `AvgID` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(40) DEFAULT NULL,
- `Name2` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `confidentiality` tinyint(4) NOT NULL DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `FullName` (`FullName`),
- UNIQUE KEY `Name` (`Name`),
- KEY `NameIndex` (`Name2`)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetXRef`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetXRef` (
- `TissueProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbesetId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `Mean` float DEFAULT 0,
- `useStatus` char(1) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `GeneId` varchar(20) DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `description` varchar(255) DEFAULT NULL,
- `Probe_Target_Description` varchar(225) DEFAULT NULL,
- PRIMARY KEY (`TissueProbeSetFreezeId`,`ProbesetId`),
- UNIQUE KEY `DataId_IDX` (`DataId`),
- KEY `symbol_IDX` (`Symbol`),
- KEY `GeneId_IDX` (`GeneId`),
- KEY `Position` (`Chr`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TraitMetadata`
---
-
-DROP TABLE IF EXISTS `TraitMetadata`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TraitMetadata` (
- `type` varchar(255) DEFAULT NULL,
- `value` longtext DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `User`
---
-
-DROP TABLE IF EXISTS `User`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `User` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL DEFAULT '',
- `password` varchar(100) NOT NULL DEFAULT '',
- `email` varchar(100) DEFAULT NULL,
- `createtime` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `user_ip` varchar(20) DEFAULT NULL,
- `lastlogin` datetime /* mariadb-5.3 */ NOT NULL DEFAULT '0000-00-00 00:00:00',
- `disable` enum('Y','N') DEFAULT 'N',
- `privilege` enum('guest','user','admin','root') DEFAULT NULL,
- `grpName` varchar(40) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `name_index` (`name`)
-) ENGINE=MyISAM AUTO_INCREMENT=353 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `UserPrivilege`
---
-
-DROP TABLE IF EXISTS `UserPrivilege`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `UserPrivilege` (
- `UserId` int(10) unsigned NOT NULL,
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL,
- `download_result_priv` enum('N','Y') NOT NULL DEFAULT 'N',
- KEY `userId` (`UserId`,`ProbeSetFreezeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Vlookup`
---
-
-DROP TABLE IF EXISTS `Vlookup`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Vlookup` (
- `Id` int(11) NOT NULL AUTO_INCREMENT,
- `VLProbeSetId` text DEFAULT NULL,
- `VLBlatSeq` longtext DEFAULT NULL,
- `InfoFileId` int(5) DEFAULT NULL,
- `DatasetId` int(5) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT NULL,
- `TissueId` int(5) DEFAULT NULL,
- `InbredSetId` int(5) DEFAULT NULL,
- `GeneChipId` int(5) DEFAULT NULL,
- `AvgMethodId` int(5) DEFAULT NULL,
- `InfoPageName` varchar(255) DEFAULT NULL,
- `GN_AccesionId` int(5) DEFAULT NULL,
- `Name` varchar(100) DEFAULT NULL,
- `GeneId` varchar(10) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Chr` varchar(10) DEFAULT NULL,
- `Probe_set_Blat_Mb_start` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `TxStart` double DEFAULT NULL,
- `TxEnd` double DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `exonCount` int(7) DEFAULT NULL,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `ProteinID` varchar(15) DEFAULT NULL,
- `AlignID` varchar(10) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `SnpName` char(30) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `HMDB_ID` varchar(255) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `description` longtext DEFAULT NULL,
- `alias` longtext DEFAULT NULL,
- `Full_Description` longtext DEFAULT NULL,
- `BlatSeq` text DEFAULT NULL,
- `ChEBI_ID` int(10) DEFAULT NULL,
- `ChEMBL_ID` varchar(100) DEFAULT NULL,
- `CAS_number` varchar(100) DEFAULT NULL,
- `PubChem_ID` int(10) DEFAULT NULL,
- `ChemSpider_ID` varchar(10) DEFAULT NULL,
- `UNII_ID` varchar(100) DEFAULT NULL,
- `EC_number` varchar(100) DEFAULT NULL,
- `KEGG_ID` varchar(100) DEFAULT NULL,
- `Molecular_Weight` varchar(100) DEFAULT NULL,
- `Nugowiki_ID` varchar(100) DEFAULT NULL,
- `assembly` varchar(10) DEFAULT NULL,
- KEY `Id` (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=753474564 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `login`
---
-
-DROP TABLE IF EXISTS `login`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `login` (
- `id` varchar(36) NOT NULL,
- `user` varchar(36) DEFAULT NULL,
- `timestamp` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `ip_address` varchar(39) DEFAULT NULL,
- `successful` tinyint(1) NOT NULL,
- `session_id` text DEFAULT NULL,
- `assumed_by` varchar(36) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `user` (`user`),
- KEY `assumed_by` (`assumed_by`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `metadata_audit`
---
-
-DROP TABLE IF EXISTS `metadata_audit`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `metadata_audit` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `dataset_id` int(11) NOT NULL,
- `editor` varchar(255) NOT NULL,
- `json_diff_data` varchar(2048) NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`id`),
- CONSTRAINT `CONSTRAINT_1` CHECK (json_valid(`json_diff_data`))
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `pubmedsearch`
---
-
-DROP TABLE IF EXISTS `pubmedsearch`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `pubmedsearch` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `pubmedid` bigint(20) DEFAULT NULL,
- `title` text DEFAULT NULL,
- `authorfullname` text DEFAULT NULL,
- `authorshortname` text DEFAULT NULL,
- `institute` text DEFAULT NULL,
- `geneid` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `NewIndex4` (`geneid`),
- FULLTEXT KEY `NewIndex1` (`institute`),
- FULLTEXT KEY `NewIndex3` (`authorfullname`,`authorshortname`)
-) ENGINE=MyISAM AUTO_INCREMENT=1401371 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `role`
---
-
-DROP TABLE IF EXISTS `role`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `role` (
- `the_id` varchar(36) NOT NULL,
- `name` varchar(80) NOT NULL,
- `description` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`the_id`),
- UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `roles_users`
---
-
-DROP TABLE IF EXISTS `roles_users`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `roles_users` (
- `user_id` int(11) DEFAULT NULL,
- `role_id` int(11) DEFAULT NULL,
- KEY `user_id` (`user_id`),
- KEY `role_id` (`role_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `temporary`
---
-
-DROP TABLE IF EXISTS `temporary`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `temporary` (
- `tax_id` varchar(20) DEFAULT NULL,
- `GeneID` varchar(20) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `OMIM` varchar(100) DEFAULT NULL,
- `HomoloGene` varchar(100) DEFAULT NULL,
- `Other_GeneID` varchar(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user`
---
-
-DROP TABLE IF EXISTS `user`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user` (
- `id` varchar(36) NOT NULL,
- `email_address` varchar(50) NOT NULL,
- `password` text NOT NULL,
- `full_name` varchar(50) DEFAULT NULL,
- `organization` varchar(50) DEFAULT NULL,
- `active` tinyint(1) NOT NULL,
- `registration_info` text DEFAULT NULL,
- `confirmed` text DEFAULT NULL,
- `superuser` text DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `email_address` (`email_address`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user_collection`
---
-
-DROP TABLE IF EXISTS `user_collection`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_collection` (
- `id` varchar(36) NOT NULL,
- `user` varchar(36) DEFAULT NULL,
- `name` text DEFAULT NULL,
- `created_timestamp` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `changed_timestamp` datetime /* mariadb-5.3 */ DEFAULT NULL,
- `members` text DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `user` (`user`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user_openids`
---
-
-DROP TABLE IF EXISTS `user_openids`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_openids` (
- `openid_url` varchar(255) NOT NULL,
- `user_id` varchar(36) NOT NULL,
- PRIMARY KEY (`openid_url`),
- KEY `user_id` (`user_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2021-07-14 5:26:53
diff --git a/sql/schema.png b/sql/schema.png
deleted file mode 100644
index fbcf28c..0000000
--- a/sql/schema.png
+++ /dev/null
Binary files differ
diff --git a/sql/schema.sql b/sql/schema.sql
deleted file mode 100644
index c37754b..0000000
--- a/sql/schema.sql
+++ /dev/null
@@ -1,2406 +0,0 @@
--- This is a work-in-progress schema for the GeneNetwork database. The
--- GeneNetwork database has no foreign key constraint information. This schema
--- has them manually added. But, the work is not complete, and there may be
--- errors. A visualization of this schema can be found in schema.png and
--- schema.svg.
-
--- MySQL dump 10.16 Distrib 10.1.41-MariaDB, for debian-linux-gnu (x86_64)
---
--- Host: localhost Database: db_webqtl
--- ------------------------------------------------------
--- Server version 10.5.8-MariaDB-log
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8mb4 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
---
--- Table structure for table `AccessLog`
---
-
-DROP TABLE IF EXISTS `AccessLog`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `AccessLog` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `accesstime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ip_address` char(20) NOT NULL DEFAULT '0.0.0.0',
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=1366832 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `AvgMethod`
---
-
-DROP TABLE IF EXISTS `AvgMethod`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `AvgMethod` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `AvgMethodId` int(5) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `Normalization` varchar(30) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `BXDSnpPosition`
---
-
-DROP TABLE IF EXISTS `BXDSnpPosition`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `BXDSnpPosition` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `Chr` char(2) DEFAULT NULL,
- `StrainId1` int(11) DEFAULT NULL,
- `StrainId2` int(11) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- PRIMARY KEY (`id`),
- FOREIGN KEY (StrainId1) REFERENCES Strain(Id),
- FOREIGN KEY (StrainId2) REFERENCES Strain(Id),
- KEY `BXDSnpPosition` (`Chr`,`StrainId1`,`StrainId2`,`Mb`)
-) ENGINE=MyISAM AUTO_INCREMENT=7791982 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttribute`
---
-
-DROP TABLE IF EXISTS `CaseAttribute`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttribute` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(30) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttributeXRef`
---
-
-DROP TABLE IF EXISTS `CaseAttributeXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttributeXRef` (
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `CaseAttributeId` smallint(5) NOT NULL DEFAULT 0,
- `Value` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`ProbeSetFreezeId`,`StrainId`,`CaseAttributeId`),
- FOREIGN KEY (ProbeSetFreezeId) REFERENCES ProbeSetFreeze(Id),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id),
- FOREIGN KEY (CaseAttributeId) REFERENCES CaseAttribute(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CaseAttributeXRefNew`
---
-
-DROP TABLE IF EXISTS `CaseAttributeXRefNew`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CaseAttributeXRefNew` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` int(8) unsigned NOT NULL DEFAULT 0,
- `CaseAttributeId` smallint(5) NOT NULL DEFAULT 0,
- `Value` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`InbredSetId`,`StrainId`,`CaseAttributeId`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id),
- FOREIGN KEY (CaseAttributeId) REFERENCES CaseAttribute(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `CeleraINFO_mm6`
---
-
-DROP TABLE IF EXISTS `CeleraINFO_mm6`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `CeleraINFO_mm6` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SNPID` char(14) NOT NULL DEFAULT '',
- `chromosome` char(3) DEFAULT NULL,
- `MB_UCSC` double DEFAULT NULL,
- `MB_celera` double DEFAULT NULL,
- `allele_B6` char(4) DEFAULT NULL,
- `allele_D2` char(4) DEFAULT NULL,
- `allele_AJ` char(4) DEFAULT NULL,
- `B6_D2` char(1) DEFAULT NULL,
- `B6_AJ` char(1) DEFAULT NULL,
- `D2_AJ` char(1) DEFAULT NULL,
- `MB_UCSC_OLD` double DEFAULT NULL,
- `allele_S1` char(4) DEFAULT NULL,
- `allele_X1` char(4) DEFAULT NULL,
- `flanking5` char(100) DEFAULT NULL,
- `flanking3` char(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `celeraIndex` (`chromosome`,`MB_celera`),
- KEY `celeraIndex2` (`chromosome`,`MB_UCSC`),
- KEY `chromosome_2` (`chromosome`,`MB_UCSC`),
- KEY `MB_UCSC_2` (`MB_UCSC`,`chromosome`),
- KEY `SNPID` (`SNPID`)
-) ENGINE=MyISAM AUTO_INCREMENT=3028848 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Chr_Length`
---
-
-DROP TABLE IF EXISTS `Chr_Length`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Chr_Length` (
- `Name` char(3) NOT NULL DEFAULT '',
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `OrderId` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Length` int(10) unsigned NOT NULL DEFAULT 0,
- `Length_2016` int(10) unsigned NOT NULL DEFAULT 0,
- `Length_mm8` int(10) unsigned DEFAULT NULL,
- UNIQUE KEY `nameIdx` (`SpeciesId`,`Name`),
- UNIQUE KEY `SpeciesIdx` (`SpeciesId`,`OrderId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DBList`
---
-
-DROP TABLE IF EXISTS `DBList`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DBList` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `DBTypeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `FreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` char(50) NOT NULL DEFAULT '',
- `Code` char(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Cde` (`Code`),
- FOREIGN KEY (DBTypeId) REFERENCES DBType(Id),
- KEY `DBIndex` (`DBTypeId`,`FreezeId`)
-) ENGINE=MyISAM AUTO_INCREMENT=907 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DBType`
---
-
-DROP TABLE IF EXISTS `DBType`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DBType` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(30) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DatasetMapInvestigator`
---
-
-DROP TABLE IF EXISTS `DatasetMapInvestigator`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DatasetMapInvestigator` (
- `Id` mediumint(9) NOT NULL AUTO_INCREMENT,
- `DatasetId` int(6) NOT NULL,
- `InvestigatorId` int(6) NOT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=2403 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `DatasetStatus`
---
-
-DROP TABLE IF EXISTS `DatasetStatus`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `DatasetStatus` (
- `DatasetStatusId` int(5) NOT NULL,
- `DatasetStatusName` varchar(20) DEFAULT NULL,
- UNIQUE KEY `DatasetStatusId` (`DatasetStatusId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Dataset_mbat`
---
-
-DROP TABLE IF EXISTS `Dataset_mbat`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Dataset_mbat` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `switch` int(1) DEFAULT NULL,
- `species` varchar(255) DEFAULT NULL,
- `cross` varchar(255) DEFAULT NULL,
- `tissue` varchar(255) DEFAULT NULL,
- `database` varchar(255) DEFAULT NULL,
- `database_LongName` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Datasets`
---
-
-DROP TABLE IF EXISTS `Datasets`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Datasets` (
- `DatasetId` int(6) NOT NULL AUTO_INCREMENT,
- `DatasetName` varchar(255) DEFAULT NULL,
- `GeoSeries` varchar(30) DEFAULT NULL,
- `PublicationTitle` longtext DEFAULT NULL,
- `Summary` longtext DEFAULT NULL,
- `ExperimentDesign` longtext DEFAULT NULL,
- `AboutCases` longtext DEFAULT NULL,
- `AboutTissue` longtext DEFAULT NULL,
- `AboutPlatform` longtext DEFAULT NULL,
- `AboutDataProcessing` longtext DEFAULT NULL,
- `Contributors` longtext DEFAULT NULL,
- `Citation` longtext DEFAULT NULL,
- `Acknowledgment` longtext DEFAULT NULL,
- `Notes` longtext DEFAULT NULL,
- `InvestigatorId` int(5) NOT NULL,
- `DatasetStatusId` int(5) NOT NULL,
- PRIMARY KEY (`DatasetId`),
- UNIQUE KEY `DatasetId` (`DatasetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=301 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Docs`
---
-
-DROP TABLE IF EXISTS `Docs`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Docs` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `entry` varchar(255) NOT NULL,
- `title` varchar(255) NOT NULL,
- `content` text NOT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblChip`
---
-
-DROP TABLE IF EXISTS `EnsemblChip`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblChip` (
- `Id` int(11) NOT NULL,
- `ProbeSetSize` int(11) NOT NULL,
- `Name` varchar(40) NOT NULL,
- `Type` enum('AFFY','OLIGO') DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblProbe`
---
-
-DROP TABLE IF EXISTS `EnsemblProbe`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblProbe` (
- `Id` int(11) NOT NULL,
- `ChipId` int(11) NOT NULL,
- `ProbeSet` varchar(40) DEFAULT NULL,
- `Name` varchar(40) DEFAULT NULL,
- `length` int(11) NOT NULL,
- KEY `EnsemblProbeId` (`Id`),
- KEY `EnsemblProbeName` (`Name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `EnsemblProbeLocation`
---
-
-DROP TABLE IF EXISTS `EnsemblProbeLocation`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `EnsemblProbeLocation` (
- `Chr` char(2) NOT NULL,
- `Start` int(11) NOT NULL,
- `Start_2016` int(11) DEFAULT NULL,
- `End` int(11) NOT NULL,
- `End_2016` int(11) DEFAULT NULL,
- `Strand` int(11) NOT NULL,
- `MisMataches` int(11) DEFAULT NULL,
- `ProbeId` int(11) NOT NULL,
- KEY `EnsemblLocationProbeId` (`ProbeId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GORef`
---
-
-DROP TABLE IF EXISTS `GORef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GORef` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `goterm` varchar(255) DEFAULT NULL,
- `genes` text DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=17510 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Genbank`
---
-
-DROP TABLE IF EXISTS `Genbank`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Genbank` (
- `Id` varchar(20) NOT NULL DEFAULT '',
- `Sequence` text DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `Id` (`Id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneCategory`
---
-
-DROP TABLE IF EXISTS `GeneCategory`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneCategory` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(255) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`),
- KEY `name_idx` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneChip`
---
-
-DROP TABLE IF EXISTS `GeneChip`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneChip` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `GeneChipId` int(5) DEFAULT NULL,
- `GeneChipName` varchar(200) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `GeoPlatform` char(15) DEFAULT NULL,
- `Title` varchar(100) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT 1,
- `GO_tree_value` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId)
-) ENGINE=MyISAM AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneChipEnsemblXRef`
---
-
-DROP TABLE IF EXISTS `GeneChipEnsemblXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneChipEnsemblXRef` (
- `GeneChipId` int(11) NOT NULL,
- `EnsemblChipId` int(11) NOT NULL,
- FOREIGN KEY (GeneChipId) REFERENCES GeneChip(GeneChipId),
- FOREIGN KEY (EnsemblChipId) REFERENCES EnsemblChip(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneIDXRef`
---
-
-DROP TABLE IF EXISTS `GeneIDXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneIDXRef` (
- `mouse` int(11) NOT NULL DEFAULT 0,
- `rat` int(11) NOT NULL DEFAULT 0,
- `human` int(11) NOT NULL DEFAULT 0,
- KEY `mouse_index` (`mouse`),
- KEY `rat_index` (`rat`),
- KEY `human_index` (`human`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList`
---
-
-DROP TABLE IF EXISTS `GeneList`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList` (
- `SpeciesId` int(5) unsigned NOT NULL DEFAULT 1,
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `GeneSymbol` varchar(15) DEFAULT NULL,
- `GeneDescription` text DEFAULT NULL,
- `Chromosome` varchar(10) DEFAULT NULL,
- `TxStart` double DEFAULT NULL,
- `TxStart_2016` double DEFAULT NULL,
- `TxEnd` double DEFAULT NULL,
- `TxEnd_2016` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `GeneID` varchar(10) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `GenBankID` varchar(15) DEFAULT NULL,
- `UnigenID` varchar(15) DEFAULT NULL,
- `ProteinID` varchar(15) DEFAULT NULL,
- `AlignID` varchar(10) DEFAULT NULL,
- `exonCount` int(7) NOT NULL DEFAULT 0,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsStart_2016` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `cdsEnd_2016` double DEFAULT NULL,
- `TxStart_mm8` double DEFAULT NULL,
- `TxEnd_mm8` double DEFAULT NULL,
- `Strand_mm8` char(1) DEFAULT NULL,
- `exonCount_mm8` int(7) DEFAULT NULL,
- `exonStarts_mm8` text DEFAULT NULL,
- `exonEnds_mm8` text DEFAULT NULL,
- `cdsStart_mm8` double DEFAULT NULL,
- `cdsEnd_mm8` double DEFAULT NULL,
- `Chromosome_mm8` varchar(10) DEFAULT NULL,
- `Info_mm9` text DEFAULT NULL,
- `RGD_ID` int(10) DEFAULT NULL,
- UNIQUE KEY `geneId` (`SpeciesId`,`Id`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- FOREIGN KEY (GenBankID) REFERENCES Genbank(Id),
- KEY `geneSymbol` (`GeneSymbol`),
- KEY `geneSymbol2` (`SpeciesId`,`GeneSymbol`),
- KEY `Loc1` (`SpeciesId`,`Chromosome`,`TxStart`),
- KEY `Loc2` (`SpeciesId`,`Chromosome`,`TxEnd`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList_rn3`
---
-
-DROP TABLE IF EXISTS `GeneList_rn3`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList_rn3` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeSet` varchar(16) DEFAULT NULL,
- `geneSymbol` varchar(15) DEFAULT NULL,
- `geneID` varchar(10) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `geneDescription` text DEFAULT NULL,
- `genBankID` varchar(15) DEFAULT NULL,
- `unigenID` varchar(15) DEFAULT NULL,
- `score` int(4) DEFAULT NULL,
- `qStart` int(3) DEFAULT NULL,
- `qEnd` int(3) DEFAULT NULL,
- `qSize` int(3) DEFAULT NULL,
- `identity` varchar(7) DEFAULT NULL,
- `chromosome` varchar(8) DEFAULT NULL,
- `strand` char(1) DEFAULT NULL,
- `txStart` double DEFAULT NULL,
- `txEnd` double DEFAULT NULL,
- `txSize` double DEFAULT NULL,
- `span` int(7) DEFAULT NULL,
- `specificity` double DEFAULT NULL,
- `sequence` text DEFAULT NULL,
- `flag` int(1) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `geneSymbol` (`geneSymbol`),
- KEY `Loc1` (`chromosome`,`txStart`),
- KEY `Loc2` (`chromosome`,`txEnd`)
-) ENGINE=MyISAM AUTO_INCREMENT=14917 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneList_rn33`
---
-
-DROP TABLE IF EXISTS `GeneList_rn33`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneList_rn33` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `geneSymbol` varchar(15) DEFAULT NULL,
- `txStart` double DEFAULT NULL,
- `txEnd` double DEFAULT NULL,
- `exonCount` int(7) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `chromosome` varchar(8) DEFAULT NULL,
- `strand` char(1) DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `geneSymbol` (`geneSymbol`),
- KEY `Loc1` (`chromosome`,`txStart`),
- KEY `Loc2` (`chromosome`,`txEnd`)
-) ENGINE=MyISAM AUTO_INCREMENT=9790 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneMap_cuiyan`
---
-
-DROP TABLE IF EXISTS `GeneMap_cuiyan`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneMap_cuiyan` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `TranscriptID` varchar(255) DEFAULT NULL,
- `GeneID` varchar(255) DEFAULT NULL,
- `Symbol` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=10537 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIF`
---
-
-DROP TABLE IF EXISTS `GeneRIF`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIF` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `versionId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `symbol` varchar(30) NOT NULL DEFAULT '',
- `PubMed_ID` varchar(255) DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `comment` text DEFAULT NULL,
- `email` varchar(50) DEFAULT NULL,
- `createtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `user_ip` varchar(20) DEFAULT NULL,
- `weburl` varchar(255) DEFAULT NULL,
- `initial` varchar(10) DEFAULT NULL,
- `display` tinyint(4) DEFAULT 1,
- `reason` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`,`versionId`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `name_idx` (`symbol`),
- KEY `status` (`display`),
- KEY `timestamp` (`createtime`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIFXRef`
---
-
-DROP TABLE IF EXISTS `GeneRIFXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIFXRef` (
- `GeneRIFId` int(10) unsigned NOT NULL DEFAULT 0,
- `versionId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `GeneCategoryId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`GeneRIFId`,`versionId`,`GeneCategoryId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GeneRIF_BASIC`
---
-
-DROP TABLE IF EXISTS `GeneRIF_BASIC`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GeneRIF_BASIC` (
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `GeneId` int(10) unsigned NOT NULL DEFAULT 0,
- `symbol` varchar(255) NOT NULL DEFAULT '',
- `PubMed_ID` int(10) unsigned NOT NULL DEFAULT 0,
- `createtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `comment` text DEFAULT NULL,
- `VersionId` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`GeneId`,`SpeciesId`,`createtime`,`PubMed_ID`,`VersionId`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `symbol` (`symbol`,`SpeciesId`,`createtime`),
- FULLTEXT KEY `commts` (`comment`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Geno`
---
-
-DROP TABLE IF EXISTS `Geno`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Geno` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `Name` varchar(40) NOT NULL DEFAULT '',
- `Marker_Name` varchar(40) DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `Sequence` text DEFAULT NULL,
- `Source` varchar(40) DEFAULT NULL,
- `chr_num` smallint(5) unsigned DEFAULT NULL,
- `Source2` varchar(40) DEFAULT NULL,
- `Comments` varchar(255) DEFAULT NULL,
- `used_by_geno_file` varchar(40) DEFAULT NULL,
- `Mb_mm8` double DEFAULT NULL,
- `Chr_mm8` char(3) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `species_name` (`SpeciesId`,`Name`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=716770 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoCode`
---
-
-DROP TABLE IF EXISTS `GenoCode`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoCode` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `AlleleType` char(3) NOT NULL DEFAULT '',
- `AlleleSymbol` char(2) NOT NULL DEFAULT '',
- `DatabaseValue` smallint(5) DEFAULT NULL,
- PRIMARY KEY (`InbredSetId`,`AlleleType`,`AlleleSymbol`),
- UNIQUE KEY `InbredSetId_AlleleType` (`InbredSetId`,`AlleleType`),
- UNIQUE KEY `InbredSetId_AlleleSymbol` (`InbredSetId`,`AlleleSymbol`),
- UNIQUE KEY `InbredSetId_DatabaseValue` (`InbredSetId`,`DatabaseValue`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoData`
---
-
-DROP TABLE IF EXISTS `GenoData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoFile`
---
-
-DROP TABLE IF EXISTS `GenoFile`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoFile` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `server` varchar(100) NOT NULL,
- `InbredSetID` int(11) NOT NULL,
- `location` varchar(255) NOT NULL,
- `title` varchar(255) NOT NULL,
- `sort` int(3) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoFreeze`
---
-
-DROP TABLE IF EXISTS `GenoFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- `confidentiality` tinyint(3) unsigned DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId),
-) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoSE`
---
-
-DROP TABLE IF EXISTS `GenoSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `GenoXRef`
---
-
-DROP TABLE IF EXISTS `GenoXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `GenoXRef` (
- `GenoFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `GenoId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `cM` double DEFAULT 0,
- `Used_for_mapping` char(1) DEFAULT 'N',
- UNIQUE KEY `ProbeSetId` (`GenoFreezeId`,`GenoId`),
- UNIQUE KEY `DataId` (`DataId`),
- FOREIGN KEY (GenoFreezeId) REFERENCES GenoFreeze(Id),
- FOREIGN KEY (GenoId) REFERENCES Geno(Id),
- KEY `GenoId` (`GenoId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `H2`
---
-
-DROP TABLE IF EXISTS `H2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `H2` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `ICH2` double NOT NULL DEFAULT 0,
- `H2SE` double NOT NULL DEFAULT 0,
- `HPH2` double NOT NULL DEFAULT 0,
- UNIQUE KEY `DataId` (`DataId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Homologene`
---
-
-DROP TABLE IF EXISTS `Homologene`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Homologene` (
- `HomologeneId` int(11) DEFAULT NULL,
- `GeneId` int(11) DEFAULT NULL,
- `TaxonomyId` int(11) DEFAULT NULL,
- KEY `GeneId` (`GeneId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InbredSet`
---
-
-DROP TABLE IF EXISTS `InbredSet`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InbredSet` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `InbredSetId` int(5) DEFAULT NULL,
- `InbredSetName` varchar(100) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `FullName` varchar(100) DEFAULT NULL,
- `public` tinyint(3) unsigned DEFAULT 2,
- `MappingMethodId` char(50) DEFAULT '1',
- `GeneticType` varchar(255) DEFAULT NULL,
- `Family` varchar(100) DEFAULT NULL,
- `FamilyOrder` int(5) DEFAULT NULL,
- `MenuOrderId` double NOT NULL,
- `InbredSetCode` varchar(5) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- FOREIGN KEY (MappingMethodId) REFERENCES MappingMethod(Id),
- KEY `Name` (`Name`),
- KEY `SpeciesId` (`SpeciesId`),
- KEY `Id` (`Id`),
- KEY `InbredSetCode` (`InbredSetCode`)
-) ENGINE=MyISAM AUTO_INCREMENT=83 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `IndelAll`
---
-
-DROP TABLE IF EXISTS `IndelAll`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `IndelAll` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `SourceId` smallint(5) unsigned DEFAULT NULL,
- `Name` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Mb_start` double DEFAULT NULL,
- `Mb_start_2016` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `Type` char(15) DEFAULT NULL,
- `Mb_end` double DEFAULT NULL,
- `Mb_end_2016` double DEFAULT NULL,
- `Size` double DEFAULT NULL,
- `InDelSequence` char(30) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `SnpId` (`SpeciesId`,`Name`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `SnpId2` (`Name`),
- KEY `Position` (`SpeciesId`,`Chromosome`,`Mb_start`) USING BTREE
-) ENGINE=MyISAM AUTO_INCREMENT=142895 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `IndelXRef`
---
-
-DROP TABLE IF EXISTS `IndelXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `IndelXRef` (
- `IndelId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId1` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId2` smallint(5) unsigned DEFAULT NULL,
- PRIMARY KEY (`IndelId`,`StrainId1`),
- FOREIGN KEY (IndelId) REFERENCES IndelAll(Id),
- FOREIGN KEY (StrainId1) REFERENCES Strain(Id),
- FOREIGN KEY (StrainId2) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InfoFiles`
---
-
-DROP TABLE IF EXISTS `InfoFiles`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InfoFiles` (
- `DatasetId` int(5) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT NULL,
- `TissueId` int(5) DEFAULT NULL,
- `InbredSetId` int(5) DEFAULT NULL,
- `GeneChipId` int(5) DEFAULT NULL,
- `AvgMethodId` int(5) DEFAULT NULL,
- `InfoFileTitle` longtext DEFAULT NULL,
- `Specifics` longtext DEFAULT NULL,
- `Status` varchar(255) DEFAULT NULL,
- `Title` varchar(255) DEFAULT NULL,
- `Organism` varchar(255) DEFAULT NULL,
- `Experiment_Type` longtext DEFAULT NULL,
- `Summary` longtext DEFAULT NULL,
- `Overall_Design` longtext DEFAULT NULL,
- `Contributor` longtext DEFAULT NULL,
- `Citation` longtext DEFAULT NULL,
- `Submission_Date` varchar(255) DEFAULT NULL,
- `Contact_Name` varchar(255) DEFAULT NULL,
- `Emails` varchar(255) DEFAULT NULL,
- `Phone` varchar(255) DEFAULT NULL,
- `URL` varchar(255) DEFAULT NULL,
- `Organization_Name` varchar(255) DEFAULT NULL,
- `Department` varchar(255) DEFAULT NULL,
- `Laboratory` varchar(255) DEFAULT NULL,
- `Street` varchar(255) DEFAULT NULL,
- `City` varchar(255) DEFAULT NULL,
- `State` varchar(255) DEFAULT NULL,
- `ZIP` varchar(255) DEFAULT NULL,
- `Country` varchar(255) DEFAULT NULL,
- `Platforms` varchar(255) DEFAULT NULL,
- `Samples` longtext DEFAULT NULL,
- `Species` varchar(255) DEFAULT NULL,
- `Normalization` varchar(255) DEFAULT NULL,
- `InbredSet` varchar(255) DEFAULT NULL,
- `InfoPageName` varchar(255) NOT NULL,
- `DB_Name` varchar(255) DEFAULT NULL,
- `Organism_Id` varchar(60) DEFAULT NULL,
- `InfoPageTitle` varchar(255) DEFAULT NULL,
- `GN_AccesionId` int(4) DEFAULT NULL,
- `Tissue` varchar(60) DEFAULT NULL,
- `AuthorizedUsers` varchar(100) DEFAULT NULL,
- `About_Cases` longtext DEFAULT NULL,
- `About_Tissue` longtext DEFAULT NULL,
- `About_Download` longtext DEFAULT NULL,
- `About_Array_Platform` longtext DEFAULT NULL,
- `About_Data_Values_Processing` longtext DEFAULT NULL,
- `Data_Source_Acknowledge` longtext DEFAULT NULL,
- `Progreso` varchar(20) DEFAULT NULL,
- `QualityControlStatus` longtext DEFAULT NULL,
- `InfoFileId` int(6) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`InfoFileId`),
- UNIQUE KEY `InfoPageName` (`InfoPageName`),
- UNIQUE KEY `GN_AccesionId` (`GN_AccesionId`)
-) ENGINE=MyISAM AUTO_INCREMENT=1470 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `InfoFilesUser_md5`
---
-
-DROP TABLE IF EXISTS `InfoFilesUser_md5`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `InfoFilesUser_md5` (
- `Username` varchar(16) DEFAULT NULL,
- `Password` varchar(32) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Investigators`
---
-
-DROP TABLE IF EXISTS `Investigators`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Investigators` (
- `FirstName` varchar(20) DEFAULT NULL,
- `LastName` varchar(20) DEFAULT NULL,
- `Address` varchar(200) DEFAULT NULL,
- `City` varchar(20) DEFAULT NULL,
- `State` varchar(20) DEFAULT NULL,
- `ZipCode` varchar(20) DEFAULT NULL,
- `Phone` varchar(200) DEFAULT NULL,
- `Email` varchar(200) DEFAULT NULL,
- `Country` varchar(35) DEFAULT NULL,
- `Url` text DEFAULT NULL,
- `UserName` varchar(30) DEFAULT NULL,
- `UserPass` varchar(50) DEFAULT NULL,
- `UserDate` datetime DEFAULT NULL,
- `UserLevel` int(8) DEFAULT NULL,
- `OrganizationId` int(5) NOT NULL,
- `InvestigatorId` int(5) NOT NULL AUTO_INCREMENT,
- PRIMARY KEY (`InvestigatorId`),
- FOREIGN KEY (OrganizationId) REFERENCES Organizations(OrganizationId)
-) ENGINE=MyISAM AUTO_INCREMENT=151 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `LCorrRamin3`
---
-
-DROP TABLE IF EXISTS `LCorrRamin3`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `LCorrRamin3` (
- `GeneId1` int(12) unsigned DEFAULT NULL,
- `GeneId2` int(12) unsigned DEFAULT NULL,
- `value` double DEFAULT NULL,
- KEY `GeneId1` (`GeneId1`),
- KEY `GeneId2` (`GeneId2`),
- KEY `GeneId1_2` (`GeneId1`,`GeneId2`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `MachineAccessLog`
---
-
-DROP TABLE IF EXISTS `MachineAccessLog`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `MachineAccessLog` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `accesstime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `ip_address` char(20) NOT NULL DEFAULT '0.0.0.0',
- `db_id` tinyint(3) unsigned NOT NULL DEFAULT 0,
- `data_id` int(10) unsigned DEFAULT NULL,
- `action` char(10) DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=514946 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `MappingMethod`
---
-
-DROP TABLE IF EXISTS `MappingMethod`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `MappingMethod` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `NStrain`
---
-
-DROP TABLE IF EXISTS `NStrain`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `NStrain` (
- `DataId` int(10) unsigned DEFAULT NULL,
- `StrainId` smallint(5) unsigned DEFAULT NULL,
- `count` varchar(5) DEFAULT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `News`
---
-
-DROP TABLE IF EXISTS `News`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `News` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `date` date DEFAULT NULL,
- `details` text DEFAULT NULL,
- PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=296 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Organizations`
---
-
-DROP TABLE IF EXISTS `Organizations`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Organizations` (
- `OrganizationId` int(5) NOT NULL AUTO_INCREMENT,
- `OrganizationName` varchar(200) NOT NULL,
- PRIMARY KEY (`OrganizationId`),
- UNIQUE KEY `OrganizationId` (`OrganizationId`),
- UNIQUE KEY `OrganizationName` (`OrganizationName`)
-) ENGINE=MyISAM AUTO_INCREMENT=92 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Phenotype`
---
-
-DROP TABLE IF EXISTS `Phenotype`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Phenotype` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Pre_publication_description` text DEFAULT NULL,
- `Post_publication_description` text DEFAULT NULL,
- `Original_description` text DEFAULT NULL,
- `Units` varchar(100) NOT NULL DEFAULT 'Unknown',
- `Pre_publication_abbreviation` varchar(40) DEFAULT NULL,
- `Post_publication_abbreviation` varchar(40) DEFAULT NULL,
- `Lab_code` varchar(255) DEFAULT NULL,
- `Submitter` varchar(255) DEFAULT NULL,
- `Owner` varchar(255) DEFAULT NULL,
- `Authorized_Users` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `Post_publication_description_Index` (`Post_publication_description`(255)),
- KEY `Pre_publication_description_Index` (`Pre_publication_description`(255)),
- KEY `Pre_publication_abbreviation_Index` (`Pre_publication_abbreviation`),
- KEY `Post_publication_abbreviation_Index` (`Post_publication_abbreviation`),
- KEY `Lab_code` (`Lab_code`),
- FULLTEXT KEY `Post_publication_description` (`Post_publication_description`),
- FULLTEXT KEY `Pre_publication_description` (`Pre_publication_description`),
- FULLTEXT KEY `Pre_publication_abbreviation` (`Pre_publication_abbreviation`),
- FULLTEXT KEY `Post_publication_abbreviation` (`Post_publication_abbreviation`),
- FULLTEXT KEY `Lab_code1` (`Lab_code`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Post_publication_description`,`Pre_publication_description`,`Pre_publication_abbreviation`,`Post_publication_abbreviation`,`Lab_code`)
-) ENGINE=MyISAM AUTO_INCREMENT=29299 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Probe`
---
-
-DROP TABLE IF EXISTS `Probe`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Probe` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeSetId` int(10) unsigned NOT NULL DEFAULT 0,
- `Name` char(20) DEFAULT NULL,
- `Sequence` char(30) DEFAULT NULL,
- `ExonNo` char(7) DEFAULT NULL,
- `SerialOrder` double DEFAULT NULL,
- `Tm` double DEFAULT NULL,
- `E_GSB` double DEFAULT NULL,
- `E_NSB` double DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `ProbeSetId` (`ProbeSetId`,`Name`),
- FOREIGN KEY (ProbeSetId) REFERENCES ProbeSet(ProbeSetId),
- KEY `SerialOrder` (`ProbeSetId`,`SerialOrder`)
-) ENGINE=MyISAM AUTO_INCREMENT=19054073 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeData`
---
-
-DROP TABLE IF EXISTS `ProbeData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeFreeze`
---
-
-DROP TABLE IF EXISTS `ProbeFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeFreezeId` int(5) DEFAULT NULL,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `TissueId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`),
- FOREIGN KEY (TissueId) REFERENCES Tissue(TissueId),
- KEY `TissueId` (`TissueId`),
- KEY `InbredSetId` (`InbredSetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=416 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeH2`
---
-
-DROP TABLE IF EXISTS `ProbeH2`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeH2` (
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeId` int(10) unsigned NOT NULL DEFAULT 0,
- `h2` double DEFAULT NULL,
- `weight` double DEFAULT NULL,
- UNIQUE KEY `ProbeId` (`ProbeFreezeId`,`ProbeId`),
- FOREIGN KEY (ProbeFreezeId) REFERENCES ProbeFreeze(ProbeFreezeId),
- FOREIGN KEY (ProbeId) REFERENCES Probe(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSE`
---
-
-DROP TABLE IF EXISTS `ProbeSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSet`
---
-
-DROP TABLE IF EXISTS `ProbeSet`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSet` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(100) DEFAULT NULL,
- `TargetId` varchar(150) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `description` longtext DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Chr_2016` char(3) DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `alias` longtext DEFAULT NULL,
- `GeneId` varchar(20) DEFAULT NULL,
- `GenbankId` varchar(1000) DEFAULT NULL,
- `SNP` int(2) DEFAULT NULL,
- `BlatSeq` text NOT NULL,
- `TargetSeq` text DEFAULT NULL,
- `UniGeneId` varchar(100) DEFAULT NULL,
- `Strand_Probe` char(1) DEFAULT NULL,
- `Strand_Gene` char(1) DEFAULT NULL,
- `OMIM` varchar(20) DEFAULT NULL,
- `comments` text NOT NULL,
- `Probe_set_target_region` varchar(255) DEFAULT NULL,
- `Probe_set_specificity` double DEFAULT NULL,
- `Probe_set_BLAT_score` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start_2016` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end_2016` double DEFAULT NULL,
- `Probe_set_strand` varchar(255) DEFAULT NULL,
- `Probe_set_Note_by_RW` varchar(255) DEFAULT NULL,
- `flag` char(1) DEFAULT NULL,
- `Symbol_H` varchar(100) DEFAULT NULL,
- `description_H` varchar(255) DEFAULT NULL,
- `chromosome_H` char(3) DEFAULT NULL,
- `MB_H` double DEFAULT NULL,
- `alias_H` varchar(255) DEFAULT NULL,
- `GeneId_H` varchar(20) DEFAULT NULL,
- `chr_num` smallint(5) unsigned DEFAULT 30,
- `name_num` int(10) unsigned DEFAULT 4294967290,
- `Probe_Target_Description` varchar(225) DEFAULT NULL,
- `RefSeq_TranscriptId` varchar(255) DEFAULT NULL,
- `ENSEMBLGeneId` varchar(50) DEFAULT NULL,
- `Chr_mm8` char(3) DEFAULT NULL,
- `Mb_mm8` double DEFAULT NULL,
- `Probe_set_Blat_Mb_start_mm8` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end_mm8` double DEFAULT NULL,
- `HomoloGeneID` varchar(20) DEFAULT NULL,
- `Biotype_ENS` varchar(255) DEFAULT NULL,
- `ProteinID` varchar(50) DEFAULT NULL,
- `ProteinName` varchar(50) DEFAULT NULL,
- `UniProtID` varchar(20) DEFAULT NULL,
- `Flybase_Id` varchar(25) DEFAULT NULL,
- `RGD_ID` int(10) DEFAULT NULL,
- `HMDB_ID` varchar(255) DEFAULT NULL,
- `Confidence` int(5) DEFAULT NULL,
- `ChEBI_ID` int(10) DEFAULT NULL,
- `ChEMBL_ID` varchar(100) DEFAULT NULL,
- `CAS_number` varchar(100) DEFAULT NULL,
- `PubChem_ID` int(10) DEFAULT NULL,
- `ChemSpider_ID` int(10) DEFAULT NULL,
- `UNII_ID` varchar(100) DEFAULT NULL,
- `EC_number` varchar(100) DEFAULT NULL,
- `KEGG_ID` varchar(100) DEFAULT NULL,
- `Molecular_Weight` double DEFAULT NULL,
- `Nugowiki_ID` int(10) DEFAULT NULL,
- `Type` varchar(255) DEFAULT NULL,
- `Tissue` varchar(255) DEFAULT NULL,
- `PrimaryName` varchar(255) DEFAULT NULL,
- `SecondaryNames` longtext DEFAULT NULL,
- `PeptideSequence` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `ProbeSetId` (`ChipId`,`Name`),
- FOREIGN KEY (HomoloGeneID) REFERENCES Homologene(HomologeneId),
- KEY `Name_IDX` (`Name`),
- KEY `symbol_IDX` (`Symbol`),
- KEY `RefSeq_TranscriptId` (`RefSeq_TranscriptId`),
- KEY `GENBANK_IDX` (`GenbankId`),
- KEY `TargetId` (`TargetId`),
- KEY `Position` (`Chr`),
- KEY `GeneId_IDX` (`GeneId`),
- FULLTEXT KEY `SEARCH_GENE_IDX` (`Symbol`,`alias`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Name`,`description`,`Symbol`,`alias`,`GenbankId`,`UniGeneId`,`Probe_Target_Description`),
- FULLTEXT KEY `RefSeq_FULL_IDX` (`RefSeq_TranscriptId`)
-) ENGINE=MyISAM AUTO_INCREMENT=12118724 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetData`
---
-
-DROP TABLE IF EXISTS `ProbeSetData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetFreeze`
---
-
-DROP TABLE IF EXISTS `ProbeSetFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `AvgID` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(40) DEFAULT NULL,
- `Name2` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `OrderList` int(5) DEFAULT NULL,
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `confidentiality` tinyint(4) NOT NULL DEFAULT 0,
- `AuthorisedUsers` varchar(300) NOT NULL,
- `DataScale` varchar(20) NOT NULL DEFAULT 'log2',
- PRIMARY KEY (`Id`),
- UNIQUE KEY `FullName` (`FullName`),
- UNIQUE KEY `Name` (`Name`),
- FOREIGN KEY (ProbeFreezeId) REFERENCES ProbeFreeze(ProbeFreezeId),
- KEY `NameIndex` (`Name2`),
- KEY `ShortName` (`ShortName`),
- KEY `ProbeFreezeId` (`ProbeFreezeId`),
- KEY `conf_and_public` (`confidentiality`,`public`)
-) ENGINE=MyISAM AUTO_INCREMENT=1006 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetSE`
---
-
-DROP TABLE IF EXISTS `ProbeSetSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeSetXRef`
---
-
-DROP TABLE IF EXISTS `ProbeSetXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeSetXRef` (
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeSetId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `Locus_old` char(20) DEFAULT NULL,
- `LRS_old` double DEFAULT NULL,
- `pValue_old` double DEFAULT NULL,
- `mean` double DEFAULT NULL,
- `se` double DEFAULT NULL,
- `Locus` char(20) DEFAULT NULL,
- `LRS` double DEFAULT NULL,
- `pValue` double DEFAULT NULL,
- `additive` double DEFAULT NULL,
- `h2` float DEFAULT NULL,
- UNIQUE KEY `ProbeSetId` (`ProbeSetFreezeId`,`ProbeSetId`),
- UNIQUE KEY `DataId_IDX` (`DataId`),
- FOREIGN KEY (ProbeSetFreezeId) REFERENCES ProbeSetFreeze(Id),
- FOREIGN KEY (ProbeSetId) REFERENCES ProbeSet(Id),
- KEY `ProbeSetId1` (`ProbeSetId`),
- KEY `Locus` (`Locus`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `ProbeXRef`
---
-
-DROP TABLE IF EXISTS `ProbeXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ProbeXRef` (
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- UNIQUE KEY `ProbeId` (`ProbeFreezeId`,`ProbeId`),
- UNIQUE KEY `DataId_IDX` (`DataId`),
- FOREIGN KEY (ProbeFreezeId) REFERENCES ProbeFreeze(ProbeFreezeId),
- FOREIGN KEY (ProbeId) REFERENCES Probe(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Publication`
---
-
-DROP TABLE IF EXISTS `Publication`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Publication` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `PubMed_ID` int(10) unsigned DEFAULT NULL,
- `Abstract` text DEFAULT NULL,
- `Authors` text NOT NULL,
- `Title` varchar(255) DEFAULT NULL,
- `Journal` varchar(255) DEFAULT NULL,
- `Volume` varchar(255) DEFAULT NULL,
- `Pages` varchar(255) DEFAULT NULL,
- `Month` varchar(255) DEFAULT NULL,
- `Year` varchar(255) NOT NULL DEFAULT '0',
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`PubMed_ID`),
- KEY `PubMed_ID` (`PubMed_ID`),
- FULLTEXT KEY `Abstract1` (`Abstract`),
- FULLTEXT KEY `Title1` (`Title`),
- FULLTEXT KEY `Authors1` (`Authors`),
- FULLTEXT KEY `SEARCH_FULL_IDX` (`Abstract`,`Title`,`Authors`)
-) ENGINE=MyISAM AUTO_INCREMENT=26076 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishData`
---
-
-DROP TABLE IF EXISTS `PublishData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` float(14,6) DEFAULT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishFreeze`
---
-
-DROP TABLE IF EXISTS `PublishFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- `confidentiality` tinyint(3) DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId),
- KEY `InbredSetId` (`InbredSetId`)
-) ENGINE=MyISAM AUTO_INCREMENT=60 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishSE`
---
-
-DROP TABLE IF EXISTS `PublishSE`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishSE` (
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `error` float NOT NULL,
- UNIQUE KEY `DataId` (`DataId`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `PublishXRef`
---
-
-DROP TABLE IF EXISTS `PublishXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `PublishXRef` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `PhenotypeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `PublicationId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `mean` double DEFAULT NULL,
- `Locus` char(50) DEFAULT NULL,
- `LRS` double DEFAULT NULL,
- `additive` double DEFAULT NULL,
- `Sequence` smallint(5) unsigned NOT NULL DEFAULT 1,
- `comments` text NOT NULL,
- UNIQUE KEY `InbredSet` (`InbredSetId`,`Id`),
- UNIQUE KEY `record` (`InbredSetId`,`PhenotypeId`,`PublicationId`,`Sequence`),
- UNIQUE KEY `PhenotypeId` (`PhenotypeId`),
- UNIQUE KEY `DataId` (`DataId`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId),
- FOREIGN KEY (PhenotypeId) REFERENCES Phenotype(Id),
- FOREIGN KEY (PublicationId) REFERENCES Publication(Id),
- KEY `InbredSetId` (`InbredSetId`),
- KEY `Locus` (`Locus`),
- KEY `PublicationId` (`PublicationId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `RatSnpPattern`
---
-
-DROP TABLE IF EXISTS `RatSnpPattern`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `RatSnpPattern` (
- `Id` int(12) NOT NULL AUTO_INCREMENT,
- `SnpId` int(12) NOT NULL,
- `BN` char(1) DEFAULT NULL,
- `F344` char(1) DEFAULT NULL,
- `ACI` char(1) DEFAULT NULL,
- `BBDP` char(1) DEFAULT NULL,
- `FHH` char(1) DEFAULT NULL,
- `FHL` char(1) DEFAULT NULL,
- `GK` char(1) DEFAULT NULL,
- `LE` char(1) DEFAULT NULL,
- `LEW` char(1) DEFAULT NULL,
- `LH` char(1) DEFAULT NULL,
- `LL` char(1) DEFAULT NULL,
- `LN` char(1) DEFAULT NULL,
- `MHS` char(1) DEFAULT NULL,
- `MNS` char(1) DEFAULT NULL,
- `SBH` char(1) DEFAULT NULL,
- `SBN` char(1) DEFAULT NULL,
- `SHR` char(1) DEFAULT NULL,
- `SHRSP` char(1) DEFAULT NULL,
- `SR` char(1) DEFAULT NULL,
- `SS` char(1) DEFAULT NULL,
- `WAG` char(1) DEFAULT NULL,
- `WLI` char(1) DEFAULT NULL,
- `WMI` char(1) DEFAULT NULL,
- `WKY` char(1) DEFAULT NULL,
- `ACI_N` char(1) DEFAULT NULL,
- `BN_N` char(1) DEFAULT NULL,
- `BUF_N` char(1) DEFAULT NULL,
- `F344_N` char(1) DEFAULT NULL,
- `M520_N` char(1) DEFAULT NULL,
- `MR_N` char(1) DEFAULT NULL,
- `WKY_N` char(1) DEFAULT NULL,
- `WN_N` char(1) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `SnpId` (`SnpId`)
-) ENGINE=MyISAM AUTO_INCREMENT=4711685 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Sample`
---
-
-DROP TABLE IF EXISTS `Sample`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Sample` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(30) DEFAULT NULL,
- `Age` smallint(6) NOT NULL DEFAULT 0,
- `Sex` enum('F','M') NOT NULL DEFAULT 'F',
- `CreateTime` date NOT NULL DEFAULT '2001-01-01',
- `TissueType` varchar(30) DEFAULT NULL,
- `FromSrc` varchar(10) DEFAULT NULL,
- `ImageURL` varchar(100) DEFAULT NULL,
- `CELURL` varchar(120) DEFAULT NULL,
- `DATURL` varchar(100) DEFAULT NULL,
- `CHPURL` varchar(100) DEFAULT NULL,
- `RPTURL` varchar(100) DEFAULT NULL,
- `EXPURL` varchar(100) DEFAULT NULL,
- `TXTURL` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`StrainId`,`Name`,`CreateTime`)
-) ENGINE=MyISAM AUTO_INCREMENT=252 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SampleXRef`
---
-
-DROP TABLE IF EXISTS `SampleXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SampleXRef` (
- `SampleId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- PRIMARY KEY (`ProbeFreezeId`,`SampleId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAll`
---
-
-DROP TABLE IF EXISTS `SnpAll`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAll` (
- `Id` int(20) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` smallint(5) unsigned DEFAULT 1,
- `SnpName` char(30) DEFAULT NULL,
- `Rs` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `Position_2016` double DEFAULT NULL,
- `Alleles` char(5) DEFAULT NULL,
- `Source` char(35) DEFAULT NULL,
- `ConservationScore` double DEFAULT NULL,
- `3Prime_UTR` text DEFAULT NULL,
- `5Prime_UTR` text DEFAULT NULL,
- `Upstream` text DEFAULT NULL,
- `Downstream` text DEFAULT NULL,
- `Intron` char(1) DEFAULT NULL,
- `Non_Splice_Site` text DEFAULT NULL,
- `Splice_Site` text DEFAULT NULL,
- `Intergenic` char(1) DEFAULT NULL,
- `Exon` char(1) DEFAULT NULL,
- `Non_Synonymous_Coding` text DEFAULT NULL,
- `Synonymous_Coding` text DEFAULT NULL,
- `Start_Gained` text DEFAULT NULL,
- `Start_Lost` text DEFAULT NULL,
- `Stop_Gained` text DEFAULT NULL,
- `Stop_Lost` text DEFAULT NULL,
- `Unknown_Effect_In_Exon` text DEFAULT NULL,
- `Domain` varchar(50) DEFAULT NULL,
- `Gene` varchar(30) DEFAULT NULL,
- `Transcript` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `SnpName` (`SnpName`),
- KEY `Rs` (`Rs`),
- KEY `Position` (`Chromosome`,`Position`),
- KEY `Source` (`Source`)
-) ENGINE=InnoDB AUTO_INCREMENT=84086331 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAllRat`
---
-
-DROP TABLE IF EXISTS `SnpAllRat`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAllRat` (
- `Id` int(20) NOT NULL AUTO_INCREMENT,
- `SpeciesId` int(5) DEFAULT 2,
- `SnpName` char(30) DEFAULT NULL,
- `Chromosome` char(2) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `Alleles` char(5) DEFAULT NULL,
- `Source` char(35) DEFAULT NULL,
- `ConservationScore` double DEFAULT NULL,
- `Domain` varchar(50) DEFAULT NULL,
- `Gene` varchar(30) DEFAULT NULL,
- `Transcript` varchar(50) DEFAULT NULL,
- `Function` varchar(50) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `SnpName` (`SnpName`),
- KEY `Position` (`Chromosome`,`Position`),
- KEY `Source` (`Source`)
-) ENGINE=MyISAM AUTO_INCREMENT=97663615 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpAllele_to_be_deleted`
---
-
-DROP TABLE IF EXISTS `SnpAllele_to_be_deleted`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpAllele_to_be_deleted` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Base` char(20) DEFAULT NULL,
- `Info` char(255) DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpPattern`
---
-
-DROP TABLE IF EXISTS `SnpPattern`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpPattern` (
- `SnpId` int(10) unsigned NOT NULL DEFAULT 0,
- `129P2/OlaHsd` char(1) DEFAULT NULL,
- `129S1/SvImJ` char(1) DEFAULT NULL,
- `129S5/SvEvBrd` char(1) DEFAULT NULL,
- `AKR/J` char(1) DEFAULT NULL,
- `A/J` char(1) DEFAULT NULL,
- `BALB/cJ` char(1) DEFAULT NULL,
- `C3H/HeJ` char(1) DEFAULT NULL,
- `C57BL/6J` char(1) DEFAULT NULL,
- `CAST/EiJ` char(1) DEFAULT NULL,
- `CBA/J` char(1) DEFAULT NULL,
- `DBA/2J` char(1) DEFAULT NULL,
- `LP/J` char(1) DEFAULT NULL,
- `NOD/ShiLtJ` char(1) DEFAULT NULL,
- `NZO/HlLtJ` char(1) DEFAULT NULL,
- `PWK/PhJ` char(1) DEFAULT NULL,
- `SPRET/EiJ` char(1) DEFAULT NULL,
- `WSB/EiJ` char(1) DEFAULT NULL,
- `PWD/PhJ` char(1) DEFAULT NULL,
- `SJL/J` char(1) DEFAULT NULL,
- `NZL/LtJ` char(1) DEFAULT NULL,
- `CZECHII/EiJ` char(1) DEFAULT NULL,
- `CALB/RkJ` char(1) DEFAULT NULL,
- `ST/bJ` char(1) DEFAULT NULL,
- `ISS/IbgTejJ` char(1) DEFAULT NULL,
- `C57L/J` char(1) DEFAULT NULL,
- `Qsi5` char(1) DEFAULT NULL,
- `B6A6_Esline_Regeneron` char(1) DEFAULT NULL,
- `129T2/SvEmsJ` char(1) DEFAULT NULL,
- `BALB/cByJ` char(1) DEFAULT NULL,
- `NZB/BlNJ` char(1) DEFAULT NULL,
- `P/J` char(1) DEFAULT NULL,
- `I/LnJ` char(1) DEFAULT NULL,
- `PERC/EiJ` char(1) DEFAULT NULL,
- `TALLYHO/JngJ` char(1) DEFAULT NULL,
- `CE/J` char(1) DEFAULT NULL,
- `MRL/MpJ` char(1) DEFAULT NULL,
- `PERA/EiJ` char(1) DEFAULT NULL,
- `IS/CamRkJ` char(1) DEFAULT NULL,
- `ZALENDE/EiJ` char(1) DEFAULT NULL,
- `Fline` char(1) DEFAULT NULL,
- `BTBRT<+>tf/J` char(1) DEFAULT NULL,
- `O20` char(1) DEFAULT NULL,
- `C58/J` char(1) DEFAULT NULL,
- `BPH/2J` char(1) DEFAULT NULL,
- `DDK/Pas` char(1) DEFAULT NULL,
- `C57BL/6NHsd` char(1) DEFAULT NULL,
- `C57BL/6NTac` char(1) DEFAULT NULL,
- `129S4/SvJae` char(1) DEFAULT NULL,
- `BPL/1J` char(1) DEFAULT NULL,
- `BPN/3J` char(1) DEFAULT NULL,
- `PL/J` char(1) DEFAULT NULL,
- `DBA/1J` char(1) DEFAULT NULL,
- `MSM/Ms` char(1) DEFAULT NULL,
- `MA/MyJ` char(1) DEFAULT NULL,
- `NZW/LacJ` char(1) DEFAULT NULL,
- `C57BL/10J` char(1) DEFAULT NULL,
- `C57BL/6ByJ` char(1) DEFAULT NULL,
- `RF/J` char(1) DEFAULT NULL,
- `C57BR/cdJ` char(1) DEFAULT NULL,
- `129S6/SvEv` char(1) DEFAULT NULL,
- `MAI/Pas` char(1) DEFAULT NULL,
- `RIIIS/J` char(1) DEFAULT NULL,
- `C57BL/6NNIH` char(1) DEFAULT NULL,
- `FVB/NJ` char(1) DEFAULT NULL,
- `SEG/Pas` char(1) DEFAULT NULL,
- `MOLF/EiJ` char(1) DEFAULT NULL,
- `C3HeB/FeJ` char(1) DEFAULT NULL,
- `Lline` char(1) DEFAULT NULL,
- `SKIVE/EiJ` char(1) DEFAULT NULL,
- `C57BL/6NCrl` char(1) DEFAULT NULL,
- `KK/HlJ` char(1) DEFAULT NULL,
- `LG/J` char(1) DEFAULT NULL,
- `C57BLKS/J` char(1) DEFAULT NULL,
- `SM/J` char(1) DEFAULT NULL,
- `NOR/LtJ` char(1) DEFAULT NULL,
- `ILS/IbgTejJ` char(1) DEFAULT NULL,
- `C57BL/6JOlaHsd` char(1) DEFAULT NULL,
- `SWR/J` char(1) DEFAULT NULL,
- `C57BL/6JBomTac` char(1) DEFAULT NULL,
- `SOD1/EiJ` char(1) DEFAULT NULL,
- `NON/LtJ` char(1) DEFAULT NULL,
- `JF1/Ms` char(1) DEFAULT NULL,
- `129X1/SvJ` char(1) DEFAULT NULL,
- `C2T1_Esline_Nagy` char(1) DEFAULT NULL,
- `C57BL/6NJ` char(1) DEFAULT NULL,
- `LEWES/EiJ` char(1) DEFAULT NULL,
- `RBA/DnJ` char(1) DEFAULT NULL,
- `DDY/JclSidSeyFrkJ` char(1) DEFAULT NULL,
- `SEA/GnJ` char(1) DEFAULT NULL,
- `C57BL/6JCrl` char(1) DEFAULT NULL,
- `EL/SuzSeyFrkJ` char(1) DEFAULT NULL,
- `HTG/GoSfSnJ` char(1) DEFAULT NULL,
- `129S2/SvHsd` char(1) DEFAULT NULL,
- `MOLG/DnJ` char(1) DEFAULT NULL,
- `BUB/BnJ` char(1) DEFAULT NULL,
- PRIMARY KEY (`SnpId`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `SnpSource`
---
-
-DROP TABLE IF EXISTS `SnpSource`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `SnpSource` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` char(35) DEFAULT NULL,
- `DateCreated` date DEFAULT NULL,
- `DateAdded` date DEFAULT NULL,
- PRIMARY KEY (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Species`
---
-
-DROP TABLE IF EXISTS `Species`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Species` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `SpeciesId` int(5) DEFAULT NULL,
- `SpeciesName` varchar(50) DEFAULT NULL,
- `Name` char(30) NOT NULL DEFAULT '',
- `MenuName` char(50) DEFAULT NULL,
- `FullName` char(100) NOT NULL DEFAULT '',
- `TaxonomyId` int(11) DEFAULT NULL,
- `OrderId` smallint(6) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Strain`
---
-
-DROP TABLE IF EXISTS `Strain`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Strain` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `Name` varchar(100) DEFAULT NULL,
- `Name2` varchar(100) DEFAULT NULL,
- `SpeciesId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Symbol` char(5) DEFAULT NULL,
- `Alias` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`,`SpeciesId`),
- FOREIGN KEY (SpeciesId) REFERENCES Species(SpeciesId),
- KEY `Symbol` (`Symbol`)
-) ENGINE=MyISAM AUTO_INCREMENT=63438 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `StrainXRef`
---
-
-DROP TABLE IF EXISTS `StrainXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `StrainXRef` (
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `OrderId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Used_for_mapping` char(1) DEFAULT 'N',
- `PedigreeStatus` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`InbredSetId`,`StrainId`),
- UNIQUE KEY `Orders` (`InbredSetId`,`OrderId`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TableComments`
---
-
-DROP TABLE IF EXISTS `TableComments`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TableComments` (
- `TableName` varchar(100) NOT NULL DEFAULT '',
- `Comment` text DEFAULT NULL,
- PRIMARY KEY (`TableName`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TableFieldAnnotation`
---
-
-DROP TABLE IF EXISTS `TableFieldAnnotation`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TableFieldAnnotation` (
- `TableField` varchar(100) NOT NULL DEFAULT '',
- `Foreign_Key` varchar(100) DEFAULT NULL,
- `Annotation` text DEFAULT NULL,
- PRIMARY KEY (`TableField`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Temp`
---
-
-DROP TABLE IF EXISTS `Temp`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Temp` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `dbdisplayname` varchar(255) DEFAULT NULL,
- `Name` varchar(30) DEFAULT NULL,
- `description` text DEFAULT NULL,
- `createtime` datetime NOT NULL DEFAULT '2004-01-01 12:00:00',
- `DataId` int(11) NOT NULL DEFAULT 0,
- `InbredSetId` smallint(5) unsigned NOT NULL DEFAULT 1,
- `IP` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`),
- FOREIGN KEY (InbredSetId) REFERENCES InbredSet(InbredSetId)
-) ENGINE=MyISAM AUTO_INCREMENT=98608 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TempData`
---
-
-DROP TABLE IF EXISTS `TempData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TempData` (
- `Id` int(10) unsigned NOT NULL DEFAULT 0,
- `StrainId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `value` double NOT NULL DEFAULT 0,
- `SE` double DEFAULT NULL,
- `NStrain` smallint(6) DEFAULT NULL,
- UNIQUE KEY `DataId` (`Id`,`StrainId`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Tissue`
---
-
-DROP TABLE IF EXISTS `Tissue`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Tissue` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `TissueId` int(5) DEFAULT NULL,
- `TissueName` varchar(50) DEFAULT NULL,
- `Name` char(50) DEFAULT NULL,
- `Short_Name` char(30) NOT NULL DEFAULT '',
- `BIRN_lex_ID` char(30) DEFAULT NULL,
- `BIRN_lex_Name` char(30) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Short_Name` (`Short_Name`),
- UNIQUE KEY `Name` (`Name`)
-) ENGINE=MyISAM AUTO_INCREMENT=180 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeFreeze`
---
-
-DROP TABLE IF EXISTS `TissueProbeFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `ChipId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `StrainId` varchar(100) NOT NULL DEFAULT '0',
- `Name` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `InbredSetId` smallint(5) unsigned DEFAULT 1,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `Name` (`Name`),
- UNIQUE KEY `FullName` (`FullName`),
- FOREIGN KEY (StrainId) REFERENCES Strain(Id)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetData`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetData`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetData` (
- `Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `TissueID` int(10) unsigned NOT NULL DEFAULT 0,
- `value` float NOT NULL DEFAULT 0,
- PRIMARY KEY (`Id`,`TissueID`),
- FOREIGN KEY (TissueID) REFERENCES Tissue(TissueId)
-) ENGINE=MyISAM AUTO_INCREMENT=90563 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetFreeze`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetFreeze`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetFreeze` (
- `Id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
- `TissueProbeFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `AvgID` smallint(5) unsigned NOT NULL DEFAULT 0,
- `Name` varchar(40) DEFAULT NULL,
- `Name2` varchar(100) NOT NULL DEFAULT '',
- `FullName` varchar(100) NOT NULL DEFAULT '',
- `ShortName` varchar(100) NOT NULL DEFAULT '',
- `CreateTime` date NOT NULL DEFAULT '0000-00-00',
- `public` tinyint(4) NOT NULL DEFAULT 0,
- `confidentiality` tinyint(4) NOT NULL DEFAULT 0,
- `AuthorisedUsers` varchar(100) DEFAULT NULL,
- PRIMARY KEY (`Id`),
- UNIQUE KEY `FullName` (`FullName`),
- UNIQUE KEY `Name` (`Name`),
- FOREIGN KEY (TissueProbeFreezeId) REFERENCES TissueProbeFreeze(Id),
- KEY `NameIndex` (`Name2`)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TissueProbeSetXRef`
---
-
-DROP TABLE IF EXISTS `TissueProbeSetXRef`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TissueProbeSetXRef` (
- `TissueProbeSetFreezeId` smallint(5) unsigned NOT NULL DEFAULT 0,
- `ProbesetId` int(10) unsigned NOT NULL DEFAULT 0,
- `DataId` int(10) unsigned NOT NULL DEFAULT 0,
- `Mean` float DEFAULT 0,
- `useStatus` char(1) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `GeneId` varchar(20) DEFAULT NULL,
- `Chr` char(3) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Mb_2016` double DEFAULT NULL,
- `description` varchar(255) DEFAULT NULL,
- `Probe_Target_Description` varchar(225) DEFAULT NULL,
- PRIMARY KEY (`TissueProbeSetFreezeId`,`ProbesetId`),
- UNIQUE KEY `DataId_IDX` (`DataId`),
- FOREIGN KEY (TissueProbeSetFreezeId) REFERENCES TissueProbeSetFreeze(Id),
- FOREIGN KEY (ProbesetId) REFERENCES ProbeSet(Id),
- KEY `symbol_IDX` (`Symbol`),
- KEY `GeneId_IDX` (`GeneId`),
- KEY `Position` (`Chr`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `TraitMetadata`
---
-
-DROP TABLE IF EXISTS `TraitMetadata`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `TraitMetadata` (
- `type` varchar(255) DEFAULT NULL,
- `value` longtext DEFAULT NULL
-) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `User`
---
-
-DROP TABLE IF EXISTS `User`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `User` (
- `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
- `name` varchar(100) NOT NULL DEFAULT '',
- `password` varchar(100) NOT NULL DEFAULT '',
- `email` varchar(100) DEFAULT NULL,
- `createtime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `user_ip` varchar(20) DEFAULT NULL,
- `lastlogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
- `disable` enum('Y','N') DEFAULT 'N',
- `privilege` enum('guest','user','admin','root') DEFAULT NULL,
- `grpName` varchar(40) DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `name_index` (`name`)
-) ENGINE=MyISAM AUTO_INCREMENT=353 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `UserPrivilege`
---
-
-DROP TABLE IF EXISTS `UserPrivilege`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `UserPrivilege` (
- `UserId` int(10) unsigned NOT NULL,
- `ProbeSetFreezeId` smallint(5) unsigned NOT NULL,
- `download_result_priv` enum('N','Y') NOT NULL DEFAULT 'N',
- KEY `userId` (`UserId`,`ProbeSetFreezeId`),
- FOREIGN KEY (UserId) REFERENCES User(id),
- FOREIGN KEY (ProbeSetFreezeId) REFERENCES ProbeSetFreeze(Id)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `Vlookup`
---
-
-DROP TABLE IF EXISTS `Vlookup`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `Vlookup` (
- `Id` int(11) NOT NULL AUTO_INCREMENT,
- `VLProbeSetId` text DEFAULT NULL,
- `VLBlatSeq` longtext DEFAULT NULL,
- `InfoFileId` int(5) DEFAULT NULL,
- `DatasetId` int(5) DEFAULT NULL,
- `SpeciesId` int(5) DEFAULT NULL,
- `TissueId` int(5) DEFAULT NULL,
- `InbredSetId` int(5) DEFAULT NULL,
- `GeneChipId` int(5) DEFAULT NULL,
- `AvgMethodId` int(5) DEFAULT NULL,
- `InfoPageName` varchar(255) DEFAULT NULL,
- `GN_AccesionId` int(5) DEFAULT NULL,
- `Name` varchar(100) DEFAULT NULL,
- `GeneId` varchar(10) DEFAULT NULL,
- `Mb` double DEFAULT NULL,
- `Chr` varchar(10) DEFAULT NULL,
- `Probe_set_Blat_Mb_start` double DEFAULT NULL,
- `Probe_set_Blat_Mb_end` double DEFAULT NULL,
- `Strand` char(1) DEFAULT NULL,
- `TxStart` double DEFAULT NULL,
- `TxEnd` double DEFAULT NULL,
- `cdsStart` double DEFAULT NULL,
- `cdsEnd` double DEFAULT NULL,
- `exonCount` int(7) DEFAULT NULL,
- `exonStarts` text DEFAULT NULL,
- `exonEnds` text DEFAULT NULL,
- `ProteinID` varchar(15) DEFAULT NULL,
- `AlignID` varchar(10) DEFAULT NULL,
- `kgID` varchar(10) DEFAULT NULL,
- `NM_ID` varchar(15) DEFAULT NULL,
- `SnpName` char(30) DEFAULT NULL,
- `Position` double DEFAULT NULL,
- `HMDB_ID` varchar(255) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `description` longtext DEFAULT NULL,
- `alias` longtext DEFAULT NULL,
- `Full_Description` longtext DEFAULT NULL,
- `BlatSeq` text DEFAULT NULL,
- `ChEBI_ID` int(10) DEFAULT NULL,
- `ChEMBL_ID` varchar(100) DEFAULT NULL,
- `CAS_number` varchar(100) DEFAULT NULL,
- `PubChem_ID` int(10) DEFAULT NULL,
- `ChemSpider_ID` varchar(10) DEFAULT NULL,
- `UNII_ID` varchar(100) DEFAULT NULL,
- `EC_number` varchar(100) DEFAULT NULL,
- `KEGG_ID` varchar(100) DEFAULT NULL,
- `Molecular_Weight` varchar(100) DEFAULT NULL,
- `Nugowiki_ID` varchar(100) DEFAULT NULL,
- `assembly` varchar(10) DEFAULT NULL,
- KEY `Id` (`Id`)
-) ENGINE=MyISAM AUTO_INCREMENT=753474564 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `login`
---
-
-DROP TABLE IF EXISTS `login`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `login` (
- `id` varchar(36) NOT NULL,
- `user` varchar(36) DEFAULT NULL,
- `timestamp` datetime DEFAULT NULL,
- `ip_address` varchar(39) DEFAULT NULL,
- `successful` tinyint(1) NOT NULL,
- `session_id` text DEFAULT NULL,
- `assumed_by` varchar(36) DEFAULT NULL,
- PRIMARY KEY (`id`),
- FOREIGN KEY (user) REFERENCES user(id),
- KEY `user` (`user`),
- KEY `assumed_by` (`assumed_by`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `metadata_audit`
---
-
-DROP TABLE IF EXISTS `metadata_audit`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `metadata_audit` (
- `id` int(11) NOT NULL AUTO_INCREMENT,
- `dataset_id` int(11) NOT NULL,
- `editor` varchar(255) NOT NULL,
- `json_diff_data` varchar(2048) NOT NULL,
- `time_stamp` timestamp NOT NULL DEFAULT current_timestamp(),
- PRIMARY KEY (`id`),
- CONSTRAINT `CONSTRAINT_1` CHECK (json_valid(`json_diff_data`))
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `pubmedsearch`
---
-
-DROP TABLE IF EXISTS `pubmedsearch`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `pubmedsearch` (
- `id` bigint(20) NOT NULL AUTO_INCREMENT,
- `pubmedid` bigint(20) DEFAULT NULL,
- `title` text DEFAULT NULL,
- `authorfullname` text DEFAULT NULL,
- `authorshortname` text DEFAULT NULL,
- `institute` text DEFAULT NULL,
- `geneid` varchar(20) DEFAULT NULL,
- PRIMARY KEY (`id`),
- KEY `NewIndex4` (`geneid`),
- FULLTEXT KEY `NewIndex1` (`institute`),
- FULLTEXT KEY `NewIndex3` (`authorfullname`,`authorshortname`)
-) ENGINE=MyISAM AUTO_INCREMENT=1401371 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `role`
---
-
-DROP TABLE IF EXISTS `role`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `role` (
- `the_id` varchar(36) NOT NULL,
- `name` varchar(80) NOT NULL,
- `description` varchar(255) DEFAULT NULL,
- PRIMARY KEY (`the_id`),
- UNIQUE KEY `name` (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `roles_users`
---
-
-DROP TABLE IF EXISTS `roles_users`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `roles_users` (
- `user_id` int(11) DEFAULT NULL,
- `role_id` int(11) DEFAULT NULL,
- KEY `user_id` (`user_id`),
- KEY `role_id` (`role_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `temporary`
---
-
-DROP TABLE IF EXISTS `temporary`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `temporary` (
- `tax_id` varchar(20) DEFAULT NULL,
- `GeneID` varchar(20) DEFAULT NULL,
- `Symbol` varchar(100) DEFAULT NULL,
- `OMIM` varchar(100) DEFAULT NULL,
- `HomoloGene` varchar(100) DEFAULT NULL,
- `Other_GeneID` varchar(20) DEFAULT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user`
---
-
-DROP TABLE IF EXISTS `user`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user` (
- `id` varchar(36) NOT NULL,
- `email_address` varchar(50) NOT NULL,
- `password` text NOT NULL,
- `full_name` varchar(50) DEFAULT NULL,
- `organization` varchar(50) DEFAULT NULL,
- `active` tinyint(1) NOT NULL,
- `registration_info` text DEFAULT NULL,
- `confirmed` text DEFAULT NULL,
- `superuser` text DEFAULT NULL,
- PRIMARY KEY (`id`),
- UNIQUE KEY `email_address` (`email_address`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user_collection`
---
-
-DROP TABLE IF EXISTS `user_collection`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_collection` (
- `id` varchar(36) NOT NULL,
- `user` varchar(36) DEFAULT NULL,
- `name` text DEFAULT NULL,
- `created_timestamp` datetime DEFAULT NULL,
- `changed_timestamp` datetime DEFAULT NULL,
- `members` text DEFAULT NULL,
- PRIMARY KEY (`id`),
- FOREIGN KEY (user) REFERENCES user(id),
- KEY `user` (`user`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
---
--- Table structure for table `user_openids`
---
-
-DROP TABLE IF EXISTS `user_openids`;
-/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_openids` (
- `openid_url` varchar(255) NOT NULL,
- `user_id` varchar(36) NOT NULL,
- PRIMARY KEY (`openid_url`),
- FOREIGN KEY (user_id) REFERENCES user(id),
- KEY `user_id` (`user_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- Dump completed on 2021-07-14 5:26:53
diff --git a/sql/schema.svg b/sql/schema.svg
deleted file mode 100644
index 2451899..0000000
--- a/sql/schema.svg
+++ /dev/null
@@ -1,1430 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
- "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
-<!-- Generated by graphviz version 2.42.3 (20191010.1750)
- -->
-<!-- Title: test Pages: 1 -->
-<svg width="5065pt" height="3178pt"
- viewBox="0.00 0.00 5065.18 3178.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 3174)">
-<title>test</title>
-<polygon fill="white" stroke="transparent" points="-4,4 -4,-3174 5061.18,-3174 5061.18,4 -4,4"/>
-<g id="clust1" class="cluster">
-<title>cluster_Others</title>
-<polygon fill="none" stroke="black" points="3495,-615.5 3495,-1429.5 5014,-1429.5 5014,-615.5 3495,-615.5"/>
-<text text-anchor="middle" x="4254.5" y="-1414.3" font-family="Times,serif" font-size="14.00">Others</text>
-</g>
-<!-- node2 -->
-<g id="node1" class="node">
-<title>node2</title>
-<polygon fill="white" stroke="black" points="933.5,-699 933.5,-820 1066.5,-820 1066.5,-699 933.5,-699"/>
-<text text-anchor="middle" x="1000" y="-804.8" font-family="Times,serif" font-size="14.00">BXDSnpPosition</text>
-<polyline fill="none" stroke="black" points="933.5,-797 1066.5,-797 "/>
-<text text-anchor="start" x="941.5" y="-781.8" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="941.5" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; Chr</text>
-<text text-anchor="start" x="941.5" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; StrainId1</text>
-<text text-anchor="start" x="941.5" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; StrainId2</text>
-<text text-anchor="start" x="941.5" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; Mb</text>
-<text text-anchor="start" x="941.5" y="-706.8" font-family="Times,serif" font-size="14.00">&#45; Mb_2016</text>
-</g>
-<!-- node3 -->
-<g id="node2" class="node">
-<title>node3</title>
-<polygon fill="white" stroke="black" points="2127,-1277 2127,-1338 2243,-1338 2243,-1277 2127,-1277"/>
-<text text-anchor="middle" x="2185" y="-1322.8" font-family="Times,serif" font-size="14.00">CaseAttribute</text>
-<polyline fill="none" stroke="black" points="2127,-1315 2243,-1315 "/>
-<text text-anchor="start" x="2135" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2135" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-</g>
-<!-- node4 -->
-<g id="node3" class="node">
-<title>node4</title>
-<polygon fill="white" stroke="black" points="2346.5,-714 2346.5,-805 2501.5,-805 2501.5,-714 2346.5,-714"/>
-<text text-anchor="middle" x="2424" y="-789.8" font-family="Times,serif" font-size="14.00">CaseAttributeXRef</text>
-<polyline fill="none" stroke="black" points="2346.5,-782 2501.5,-782 "/>
-<text text-anchor="start" x="2354.5" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; ProbeSetFreezeId</text>
-<text text-anchor="start" x="2354.5" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="2354.5" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; CaseAttributeId</text>
-<text text-anchor="start" x="2354.5" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; Value</text>
-</g>
-<!-- node3&#45;&gt;node4 -->
-<g id="edge1" class="edge">
-<title>node3&#45;&gt;node4</title>
-<path fill="none" stroke="black" d="M2204.49,-1276.97C2235.74,-1228.64 2297.55,-1128.9 2337,-1038 2369.52,-963.07 2395.68,-872.01 2410.54,-815.14"/>
-<polygon fill="black" stroke="black" points="2413.97,-815.84 2413.09,-805.28 2407.2,-814.09 2413.97,-815.84"/>
-</g>
-<!-- node5 -->
-<g id="node4" class="node">
-<title>node5</title>
-<polygon fill="white" stroke="black" points="1970,-714 1970,-805 2152,-805 2152,-714 1970,-714"/>
-<text text-anchor="middle" x="2061" y="-789.8" font-family="Times,serif" font-size="14.00">CaseAttributeXRefNew</text>
-<polyline fill="none" stroke="black" points="1970,-782 2152,-782 "/>
-<text text-anchor="start" x="1978" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="1978" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1978" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; CaseAttributeId</text>
-<text text-anchor="start" x="1978" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; Value</text>
-</g>
-<!-- node3&#45;&gt;node5 -->
-<g id="edge2" class="edge">
-<title>node3&#45;&gt;node5</title>
-<path fill="none" stroke="black" d="M2178.25,-1276.76C2158.28,-1188.84 2099.32,-929.21 2073.43,-815.22"/>
-<polygon fill="black" stroke="black" points="2076.8,-814.28 2071.18,-805.3 2069.98,-815.83 2076.8,-814.28"/>
-</g>
-<!-- node6 -->
-<g id="node5" class="node">
-<title>node6</title>
-<polygon fill="white" stroke="black" points="3616,-2268 3616,-2374 3712,-2374 3712,-2268 3616,-2268"/>
-<text text-anchor="middle" x="3664" y="-2358.8" font-family="Times,serif" font-size="14.00">DBList</text>
-<polyline fill="none" stroke="black" points="3616,-2351 3712,-2351 "/>
-<text text-anchor="start" x="3624" y="-2335.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3624" y="-2320.8" font-family="Times,serif" font-size="14.00">&#45; DBTypeId</text>
-<text text-anchor="start" x="3624" y="-2305.8" font-family="Times,serif" font-size="14.00">&#45; FreezeId</text>
-<text text-anchor="start" x="3624" y="-2290.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="3624" y="-2275.8" font-family="Times,serif" font-size="14.00">&#45; Code</text>
-</g>
-<!-- node7 -->
-<g id="node6" class="node">
-<title>node7</title>
-<polygon fill="white" stroke="black" points="3627.5,-3003.5 3627.5,-3064.5 3700.5,-3064.5 3700.5,-3003.5 3627.5,-3003.5"/>
-<text text-anchor="middle" x="3664" y="-3049.3" font-family="Times,serif" font-size="14.00">DBType</text>
-<polyline fill="none" stroke="black" points="3627.5,-3041.5 3700.5,-3041.5 "/>
-<text text-anchor="start" x="3635.5" y="-3026.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3635.5" y="-3011.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-</g>
-<!-- node7&#45;&gt;node6 -->
-<g id="edge3" class="edge">
-<title>node7&#45;&gt;node6</title>
-<path fill="none" stroke="black" d="M3664,-3003.35C3664,-2896.78 3664,-2531.61 3664,-2384.32"/>
-<polygon fill="black" stroke="black" points="3667.5,-2384.1 3664,-2374.1 3660.5,-2384.1 3667.5,-2384.1"/>
-</g>
-<!-- node8 -->
-<g id="node7" class="node">
-<title>node8</title>
-<polygon fill="white" stroke="black" points="3718.5,-2898.5 3718.5,-3169.5 3897.5,-3169.5 3897.5,-2898.5 3718.5,-2898.5"/>
-<text text-anchor="middle" x="3808" y="-3154.3" font-family="Times,serif" font-size="14.00">Datasets</text>
-<polyline fill="none" stroke="black" points="3718.5,-3146.5 3897.5,-3146.5 "/>
-<text text-anchor="start" x="3726.5" y="-3131.3" font-family="Times,serif" font-size="14.00">&#45; DatasetId</text>
-<text text-anchor="start" x="3726.5" y="-3116.3" font-family="Times,serif" font-size="14.00">&#45; DatasetName</text>
-<text text-anchor="start" x="3726.5" y="-3101.3" font-family="Times,serif" font-size="14.00">&#45; GeoSeries</text>
-<text text-anchor="start" x="3726.5" y="-3086.3" font-family="Times,serif" font-size="14.00">&#45; PublicationTitle</text>
-<text text-anchor="start" x="3726.5" y="-3071.3" font-family="Times,serif" font-size="14.00">&#45; Summary</text>
-<text text-anchor="start" x="3726.5" y="-3056.3" font-family="Times,serif" font-size="14.00">&#45; ExperimentDesign</text>
-<text text-anchor="start" x="3726.5" y="-3041.3" font-family="Times,serif" font-size="14.00">&#45; AboutCases</text>
-<text text-anchor="start" x="3726.5" y="-3026.3" font-family="Times,serif" font-size="14.00">&#45; AboutTissue</text>
-<text text-anchor="start" x="3726.5" y="-3011.3" font-family="Times,serif" font-size="14.00">&#45; AboutPlatform</text>
-<text text-anchor="start" x="3726.5" y="-2996.3" font-family="Times,serif" font-size="14.00">&#45; AboutDataProcessing</text>
-<text text-anchor="start" x="3726.5" y="-2981.3" font-family="Times,serif" font-size="14.00">&#45; Contributors</text>
-<text text-anchor="start" x="3726.5" y="-2966.3" font-family="Times,serif" font-size="14.00">&#45; Citation</text>
-<text text-anchor="start" x="3726.5" y="-2951.3" font-family="Times,serif" font-size="14.00">&#45; Acknowledgment</text>
-<text text-anchor="start" x="3726.5" y="-2936.3" font-family="Times,serif" font-size="14.00">&#45; Notes</text>
-<text text-anchor="start" x="3726.5" y="-2921.3" font-family="Times,serif" font-size="14.00">&#45; InvestigatorId</text>
-<text text-anchor="start" x="3726.5" y="-2906.3" font-family="Times,serif" font-size="14.00">&#45; DatasetStatusId</text>
-</g>
-<!-- node10 -->
-<g id="node8" class="node">
-<title>node10</title>
-<polygon fill="white" stroke="black" points="431,-1262 431,-1353 553,-1353 553,-1262 431,-1262"/>
-<text text-anchor="middle" x="492" y="-1337.8" font-family="Times,serif" font-size="14.00">EnsemblChip</text>
-<polyline fill="none" stroke="black" points="431,-1330 553,-1330 "/>
-<text text-anchor="start" x="439" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="439" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; ProbeSetSize</text>
-<text text-anchor="start" x="439" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="439" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; Type</text>
-</g>
-<!-- node13 -->
-<g id="node11" class="node">
-<title>node13</title>
-<polygon fill="white" stroke="black" points="104,-729 104,-790 286,-790 286,-729 104,-729"/>
-<text text-anchor="middle" x="195" y="-774.8" font-family="Times,serif" font-size="14.00">GeneChipEnsemblXRef</text>
-<polyline fill="none" stroke="black" points="104,-767 286,-767 "/>
-<text text-anchor="start" x="112" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; GeneChipId</text>
-<text text-anchor="start" x="112" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; EnsemblChipId</text>
-</g>
-<!-- node10&#45;&gt;node13 -->
-<g id="edge4" class="edge">
-<title>node10&#45;&gt;node13</title>
-<path fill="none" stroke="black" d="M490.64,-1261.97C486.62,-1209.8 472.04,-1124.12 421,-1074 379.45,-1033.19 337.55,-1077.77 295,-1038 226.88,-974.34 205.07,-860.87 198.16,-800.64"/>
-<polygon fill="black" stroke="black" points="201.61,-799.96 197.07,-790.38 194.65,-800.7 201.61,-799.96"/>
-</g>
-<!-- node11 -->
-<g id="node9" class="node">
-<title>node11</title>
-<polygon fill="white" stroke="black" points="571.5,-1269.5 571.5,-1345.5 666.5,-1345.5 666.5,-1269.5 571.5,-1269.5"/>
-<text text-anchor="middle" x="619" y="-1330.3" font-family="Times,serif" font-size="14.00">Genbank</text>
-<polyline fill="none" stroke="black" points="571.5,-1322.5 666.5,-1322.5 "/>
-<text text-anchor="start" x="579.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="579.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Sequence</text>
-<text text-anchor="start" x="579.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-</g>
-<!-- node14 -->
-<g id="node12" class="node">
-<title>node14</title>
-<polygon fill="white" stroke="black" points="304,-481.5 304,-1037.5 466,-1037.5 466,-481.5 304,-481.5"/>
-<text text-anchor="middle" x="385" y="-1022.3" font-family="Times,serif" font-size="14.00">GeneList</text>
-<polyline fill="none" stroke="black" points="304,-1014.5 466,-1014.5 "/>
-<text text-anchor="start" x="312" y="-999.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="312" y="-984.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="312" y="-969.3" font-family="Times,serif" font-size="14.00">&#45; GeneSymbol</text>
-<text text-anchor="start" x="312" y="-954.3" font-family="Times,serif" font-size="14.00">&#45; GeneDescription</text>
-<text text-anchor="start" x="312" y="-939.3" font-family="Times,serif" font-size="14.00">&#45; Chromosome</text>
-<text text-anchor="start" x="312" y="-924.3" font-family="Times,serif" font-size="14.00">&#45; TxStart</text>
-<text text-anchor="start" x="312" y="-909.3" font-family="Times,serif" font-size="14.00">&#45; TxStart_2016</text>
-<text text-anchor="start" x="312" y="-894.3" font-family="Times,serif" font-size="14.00">&#45; TxEnd</text>
-<text text-anchor="start" x="312" y="-879.3" font-family="Times,serif" font-size="14.00">&#45; TxEnd_2016</text>
-<text text-anchor="start" x="312" y="-864.3" font-family="Times,serif" font-size="14.00">&#45; Strand</text>
-<text text-anchor="start" x="312" y="-849.3" font-family="Times,serif" font-size="14.00">&#45; GeneID</text>
-<text text-anchor="start" x="312" y="-834.3" font-family="Times,serif" font-size="14.00">&#45; NM_ID</text>
-<text text-anchor="start" x="312" y="-819.3" font-family="Times,serif" font-size="14.00">&#45; kgID</text>
-<text text-anchor="start" x="312" y="-804.3" font-family="Times,serif" font-size="14.00">&#45; GenBankID</text>
-<text text-anchor="start" x="312" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; UnigenID</text>
-<text text-anchor="start" x="312" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; ProteinID</text>
-<text text-anchor="start" x="312" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; AlignID</text>
-<text text-anchor="start" x="312" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; exonCount</text>
-<text text-anchor="start" x="312" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; exonStarts</text>
-<text text-anchor="start" x="312" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; exonEnds</text>
-<text text-anchor="start" x="312" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; cdsStart</text>
-<text text-anchor="start" x="312" y="-684.3" font-family="Times,serif" font-size="14.00">&#45; cdsStart_2016</text>
-<text text-anchor="start" x="312" y="-669.3" font-family="Times,serif" font-size="14.00">&#45; cdsEnd</text>
-<text text-anchor="start" x="312" y="-654.3" font-family="Times,serif" font-size="14.00">&#45; cdsEnd_2016</text>
-<text text-anchor="start" x="312" y="-639.3" font-family="Times,serif" font-size="14.00">&#45; TxStart_mm8</text>
-<text text-anchor="start" x="312" y="-624.3" font-family="Times,serif" font-size="14.00">&#45; TxEnd_mm8</text>
-<text text-anchor="start" x="312" y="-609.3" font-family="Times,serif" font-size="14.00">&#45; Strand_mm8</text>
-<text text-anchor="start" x="312" y="-594.3" font-family="Times,serif" font-size="14.00">&#45; exonCount_mm8</text>
-<text text-anchor="start" x="312" y="-579.3" font-family="Times,serif" font-size="14.00">&#45; exonStarts_mm8</text>
-<text text-anchor="start" x="312" y="-564.3" font-family="Times,serif" font-size="14.00">&#45; exonEnds_mm8</text>
-<text text-anchor="start" x="312" y="-549.3" font-family="Times,serif" font-size="14.00">&#45; cdsStart_mm8</text>
-<text text-anchor="start" x="312" y="-534.3" font-family="Times,serif" font-size="14.00">&#45; cdsEnd_mm8</text>
-<text text-anchor="start" x="312" y="-519.3" font-family="Times,serif" font-size="14.00">&#45; Chromosome_mm8</text>
-<text text-anchor="start" x="312" y="-504.3" font-family="Times,serif" font-size="14.00">&#45; Info_mm9</text>
-<text text-anchor="start" x="312" y="-489.3" font-family="Times,serif" font-size="14.00">&#45; RGD_ID</text>
-</g>
-<!-- node11&#45;&gt;node14 -->
-<g id="edge5" class="edge">
-<title>node11&#45;&gt;node14</title>
-<path fill="none" stroke="black" d="M619.75,-1269.26C618.77,-1219.08 609.78,-1129.66 562,-1074 534.74,-1042.25 503.4,-1068.73 475,-1038 474.23,-1037.16 473.46,-1036.32 472.7,-1035.47"/>
-<polygon fill="none" stroke="black" points="475.18,-1032.99 466.03,-1027.65 469.86,-1037.53 475.18,-1032.99"/>
-</g>
-<!-- node12 -->
-<g id="node10" class="node">
-<title>node12</title>
-<polygon fill="white" stroke="black" points="126.5,-1232 126.5,-1383 263.5,-1383 263.5,-1232 126.5,-1232"/>
-<text text-anchor="middle" x="195" y="-1367.8" font-family="Times,serif" font-size="14.00">GeneChip</text>
-<polyline fill="none" stroke="black" points="126.5,-1360 263.5,-1360 "/>
-<text text-anchor="start" x="134.5" y="-1344.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="134.5" y="-1329.8" font-family="Times,serif" font-size="14.00">&#45; GeneChipId</text>
-<text text-anchor="start" x="134.5" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; GeneChipName</text>
-<text text-anchor="start" x="134.5" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="134.5" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; GeoPlatform</text>
-<text text-anchor="start" x="134.5" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; Title</text>
-<text text-anchor="start" x="134.5" y="-1254.8" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="134.5" y="-1239.8" font-family="Times,serif" font-size="14.00">&#45; GO_tree_value</text>
-</g>
-<!-- node12&#45;&gt;node13 -->
-<g id="edge6" class="edge">
-<title>node12&#45;&gt;node13</title>
-<path fill="none" stroke="black" d="M195,-1231.73C195,-1114.43 195,-891.23 195,-800.42"/>
-<polygon fill="black" stroke="black" points="198.5,-800.27 195,-790.27 191.5,-800.27 198.5,-800.27"/>
-</g>
-<!-- node15 -->
-<g id="node13" class="node">
-<title>node15</title>
-<polygon fill="white" stroke="black" points="0,-1194.5 0,-1420.5 108,-1420.5 108,-1194.5 0,-1194.5"/>
-<text text-anchor="middle" x="54" y="-1405.3" font-family="Times,serif" font-size="14.00">GeneRIF</text>
-<polyline fill="none" stroke="black" points="0,-1397.5 108,-1397.5 "/>
-<text text-anchor="start" x="8" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="8" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; versionId</text>
-<text text-anchor="start" x="8" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; symbol</text>
-<text text-anchor="start" x="8" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; PubMed_ID</text>
-<text text-anchor="start" x="8" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="8" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; comment</text>
-<text text-anchor="start" x="8" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; email</text>
-<text text-anchor="start" x="8" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; createtime</text>
-<text text-anchor="start" x="8" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; user_ip</text>
-<text text-anchor="start" x="8" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; weburl</text>
-<text text-anchor="start" x="8" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; initial</text>
-<text text-anchor="start" x="8" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; display</text>
-<text text-anchor="start" x="8" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; reason</text>
-</g>
-<!-- node16 -->
-<g id="node14" class="node">
-<title>node16</title>
-<polygon fill="white" stroke="black" points="281.5,-1239.5 281.5,-1375.5 412.5,-1375.5 412.5,-1239.5 281.5,-1239.5"/>
-<text text-anchor="middle" x="347" y="-1360.3" font-family="Times,serif" font-size="14.00">GeneRIF_BASIC</text>
-<polyline fill="none" stroke="black" points="281.5,-1352.5 412.5,-1352.5 "/>
-<text text-anchor="start" x="289.5" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="289.5" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; GeneId</text>
-<text text-anchor="start" x="289.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; symbol</text>
-<text text-anchor="start" x="289.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; PubMed_ID</text>
-<text text-anchor="start" x="289.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; createtime</text>
-<text text-anchor="start" x="289.5" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; comment</text>
-<text text-anchor="start" x="289.5" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; VersionId</text>
-</g>
-<!-- node17 -->
-<g id="node15" class="node">
-<title>node17</title>
-<polygon fill="white" stroke="black" points="1741.5,-1179.5 1741.5,-1435.5 1894.5,-1435.5 1894.5,-1179.5 1741.5,-1179.5"/>
-<text text-anchor="middle" x="1818" y="-1420.3" font-family="Times,serif" font-size="14.00">Geno</text>
-<polyline fill="none" stroke="black" points="1741.5,-1412.5 1894.5,-1412.5 "/>
-<text text-anchor="start" x="1749.5" y="-1397.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1749.5" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="1749.5" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="1749.5" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; Marker_Name</text>
-<text text-anchor="start" x="1749.5" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; Chr</text>
-<text text-anchor="start" x="1749.5" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; Mb</text>
-<text text-anchor="start" x="1749.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; Mb_2016</text>
-<text text-anchor="start" x="1749.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Sequence</text>
-<text text-anchor="start" x="1749.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; Source</text>
-<text text-anchor="start" x="1749.5" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; chr_num</text>
-<text text-anchor="start" x="1749.5" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; Source2</text>
-<text text-anchor="start" x="1749.5" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; Comments</text>
-<text text-anchor="start" x="1749.5" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; used_by_geno_file</text>
-<text text-anchor="start" x="1749.5" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; Mb_mm8</text>
-<text text-anchor="start" x="1749.5" y="-1187.3" font-family="Times,serif" font-size="14.00">&#45; Chr_mm8</text>
-</g>
-<!-- node20 -->
-<g id="node18" class="node">
-<title>node20</title>
-<polygon fill="white" stroke="black" points="2264,-293.5 2264,-399.5 2422,-399.5 2422,-293.5 2264,-293.5"/>
-<text text-anchor="middle" x="2343" y="-384.3" font-family="Times,serif" font-size="14.00">GenoXRef</text>
-<polyline fill="none" stroke="black" points="2264,-376.5 2422,-376.5 "/>
-<text text-anchor="start" x="2272" y="-361.3" font-family="Times,serif" font-size="14.00">&#45; GenoFreezeId</text>
-<text text-anchor="start" x="2272" y="-346.3" font-family="Times,serif" font-size="14.00">&#45; GenoId</text>
-<text text-anchor="start" x="2272" y="-331.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="2272" y="-316.3" font-family="Times,serif" font-size="14.00">&#45; cM</text>
-<text text-anchor="start" x="2272" y="-301.3" font-family="Times,serif" font-size="14.00">&#45; Used_for_mapping</text>
-</g>
-<!-- node17&#45;&gt;node20 -->
-<g id="edge7" class="edge">
-<title>node17&#45;&gt;node20</title>
-<path fill="none" stroke="black" d="M1876.29,-1179.2C1893.94,-1135.33 1911.43,-1085.32 1922,-1038 1935.52,-977.45 1919.45,-527.07 1961,-481 2023.25,-411.98 2079.36,-475.95 2167,-445 2196.87,-434.45 2227.66,-419.14 2254.98,-403.77"/>
-<polygon fill="black" stroke="black" points="2256.77,-406.78 2263.72,-398.78 2253.3,-400.7 2256.77,-406.78"/>
-</g>
-<!-- node18 -->
-<g id="node16" class="node">
-<title>node18</title>
-<polygon fill="white" stroke="black" points="1084.5,-721.5 1084.5,-797.5 1171.5,-797.5 1171.5,-721.5 1084.5,-721.5"/>
-<text text-anchor="middle" x="1128" y="-782.3" font-family="Times,serif" font-size="14.00">GenoData</text>
-<polyline fill="none" stroke="black" points="1084.5,-774.5 1171.5,-774.5 "/>
-<text text-anchor="start" x="1092.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1092.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1092.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node19 -->
-<g id="node17" class="node">
-<title>node19</title>
-<polygon fill="white" stroke="black" points="2672,-676.5 2672,-842.5 2818,-842.5 2818,-676.5 2672,-676.5"/>
-<text text-anchor="middle" x="2745" y="-827.3" font-family="Times,serif" font-size="14.00">GenoFreeze</text>
-<polyline fill="none" stroke="black" points="2672,-819.5 2818,-819.5 "/>
-<text text-anchor="start" x="2680" y="-804.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2680" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="2680" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="2680" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="2680" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="2680" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; public</text>
-<text text-anchor="start" x="2680" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="2680" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; confidentiality</text>
-<text text-anchor="start" x="2680" y="-684.3" font-family="Times,serif" font-size="14.00">&#45; AuthorisedUsers</text>
-</g>
-<!-- node19&#45;&gt;node20 -->
-<g id="edge8" class="edge">
-<title>node19&#45;&gt;node20</title>
-<path fill="none" stroke="black" d="M2739.35,-676.23C2731.16,-615.63 2711.24,-534.74 2663,-481 2603,-414.15 2504.21,-379.87 2432.25,-362.91"/>
-<polygon fill="black" stroke="black" points="2432.8,-359.45 2422.28,-360.63 2431.24,-366.27 2432.8,-359.45"/>
-</g>
-<!-- node21 -->
-<g id="node19" class="node">
-<title>node21</title>
-<polygon fill="white" stroke="black" points="3410.5,-2996 3410.5,-3072 3539.5,-3072 3539.5,-2996 3410.5,-2996"/>
-<text text-anchor="middle" x="3475" y="-3056.8" font-family="Times,serif" font-size="14.00">Homologene</text>
-<polyline fill="none" stroke="black" points="3410.5,-3049 3539.5,-3049 "/>
-<text text-anchor="start" x="3418.5" y="-3033.8" font-family="Times,serif" font-size="14.00">&#45; HomologeneId</text>
-<text text-anchor="start" x="3418.5" y="-3018.8" font-family="Times,serif" font-size="14.00">&#45; GeneId</text>
-<text text-anchor="start" x="3418.5" y="-3003.8" font-family="Times,serif" font-size="14.00">&#45; TaxonomyId</text>
-</g>
-<!-- node37 -->
-<g id="node31" class="node">
-<title>node37</title>
-<polygon fill="white" stroke="black" points="3352,-1780.5 3352,-2861.5 3598,-2861.5 3598,-1780.5 3352,-1780.5"/>
-<text text-anchor="middle" x="3475" y="-2846.3" font-family="Times,serif" font-size="14.00">ProbeSet</text>
-<polyline fill="none" stroke="black" points="3352,-2838.5 3598,-2838.5 "/>
-<text text-anchor="start" x="3360" y="-2823.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3360" y="-2808.3" font-family="Times,serif" font-size="14.00">&#45; ChipId</text>
-<text text-anchor="start" x="3360" y="-2793.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="3360" y="-2778.3" font-family="Times,serif" font-size="14.00">&#45; TargetId</text>
-<text text-anchor="start" x="3360" y="-2763.3" font-family="Times,serif" font-size="14.00">&#45; Symbol</text>
-<text text-anchor="start" x="3360" y="-2748.3" font-family="Times,serif" font-size="14.00">&#45; description</text>
-<text text-anchor="start" x="3360" y="-2733.3" font-family="Times,serif" font-size="14.00">&#45; Chr</text>
-<text text-anchor="start" x="3360" y="-2718.3" font-family="Times,serif" font-size="14.00">&#45; Mb</text>
-<text text-anchor="start" x="3360" y="-2703.3" font-family="Times,serif" font-size="14.00">&#45; Chr_2016</text>
-<text text-anchor="start" x="3360" y="-2688.3" font-family="Times,serif" font-size="14.00">&#45; Mb_2016</text>
-<text text-anchor="start" x="3360" y="-2673.3" font-family="Times,serif" font-size="14.00">&#45; alias</text>
-<text text-anchor="start" x="3360" y="-2658.3" font-family="Times,serif" font-size="14.00">&#45; GeneId</text>
-<text text-anchor="start" x="3360" y="-2643.3" font-family="Times,serif" font-size="14.00">&#45; GenbankId</text>
-<text text-anchor="start" x="3360" y="-2628.3" font-family="Times,serif" font-size="14.00">&#45; SNP</text>
-<text text-anchor="start" x="3360" y="-2613.3" font-family="Times,serif" font-size="14.00">&#45; BlatSeq</text>
-<text text-anchor="start" x="3360" y="-2598.3" font-family="Times,serif" font-size="14.00">&#45; TargetSeq</text>
-<text text-anchor="start" x="3360" y="-2583.3" font-family="Times,serif" font-size="14.00">&#45; UniGeneId</text>
-<text text-anchor="start" x="3360" y="-2568.3" font-family="Times,serif" font-size="14.00">&#45; Strand_Probe</text>
-<text text-anchor="start" x="3360" y="-2553.3" font-family="Times,serif" font-size="14.00">&#45; Strand_Gene</text>
-<text text-anchor="start" x="3360" y="-2538.3" font-family="Times,serif" font-size="14.00">&#45; OMIM</text>
-<text text-anchor="start" x="3360" y="-2523.3" font-family="Times,serif" font-size="14.00">&#45; comments</text>
-<text text-anchor="start" x="3360" y="-2508.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_target_region</text>
-<text text-anchor="start" x="3360" y="-2493.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_specificity</text>
-<text text-anchor="start" x="3360" y="-2478.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_BLAT_score</text>
-<text text-anchor="start" x="3360" y="-2463.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_start</text>
-<text text-anchor="start" x="3360" y="-2448.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_end</text>
-<text text-anchor="start" x="3360" y="-2433.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_start_2016</text>
-<text text-anchor="start" x="3360" y="-2418.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_end_2016</text>
-<text text-anchor="start" x="3360" y="-2403.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_strand</text>
-<text text-anchor="start" x="3360" y="-2388.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Note_by_RW</text>
-<text text-anchor="start" x="3360" y="-2373.3" font-family="Times,serif" font-size="14.00">&#45; flag</text>
-<text text-anchor="start" x="3360" y="-2358.3" font-family="Times,serif" font-size="14.00">&#45; Symbol_H</text>
-<text text-anchor="start" x="3360" y="-2343.3" font-family="Times,serif" font-size="14.00">&#45; description_H</text>
-<text text-anchor="start" x="3360" y="-2328.3" font-family="Times,serif" font-size="14.00">&#45; chromosome_H</text>
-<text text-anchor="start" x="3360" y="-2313.3" font-family="Times,serif" font-size="14.00">&#45; MB_H</text>
-<text text-anchor="start" x="3360" y="-2298.3" font-family="Times,serif" font-size="14.00">&#45; alias_H</text>
-<text text-anchor="start" x="3360" y="-2283.3" font-family="Times,serif" font-size="14.00">&#45; GeneId_H</text>
-<text text-anchor="start" x="3360" y="-2268.3" font-family="Times,serif" font-size="14.00">&#45; chr_num</text>
-<text text-anchor="start" x="3360" y="-2253.3" font-family="Times,serif" font-size="14.00">&#45; name_num</text>
-<text text-anchor="start" x="3360" y="-2238.3" font-family="Times,serif" font-size="14.00">&#45; Probe_Target_Description</text>
-<text text-anchor="start" x="3360" y="-2223.3" font-family="Times,serif" font-size="14.00">&#45; RefSeq_TranscriptId</text>
-<text text-anchor="start" x="3360" y="-2208.3" font-family="Times,serif" font-size="14.00">&#45; ENSEMBLGeneId</text>
-<text text-anchor="start" x="3360" y="-2193.3" font-family="Times,serif" font-size="14.00">&#45; Chr_mm8</text>
-<text text-anchor="start" x="3360" y="-2178.3" font-family="Times,serif" font-size="14.00">&#45; Mb_mm8</text>
-<text text-anchor="start" x="3360" y="-2163.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_start_mm8</text>
-<text text-anchor="start" x="3360" y="-2148.3" font-family="Times,serif" font-size="14.00">&#45; Probe_set_Blat_Mb_end_mm8</text>
-<text text-anchor="start" x="3360" y="-2133.3" font-family="Times,serif" font-size="14.00">&#45; HomoloGeneID</text>
-<text text-anchor="start" x="3360" y="-2118.3" font-family="Times,serif" font-size="14.00">&#45; Biotype_ENS</text>
-<text text-anchor="start" x="3360" y="-2103.3" font-family="Times,serif" font-size="14.00">&#45; ProteinID</text>
-<text text-anchor="start" x="3360" y="-2088.3" font-family="Times,serif" font-size="14.00">&#45; ProteinName</text>
-<text text-anchor="start" x="3360" y="-2073.3" font-family="Times,serif" font-size="14.00">&#45; UniProtID</text>
-<text text-anchor="start" x="3360" y="-2058.3" font-family="Times,serif" font-size="14.00">&#45; Flybase_Id</text>
-<text text-anchor="start" x="3360" y="-2043.3" font-family="Times,serif" font-size="14.00">&#45; RGD_ID</text>
-<text text-anchor="start" x="3360" y="-2028.3" font-family="Times,serif" font-size="14.00">&#45; HMDB_ID</text>
-<text text-anchor="start" x="3360" y="-2013.3" font-family="Times,serif" font-size="14.00">&#45; Confidence</text>
-<text text-anchor="start" x="3360" y="-1998.3" font-family="Times,serif" font-size="14.00">&#45; ChEBI_ID</text>
-<text text-anchor="start" x="3360" y="-1983.3" font-family="Times,serif" font-size="14.00">&#45; ChEMBL_ID</text>
-<text text-anchor="start" x="3360" y="-1968.3" font-family="Times,serif" font-size="14.00">&#45; CAS_number</text>
-<text text-anchor="start" x="3360" y="-1953.3" font-family="Times,serif" font-size="14.00">&#45; PubChem_ID</text>
-<text text-anchor="start" x="3360" y="-1938.3" font-family="Times,serif" font-size="14.00">&#45; ChemSpider_ID</text>
-<text text-anchor="start" x="3360" y="-1923.3" font-family="Times,serif" font-size="14.00">&#45; UNII_ID</text>
-<text text-anchor="start" x="3360" y="-1908.3" font-family="Times,serif" font-size="14.00">&#45; EC_number</text>
-<text text-anchor="start" x="3360" y="-1893.3" font-family="Times,serif" font-size="14.00">&#45; KEGG_ID</text>
-<text text-anchor="start" x="3360" y="-1878.3" font-family="Times,serif" font-size="14.00">&#45; Molecular_Weight</text>
-<text text-anchor="start" x="3360" y="-1863.3" font-family="Times,serif" font-size="14.00">&#45; Nugowiki_ID</text>
-<text text-anchor="start" x="3360" y="-1848.3" font-family="Times,serif" font-size="14.00">&#45; Type</text>
-<text text-anchor="start" x="3360" y="-1833.3" font-family="Times,serif" font-size="14.00">&#45; Tissue</text>
-<text text-anchor="start" x="3360" y="-1818.3" font-family="Times,serif" font-size="14.00">&#45; PrimaryName</text>
-<text text-anchor="start" x="3360" y="-1803.3" font-family="Times,serif" font-size="14.00">&#45; SecondaryNames</text>
-<text text-anchor="start" x="3360" y="-1788.3" font-family="Times,serif" font-size="14.00">&#45; PeptideSequence</text>
-</g>
-<!-- node21&#45;&gt;node37 -->
-<g id="edge9" class="edge">
-<title>node21&#45;&gt;node37</title>
-<path fill="none" stroke="black" d="M3475,-2995.77C3475,-2966.92 3475,-2923.23 3475,-2871.69"/>
-<polygon fill="none" stroke="black" points="3478.5,-2871.62 3475,-2861.62 3471.5,-2871.62 3478.5,-2871.62"/>
-</g>
-<!-- node22 -->
-<g id="node20" class="node">
-<title>node22</title>
-<polygon fill="white" stroke="black" points="2443,-1194.5 2443,-1420.5 2601,-1420.5 2601,-1194.5 2443,-1194.5"/>
-<text text-anchor="middle" x="2522" y="-1405.3" font-family="Times,serif" font-size="14.00">InbredSet</text>
-<polyline fill="none" stroke="black" points="2443,-1397.5 2601,-1397.5 "/>
-<text text-anchor="start" x="2451" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2451" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="2451" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetName</text>
-<text text-anchor="start" x="2451" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="2451" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="2451" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="2451" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; public</text>
-<text text-anchor="start" x="2451" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; MappingMethodId</text>
-<text text-anchor="start" x="2451" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; GeneticType</text>
-<text text-anchor="start" x="2451" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; Family</text>
-<text text-anchor="start" x="2451" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; FamilyOrder</text>
-<text text-anchor="start" x="2451" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; MenuOrderId</text>
-<text text-anchor="start" x="2451" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetCode</text>
-</g>
-<!-- node22&#45;&gt;node5 -->
-<g id="edge10" class="edge">
-<title>node22&#45;&gt;node5</title>
-<path fill="none" stroke="black" d="M2442.8,-1225.71C2391.74,-1176.97 2322.01,-1116.33 2252,-1074 2214.78,-1051.5 2191.28,-1069.23 2161,-1038 2101.31,-976.45 2076.93,-876.71 2067.19,-815.06"/>
-<polygon fill="black" stroke="black" points="2070.65,-814.5 2065.7,-805.13 2063.73,-815.54 2070.65,-814.5"/>
-</g>
-<!-- node22&#45;&gt;node19 -->
-<g id="edge11" class="edge">
-<title>node22&#45;&gt;node19</title>
-<path fill="none" stroke="black" d="M2548.33,-1194.49C2561.76,-1153.65 2581.29,-1108.95 2609,-1074 2626.92,-1051.4 2645.89,-1061.22 2663,-1038 2702.93,-983.81 2723.53,-910.32 2734.09,-852.58"/>
-<polygon fill="none" stroke="black" points="2737.54,-853.18 2735.82,-842.72 2730.64,-851.97 2737.54,-853.18"/>
-</g>
-<!-- node45 -->
-<g id="node39" class="node">
-<title>node45</title>
-<polygon fill="white" stroke="black" points="2836,-676.5 2836,-842.5 2982,-842.5 2982,-676.5 2836,-676.5"/>
-<text text-anchor="middle" x="2909" y="-827.3" font-family="Times,serif" font-size="14.00">PublishFreeze</text>
-<polyline fill="none" stroke="black" points="2836,-819.5 2982,-819.5 "/>
-<text text-anchor="start" x="2844" y="-804.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2844" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="2844" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="2844" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="2844" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="2844" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; public</text>
-<text text-anchor="start" x="2844" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="2844" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; confidentiality</text>
-<text text-anchor="start" x="2844" y="-684.3" font-family="Times,serif" font-size="14.00">&#45; AuthorisedUsers</text>
-</g>
-<!-- node22&#45;&gt;node45 -->
-<g id="edge12" class="edge">
-<title>node22&#45;&gt;node45</title>
-<path fill="none" stroke="black" d="M2539.14,-1194.37C2551.46,-1150.63 2572.63,-1103.91 2609,-1074 2684.85,-1011.63 2753.4,-1103.02 2827,-1038 2879.25,-991.84 2898.95,-914.18 2906.03,-852.74"/>
-<polygon fill="none" stroke="black" points="2909.53,-852.95 2907.1,-842.63 2902.57,-852.21 2909.53,-852.95"/>
-</g>
-<!-- node47 -->
-<g id="node41" class="node">
-<title>node47</title>
-<polygon fill="white" stroke="black" points="3000,-661.5 3000,-857.5 3120,-857.5 3120,-661.5 3000,-661.5"/>
-<text text-anchor="middle" x="3060" y="-842.3" font-family="Times,serif" font-size="14.00">PublishXRef</text>
-<polyline fill="none" stroke="black" points="3000,-834.5 3120,-834.5 "/>
-<text text-anchor="start" x="3008" y="-819.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3008" y="-804.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="3008" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; PhenotypeId</text>
-<text text-anchor="start" x="3008" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; PublicationId</text>
-<text text-anchor="start" x="3008" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="3008" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; mean</text>
-<text text-anchor="start" x="3008" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; Locus</text>
-<text text-anchor="start" x="3008" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; LRS</text>
-<text text-anchor="start" x="3008" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; additive</text>
-<text text-anchor="start" x="3008" y="-684.3" font-family="Times,serif" font-size="14.00">&#45; Sequence</text>
-<text text-anchor="start" x="3008" y="-669.3" font-family="Times,serif" font-size="14.00">&#45; comments</text>
-</g>
-<!-- node22&#45;&gt;node47 -->
-<g id="edge13" class="edge">
-<title>node22&#45;&gt;node47</title>
-<path fill="none" stroke="black" d="M2537.8,-1194.31C2549.9,-1150.01 2571.27,-1102.88 2609,-1074 2676.7,-1022.17 2926.37,-1093.61 2991,-1038 3039.29,-996.45 3056.51,-926.83 3061.67,-867.71"/>
-<polygon fill="black" stroke="black" points="3065.17,-867.81 3062.44,-857.57 3058.19,-867.27 3065.17,-867.81"/>
-</g>
-<!-- node51 -->
-<g id="node45" class="node">
-<title>node51</title>
-<polygon fill="white" stroke="black" points="2170,-706.5 2170,-812.5 2328,-812.5 2328,-706.5 2170,-706.5"/>
-<text text-anchor="middle" x="2249" y="-797.3" font-family="Times,serif" font-size="14.00">StrainXRef</text>
-<polyline fill="none" stroke="black" points="2170,-789.5 2328,-789.5 "/>
-<text text-anchor="start" x="2178" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="2178" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="2178" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; OrderId</text>
-<text text-anchor="start" x="2178" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; Used_for_mapping</text>
-<text text-anchor="start" x="2178" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; PedigreeStatus</text>
-</g>
-<!-- node22&#45;&gt;node51 -->
-<g id="edge14" class="edge">
-<title>node22&#45;&gt;node51</title>
-<path fill="none" stroke="black" d="M2442.9,-1206.97C2406.91,-1158.16 2365.99,-1097.23 2337,-1038 2302.47,-967.45 2277.43,-880.28 2263.09,-822.68"/>
-<polygon fill="black" stroke="black" points="2266.4,-821.51 2260.62,-812.63 2259.6,-823.18 2266.4,-821.51"/>
-</g>
-<!-- node54 -->
-<g id="node46" class="node">
-<title>node54</title>
-<polygon fill="white" stroke="black" points="2520,-684 2520,-835 2654,-835 2654,-684 2520,-684"/>
-<text text-anchor="middle" x="2587" y="-819.8" font-family="Times,serif" font-size="14.00">Temp</text>
-<polyline fill="none" stroke="black" points="2520,-812 2654,-812 "/>
-<text text-anchor="start" x="2528" y="-796.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2528" y="-781.8" font-family="Times,serif" font-size="14.00">&#45; dbdisplayname</text>
-<text text-anchor="start" x="2528" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="2528" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; description</text>
-<text text-anchor="start" x="2528" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; createtime</text>
-<text text-anchor="start" x="2528" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="2528" y="-706.8" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-<text text-anchor="start" x="2528" y="-691.8" font-family="Times,serif" font-size="14.00">&#45; IP</text>
-</g>
-<!-- node22&#45;&gt;node54 -->
-<g id="edge15" class="edge">
-<title>node22&#45;&gt;node54</title>
-<path fill="none" stroke="black" d="M2535.35,-1194.36C2547.68,-1090.78 2565.73,-939.17 2576.9,-845.33"/>
-<polygon fill="black" stroke="black" points="2580.39,-845.65 2578.09,-835.31 2573.44,-844.82 2580.39,-845.65"/>
-</g>
-<!-- node23 -->
-<g id="node21" class="node">
-<title>node23</title>
-<polygon fill="white" stroke="black" points="950.5,-1194.5 950.5,-1420.5 1083.5,-1420.5 1083.5,-1194.5 950.5,-1194.5"/>
-<text text-anchor="middle" x="1017" y="-1405.3" font-family="Times,serif" font-size="14.00">IndelAll</text>
-<polyline fill="none" stroke="black" points="950.5,-1397.5 1083.5,-1397.5 "/>
-<text text-anchor="start" x="958.5" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="958.5" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="958.5" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; SourceId</text>
-<text text-anchor="start" x="958.5" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="958.5" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; Chromosome</text>
-<text text-anchor="start" x="958.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; Mb_start</text>
-<text text-anchor="start" x="958.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Mb_start_2016</text>
-<text text-anchor="start" x="958.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; Strand</text>
-<text text-anchor="start" x="958.5" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; Type</text>
-<text text-anchor="start" x="958.5" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; Mb_end</text>
-<text text-anchor="start" x="958.5" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; Mb_end_2016</text>
-<text text-anchor="start" x="958.5" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; Size</text>
-<text text-anchor="start" x="958.5" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; InDelSequence</text>
-</g>
-<!-- node24 -->
-<g id="node22" class="node">
-<title>node24</title>
-<polygon fill="white" stroke="black" points="484.5,-721.5 484.5,-797.5 577.5,-797.5 577.5,-721.5 484.5,-721.5"/>
-<text text-anchor="middle" x="531" y="-782.3" font-family="Times,serif" font-size="14.00">IndelXRef</text>
-<polyline fill="none" stroke="black" points="484.5,-774.5 577.5,-774.5 "/>
-<text text-anchor="start" x="492.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; IndelId</text>
-<text text-anchor="start" x="492.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId1</text>
-<text text-anchor="start" x="492.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; StrainId2</text>
-</g>
-<!-- node23&#45;&gt;node24 -->
-<g id="edge16" class="edge">
-<title>node23&#45;&gt;node24</title>
-<path fill="none" stroke="black" d="M1006.53,-1194.48C996.53,-1150.35 977.38,-1103.3 941,-1074 879.42,-1024.4 645.58,-1091.11 587,-1038 522.85,-979.83 520.48,-870.29 525.23,-807.63"/>
-<polygon fill="black" stroke="black" points="528.72,-807.89 526.08,-797.62 521.75,-807.29 528.72,-807.89"/>
-</g>
-<!-- node27 -->
-<g id="node23" class="node">
-<title>node27</title>
-<polygon fill="white" stroke="black" points="2455,-1630 2455,-1691 2589,-1691 2589,-1630 2455,-1630"/>
-<text text-anchor="middle" x="2522" y="-1675.8" font-family="Times,serif" font-size="14.00">MappingMethod</text>
-<polyline fill="none" stroke="black" points="2455,-1668 2589,-1668 "/>
-<text text-anchor="start" x="2463" y="-1652.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2463" y="-1637.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-</g>
-<!-- node27&#45;&gt;node22 -->
-<g id="edge17" class="edge">
-<title>node27&#45;&gt;node22</title>
-<path fill="none" stroke="black" d="M2522,-1629.88C2522,-1586.24 2522,-1502.15 2522,-1430.93"/>
-<polygon fill="none" stroke="black" points="2525.5,-1430.53 2522,-1420.53 2518.5,-1430.53 2525.5,-1430.53"/>
-</g>
-<!-- node28 -->
-<g id="node24" class="node">
-<title>node28</title>
-<polygon fill="white" stroke="black" points="1190,-721.5 1190,-797.5 1274,-797.5 1274,-721.5 1190,-721.5"/>
-<text text-anchor="middle" x="1232" y="-782.3" font-family="Times,serif" font-size="14.00">NStrain</text>
-<polyline fill="none" stroke="black" points="1190,-774.5 1274,-774.5 "/>
-<text text-anchor="start" x="1198" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="1198" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1198" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; count</text>
-</g>
-<!-- node31 -->
-<g id="node25" class="node">
-<title>node31</title>
-<polygon fill="white" stroke="black" points="2618.5,-1209.5 2618.5,-1405.5 2857.5,-1405.5 2857.5,-1209.5 2618.5,-1209.5"/>
-<text text-anchor="middle" x="2738" y="-1390.3" font-family="Times,serif" font-size="14.00">Phenotype</text>
-<polyline fill="none" stroke="black" points="2618.5,-1382.5 2857.5,-1382.5 "/>
-<text text-anchor="start" x="2626.5" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2626.5" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; Pre_publication_description</text>
-<text text-anchor="start" x="2626.5" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; Post_publication_description</text>
-<text text-anchor="start" x="2626.5" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; Original_description</text>
-<text text-anchor="start" x="2626.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; Units</text>
-<text text-anchor="start" x="2626.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Pre_publication_abbreviation</text>
-<text text-anchor="start" x="2626.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; Post_publication_abbreviation</text>
-<text text-anchor="start" x="2626.5" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; Lab_code</text>
-<text text-anchor="start" x="2626.5" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; Submitter</text>
-<text text-anchor="start" x="2626.5" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; Owner</text>
-<text text-anchor="start" x="2626.5" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; Authorized_Users</text>
-</g>
-<!-- node31&#45;&gt;node47 -->
-<g id="edge19" class="edge">
-<title>node31&#45;&gt;node47</title>
-<path fill="none" stroke="black" d="M2771.49,-1209.49C2792.26,-1162.46 2823.43,-1108.76 2867,-1074 2911.86,-1038.21 2951.22,-1079.36 2991,-1038 3034.34,-992.94 3051.74,-925.06 3058.23,-867.71"/>
-<polygon fill="black" stroke="black" points="3061.74,-867.81 3059.28,-857.5 3054.77,-867.09 3061.74,-867.81"/>
-</g>
-<!-- node32 -->
-<g id="node26" class="node">
-<title>node32</title>
-<polygon fill="white" stroke="black" points="3326,-1577.5 3326,-1743.5 3436,-1743.5 3436,-1577.5 3326,-1577.5"/>
-<text text-anchor="middle" x="3381" y="-1728.3" font-family="Times,serif" font-size="14.00">Probe</text>
-<polyline fill="none" stroke="black" points="3326,-1720.5 3436,-1720.5 "/>
-<text text-anchor="start" x="3334" y="-1705.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3334" y="-1690.3" font-family="Times,serif" font-size="14.00">&#45; ProbeSetId</text>
-<text text-anchor="start" x="3334" y="-1675.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="3334" y="-1660.3" font-family="Times,serif" font-size="14.00">&#45; Sequence</text>
-<text text-anchor="start" x="3334" y="-1645.3" font-family="Times,serif" font-size="14.00">&#45; ExonNo</text>
-<text text-anchor="start" x="3334" y="-1630.3" font-family="Times,serif" font-size="14.00">&#45; SerialOrder</text>
-<text text-anchor="start" x="3334" y="-1615.3" font-family="Times,serif" font-size="14.00">&#45; Tm</text>
-<text text-anchor="start" x="3334" y="-1600.3" font-family="Times,serif" font-size="14.00">&#45; E_GSB</text>
-<text text-anchor="start" x="3334" y="-1585.3" font-family="Times,serif" font-size="14.00">&#45; E_NSB</text>
-</g>
-<!-- node35 -->
-<g id="node29" class="node">
-<title>node35</title>
-<polygon fill="white" stroke="black" points="3315.5,-1262 3315.5,-1353 3446.5,-1353 3446.5,-1262 3315.5,-1262"/>
-<text text-anchor="middle" x="3381" y="-1337.8" font-family="Times,serif" font-size="14.00">ProbeH2</text>
-<polyline fill="none" stroke="black" points="3315.5,-1330 3446.5,-1330 "/>
-<text text-anchor="start" x="3323.5" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; ProbeFreezeId</text>
-<text text-anchor="start" x="3323.5" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; ProbeId</text>
-<text text-anchor="start" x="3323.5" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; h2</text>
-<text text-anchor="start" x="3323.5" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; weight</text>
-</g>
-<!-- node32&#45;&gt;node35 -->
-<g id="edge20" class="edge">
-<title>node32&#45;&gt;node35</title>
-<path fill="none" stroke="black" d="M3381,-1577.21C3381,-1511.4 3381,-1420.95 3381,-1363.61"/>
-<polygon fill="black" stroke="black" points="3384.5,-1363.3 3381,-1353.3 3377.5,-1363.3 3384.5,-1363.3"/>
-</g>
-<!-- node42 -->
-<g id="node36" class="node">
-<title>node42</title>
-<polygon fill="white" stroke="black" points="3166.5,-1269.5 3166.5,-1345.5 3297.5,-1345.5 3297.5,-1269.5 3166.5,-1269.5"/>
-<text text-anchor="middle" x="3232" y="-1330.3" font-family="Times,serif" font-size="14.00">ProbeXRef</text>
-<polyline fill="none" stroke="black" points="3166.5,-1322.5 3297.5,-1322.5 "/>
-<text text-anchor="start" x="3174.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; ProbeFreezeId</text>
-<text text-anchor="start" x="3174.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; ProbeId</text>
-<text text-anchor="start" x="3174.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-</g>
-<!-- node32&#45;&gt;node42 -->
-<g id="edge21" class="edge">
-<title>node32&#45;&gt;node42</title>
-<path fill="none" stroke="black" d="M3325.94,-1578.48C3318.71,-1566.2 3311.81,-1553.47 3306,-1541 3277.26,-1479.35 3255.46,-1403.56 3243.2,-1355.63"/>
-<polygon fill="black" stroke="black" points="3246.57,-1354.68 3240.73,-1345.84 3239.78,-1356.39 3246.57,-1354.68"/>
-</g>
-<!-- node33 -->
-<g id="node27" class="node">
-<title>node33</title>
-<polygon fill="white" stroke="black" points="1292,-721.5 1292,-797.5 1384,-797.5 1384,-721.5 1292,-721.5"/>
-<text text-anchor="middle" x="1338" y="-782.3" font-family="Times,serif" font-size="14.00">ProbeData</text>
-<polyline fill="none" stroke="black" points="1292,-774.5 1384,-774.5 "/>
-<text text-anchor="start" x="1300" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1300" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1300" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node34 -->
-<g id="node28" class="node">
-<title>node34</title>
-<polygon fill="white" stroke="black" points="3087.5,-1577.5 3087.5,-1743.5 3218.5,-1743.5 3218.5,-1577.5 3087.5,-1577.5"/>
-<text text-anchor="middle" x="3153" y="-1728.3" font-family="Times,serif" font-size="14.00">ProbeFreeze</text>
-<polyline fill="none" stroke="black" points="3087.5,-1720.5 3218.5,-1720.5 "/>
-<text text-anchor="start" x="3095.5" y="-1705.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3095.5" y="-1690.3" font-family="Times,serif" font-size="14.00">&#45; ProbeFreezeId</text>
-<text text-anchor="start" x="3095.5" y="-1675.3" font-family="Times,serif" font-size="14.00">&#45; ChipId</text>
-<text text-anchor="start" x="3095.5" y="-1660.3" font-family="Times,serif" font-size="14.00">&#45; TissueId</text>
-<text text-anchor="start" x="3095.5" y="-1645.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="3095.5" y="-1630.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="3095.5" y="-1615.3" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="3095.5" y="-1600.3" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="3095.5" y="-1585.3" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-</g>
-<!-- node34&#45;&gt;node35 -->
-<g id="edge22" class="edge">
-<title>node34&#45;&gt;node35</title>
-<path fill="none" stroke="black" d="M3218.59,-1621.61C3248.94,-1601.16 3283.23,-1573.45 3306,-1541 3343.84,-1487.08 3363.37,-1413.02 3372.88,-1363.1"/>
-<polygon fill="black" stroke="black" points="3376.34,-1363.6 3374.7,-1353.13 3369.46,-1362.34 3376.34,-1363.6"/>
-</g>
-<!-- node39 -->
-<g id="node33" class="node">
-<title>node39</title>
-<polygon fill="white" stroke="black" points="3002,-1194.5 3002,-1420.5 3148,-1420.5 3148,-1194.5 3002,-1194.5"/>
-<text text-anchor="middle" x="3075" y="-1405.3" font-family="Times,serif" font-size="14.00">ProbeSetFreeze</text>
-<polyline fill="none" stroke="black" points="3002,-1397.5 3148,-1397.5 "/>
-<text text-anchor="start" x="3010" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="3010" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; ProbeFreezeId</text>
-<text text-anchor="start" x="3010" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; AvgID</text>
-<text text-anchor="start" x="3010" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="3010" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; Name2</text>
-<text text-anchor="start" x="3010" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="3010" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="3010" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="3010" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; OrderList</text>
-<text text-anchor="start" x="3010" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; public</text>
-<text text-anchor="start" x="3010" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; confidentiality</text>
-<text text-anchor="start" x="3010" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; AuthorisedUsers</text>
-<text text-anchor="start" x="3010" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; DataScale</text>
-</g>
-<!-- node34&#45;&gt;node39 -->
-<g id="edge23" class="edge">
-<title>node34&#45;&gt;node39</title>
-<path fill="none" stroke="black" d="M3134.71,-1577.21C3125,-1533.51 3112.88,-1478.96 3102.1,-1430.44"/>
-<polygon fill="black" stroke="black" points="3105.48,-1429.51 3099.89,-1420.51 3098.64,-1431.03 3105.48,-1429.51"/>
-</g>
-<!-- node34&#45;&gt;node42 -->
-<g id="edge24" class="edge">
-<title>node34&#45;&gt;node42</title>
-<path fill="none" stroke="black" d="M3171.52,-1577.21C3187.05,-1508.2 3208.68,-1412.11 3221.42,-1355.5"/>
-<polygon fill="black" stroke="black" points="3224.84,-1356.27 3223.62,-1345.74 3218.01,-1354.73 3224.84,-1356.27"/>
-</g>
-<!-- node36 -->
-<g id="node30" class="node">
-<title>node36</title>
-<polygon fill="white" stroke="black" points="1402,-721.5 1402,-797.5 1486,-797.5 1486,-721.5 1402,-721.5"/>
-<text text-anchor="middle" x="1444" y="-782.3" font-family="Times,serif" font-size="14.00">ProbeSE</text>
-<polyline fill="none" stroke="black" points="1402,-774.5 1486,-774.5 "/>
-<text text-anchor="start" x="1410" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="1410" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1410" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; error</text>
-</g>
-<!-- node37&#45;&gt;node32 -->
-<g id="edge25" class="edge">
-<title>node37&#45;&gt;node32</title>
-<path fill="none" stroke="black" d="M3397.97,-1780.37C3396.64,-1771.07 3395.37,-1762.15 3394.16,-1753.68"/>
-<polygon fill="black" stroke="black" points="3397.59,-1752.98 3392.72,-1743.58 3390.66,-1753.97 3397.59,-1752.98"/>
-</g>
-<!-- node41 -->
-<g id="node35" class="node">
-<title>node41</title>
-<polygon fill="white" stroke="black" points="3202.5,-646.5 3202.5,-872.5 3357.5,-872.5 3357.5,-646.5 3202.5,-646.5"/>
-<text text-anchor="middle" x="3280" y="-857.3" font-family="Times,serif" font-size="14.00">ProbeSetXRef</text>
-<polyline fill="none" stroke="black" points="3202.5,-849.5 3357.5,-849.5 "/>
-<text text-anchor="start" x="3210.5" y="-834.3" font-family="Times,serif" font-size="14.00">&#45; ProbeSetFreezeId</text>
-<text text-anchor="start" x="3210.5" y="-819.3" font-family="Times,serif" font-size="14.00">&#45; ProbeSetId</text>
-<text text-anchor="start" x="3210.5" y="-804.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="3210.5" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; Locus_old</text>
-<text text-anchor="start" x="3210.5" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; LRS_old</text>
-<text text-anchor="start" x="3210.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; pValue_old</text>
-<text text-anchor="start" x="3210.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; mean</text>
-<text text-anchor="start" x="3210.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; se</text>
-<text text-anchor="start" x="3210.5" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; Locus</text>
-<text text-anchor="start" x="3210.5" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; LRS</text>
-<text text-anchor="start" x="3210.5" y="-684.3" font-family="Times,serif" font-size="14.00">&#45; pValue</text>
-<text text-anchor="start" x="3210.5" y="-669.3" font-family="Times,serif" font-size="14.00">&#45; additive</text>
-<text text-anchor="start" x="3210.5" y="-654.3" font-family="Times,serif" font-size="14.00">&#45; h2</text>
-</g>
-<!-- node37&#45;&gt;node41 -->
-<g id="edge26" class="edge">
-<title>node37&#45;&gt;node41</title>
-<path fill="none" stroke="black" d="M3478.52,-1780.31C3478.33,-1476.13 3473.65,-1143.37 3455,-1074 3436.26,-1004.29 3398.67,-933.5 3363.11,-876.86"/>
-<polygon fill="black" stroke="black" points="3365.96,-874.83 3357.65,-868.26 3360.05,-878.58 3365.96,-874.83"/>
-</g>
-<!-- node60 -->
-<g id="node52" class="node">
-<title>node60</title>
-<polygon fill="white" stroke="black" points="3603,-0.5 3603,-211.5 3813,-211.5 3813,-0.5 3603,-0.5"/>
-<text text-anchor="middle" x="3708" y="-196.3" font-family="Times,serif" font-size="14.00">TissueProbeSetXRef</text>
-<polyline fill="none" stroke="black" points="3603,-188.5 3813,-188.5 "/>
-<text text-anchor="start" x="3611" y="-173.3" font-family="Times,serif" font-size="14.00">&#45; TissueProbeSetFreezeId</text>
-<text text-anchor="start" x="3611" y="-158.3" font-family="Times,serif" font-size="14.00">&#45; ProbesetId</text>
-<text text-anchor="start" x="3611" y="-143.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="3611" y="-128.3" font-family="Times,serif" font-size="14.00">&#45; Mean</text>
-<text text-anchor="start" x="3611" y="-113.3" font-family="Times,serif" font-size="14.00">&#45; useStatus</text>
-<text text-anchor="start" x="3611" y="-98.3" font-family="Times,serif" font-size="14.00">&#45; Symbol</text>
-<text text-anchor="start" x="3611" y="-83.3" font-family="Times,serif" font-size="14.00">&#45; GeneId</text>
-<text text-anchor="start" x="3611" y="-68.3" font-family="Times,serif" font-size="14.00">&#45; Chr</text>
-<text text-anchor="start" x="3611" y="-53.3" font-family="Times,serif" font-size="14.00">&#45; Mb</text>
-<text text-anchor="start" x="3611" y="-38.3" font-family="Times,serif" font-size="14.00">&#45; Mb_2016</text>
-<text text-anchor="start" x="3611" y="-23.3" font-family="Times,serif" font-size="14.00">&#45; description</text>
-<text text-anchor="start" x="3611" y="-8.3" font-family="Times,serif" font-size="14.00">&#45; Probe_Target_Description</text>
-</g>
-<!-- node37&#45;&gt;node60 -->
-<g id="edge27" class="edge">
-<title>node37&#45;&gt;node60</title>
-<path fill="none" stroke="black" d="M3598.18,-1788.55C3601.06,-1785.64 3604,-1782.79 3607,-1780 4072.64,-1346.72 4591.07,-2012.47 5018,-1541 5087.52,-1464.22 5034,-1412.08 5034,-1308.5 5034,-1308.5 5034,-1308.5 5034,-758.5 5034,-634.96 5095.21,-577.44 5018,-481 4866.15,-291.35 4114.38,-165.23 3823.35,-122.81"/>
-<polygon fill="black" stroke="black" points="3823.59,-119.31 3813.19,-121.34 3822.58,-126.24 3823.59,-119.31"/>
-</g>
-<!-- node38 -->
-<g id="node32" class="node">
-<title>node38</title>
-<polygon fill="white" stroke="black" points="1676,-721.5 1676,-797.5 1792,-797.5 1792,-721.5 1676,-721.5"/>
-<text text-anchor="middle" x="1734" y="-782.3" font-family="Times,serif" font-size="14.00">ProbeSetData</text>
-<polyline fill="none" stroke="black" points="1676,-774.5 1792,-774.5 "/>
-<text text-anchor="start" x="1684" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1684" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1684" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node39&#45;&gt;node4 -->
-<g id="edge28" class="edge">
-<title>node39&#45;&gt;node4</title>
-<path fill="none" stroke="black" d="M3062.04,-1194.41C3050.97,-1149.99 3030.56,-1102.74 2993,-1074 2907.7,-1008.73 2595.14,-1104.76 2511,-1038 2443.84,-984.71 2427.5,-880.03 2424.11,-815.58"/>
-<polygon fill="black" stroke="black" points="2427.59,-815.04 2423.65,-805.2 2420.59,-815.35 2427.59,-815.04"/>
-</g>
-<!-- node39&#45;&gt;node41 -->
-<g id="edge29" class="edge">
-<title>node39&#45;&gt;node41</title>
-<path fill="none" stroke="black" d="M3113.63,-1194.46C3127.07,-1156.15 3142.44,-1113.11 3157,-1074 3180.68,-1010.42 3208.16,-940.07 3231.14,-882.14"/>
-<polygon fill="black" stroke="black" points="3234.49,-883.17 3234.93,-872.59 3227.99,-880.59 3234.49,-883.17"/>
-</g>
-<!-- node63 -->
-<g id="node56" class="node">
-<title>node63</title>
-<polygon fill="white" stroke="black" points="3867,-721.5 3867,-797.5 4045,-797.5 4045,-721.5 3867,-721.5"/>
-<text text-anchor="middle" x="3956" y="-782.3" font-family="Times,serif" font-size="14.00">UserPrivilege</text>
-<polyline fill="none" stroke="black" points="3867,-774.5 4045,-774.5 "/>
-<text text-anchor="start" x="3875" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; UserId</text>
-<text text-anchor="start" x="3875" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; ProbeSetFreezeId</text>
-<text text-anchor="start" x="3875" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; download_result_priv</text>
-</g>
-<!-- node39&#45;&gt;node63 -->
-<g id="edge30" class="edge">
-<title>node39&#45;&gt;node63</title>
-<path fill="none" stroke="black" d="M3089.8,-1194.33C3101.19,-1150.71 3121.35,-1104.1 3157,-1074 3229.02,-1013.2 3276.1,-1066.31 3366,-1038 3560.8,-976.65 3774.09,-863.93 3883.04,-802.73"/>
-<polygon fill="black" stroke="black" points="3884.98,-805.65 3891.98,-797.69 3881.55,-799.55 3884.98,-805.65"/>
-</g>
-<!-- node40 -->
-<g id="node34" class="node">
-<title>node40</title>
-<polygon fill="white" stroke="black" points="1810.5,-721.5 1810.5,-797.5 1913.5,-797.5 1913.5,-721.5 1810.5,-721.5"/>
-<text text-anchor="middle" x="1862" y="-782.3" font-family="Times,serif" font-size="14.00">ProbeSetSE</text>
-<polyline fill="none" stroke="black" points="1810.5,-774.5 1913.5,-774.5 "/>
-<text text-anchor="start" x="1818.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="1818.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1818.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; error</text>
-</g>
-<!-- node43 -->
-<g id="node37" class="node">
-<title>node43</title>
-<polygon fill="white" stroke="black" points="2876,-1217 2876,-1398 2984,-1398 2984,-1217 2876,-1217"/>
-<text text-anchor="middle" x="2930" y="-1382.8" font-family="Times,serif" font-size="14.00">Publication</text>
-<polyline fill="none" stroke="black" points="2876,-1375 2984,-1375 "/>
-<text text-anchor="start" x="2884" y="-1359.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="2884" y="-1344.8" font-family="Times,serif" font-size="14.00">&#45; PubMed_ID</text>
-<text text-anchor="start" x="2884" y="-1329.8" font-family="Times,serif" font-size="14.00">&#45; Abstract</text>
-<text text-anchor="start" x="2884" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; Authors</text>
-<text text-anchor="start" x="2884" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; Title</text>
-<text text-anchor="start" x="2884" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; Journal</text>
-<text text-anchor="start" x="2884" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; Volume</text>
-<text text-anchor="start" x="2884" y="-1254.8" font-family="Times,serif" font-size="14.00">&#45; Pages</text>
-<text text-anchor="start" x="2884" y="-1239.8" font-family="Times,serif" font-size="14.00">&#45; Month</text>
-<text text-anchor="start" x="2884" y="-1224.8" font-family="Times,serif" font-size="14.00">&#45; Year</text>
-</g>
-<!-- node43&#45;&gt;node47 -->
-<g id="edge31" class="edge">
-<title>node43&#45;&gt;node47</title>
-<path fill="none" stroke="black" d="M2951.32,-1216.95C2974.08,-1121.36 3010.14,-969.91 3034.42,-867.95"/>
-<polygon fill="black" stroke="black" points="3037.89,-868.47 3036.8,-857.93 3031.08,-866.85 3037.89,-868.47"/>
-</g>
-<!-- node44 -->
-<g id="node38" class="node">
-<title>node44</title>
-<polygon fill="white" stroke="black" points="596,-721.5 596,-797.5 700,-797.5 700,-721.5 596,-721.5"/>
-<text text-anchor="middle" x="648" y="-782.3" font-family="Times,serif" font-size="14.00">PublishData</text>
-<polyline fill="none" stroke="black" points="596,-774.5 700,-774.5 "/>
-<text text-anchor="start" x="604" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="604" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="604" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node46 -->
-<g id="node40" class="node">
-<title>node46</title>
-<polygon fill="white" stroke="black" points="718,-721.5 718,-797.5 808,-797.5 808,-721.5 718,-721.5"/>
-<text text-anchor="middle" x="763" y="-782.3" font-family="Times,serif" font-size="14.00">PublishSE</text>
-<polyline fill="none" stroke="black" points="718,-774.5 808,-774.5 "/>
-<text text-anchor="start" x="726" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; DataId</text>
-<text text-anchor="start" x="726" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="726" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; error</text>
-</g>
-<!-- node48 -->
-<g id="node42" class="node">
-<title>node48</title>
-<polygon fill="white" stroke="black" points="723.5,-1074.5 723.5,-1540.5 932.5,-1540.5 932.5,-1074.5 723.5,-1074.5"/>
-<text text-anchor="middle" x="828" y="-1525.3" font-family="Times,serif" font-size="14.00">SnpAll</text>
-<polyline fill="none" stroke="black" points="723.5,-1517.5 932.5,-1517.5 "/>
-<text text-anchor="start" x="731.5" y="-1502.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="731.5" y="-1487.3" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="731.5" y="-1472.3" font-family="Times,serif" font-size="14.00">&#45; SnpName</text>
-<text text-anchor="start" x="731.5" y="-1457.3" font-family="Times,serif" font-size="14.00">&#45; Rs</text>
-<text text-anchor="start" x="731.5" y="-1442.3" font-family="Times,serif" font-size="14.00">&#45; Chromosome</text>
-<text text-anchor="start" x="731.5" y="-1427.3" font-family="Times,serif" font-size="14.00">&#45; Position</text>
-<text text-anchor="start" x="731.5" y="-1412.3" font-family="Times,serif" font-size="14.00">&#45; Position_2016</text>
-<text text-anchor="start" x="731.5" y="-1397.3" font-family="Times,serif" font-size="14.00">&#45; Alleles</text>
-<text text-anchor="start" x="731.5" y="-1382.3" font-family="Times,serif" font-size="14.00">&#45; Source</text>
-<text text-anchor="start" x="731.5" y="-1367.3" font-family="Times,serif" font-size="14.00">&#45; ConservationScore</text>
-<text text-anchor="start" x="731.5" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; 3Prime_UTR</text>
-<text text-anchor="start" x="731.5" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; 5Prime_UTR</text>
-<text text-anchor="start" x="731.5" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; Upstream</text>
-<text text-anchor="start" x="731.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; Downstream</text>
-<text text-anchor="start" x="731.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Intron</text>
-<text text-anchor="start" x="731.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; Non_Splice_Site</text>
-<text text-anchor="start" x="731.5" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; Splice_Site</text>
-<text text-anchor="start" x="731.5" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; Intergenic</text>
-<text text-anchor="start" x="731.5" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; Exon</text>
-<text text-anchor="start" x="731.5" y="-1217.3" font-family="Times,serif" font-size="14.00">&#45; Non_Synonymous_Coding</text>
-<text text-anchor="start" x="731.5" y="-1202.3" font-family="Times,serif" font-size="14.00">&#45; Synonymous_Coding</text>
-<text text-anchor="start" x="731.5" y="-1187.3" font-family="Times,serif" font-size="14.00">&#45; Start_Gained</text>
-<text text-anchor="start" x="731.5" y="-1172.3" font-family="Times,serif" font-size="14.00">&#45; Start_Lost</text>
-<text text-anchor="start" x="731.5" y="-1157.3" font-family="Times,serif" font-size="14.00">&#45; Stop_Gained</text>
-<text text-anchor="start" x="731.5" y="-1142.3" font-family="Times,serif" font-size="14.00">&#45; Stop_Lost</text>
-<text text-anchor="start" x="731.5" y="-1127.3" font-family="Times,serif" font-size="14.00">&#45; Unknown_Effect_In_Exon</text>
-<text text-anchor="start" x="731.5" y="-1112.3" font-family="Times,serif" font-size="14.00">&#45; Domain</text>
-<text text-anchor="start" x="731.5" y="-1097.3" font-family="Times,serif" font-size="14.00">&#45; Gene</text>
-<text text-anchor="start" x="731.5" y="-1082.3" font-family="Times,serif" font-size="14.00">&#45; Transcript</text>
-</g>
-<!-- node49 -->
-<g id="node43" class="node">
-<title>node49</title>
-<polygon fill="white" stroke="black" points="767,-1585 767,-1736 889,-1736 889,-1585 767,-1585"/>
-<text text-anchor="middle" x="828" y="-1720.8" font-family="Times,serif" font-size="14.00">Species</text>
-<polyline fill="none" stroke="black" points="767,-1713 889,-1713 "/>
-<text text-anchor="start" x="775" y="-1697.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="775" y="-1682.8" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="775" y="-1667.8" font-family="Times,serif" font-size="14.00">&#45; SpeciesName</text>
-<text text-anchor="start" x="775" y="-1652.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="775" y="-1637.8" font-family="Times,serif" font-size="14.00">&#45; MenuName</text>
-<text text-anchor="start" x="775" y="-1622.8" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="775" y="-1607.8" font-family="Times,serif" font-size="14.00">&#45; TaxonomyId</text>
-<text text-anchor="start" x="775" y="-1592.8" font-family="Times,serif" font-size="14.00">&#45; OrderId</text>
-</g>
-<!-- node49&#45;&gt;node11 -->
-<g id="edge32" class="edge">
-<title>node49&#45;&gt;node11</title>
-<path fill="none" stroke="black" d="M767.26,-1584.63C764.23,-1581.95 761.13,-1579.39 758,-1577 727.98,-1554.07 705.25,-1569.97 681,-1541 636.84,-1488.26 623.84,-1407.18 620.18,-1356.03"/>
-<polygon fill="black" stroke="black" points="623.67,-1355.67 619.55,-1345.91 616.68,-1356.11 623.67,-1355.67"/>
-</g>
-<!-- node49&#45;&gt;node12 -->
-<g id="edge33" class="edge">
-<title>node49&#45;&gt;node12</title>
-<path fill="none" stroke="black" d="M770.56,-1584.74C766.54,-1581.83 762.35,-1579.21 758,-1577 661.47,-1527.9 357.39,-1607.61 272,-1541 227.21,-1506.06 208.2,-1444.27 200.26,-1393.17"/>
-<polygon fill="none" stroke="black" points="203.7,-1392.51 198.81,-1383.1 196.77,-1393.5 203.7,-1392.51"/>
-</g>
-<!-- node49&#45;&gt;node14 -->
-<g id="edge34" class="edge">
-<title>node49&#45;&gt;node14</title>
-<path fill="none" stroke="black" d="M766.85,-1585.98C763.91,-1582.9 760.95,-1579.9 758,-1577 739.97,-1559.29 725.76,-1563.36 714,-1541 665.52,-1448.83 745.07,-1151.04 675,-1074 614.23,-1007.18 543.04,-1097.39 475,-1038 474.52,-1037.58 474.05,-1037.16 473.58,-1036.74"/>
-<polygon fill="black" stroke="black" points="475.81,-1034.04 466.15,-1029.7 471,-1039.12 475.81,-1034.04"/>
-</g>
-<!-- node49&#45;&gt;node15 -->
-<g id="edge35" class="edge">
-<title>node49&#45;&gt;node15</title>
-<path fill="none" stroke="black" d="M771.07,-1584.98C766.9,-1581.96 762.54,-1579.26 758,-1577 630.27,-1513.45 227.83,-1630.84 117,-1541 83.84,-1514.12 67.11,-1471.72 58.97,-1430.44"/>
-<polygon fill="black" stroke="black" points="62.41,-1429.76 57.18,-1420.54 55.52,-1431.01 62.41,-1429.76"/>
-</g>
-<!-- node49&#45;&gt;node16 -->
-<g id="edge36" class="edge">
-<title>node49&#45;&gt;node16</title>
-<path fill="none" stroke="black" d="M770.47,-1584.91C766.48,-1581.96 762.32,-1579.29 758,-1577 691.63,-1541.86 480.26,-1588.38 422,-1541 376.03,-1503.62 357.9,-1437.81 350.91,-1385.72"/>
-<polygon fill="black" stroke="black" points="354.35,-1385 349.66,-1375.5 347.4,-1385.85 354.35,-1385"/>
-</g>
-<!-- node49&#45;&gt;node17 -->
-<g id="edge37" class="edge">
-<title>node49&#45;&gt;node17</title>
-<path fill="none" stroke="black" d="M889.29,-1649.97C986.8,-1633.79 1182.45,-1597.13 1341,-1541 1483.39,-1490.59 1639.05,-1409.38 1732.58,-1357.5"/>
-<polygon fill="black" stroke="black" points="1734.4,-1360.49 1741.43,-1352.57 1730.99,-1354.38 1734.4,-1360.49"/>
-</g>
-<!-- node49&#45;&gt;node22 -->
-<g id="edge38" class="edge">
-<title>node49&#45;&gt;node22</title>
-<path fill="none" stroke="black" d="M889.22,-1659.39C1128.57,-1658.2 2000.19,-1646.56 2252,-1541 2322.14,-1511.59 2387.19,-1456.8 2435.86,-1407.79"/>
-<polygon fill="none" stroke="black" points="2438.41,-1410.19 2442.92,-1400.61 2433.41,-1405.29 2438.41,-1410.19"/>
-</g>
-<!-- node49&#45;&gt;node23 -->
-<g id="edge39" class="edge">
-<title>node49&#45;&gt;node23</title>
-<path fill="none" stroke="black" d="M889.13,-1605.65C907.81,-1586.71 927.07,-1564.3 941,-1541 961.15,-1507.29 976.66,-1467.59 988.26,-1430.63"/>
-<polygon fill="none" stroke="black" points="991.69,-1431.38 991.27,-1420.79 984.99,-1429.33 991.69,-1431.38"/>
-</g>
-<!-- node49&#45;&gt;node48 -->
-<g id="edge40" class="edge">
-<title>node49&#45;&gt;node48</title>
-<path fill="none" stroke="black" d="M828,-1584.63C828,-1574.01 828,-1562.66 828,-1550.82"/>
-<polygon fill="none" stroke="black" points="831.5,-1550.77 828,-1540.77 824.5,-1550.77 831.5,-1550.77"/>
-</g>
-<!-- node50 -->
-<g id="node44" class="node">
-<title>node50</title>
-<polygon fill="white" stroke="black" points="1237.5,-1247 1237.5,-1368 1332.5,-1368 1332.5,-1247 1237.5,-1247"/>
-<text text-anchor="middle" x="1285" y="-1352.8" font-family="Times,serif" font-size="14.00">Strain</text>
-<polyline fill="none" stroke="black" points="1237.5,-1345 1332.5,-1345 "/>
-<text text-anchor="start" x="1245.5" y="-1329.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1245.5" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="1245.5" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; Name2</text>
-<text text-anchor="start" x="1245.5" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; SpeciesId</text>
-<text text-anchor="start" x="1245.5" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; Symbol</text>
-<text text-anchor="start" x="1245.5" y="-1254.8" font-family="Times,serif" font-size="14.00">&#45; Alias</text>
-</g>
-<!-- node49&#45;&gt;node50 -->
-<g id="edge41" class="edge">
-<title>node49&#45;&gt;node50</title>
-<path fill="none" stroke="black" d="M889.09,-1641C945.49,-1621.95 1029.71,-1588.35 1092,-1541 1152.33,-1495.14 1206.03,-1427 1241.37,-1376.33"/>
-<polygon fill="black" stroke="black" points="1244.29,-1378.26 1247.1,-1368.04 1238.54,-1374.28 1244.29,-1378.26"/>
-</g>
-<!-- node50&#45;&gt;node2 -->
-<g id="edge42" class="edge">
-<title>node50&#45;&gt;node2</title>
-<path fill="none" stroke="black" d="M1237.32,-1258.22C1189.7,-1207.44 1117.63,-1123.21 1075,-1038 1041.67,-971.37 1021.71,-888.08 1010.86,-830.22"/>
-<polygon fill="none" stroke="black" points="1014.24,-829.29 1009,-820.09 1007.36,-830.55 1014.24,-829.29"/>
-</g>
-<!-- node50&#45;&gt;node4 -->
-<g id="edge43" class="edge">
-<title>node50&#45;&gt;node4</title>
-<path fill="none" stroke="black" d="M1332.76,-1272.93C1411.6,-1219.6 1575.8,-1117.15 1732,-1074 1796.91,-1056.07 2283.93,-1079.46 2337,-1038 2404.79,-985.04 2420.88,-879.65 2424.06,-815.08"/>
-<polygon fill="black" stroke="black" points="2427.56,-815.22 2424.47,-805.08 2420.57,-814.93 2427.56,-815.22"/>
-</g>
-<!-- node50&#45;&gt;node5 -->
-<g id="edge44" class="edge">
-<title>node50&#45;&gt;node5</title>
-<path fill="none" stroke="black" d="M1332.5,-1275.8C1411.95,-1225.86 1578.26,-1127.25 1732,-1074 1813.21,-1045.87 1853.42,-1089.8 1922,-1038 1994.96,-982.9 2032.26,-878.94 2049.13,-815.09"/>
-<polygon fill="black" stroke="black" points="2052.57,-815.75 2051.66,-805.2 2045.79,-814.02 2052.57,-815.75"/>
-</g>
-<!-- node50&#45;&gt;node18 -->
-<g id="edge45" class="edge">
-<title>node50&#45;&gt;node18</title>
-<path fill="none" stroke="black" d="M1258.27,-1246.79C1235.11,-1193.07 1202.07,-1111.52 1181,-1038 1158.23,-958.55 1142.47,-863.46 1134.36,-807.74"/>
-<polygon fill="black" stroke="black" points="1137.82,-807.21 1132.93,-797.81 1130.89,-808.2 1137.82,-807.21"/>
-</g>
-<!-- node50&#45;&gt;node24 -->
-<g id="edge46" class="edge">
-<title>node50&#45;&gt;node24</title>
-<path fill="none" stroke="black" d="M1254.06,-1246.76C1221.79,-1191.31 1165.61,-1111.82 1092,-1074 991.93,-1022.59 671.48,-1112.31 587,-1038 521.98,-980.81 519.93,-870.89 524.98,-807.92"/>
-<polygon fill="black" stroke="black" points="528.47,-808.13 525.87,-797.86 521.5,-807.5 528.47,-808.13"/>
-</g>
-<!-- node50&#45;&gt;node28 -->
-<g id="edge47" class="edge">
-<title>node50&#45;&gt;node28</title>
-<path fill="none" stroke="black" d="M1279.2,-1246.77C1268.58,-1137.33 1246.2,-906.81 1236.57,-807.57"/>
-<polygon fill="none" stroke="black" points="1240.05,-807.15 1235.6,-797.54 1233.08,-807.83 1240.05,-807.15"/>
-</g>
-<!-- node50&#45;&gt;node33 -->
-<g id="edge48" class="edge">
-<title>node50&#45;&gt;node33</title>
-<path fill="none" stroke="black" d="M1290.8,-1246.77C1301.42,-1137.33 1323.8,-906.81 1333.43,-807.57"/>
-<polygon fill="black" stroke="black" points="1336.92,-807.83 1334.4,-797.54 1329.95,-807.15 1336.92,-807.83"/>
-</g>
-<!-- node50&#45;&gt;node36 -->
-<g id="edge49" class="edge">
-<title>node50&#45;&gt;node36</title>
-<path fill="none" stroke="black" d="M1312.99,-1246.94C1337.2,-1193.32 1371.6,-1111.84 1393,-1038 1415.98,-958.72 1430.8,-863.57 1438.25,-807.8"/>
-<polygon fill="black" stroke="black" points="1441.73,-808.23 1439.56,-797.86 1434.79,-807.32 1441.73,-808.23"/>
-</g>
-<!-- node50&#45;&gt;node38 -->
-<g id="edge50" class="edge">
-<title>node50&#45;&gt;node38</title>
-<path fill="none" stroke="black" d="M1332.57,-1286.63C1414.1,-1250.03 1580.05,-1164.01 1666,-1038 1713.99,-967.64 1728.19,-866.84 1732.35,-808.08"/>
-<polygon fill="black" stroke="black" points="1735.85,-808.16 1732.99,-797.96 1728.86,-807.72 1735.85,-808.16"/>
-</g>
-<!-- node50&#45;&gt;node40 -->
-<g id="edge51" class="edge">
-<title>node50&#45;&gt;node40</title>
-<path fill="none" stroke="black" d="M1332.59,-1281.76C1460.27,-1215.37 1800.75,-1038.33 1801,-1038 1852.79,-970.4 1862.47,-867.78 1863.28,-808.11"/>
-<polygon fill="black" stroke="black" points="1866.78,-807.86 1863.34,-797.84 1859.78,-807.82 1866.78,-807.86"/>
-</g>
-<!-- node50&#45;&gt;node44 -->
-<g id="edge52" class="edge">
-<title>node50&#45;&gt;node44</title>
-<path fill="none" stroke="black" d="M1253.72,-1246.86C1221.28,-1191.69 1165.06,-1112.58 1092,-1074 1016.41,-1034.08 773.04,-1094.63 709,-1038 643.89,-980.43 639.51,-870.66 643.11,-807.81"/>
-<polygon fill="black" stroke="black" points="646.6,-807.97 643.77,-797.77 639.62,-807.51 646.6,-807.97"/>
-</g>
-<!-- node50&#45;&gt;node46 -->
-<g id="edge53" class="edge">
-<title>node50&#45;&gt;node46</title>
-<path fill="none" stroke="black" d="M1253.09,-1246.93C1220.37,-1192.21 1164.12,-1113.78 1092,-1074 984.07,-1014.46 906.82,-1122.42 817,-1038 754.15,-978.94 752.14,-870.21 757.06,-807.83"/>
-<polygon fill="black" stroke="black" points="760.55,-808.13 757.94,-797.86 753.57,-807.51 760.55,-808.13"/>
-</g>
-<!-- node50&#45;&gt;node51 -->
-<g id="edge54" class="edge">
-<title>node50&#45;&gt;node51</title>
-<path fill="none" stroke="black" d="M1332.57,-1273.58C1411.45,-1220.92 1576.13,-1119.1 1732,-1074 1823.9,-1047.41 2086.23,-1097.69 2161,-1038 2225.58,-986.44 2243.57,-887.55 2248.13,-822.81"/>
-<polygon fill="black" stroke="black" points="2251.63,-822.92 2248.75,-812.73 2244.64,-822.49 2251.63,-822.92"/>
-</g>
-<!-- node55 -->
-<g id="node47" class="node">
-<title>node55</title>
-<polygon fill="white" stroke="black" points="826.5,-706.5 826.5,-812.5 915.5,-812.5 915.5,-706.5 826.5,-706.5"/>
-<text text-anchor="middle" x="871" y="-797.3" font-family="Times,serif" font-size="14.00">TempData</text>
-<polyline fill="none" stroke="black" points="826.5,-789.5 915.5,-789.5 "/>
-<text text-anchor="start" x="834.5" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="834.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="834.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-<text text-anchor="start" x="834.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; SE</text>
-<text text-anchor="start" x="834.5" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; NStrain</text>
-</g>
-<!-- node50&#45;&gt;node55 -->
-<g id="edge55" class="edge">
-<title>node50&#45;&gt;node55</title>
-<path fill="none" stroke="black" d="M1251.54,-1246.93C1218.18,-1193.21 1161.89,-1116.32 1092,-1074 1026.68,-1034.44 977.39,-1092.6 924,-1038 868.62,-981.36 862.02,-885.74 864.7,-822.86"/>
-<polygon fill="black" stroke="black" points="868.2,-822.84 865.22,-812.68 861.21,-822.48 868.2,-822.84"/>
-</g>
-<!-- node57 -->
-<g id="node49" class="node">
-<title>node57</title>
-<polygon fill="white" stroke="black" points="1504.5,-684 1504.5,-835 1657.5,-835 1657.5,-684 1504.5,-684"/>
-<text text-anchor="middle" x="1581" y="-819.8" font-family="Times,serif" font-size="14.00">TissueProbeFreeze</text>
-<polyline fill="none" stroke="black" points="1504.5,-812 1657.5,-812 "/>
-<text text-anchor="start" x="1512.5" y="-796.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1512.5" y="-781.8" font-family="Times,serif" font-size="14.00">&#45; ChipId</text>
-<text text-anchor="start" x="1512.5" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; StrainId</text>
-<text text-anchor="start" x="1512.5" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="1512.5" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="1512.5" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="1512.5" y="-706.8" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="1512.5" y="-691.8" font-family="Times,serif" font-size="14.00">&#45; InbredSetId</text>
-</g>
-<!-- node50&#45;&gt;node57 -->
-<g id="edge56" class="edge">
-<title>node50&#45;&gt;node57</title>
-<path fill="none" stroke="black" d="M1332.92,-1256.94C1380.04,-1205.8 1451.1,-1121.89 1495,-1038 1526.99,-976.87 1549.35,-901.84 1563.23,-845.22"/>
-<polygon fill="black" stroke="black" points="1566.7,-845.77 1565.64,-835.22 1559.9,-844.13 1566.7,-845.77"/>
-</g>
-<!-- node56 -->
-<g id="node48" class="node">
-<title>node56</title>
-<polygon fill="white" stroke="black" points="1880,-2253 1880,-2389 2020,-2389 2020,-2253 1880,-2253"/>
-<text text-anchor="middle" x="1950" y="-2373.8" font-family="Times,serif" font-size="14.00">Tissue</text>
-<polyline fill="none" stroke="black" points="1880,-2366 2020,-2366 "/>
-<text text-anchor="start" x="1888" y="-2350.8" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1888" y="-2335.8" font-family="Times,serif" font-size="14.00">&#45; TissueId</text>
-<text text-anchor="start" x="1888" y="-2320.8" font-family="Times,serif" font-size="14.00">&#45; TissueName</text>
-<text text-anchor="start" x="1888" y="-2305.8" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="1888" y="-2290.8" font-family="Times,serif" font-size="14.00">&#45; Short_Name</text>
-<text text-anchor="start" x="1888" y="-2275.8" font-family="Times,serif" font-size="14.00">&#45; BIRN_lex_ID</text>
-<text text-anchor="start" x="1888" y="-2260.8" font-family="Times,serif" font-size="14.00">&#45; BIRN_lex_Name</text>
-</g>
-<!-- node56&#45;&gt;node34 -->
-<g id="edge57" class="edge">
-<title>node56&#45;&gt;node34</title>
-<path fill="none" stroke="black" d="M2020.32,-2281.51C2231.98,-2165.65 2861.84,-1820.87 3078.68,-1702.18"/>
-<polygon fill="black" stroke="black" points="3080.36,-1705.25 3087.45,-1697.38 3077,-1699.11 3080.36,-1705.25"/>
-</g>
-<!-- node58 -->
-<g id="node50" class="node">
-<title>node58</title>
-<polygon fill="white" stroke="black" points="587,-1622.5 587,-1698.5 749,-1698.5 749,-1622.5 587,-1622.5"/>
-<text text-anchor="middle" x="668" y="-1683.3" font-family="Times,serif" font-size="14.00">TissueProbeSetData</text>
-<polyline fill="none" stroke="black" points="587,-1675.5 749,-1675.5 "/>
-<text text-anchor="start" x="595" y="-1660.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="595" y="-1645.3" font-family="Times,serif" font-size="14.00">&#45; TissueID</text>
-<text text-anchor="start" x="595" y="-1630.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node56&#45;&gt;node58 -->
-<g id="edge58" class="edge">
-<title>node56&#45;&gt;node58</title>
-<path fill="none" stroke="black" d="M1879.67,-2294.38C1689.38,-2223.36 1152.2,-2011.4 758,-1744 741.72,-1732.96 725.41,-1719.08 711.24,-1705.87"/>
-<polygon fill="black" stroke="black" points="713.27,-1702.96 703.6,-1698.62 708.45,-1708.04 713.27,-1702.96"/>
-</g>
-<!-- node59 -->
-<g id="node51" class="node">
-<title>node59</title>
-<polygon fill="white" stroke="black" points="1981.5,-248.5 1981.5,-444.5 2158.5,-444.5 2158.5,-248.5 1981.5,-248.5"/>
-<text text-anchor="middle" x="2070" y="-429.3" font-family="Times,serif" font-size="14.00">TissueProbeSetFreeze</text>
-<polyline fill="none" stroke="black" points="1981.5,-421.5 2158.5,-421.5 "/>
-<text text-anchor="start" x="1989.5" y="-406.3" font-family="Times,serif" font-size="14.00">&#45; Id</text>
-<text text-anchor="start" x="1989.5" y="-391.3" font-family="Times,serif" font-size="14.00">&#45; TissueProbeFreezeId</text>
-<text text-anchor="start" x="1989.5" y="-376.3" font-family="Times,serif" font-size="14.00">&#45; AvgID</text>
-<text text-anchor="start" x="1989.5" y="-361.3" font-family="Times,serif" font-size="14.00">&#45; Name</text>
-<text text-anchor="start" x="1989.5" y="-346.3" font-family="Times,serif" font-size="14.00">&#45; Name2</text>
-<text text-anchor="start" x="1989.5" y="-331.3" font-family="Times,serif" font-size="14.00">&#45; FullName</text>
-<text text-anchor="start" x="1989.5" y="-316.3" font-family="Times,serif" font-size="14.00">&#45; ShortName</text>
-<text text-anchor="start" x="1989.5" y="-301.3" font-family="Times,serif" font-size="14.00">&#45; CreateTime</text>
-<text text-anchor="start" x="1989.5" y="-286.3" font-family="Times,serif" font-size="14.00">&#45; public</text>
-<text text-anchor="start" x="1989.5" y="-271.3" font-family="Times,serif" font-size="14.00">&#45; confidentiality</text>
-<text text-anchor="start" x="1989.5" y="-256.3" font-family="Times,serif" font-size="14.00">&#45; AuthorisedUsers</text>
-</g>
-<!-- node57&#45;&gt;node59 -->
-<g id="edge59" class="edge">
-<title>node57&#45;&gt;node59</title>
-<path fill="none" stroke="black" d="M1585.66,-683.88C1593.4,-621.86 1613.76,-535.28 1667,-481 1747.71,-398.71 1880.2,-367.14 1971.09,-355.03"/>
-<polygon fill="black" stroke="black" points="1971.66,-358.49 1981.14,-353.75 1970.77,-351.54 1971.66,-358.49"/>
-</g>
-<!-- node59&#45;&gt;node60 -->
-<g id="edge60" class="edge">
-<title>node59&#45;&gt;node60</title>
-<path fill="none" stroke="black" d="M2158.74,-289.8C2188.32,-273.7 2222.13,-257.84 2255,-248 2505.22,-173.09 3294.44,-127.4 3592.5,-112.44"/>
-<polygon fill="black" stroke="black" points="3593.08,-115.92 3602.9,-111.92 3592.73,-108.93 3593.08,-115.92"/>
-</g>
-<!-- node61 -->
-<g id="node53" class="node">
-<title>node61</title>
-<polygon fill="white" stroke="black" points="3915.5,-3003.5 3915.5,-3064.5 4034.5,-3064.5 4034.5,-3003.5 3915.5,-3003.5"/>
-<text text-anchor="middle" x="3975" y="-3049.3" font-family="Times,serif" font-size="14.00">TraitMetadata</text>
-<polyline fill="none" stroke="black" points="3915.5,-3041.5 4034.5,-3041.5 "/>
-<text text-anchor="start" x="3923.5" y="-3026.3" font-family="Times,serif" font-size="14.00">&#45; type</text>
-<text text-anchor="start" x="3923.5" y="-3011.3" font-family="Times,serif" font-size="14.00">&#45; value</text>
-</g>
-<!-- node30 -->
-<g id="node54" class="node">
-<title>node30</title>
-<polygon fill="white" stroke="black" points="4846,-1277 4846,-1338 5006,-1338 5006,-1277 4846,-1277"/>
-<text text-anchor="middle" x="4926" y="-1322.8" font-family="Times,serif" font-size="14.00">Organizations</text>
-<polyline fill="none" stroke="black" points="4846,-1315 5006,-1315 "/>
-<text text-anchor="start" x="4854" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; OrganizationId</text>
-<text text-anchor="start" x="4854" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; OrganizationName</text>
-</g>
-<!-- node25 -->
-<g id="node55" class="node">
-<title>node25</title>
-<polygon fill="white" stroke="black" points="4867,-624 4867,-895 4999,-895 4999,-624 4867,-624"/>
-<text text-anchor="middle" x="4933" y="-879.8" font-family="Times,serif" font-size="14.00">Investigators</text>
-<polyline fill="none" stroke="black" points="4867,-872 4999,-872 "/>
-<text text-anchor="start" x="4875" y="-856.8" font-family="Times,serif" font-size="14.00">&#45; FirstName</text>
-<text text-anchor="start" x="4875" y="-841.8" font-family="Times,serif" font-size="14.00">&#45; LastName</text>
-<text text-anchor="start" x="4875" y="-826.8" font-family="Times,serif" font-size="14.00">&#45; Address</text>
-<text text-anchor="start" x="4875" y="-811.8" font-family="Times,serif" font-size="14.00">&#45; City</text>
-<text text-anchor="start" x="4875" y="-796.8" font-family="Times,serif" font-size="14.00">&#45; State</text>
-<text text-anchor="start" x="4875" y="-781.8" font-family="Times,serif" font-size="14.00">&#45; ZipCode</text>
-<text text-anchor="start" x="4875" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; Phone</text>
-<text text-anchor="start" x="4875" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; Email</text>
-<text text-anchor="start" x="4875" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; Country</text>
-<text text-anchor="start" x="4875" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; Url</text>
-<text text-anchor="start" x="4875" y="-706.8" font-family="Times,serif" font-size="14.00">&#45; UserName</text>
-<text text-anchor="start" x="4875" y="-691.8" font-family="Times,serif" font-size="14.00">&#45; UserPass</text>
-<text text-anchor="start" x="4875" y="-676.8" font-family="Times,serif" font-size="14.00">&#45; UserDate</text>
-<text text-anchor="start" x="4875" y="-661.8" font-family="Times,serif" font-size="14.00">&#45; UserLevel</text>
-<text text-anchor="start" x="4875" y="-646.8" font-family="Times,serif" font-size="14.00">&#45; OrganizationId</text>
-<text text-anchor="start" x="4875" y="-631.8" font-family="Times,serif" font-size="14.00">&#45; InvestigatorId</text>
-</g>
-<!-- node30&#45;&gt;node25 -->
-<g id="edge18" class="edge">
-<title>node30&#45;&gt;node25</title>
-<path fill="none" stroke="black" d="M4926.38,-1276.76C4927.27,-1207.64 4929.51,-1032.4 4931.14,-905.23"/>
-<polygon fill="black" stroke="black" points="4934.65,-905.05 4931.28,-895.01 4927.65,-904.96 4934.65,-905.05"/>
-</g>
-<!-- node62 -->
-<g id="node57" class="node">
-<title>node62</title>
-<polygon fill="white" stroke="black" points="4562.5,-1217 4562.5,-1398 4665.5,-1398 4665.5,-1217 4562.5,-1217"/>
-<text text-anchor="middle" x="4614" y="-1382.8" font-family="Times,serif" font-size="14.00">User</text>
-<polyline fill="none" stroke="black" points="4562.5,-1375 4665.5,-1375 "/>
-<text text-anchor="start" x="4570.5" y="-1359.8" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4570.5" y="-1344.8" font-family="Times,serif" font-size="14.00">&#45; name</text>
-<text text-anchor="start" x="4570.5" y="-1329.8" font-family="Times,serif" font-size="14.00">&#45; password</text>
-<text text-anchor="start" x="4570.5" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; email</text>
-<text text-anchor="start" x="4570.5" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; createtime</text>
-<text text-anchor="start" x="4570.5" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; user_ip</text>
-<text text-anchor="start" x="4570.5" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; lastlogin</text>
-<text text-anchor="start" x="4570.5" y="-1254.8" font-family="Times,serif" font-size="14.00">&#45; disable</text>
-<text text-anchor="start" x="4570.5" y="-1239.8" font-family="Times,serif" font-size="14.00">&#45; privilege</text>
-<text text-anchor="start" x="4570.5" y="-1224.8" font-family="Times,serif" font-size="14.00">&#45; grpName</text>
-</g>
-<!-- node62&#45;&gt;node63 -->
-<g id="edge61" class="edge">
-<title>node62&#45;&gt;node63</title>
-<path fill="none" stroke="black" d="M4611.74,-1216.74C4605.82,-1168.38 4590.48,-1111.17 4553,-1074 4506.77,-1028.15 4471.02,-1063.23 4411,-1038 4258.65,-973.95 4097.4,-864.19 4013.83,-803.68"/>
-<polygon fill="black" stroke="black" points="4015.64,-800.67 4005.5,-797.63 4011.53,-806.34 4015.64,-800.67"/>
-</g>
-<!-- node67 -->
-<g id="node58" class="node">
-<title>node67</title>
-<polygon fill="white" stroke="black" points="4684,-1224.5 4684,-1390.5 4828,-1390.5 4828,-1224.5 4684,-1224.5"/>
-<text text-anchor="middle" x="4756" y="-1375.3" font-family="Times,serif" font-size="14.00">user</text>
-<polyline fill="none" stroke="black" points="4684,-1367.5 4828,-1367.5 "/>
-<text text-anchor="start" x="4692" y="-1352.3" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4692" y="-1337.3" font-family="Times,serif" font-size="14.00">&#45; email_address</text>
-<text text-anchor="start" x="4692" y="-1322.3" font-family="Times,serif" font-size="14.00">&#45; password</text>
-<text text-anchor="start" x="4692" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; full_name</text>
-<text text-anchor="start" x="4692" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; organization</text>
-<text text-anchor="start" x="4692" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; active</text>
-<text text-anchor="start" x="4692" y="-1262.3" font-family="Times,serif" font-size="14.00">&#45; registration_info</text>
-<text text-anchor="start" x="4692" y="-1247.3" font-family="Times,serif" font-size="14.00">&#45; confirmed</text>
-<text text-anchor="start" x="4692" y="-1232.3" font-family="Times,serif" font-size="14.00">&#45; superuser</text>
-</g>
-<!-- node64 -->
-<g id="node59" class="node">
-<title>node64</title>
-<polygon fill="white" stroke="black" points="4735.5,-691.5 4735.5,-827.5 4848.5,-827.5 4848.5,-691.5 4735.5,-691.5"/>
-<text text-anchor="middle" x="4792" y="-812.3" font-family="Times,serif" font-size="14.00">login</text>
-<polyline fill="none" stroke="black" points="4735.5,-804.5 4848.5,-804.5 "/>
-<text text-anchor="start" x="4743.5" y="-789.3" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4743.5" y="-774.3" font-family="Times,serif" font-size="14.00">&#45; user</text>
-<text text-anchor="start" x="4743.5" y="-759.3" font-family="Times,serif" font-size="14.00">&#45; timestamp</text>
-<text text-anchor="start" x="4743.5" y="-744.3" font-family="Times,serif" font-size="14.00">&#45; ip_address</text>
-<text text-anchor="start" x="4743.5" y="-729.3" font-family="Times,serif" font-size="14.00">&#45; successful</text>
-<text text-anchor="start" x="4743.5" y="-714.3" font-family="Times,serif" font-size="14.00">&#45; session_id</text>
-<text text-anchor="start" x="4743.5" y="-699.3" font-family="Times,serif" font-size="14.00">&#45; assumed_by</text>
-</g>
-<!-- node67&#45;&gt;node64 -->
-<g id="edge62" class="edge">
-<title>node67&#45;&gt;node64</title>
-<path fill="none" stroke="black" d="M4761.41,-1224.46C4768.31,-1119.84 4780.15,-940.26 4786.9,-837.9"/>
-<polygon fill="none" stroke="black" points="4790.41,-837.85 4787.57,-827.64 4783.42,-837.39 4790.41,-837.85"/>
-</g>
-<!-- node68 -->
-<g id="node60" class="node">
-<title>node68</title>
-<polygon fill="white" stroke="black" points="4419.5,-699 4419.5,-820 4588.5,-820 4588.5,-699 4419.5,-699"/>
-<text text-anchor="middle" x="4504" y="-804.8" font-family="Times,serif" font-size="14.00">user_collection</text>
-<polyline fill="none" stroke="black" points="4419.5,-797 4588.5,-797 "/>
-<text text-anchor="start" x="4427.5" y="-781.8" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4427.5" y="-766.8" font-family="Times,serif" font-size="14.00">&#45; user</text>
-<text text-anchor="start" x="4427.5" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; name</text>
-<text text-anchor="start" x="4427.5" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; created_timestamp</text>
-<text text-anchor="start" x="4427.5" y="-721.8" font-family="Times,serif" font-size="14.00">&#45; changed_timestamp</text>
-<text text-anchor="start" x="4427.5" y="-706.8" font-family="Times,serif" font-size="14.00">&#45; members</text>
-</g>
-<!-- node67&#45;&gt;node68 -->
-<g id="edge63" class="edge">
-<title>node67&#45;&gt;node68</title>
-<path fill="none" stroke="black" d="M4743.82,-1224.34C4732.93,-1175.7 4712.59,-1115.64 4675,-1074 4649.68,-1045.96 4623.19,-1066.15 4598,-1038 4545.86,-979.75 4522.45,-891.42 4512.06,-830.12"/>
-<polygon fill="none" stroke="black" points="4515.5,-829.46 4510.44,-820.15 4508.59,-830.58 4515.5,-829.46"/>
-</g>
-<!-- node69 -->
-<g id="node61" class="node">
-<title>node69</title>
-<polygon fill="white" stroke="black" points="4607,-729 4607,-790 4717,-790 4717,-729 4607,-729"/>
-<text text-anchor="middle" x="4662" y="-774.8" font-family="Times,serif" font-size="14.00">user_openids</text>
-<polyline fill="none" stroke="black" points="4607,-767 4717,-767 "/>
-<text text-anchor="start" x="4615" y="-751.8" font-family="Times,serif" font-size="14.00">&#45; openid_url</text>
-<text text-anchor="start" x="4615" y="-736.8" font-family="Times,serif" font-size="14.00">&#45; user_id</text>
-</g>
-<!-- node67&#45;&gt;node69 -->
-<g id="edge64" class="edge">
-<title>node67&#45;&gt;node69</title>
-<path fill="none" stroke="black" d="M4741.88,-1224.46C4721.37,-1105.34 4684.13,-889.02 4668.83,-800.19"/>
-<polygon fill="black" stroke="black" points="4672.27,-799.52 4667.12,-790.26 4665.37,-800.7 4672.27,-799.52"/>
-</g>
-<!-- node1 -->
-<g id="node62" class="node">
-<title>node1</title>
-<polygon fill="white" stroke="black" points="4440,-1269.5 4440,-1345.5 4544,-1345.5 4544,-1269.5 4440,-1269.5"/>
-<text text-anchor="middle" x="4492" y="-1330.3" font-family="Times,serif" font-size="14.00">AccessLog</text>
-<polyline fill="none" stroke="black" points="4440,-1322.5 4544,-1322.5 "/>
-<text text-anchor="start" x="4448" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4448" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; accesstime</text>
-<text text-anchor="start" x="4448" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; ip_address</text>
-</g>
-<!-- node9 -->
-<g id="node63" class="node">
-<title>node9</title>
-<polygon fill="white" stroke="black" points="4342,-1262 4342,-1353 4422,-1353 4422,-1262 4342,-1262"/>
-<text text-anchor="middle" x="4382" y="-1337.8" font-family="Times,serif" font-size="14.00">Docs</text>
-<polyline fill="none" stroke="black" points="4342,-1330 4422,-1330 "/>
-<text text-anchor="start" x="4350" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4350" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; entry</text>
-<text text-anchor="start" x="4350" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; title</text>
-<text text-anchor="start" x="4350" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; content</text>
-</g>
-<!-- node26 -->
-<g id="node64" class="node">
-<title>node26</title>
-<polygon fill="white" stroke="black" points="4172,-1247 4172,-1368 4324,-1368 4324,-1247 4172,-1247"/>
-<text text-anchor="middle" x="4248" y="-1352.8" font-family="Times,serif" font-size="14.00">MachineAccessLog</text>
-<polyline fill="none" stroke="black" points="4172,-1345 4324,-1345 "/>
-<text text-anchor="start" x="4180" y="-1329.8" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4180" y="-1314.8" font-family="Times,serif" font-size="14.00">&#45; accesstime</text>
-<text text-anchor="start" x="4180" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; ip_address</text>
-<text text-anchor="start" x="4180" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; db_id</text>
-<text text-anchor="start" x="4180" y="-1269.8" font-family="Times,serif" font-size="14.00">&#45; data_id</text>
-<text text-anchor="start" x="4180" y="-1254.8" font-family="Times,serif" font-size="14.00">&#45; action</text>
-</g>
-<!-- node29 -->
-<g id="node65" class="node">
-<title>node29</title>
-<polygon fill="white" stroke="black" points="4080,-1269.5 4080,-1345.5 4154,-1345.5 4154,-1269.5 4080,-1269.5"/>
-<text text-anchor="middle" x="4117" y="-1330.3" font-family="Times,serif" font-size="14.00">News</text>
-<polyline fill="none" stroke="black" points="4080,-1322.5 4154,-1322.5 "/>
-<text text-anchor="start" x="4088" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; id</text>
-<text text-anchor="start" x="4088" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; date</text>
-<text text-anchor="start" x="4088" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; details</text>
-</g>
-<!-- node52 -->
-<g id="node66" class="node">
-<title>node52</title>
-<polygon fill="white" stroke="black" points="3930.5,-1277 3930.5,-1338 4061.5,-1338 4061.5,-1277 3930.5,-1277"/>
-<text text-anchor="middle" x="3996" y="-1322.8" font-family="Times,serif" font-size="14.00">TableComments</text>
-<polyline fill="none" stroke="black" points="3930.5,-1315 4061.5,-1315 "/>
-<text text-anchor="start" x="3938.5" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; TableName</text>
-<text text-anchor="start" x="3938.5" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; Comment</text>
-</g>
-<!-- node53 -->
-<g id="node67" class="node">
-<title>node53</title>
-<polygon fill="white" stroke="black" points="3743.5,-1269.5 3743.5,-1345.5 3912.5,-1345.5 3912.5,-1269.5 3743.5,-1269.5"/>
-<text text-anchor="middle" x="3828" y="-1330.3" font-family="Times,serif" font-size="14.00">TableFieldAnnotation</text>
-<polyline fill="none" stroke="black" points="3743.5,-1322.5 3912.5,-1322.5 "/>
-<text text-anchor="start" x="3751.5" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; TableField</text>
-<text text-anchor="start" x="3751.5" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; Foreign_Key</text>
-<text text-anchor="start" x="3751.5" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; Annotation</text>
-</g>
-<!-- node65 -->
-<g id="node68" class="node">
-<title>node65</title>
-<polygon fill="white" stroke="black" points="3619,-1269.5 3619,-1345.5 3725,-1345.5 3725,-1269.5 3619,-1269.5"/>
-<text text-anchor="middle" x="3672" y="-1330.3" font-family="Times,serif" font-size="14.00">role</text>
-<polyline fill="none" stroke="black" points="3619,-1322.5 3725,-1322.5 "/>
-<text text-anchor="start" x="3627" y="-1307.3" font-family="Times,serif" font-size="14.00">&#45; the_id</text>
-<text text-anchor="start" x="3627" y="-1292.3" font-family="Times,serif" font-size="14.00">&#45; name</text>
-<text text-anchor="start" x="3627" y="-1277.3" font-family="Times,serif" font-size="14.00">&#45; description</text>
-</g>
-<!-- node66 -->
-<g id="node69" class="node">
-<title>node66</title>
-<polygon fill="white" stroke="black" points="3503,-1277 3503,-1338 3601,-1338 3601,-1277 3503,-1277"/>
-<text text-anchor="middle" x="3552" y="-1322.8" font-family="Times,serif" font-size="14.00">roles_users</text>
-<polyline fill="none" stroke="black" points="3503,-1315 3601,-1315 "/>
-<text text-anchor="start" x="3511" y="-1299.8" font-family="Times,serif" font-size="14.00">&#45; user_id</text>
-<text text-anchor="start" x="3511" y="-1284.8" font-family="Times,serif" font-size="14.00">&#45; role_id</text>
-</g>
-</g>
-</svg>
diff --git a/sql/update/json_diff_update.sql b/sql/update/json_diff_update.sql
new file mode 100644
index 0000000..e18b285
--- /dev/null
+++ b/sql/update/json_diff_update.sql
@@ -0,0 +1,22 @@
+-- metadata_audit.sql ---
+
+-- Copyright (C) 2021 Bonface Munyoki K. <me@bonfacemunyoki.com>
+
+-- Author: Bonface Munyoki K. <me@bonfacemunyoki.com>
+
+-- This program is free software; you can redistribute it and/or
+-- modify it under the terms of the GNU General Public License
+-- as published by the Free Software Foundation; either version 3
+-- of the License, or (at your option) any later version.
+
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-- Update the json_diff_data column to TEXT
+ALTER TABLE metadata_audit
+MODIFY json_diff_data TEXT NOT NULL;
diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py
new file mode 100644
index 0000000..be927a4
--- /dev/null
+++ b/tests/integration/conftest.py
@@ -0,0 +1,24 @@
+"""Module that holds fixtures for integration tests"""
+import pytest
+
+from gn3.app import create_app
+from gn3.db_utils import database_connector
+
+@pytest.fixture(scope="session")
+def client():
+ """Create a test client fixture for tests"""
+ # Do some setup
+ app = create_app()
+ app.config.update({"TESTING": True})
+ app.testing = True
+ yield app.test_client()
+ # Do some teardown/cleanup
+
+
+@pytest.fixture
+def db_conn():
+ """Create a db connection fixture for tests"""
+ ## Update this to use temp db once that is in place
+ conn = database_connector()
+ yield conn
+ conn.close()
diff --git a/tests/integration/test_correlation.py b/tests/integration/test_correlation.py
index bdd9bce..d52ab01 100644
--- a/tests/integration/test_correlation.py
+++ b/tests/integration/test_correlation.py
@@ -1,6 +1,7 @@
"""module contains integration tests for correlation"""
from unittest import TestCase
from unittest import mock
+import pytest
from gn3.app import create_app
@@ -10,6 +11,7 @@ class CorrelationIntegrationTest(TestCase):
def setUp(self):
self.app = create_app().test_client()
+ @pytest.mark.integration_test
@mock.patch("gn3.api.correlation.compute_all_sample_correlation")
def test_sample_r_correlation(self, mock_compute_samples):
"""Test /api/correlation/sample_r/{method}"""
@@ -61,6 +63,7 @@ class CorrelationIntegrationTest(TestCase):
self.assertEqual(response.status_code, 200)
self.assertEqual(response.get_json(), api_response)
+ @pytest.mark.integration_test
@mock.patch("gn3.api.correlation.compute_all_lit_correlation")
@mock.patch("gn3.api.correlation.database_connector")
def test_lit_correlation(self, database_connector, mock_compute_corr):
@@ -68,7 +71,9 @@ class CorrelationIntegrationTest(TestCase):
mock_compute_corr.return_value = []
- database_connector.return_value = (mock.Mock(), mock.Mock())
+ database_connector.return_value = mock.Mock()
+ database_connector.return_value.__enter__ = mock.Mock()
+ database_connector.return_value.__exit__ = mock.Mock()
post_data = {"1426678_at": "68031",
"1426679_at": "68036",
@@ -80,6 +85,7 @@ class CorrelationIntegrationTest(TestCase):
self.assertEqual(mock_compute_corr.call_count, 1)
self.assertEqual(response.status_code, 200)
+ @pytest.mark.integration_test
@mock.patch("gn3.api.correlation.compute_tissue_correlation")
def test_tissue_correlation(self, mock_tissue_corr):
"""Test api/correlation/tissue_corr/{corr_method}"""
diff --git a/tests/integration/test_gemma.py b/tests/integration/test_gemma.py
index f871173..0515539 100644
--- a/tests/integration/test_gemma.py
+++ b/tests/integration/test_gemma.py
@@ -7,6 +7,8 @@ from dataclasses import dataclass
from typing import Callable
from unittest import mock
+import pytest
+
from gn3.app import create_app
@@ -30,6 +32,7 @@ class GemmaAPITest(unittest.TestCase):
"TMPDIR": "/tmp"
}).test_client()
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.run_cmd")
def test_get_version(self, mock_run_cmd):
"""Test that the correct response is returned"""
@@ -38,6 +41,7 @@ class GemmaAPITest(unittest.TestCase):
self.assertEqual(response.get_json(), {"status": 0, "output": "v1.9"})
self.assertEqual(response.status_code, 200)
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.redis.Redis")
def test_check_cmd_status(self, mock_redis):
"""Test that you can check the status of a given command"""
@@ -52,6 +56,7 @@ class GemmaAPITest(unittest.TestCase):
name="cmd::2021-02-1217-3224-3224-1234", key="status")
self.assertEqual(response.get_json(), {"status": "test"})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -94,6 +99,7 @@ class GemmaAPITest(unittest.TestCase):
"unique_id": "my-unique-id"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -137,6 +143,7 @@ class GemmaAPITest(unittest.TestCase):
"unique_id": "my-unique-id"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -187,6 +194,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -240,6 +248,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -292,6 +301,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -346,6 +356,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -401,6 +412,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -465,6 +477,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
@@ -530,6 +543,7 @@ class GemmaAPITest(unittest.TestCase):
"output_file": "hash-output.json"
})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.gemma.queue_cmd")
@mock.patch("gn3.computations.gemma.get_hash_of_files")
@mock.patch("gn3.api.gemma.jsonfile_to_dict")
diff --git a/tests/integration/test_general.py b/tests/integration/test_general.py
index 8fc2b43..9d87449 100644
--- a/tests/integration/test_general.py
+++ b/tests/integration/test_general.py
@@ -1,8 +1,10 @@
"""Integration tests for some 'general' API endpoints"""
import os
import unittest
-
from unittest import mock
+
+import pytest
+
from gn3.app import create_app
@@ -11,6 +13,7 @@ class GeneralAPITest(unittest.TestCase):
def setUp(self):
self.app = create_app().test_client()
+ @pytest.mark.integration_test
def test_metadata_endpoint_exists(self):
"""Test that /metadata/upload exists"""
response = self.app.post("/api/metadata/upload/d41d86-e4ceEo")
@@ -19,6 +22,7 @@ class GeneralAPITest(unittest.TestCase):
{"status": 128,
"error": "Please provide a file!"})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.general.extract_uploaded_file")
def test_metadata_file_upload(self, mock_extract_upload):
"""Test correct upload of file"""
@@ -37,6 +41,7 @@ class GeneralAPITest(unittest.TestCase):
{"status": 0,
"token": "d41d86-e4ceEo"})
+ @pytest.mark.integration_test
def test_metadata_file_wrong_upload(self):
"""Test that incorrect upload return correct status code"""
response = self.app.post("/api/metadata/upload/d41d86-e4ceEo",
@@ -47,6 +52,7 @@ class GeneralAPITest(unittest.TestCase):
{"status": 128,
"error": "gzip failed to unpack file"})
+ @pytest.mark.integration_test
@mock.patch("gn3.api.general.run_cmd")
def test_run_r_qtl(self, mock_run_cmd):
"""Test correct upload of file"""
diff --git a/tests/integration/test_partial_correlations.py b/tests/integration/test_partial_correlations.py
new file mode 100644
index 0000000..4bf352a
--- /dev/null
+++ b/tests/integration/test_partial_correlations.py
@@ -0,0 +1,225 @@
+"""Test partial correlations"""
+from unittest import mock
+
+import pytest
+
+from gn3.computations.partial_correlations import partial_correlations_entry
+
+@pytest.mark.integration_test
+@pytest.mark.parametrize(
+ "post_data", (
+ None, {}, {
+ "primary_trait": None,
+ "control_traits": None,
+ "method": None,
+ "target_db": None
+ }, {
+ "primary_trait": None,
+ "control_traits": None,
+ "method": None,
+ "target_db": "a_db"
+ }, {
+ "primary_trait": None,
+ "control_traits": None,
+ "method": "a_method",
+ "target_db": None
+ }, {
+ "primary_trait": None,
+ "control_traits": None,
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {
+ "primary_trait": None,
+ "control_traits": ["a_trait", "another"],
+ "method": None,
+ "target_db": None
+ }, {
+ "primary_trait": None,
+ "control_traits": ["a_trait", "another"],
+ "method": None,
+ "target_db": "a_db"
+ }, {
+ "primary_trait": None,
+ "control_traits": ["a_trait", "another"],
+ "method": "a_method",
+ "target_db": None
+ }, {
+ "primary_trait": None,
+ "control_traits": ["a_trait", "another"],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": None,
+ "method": None,
+ "target_db": None
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": None,
+ "method": None,
+ "target_db": "a_db"
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": None,
+ "method": "a_method",
+ "target_db": None
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": None,
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": ["a_trait", "another"],
+ "method": None,
+ "target_db": None
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": ["a_trait", "another"],
+ "method": None,
+ "target_db": "a_db"
+ }, {
+ "primary_trait": "a_trait",
+ "control_traits": ["a_trait", "another"],
+ "method": "a_method",
+ "target_db": None
+ }))
+def test_partial_correlation_api_with_missing_request_data(client, post_data):
+ """
+ Test /api/correlations/partial endpoint with various expected request data
+ missing.
+ """
+ response = client.post("/api/correlation/partial", json=post_data)
+ assert (
+ response.status_code == 400 and response.is_json and
+ response.json.get("status") == "error")
+
+@pytest.mark.integration_test
+@pytest.mark.slow
+@pytest.mark.parametrize(
+ "post_data",
+ ({# ProbeSet
+ "primary_trait": {"dataset": "a_dataset", "trait_name": "a_name"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {# Publish
+ "primary_trait": {
+ "dataset": "a_Publish_dataset", "trait_name": "a_name"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {# Geno
+ "primary_trait": {"dataset": "a_Geno_dataset", "trait_name": "a_name"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {# Temp
+ "primary_trait": {"dataset": "a_Temp_dataset", "trait_name": "a_name"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }))
+def test_partial_correlation_api_with_non_existent_primary_traits(
+ client, post_data, mocker):
+ """
+ Check that the system responds appropriately in the case where the user
+ makes a request with a non-existent primary trait.
+ """
+ mocker.patch("gn3.api.correlation.redis.Redis", mock.MagicMock())
+ response = client.post("/api/correlation/partial", json=post_data)
+ assert (
+ response.status_code == 200 and response.is_json and
+ response.json.get("status") == "success")
+
+@pytest.mark.integration_test
+@pytest.mark.slow
+@pytest.mark.parametrize(
+ "post_data",
+ ({# ProbeSet
+ "primary_trait": {
+ "dataset": "UCLA_BXDBXH_CARTILAGE_V2",
+ "trait_name": "ILM103710672"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {# Publish
+ "primary_trait": {"dataset": "BXDPublish", "trait_name": "BXD_12557"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }, {# Geno
+ "primary_trait": {"dataset": "AKXDGeno", "trait_name": "D4Mit16"},
+ "control_traits": [
+ {"dataset": "a_dataset", "trait_name": "a_name"},
+ {"dataset": "a_dataset2", "trait_name": "a_name2"}],
+ "method": "a_method",
+ "target_db": "a_db"
+ }
+ # Temp -- the data in the database for these is ephemeral, making it
+ # difficult to test for this
+ ))
+def test_partial_correlation_api_with_non_existent_control_traits(client, post_data, mocker):
+ """
+ Check that the system responds appropriately in the case where the user
+ makes a request with a non-existent control traits.
+
+ The code repetition here is on purpose - valuing clarity over succinctness.
+ """
+ mocker.patch("gn3.api.correlation.redis.Redis", mock.MagicMock())
+ response = client.post("/api/correlation/partial", json=post_data)
+ assert (
+ response.status_code == 200 and response.is_json and
+ response.json.get("status") == "success")
+
+@pytest.mark.integration_test
+@pytest.mark.slow
+@pytest.mark.parametrize(
+ "primary,controls,method,target", (
+ (# Probeset
+ "UCLA_BXDBXH_CARTILAGE_V2::ILM103710672", (
+ "UCLA_BXDBXH_CARTILAGE_V2::nonExisting01",
+ "UCLA_BXDBXH_CARTILAGE_V2::nonExisting02",
+ "UCLA_BXDBXH_CARTILAGE_V2::ILM380019"),
+ "Genetic Correlation, Pearson's r", "BXDPublish"),
+ (# Publish
+ "BXDPublish::17937", (
+ "BXDPublish::17940",
+ "BXDPublish::nonExisting03"),
+ "Genetic Correlation, Spearman's rho", "BXDPublish"),
+ (# Geno
+ "AKXDGeno::D4Mit16", (
+ "AKXDGeno::D1Mit170",
+ "AKXDGeno::nonExisting04",
+ "AKXDGeno::D1Mit135",
+ "AKXDGeno::nonExisting05",
+ "AKXDGeno::nonExisting06"),
+ "SGO Literature Correlation", "BXDPublish")
+ )
+ # Temp -- the data in the database for these is ephemeral, making it
+ # difficult to test for these without a temp database with the temp
+ # traits data set to something we are in control of
+ )
+
+def test_part_corr_api_with_mix_of_existing_and_non_existing_control_traits(
+ db_conn, primary, controls, method, target):
+ """
+ Check that calling the function with a mix of existing and missing control
+ traits raises an warning.
+ """
+ criteria = 10
+ with pytest.warns(UserWarning):
+ partial_correlations_entry(
+ db_conn, primary, controls, method, criteria, target)
diff --git a/tests/integration/test_wgcna.py b/tests/integration/test_wgcna.py
index 078449d..5880b40 100644
--- a/tests/integration/test_wgcna.py
+++ b/tests/integration/test_wgcna.py
@@ -3,6 +3,8 @@
from unittest import TestCase
from unittest import mock
+import pytest
+
from gn3.app import create_app
@@ -12,6 +14,7 @@ class WgcnaIntegrationTest(TestCase):
def setUp(self):
self.app = create_app().test_client()
+ @pytest.mark.integration_test
@mock.patch("gn3.api.wgcna.call_wgcna_script")
def test_wgcna_endpoint(self, mock_wgcna_script):
"""test /api/wgcna/run_wgcna endpoint"""
diff --git a/tests/performance/perf_query.py b/tests/performance/perf_query.py
index 12cb944..e534e9b 100644
--- a/tests/performance/perf_query.py
+++ b/tests/performance/perf_query.py
@@ -28,21 +28,19 @@ def timer(func):
def query_executor(query: str,
fetch_all: bool = True):
"""function to execute a query"""
- conn, _ = database_connector()
+ with database_connector() as conn:
+ with conn.cursor() as cursor:
+ cursor.execute(query)
- with conn:
- cursor = conn.cursor()
- cursor.execute(query)
-
- if fetch_all:
- return cursor.fetchall()
- return cursor.fetchone()
+ if fetch_all:
+ return cursor.fetchall()
+ return cursor.fetchone()
def fetch_probeset_query(dataset_name: str):
"""contains queries for datasets"""
- query = """SELECT * from ProbeSetData
+ query = f"""SELECT * from ProbeSetData
where StrainID in (4, 5, 6, 7, 8, 9, 10, 11, 12,
14, 15, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28,
29, 30, 31, 35, 36, 37, 39, 98, 99, 100, 103,
@@ -53,8 +51,8 @@ def fetch_probeset_query(dataset_name: str):
and id in (SELECT ProbeSetXRef.DataId
FROM (ProbeSet, ProbeSetXRef, ProbeSetFreeze)
WHERE ProbeSetXRef.ProbeSetFreezeId = ProbeSetFreeze.Id
- and ProbeSetFreeze.Name = '{}'
- and ProbeSet.Id = ProbeSetXRef.ProbeSetId)""".format(dataset_name)
+ and ProbeSetFreeze.Name = '{dataset_name}'
+ and ProbeSet.Id = ProbeSetXRef.ProbeSetId)"""
return query
diff --git a/tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.txt b/tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.txt
new file mode 100644
index 0000000..6254902
--- /dev/null
+++ b/tests/unit/computations/partial_correlations_test_data/pcor_rec_blackbox_test.txt
@@ -0,0 +1,1009 @@
+------------------------------------------------------------
+function_name: pcor.rec
+count: 18
+x: 27.0465861540288, 85.84661539644, 23.6260315869004, -6.64654695428908, 66.0871273837984, -74.3310157675296, -7.09130000323057, -11.6802562493831, 24.9050020240247, -22.3750857636333, 68.0144839920104, 16.7857648339123, -26.3561313506216, 57.9470653086901, -9.12516843527555, -36.0829488374293, 68.283180333674, -83.6802623700351
+y: 12.4649536795914, -20.5139847937971, -33.6048585828394, 19.9723906349391, 35.5448212940246, 31.2940447591245, -14.5105968695134, 79.1401757858694, -13.6585284024477, -57.8275624662638, -81.5757951233536, -34.5542138442397, 99.8554266057909, 31.5982210449874, 36.1663243733346, 7.66049646772444, -49.2159572429955, 87.6347878947854
+z: -45.889978017658, 50.1325799152255, -25.5673226900399, 87.3435476794839, -98.9604395348579, -45.4698990099132, 13.7257359456271, -81.9015400484204, 53.4290503710508, 9.70146018080413, 80.2283481229097, 76.1991834267974, 73.4845123719424, 28.7944686599076, -57.0716312620789, -62.2007157187909, -95.3627366572618, -57.3240759316832
+method: s
+rm: FALSE
+result: -0.458362369707244
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: 21.083299908787, -98.2076421380043, -45.41100054048, 33.6558640468866, 33.8769129477441, 90.4809392523021, -83.2292538136244, -53.039117064327, -26.2141453567892, -40.8924567047507, -13.2970791775733
+y: -71.2343545164913, -33.0757538322359, -30.886987876147, -62.0309396646917, -46.2347051594406, -45.9761362057179, 16.1026658024639, -30.2154338918626, 10.4190110228956, -6.23724199831486, -19.9442820157856
+method: k
+rm: TRUE
+result: -0.158592651153528
+input.z.1: -69.6558590978384, 76.5958794392645, -74.462781380862, -55.6329038925469, -34.0182736050338, -81.8313004914671, 80.8752333279699, 73.2946038711816, -49.8568836599588, 12.4631694052368, 71.3077447377145
+input.z.2: -55.6238626595587, 71.5313264168799, 49.0649917162955, -96.4836423750967, 31.4231107011437, 98.5001483000815, -60.020112991333, 5.04361470229924, -21.7608422972262, 3.66116226650774, 37.4486085027456
+input.z.3: -9.95428394526243, -51.5089114196599, -84.7546851728112, 90.5390536878258, -12.833157973364, 21.4086377061903, 59.5765900798142, -57.5253647286445, 35.5521977413446, -55.1964603364468, -82.078071590513
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: -25.1664641778916, -56.7158963531256, 98.2197014149278, -39.1562284901738, 69.8500068392605, -98.8793865777552, 64.3333005718887, 2.49145850539207, -13.4482780471444, 15.8296941313893, -14.4610319286585, 8.14920198172331, 26.8839774187654, -94.38610766083, 73.5400937031955, -41.284476686269, -72.5798789411783, -45.4698437359184, -94.7900563944131
+y: 73.5157749149948, 69.8058058042079, 38.3851455990225, -15.4582026414573, 39.7315986920148, 27.1629291586578, 66.9298667926341, 26.3044673483819, -62.2310540173203, 28.8334564771503, 4.62915268726647, -17.3412421252578, -62.9840137436986, 24.5139833539724, -64.8512890096754, 53.5849830601364, 84.3197864014655, 62.4854291789234, -33.11452944763
+z: -14.3098634667695, 66.4927227422595, 16.3307644892484, 6.14525671117008, -68.4833894949406, -96.6041945386678, 46.0874481592327, 64.1859616152942, 45.0831798370928, -51.5323319006711, 81.7438598722219, 57.8951288480312, 82.2177275083959, -95.4358763061464, -99.8694028239697, 66.1022247746587, -37.5455300789326, 57.4841354973614, 2.12362264283001
+method: s
+rm: FALSE
+result: -0.204204149462281
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: 42.9641991853714, -33.6526750586927, 64.5110571291298, -3.50967179983854, -62.1003251988441, 75.9439217858016, -40.5138825066388, 61.7869598791003, 65.514537319541, -32.6844135764986, 98.1214119587094
+y: -87.1564343106002, -31.8151163868606, -98.0668175034225, -48.0268982239068, -65.0074473116547, 29.7599448822439, -78.1958315055817, -98.9310230594128, -37.0073825120926, 99.8306283261627, -65.8631965983659
+method: k
+rm: FALSE
+result: -0.143621272076104
+input.z.1: -27.1912457421422, -84.1915388125926, -86.4654324017465, 0.588246434926987, 19.5371210109442, -89.7052477579564, -69.2373412195593, 37.7897844649851, 52.10354286246, 86.67849637568, -26.65113247931
+input.z.2: -6.18069735355675, -45.4417984467, 71.68323029764, 40.7072803471237, 30.662393476814, -58.0406312830746, 11.6332073230296, 83.1229616422206, -79.0208636317402, -44.603179441765, -41.5212479420006
+input.z.3: -5.77356708236039, 71.4390681125224, -48.5977551434189, -33.8404927402735, 46.5380611363798, -93.3157123159617, -0.389049109071493, -38.7082135304809, -4.53768568113446, -70.9879754111171, 68.8483240548521
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: 60.9317239839584, -31.2905447091907, 53.948915284127, -95.7576057408005, 35.007868334651, -85.5168207548559, 73.7568661570549, -20.455909660086, 10.8152956236154, 39.7627064492553, -44.756277743727, -71.251277718693, 99.0610776469111, 29.1336865630001, 53.8847446907312, 54.8433600459248
+y: -69.0110558643937, 74.3098065257072, -93.1558133102953, -48.1973732821643, 3.78763284534216, -45.7135255914181, 14.0458890702575, 57.1197693236172, -63.5192428249866, -80.8886671904474, -54.2279600631446, 79.5978177338839, -13.394229626283, -2.99848061986268, -82.9510015901178, -27.8741750866175
+z: -68.4228350874037, -11.2382180523127, -74.2924707010388, -91.1819029133767, -58.1376497633755, -70.0835255905986, -58.3644146099687, -73.0489106848836, 68.5998952481896, 60.6510613579303, 61.4266434684396, 40.6665476504713, 49.3221402168274, 56.9117167964578, -5.39970770478249, -69.6209676098078
+method: k
+rm: TRUE
+result: -0.200111203789521
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: 40.2440257836133, -46.3242933154106, 72.7708220481873, -36.3226366229355, -92.5043274182826, -13.0487341899425, -46.8136807903647, 55.9087499044836, 11.1851918045431, -41.1343066487461
+y: 44.3925043102354, 79.2225563433021, 12.92391307652, -94.4711372256279, 8.49277810193598, -37.1448263991624, 77.1530977915972, 67.4801368732005, -41.9478724244982, 72.7613130584359
+z: -2.98054488375783, -41.6941301431507, 65.8284252975136, 80.405295919627, 56.1443844810128, -67.8014985751361, -96.869227103889, -59.2089117504656, 45.6999542657286, 16.634497186169
+method: s
+rm: FALSE
+result: -0.20778140910639
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -93.3505594264716, -2.47896937653422, -97.1759914420545, -38.2430272176862, 99.4149339385331, 0.428299093618989, 90.4291214887053, -60.8191690873355, -17.9825736675411, -87.1595453470945, -36.4918932318687
+y: -5.86937200278044, 40.7252304255962, -82.1171450894326, 80.3501662798226, -27.133903093636, 40.9038231242448, 64.1522381454706, -94.5180553942919, -79.7904842533171, 49.5809083338827, -67.2030501067638
+method: k
+rm: FALSE
+result: -0.00415066820058267
+input.z.1: 54.7301535494626, 31.2304168008268, 92.258932441473, -77.6000469457358, -95.9519237745553, -67.8663256578147, 45.4026754945517, 76.5307268127799, -9.65234781615436, -50.799378240481, 19.5994042325765
+input.z.2: 89.8357455153018, -50.7813970558345, -44.0238927956671, 82.4097864795476, -35.6187962926924, -82.3095034342259, -57.0411204826087, 55.669168708846, 37.2431641444564, -7.40567096509039, -74.2486072704196
+input.z.3: -21.2622028309852, 2.9518733266741, 76.1393244378269, -73.8079617731273, -71.1744130123407, 37.7846655901521, -8.74427421949804, -4.20535416342318, 39.9581101723015, 8.55288412421942, 79.2008865159005
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: 55.8748798910528, 51.0572876781225, 82.5137235689908, 14.2397709656507, 2.99776284955442, 65.2987132780254, -59.7197342664003, -12.6050740480423, -46.4378262404352, 55.494225025177, 41.8674737215042, 82.1887638885528, -2.28542112745345
+y: 88.4641766548157, 27.435901388526, -79.5164803043008, -9.17457146570086, -38.7884174473584, -42.7281686104834, 29.9447605852038, 42.1490131877363, 6.86571071855724, -10.5507157277316, 34.6828168723732, -11.884824372828, -11.3106375560164
+z: -8.47988268360496, -62.9638673271984, 76.2596300803125, 72.5790326483548, -89.2584360204637, -62.1974066831172, -19.7280053514987, 25.6929714698344, -76.6775759402663, 28.7336804438382, 60.828927019611, -95.1663577463478, -59.2235392890871
+method: s
+rm: TRUE
+result: -0.486706898961164
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -0.0649684108793736, -9.12190317176282, -97.854143474251, -13.7245919555426, -98.3851981814951, -52.1242694463581, -80.3953207563609, -1.50988507084548, -67.9019027389586, 53.890549344942, 76.6144499648362, 94.333418738097, 42.1835497952998, -82.3511867318302
+y: -51.941104978323, 29.7715055756271, 96.8885408248752, -93.3864999562502, 71.9892789144069, 33.8113908655941, -73.2613898813725, -80.6048061698675, 74.224327551201, 57.013650611043, 9.70671167597175, 79.8423840198666, -69.2205078434199, 89.1150287352502
+z: 23.4675401821733, 84.267854411155, -51.1970835737884, -98.0038798414171, 47.583898389712, -48.8845239859074, -0.850127916783094, 7.31711369007826, 13.4415757842362, -57.4014388024807, -17.8407940082252, -40.6244638841599, -13.1918888073415, -63.6225790716708
+method: k
+rm: TRUE
+result: -0.202860566215319
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -61.3124287221581, 18.1583377532661, -58.751318231225, 14.6944977343082, 74.491372751072, 64.7918365430087, 88.5010475292802, 46.6877995524555, 32.0965091697872, 98.7485934048891, 22.8932307101786, -79.3458161875606, 29.175332095474, 85.9066780656576, 32.5589253101498
+y: 74.3193860165775, -1.54028623364866, 14.3234346993268, 22.6996371522546, 34.6773494500667, 68.9461726229638, -70.669891545549, 6.67718132026494, -70.8217049948871, -96.8078156001866, 98.5030621755868, 35.5320736765862, 1.35495862923563, -66.8200423009694, 87.3174419160932
+method: k
+rm: TRUE
+result: -0.403444240007549
+input.z.1: 63.1398477125913, -93.6047930736095, -82.9460870008916, 17.1801930759102, -56.8764031399041, 14.5227553322911, 67.7316694986075, -36.5888524800539, -6.70271222479641, -87.9417958203703, 96.0809137206525, -18.8335922546685, 13.2128197699785, -32.5581130571663, -90.6071182340384
+input.z.2: 88.5960716288537, -13.0231159739196, 66.9877568725497, 57.8428873792291, -19.4016022607684, -33.0764503218234, 68.1236225645989, -33.8005813304335, -32.7262029517442, 90.8223036210984, 58.4868327714503, -76.5773380175233, -0.575498351827264, 42.7307121455669, -62.9820253234357
+input.z.3: -65.5557164456695, 34.7501182928681, -11.9676230940968, -55.2262251731008, -36.8215633556247, -68.8912406563759, -60.3880607523024, -8.90412745065987, 76.2590947095305, -98.0812083929777, -22.7019656449556, 54.0401803329587, -31.2883075326681, -94.085031747818, 26.6006113030016
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -66.0635123960674, -67.4732076469809, 42.8204931784421, 83.9072343893349, 64.1622506547719, -31.2235444784164, 45.2104966156185, -77.7350789867342, -41.6209270711988, 77.8038220480084, 4.94705736637115, -47.8676947765052, -40.3655698057264, 87.1949778869748, 59.282084601
+y: -44.0877958200872, 43.1024875491858, 29.3431533966213, 54.0742883924395, 30.3691518027335, -71.8555608764291, 62.1317124925554, 8.58862511813641, 7.24410070106387, 83.5120551753789, -63.7099585030228, -96.2103466968983, -49.2979577742517, 83.7898887228221, 35.5132043361664
+method: k
+rm: TRUE
+result: 0.384008728398402
+input.z.1: -4.6655245590955, 70.4251590184867, -80.6666431482881, 85.5599484872073, -4.1441548615694, 77.3068489506841, 65.8226968720555, 94.5305422879755, -63.2336198817939, 86.3333691377193, 79.903667466715, 51.2524782679975, 99.025963479653, -75.7371618878096, -61.1681820824742
+input.z.2: -2.65423716045916, -78.2148709055036, 98.3434916473925, -22.4563017021865, 12.9930391907692, 53.0512262135744, -38.8523698784411, -54.1274403687567, 57.2192461229861, -85.3108969051391, 36.1713513266295, 52.4544527288526, 62.3474055435508, -82.7991028316319, -48.1557835824788
+input.z.3: 71.8588098417968, -7.05220480449498, 69.235354475677, -38.4673862252384, 53.1879930756986, 74.1162660066038, -33.3680822513998, 66.3322701584548, -36.8293787818402, -77.0495353732258, -31.3548975624144, -38.8354785274714, -59.7352970857173, -33.5001980420202, -52.4871282279491
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: -78.5274708177894, 54.6583318617195, -10.7358992099762, -45.4171522054821, 25.4497814457864, -64.0730748418719, 68.9721046481282, -49.2593355942518, -29.5779021456838, -52.45715030469, 16.8660826049745, 97.6588599383831, -60.2859176229686
+y: 48.7125545274466, -86.9950996246189, -88.7554660905153, 91.8915181886405, -77.034616516903, 88.2693362422287, 58.6634032428265, 14.3693041522056, -41.9572623912245, -49.6693043969572, 97.597514744848, -14.9741226341575, 99.4055413641036
+method: s
+rm: TRUE
+result: -0.22769505950471
+input.z.1: -71.1109426803887, 15.6759196892381, 94.438049569726, -37.2807722073048, 39.3087625037879, 15.7282522879541, 79.2091070208699, -16.5951025206596, 56.8437909707427, -48.6758518964052, -93.334536626935, 41.8724854942411, 89.190365979448
+input.z.2: -0.60031795874238, 44.824774377048, -81.4030232839286, -95.4328638501465, -5.63060604035854, -11.984769301489, 71.3819028344005, 82.8589734155685, -12.7086061518639, -16.8309166561812, -26.7068251501769, 43.9979130867869, -56.4366859849542
+input.z.3: -16.3842175621539, -8.85082990862429, -95.985221164301, -73.4366697724909, -28.4655119758099, -52.8220290318131, -61.4263267721981, 64.5336702931672, -39.0190409030765, -1.5689545776695, 11.0946391709149, 56.4090613275766, -60.4540335014462
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -65.7591099850833, 80.7566788513213, 88.1564508192241, -48.9770147949457, -55.7247276883572, -57.5253066141158, -83.2564804237336, 57.4012059252709, 35.2928108070046, -72.2103993408382, -63.602004526183, -56.8528092466295, -36.7954559158534, -51.8933654297143, 62.31161900796, 39.0559389255941
+y: -29.5054595451802, 78.5674630198628, 57.8101953491569, -23.3210172038525, 68.2822681497782, -56.1916985549033, 69.3101673386991, -23.5763778910041, 42.4868553876877, -80.7561526075006, 53.3658074680716, -46.6725745704025, -48.636918887496, 77.6377590373158, -98.6770060379058, 69.6450849529356
+method: p
+rm: FALSE
+result: 0.286445562770149
+input.z.1: -80.6849138811231, -90.7679206226021, 7.13438023813069, -86.4396455232054, -16.7458149138838, -51.5618403907865, 46.1916353553534, 63.4878667071462, -98.7970676738769, -86.5430972073227, -52.745211077854, -87.5790499150753, 4.79577607475221, 2.6803994551301, 10.9007480088621, -45.8506872877479
+input.z.2: 8.42293403111398, -80.3381159901619, -15.9135971218348, 89.8643282707781, 90.3070626314729, 12.7958082128316, 97.4500481039286, -59.7645458299667, -50.2175740431994, -33.6365795694292, -37.7593765966594, -59.8080027848482, 14.1750884708017, 84.0673042926937, 2.86107184365392, -15.2980412356555
+input.z.3: 18.416645983234, 8.72256266884506, -27.135418029502, 66.9198032002896, 11.7570180911571, -81.8186190910637, 55.6397127918899, -42.1071819029748, -27.3977108299732, 87.2775603551418, -31.7873003892601, -0.830735079944134, 14.7588836960495, 24.6488864067942, -4.1443657130003, -22.5756781641394
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: 72.941006347537, 88.5350834578276, -61.3946152850986, -94.1264885943383, -59.6083014272153, 0.0383354723453522, 38.962951535359, -33.1267971079797, -14.1101143322885, 11.0402037389576, 66.5075759869069, -39.2349756322801, 1.62258669734001, 63.6307552922517, -53.3561239019036, -57.0986500941217, 63.9509742613882, 69.1873391158879, 92.4651104025543
+y: 68.2863459456712, 32.8301987610757, -12.0631097815931, -77.5489529129118, -9.26943984813988, -53.196216467768, 99.207640811801, 45.8405578043312, 70.8663184195757, 2.17023831792176, -30.1671982742846, -87.5547814648598, 53.4424650482833, 91.9836340006441, 14.094074908644, -81.96129957214, -66.6266257409006, 26.5053286217153, 88.7426108587533
+z: 26.3681552372873, 45.7198408432305, 68.2894596364349, -66.7965121567249, -8.64458661526442, 40.5387890059501, 24.7470463160425, -55.4631956387311, 43.0947626940906, 40.5702913645655, -94.7409357409924, 80.7332515716553, 98.3253448270261, 38.5890654288232, -92.7877118811011, -41.1318491213024, 68.1029357016087, 81.3247045036405, -64.87777819857
+method: k
+rm: TRUE
+result: 0.370885040886946
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 47.7815555874258, 0.757466396316886, -78.5694096237421, -10.5338782072067, 6.84339161962271, -12.5417194329202, -79.6884837560356, -50.4556390456855, -18.0644971318543, -43.5523690190166, -31.3758133444935, -64.514737483114, -35.6566301546991, 24.6359940152615, -52.1337051875889, -81.0267004650086, 9.79939419776201
+y: 9.00454632937908, -92.5409240182489, 82.6424018014222, 37.390052061528, 39.1525054816157, -32.2375071700662, 33.1057799514383, 60.8027548994869, 49.1245619021356, -1.29677709192038, 59.6215286292136, -5.71877667680383, -64.2789027653635, 7.67776034772396, -85.6839925516397, 87.0561090763658, 53.9691422134638
+z: 94.1489060875028, 5.35360146313906, -45.0954835861921, 13.4744525421411, 70.4065824393183, -37.5215549487621, -53.9351030252874, -95.9617306943983, 95.8626475185156, 56.3450652174652, -78.2765238545835, 49.8751151841134, -40.399710368365, 70.9471312351525, 67.7706296090037, -44.7566135320812, 18.9933343790472
+method: s
+rm: TRUE
+result: -0.0307253503097024
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 77.0224547944963, -7.21212634816766, 94.6494690608233, -19.8536953888834, 60.6895769014955, -18.8230661675334, 46.6576409060508, 20.9713363554329, 29.2338462080806, 81.9798021577299, -46.1181710008532, 57.9514958895743, -10.7711394317448, 47.9182483628392, 60.8951596543193
+y: 71.0176297463477, -19.332714471966, 3.20451441220939, 63.0101921502501, 18.177311681211, 18.1690010707825, 12.173681287095, 10.6716933194548, -85.9119288157672, -7.69144585356116, -95.4866513609886, 53.3560248091817, -56.3376172445714, 98.2990854419768, 34.0318501461297
+method: k
+rm: TRUE
+result: 0.215514678797688
+input.z.1: 75.5163984373212, 97.6738740224391, -16.5575933642685, -35.9448304865509, 30.2785072475672, -4.58882753737271, 19.8265417013317, -68.4901964850724, 84.9371602758765, -71.9693731982261, -56.5736060962081, -36.8734282441437, 19.3909254390746, 86.3937048241496, -90.9074582159519
+input.z.2: -82.2815494611859, -62.3412929475307, -75.7495530415326, -85.9084845986217, 38.5769664309919, -14.2082320991904, 51.2620362918824, -27.3738067597151, -52.3408399429172, -0.0353863462805748, 52.8306930325925, 47.6732281967998, 40.0251228827983, 10.1307895034552, 81.8184955511242
+input.z.3: -24.4488768745214, 88.5539114940912, -76.0014849714935, -20.0668734498322, -17.3311269376427, 53.2966234721243, 28.3089226577431, -10.4635909199715, 3.67960454896092, 54.5719591900706, -79.4869703240693, -76.6309262719005, 41.3653851021081, -68.3333130553365, 86.5088677499443
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -17.6799289416522, 49.4767578784376, 69.4365380797535, 62.0824650395662, -14.5133852958679, 92.8273646626621, -35.5502421967685, 26.3818026985973, -47.6345511619002, -81.7291165236384, 90.68892756477, 87.9910979419947, -96.1814912967384, 34.966702433303, 44.7223367169499
+y: 77.5102899409831, 71.6682025231421, 30.0063323695213, 30.9808460995555, 16.6262952145189, 80.4908129386604, -92.2186760231853, 54.273960320279, 7.27685410529375, -20.4685146920383, -50.272509874776, 27.1341995336115, 15.8458969090134, -98.8356848247349, -37.4736201483756
+method: p
+rm: TRUE
+result: -0.0604063399963708
+input.z.1: 62.3108414001763, -12.2461723163724, -45.8216614555568, 91.8788344599307, 91.6252538561821, -0.413994630798697, 90.2596836909652, 56.2185476068407, 91.5859371889383, -15.2596113737673, -43.3501244522631, -68.923271773383, -19.7409045416862, -86.2786957528442, -89.9489548057318
+input.z.2: -22.556777484715, -5.61479208990932, -47.4028566852212, 30.8866687119007, -16.6167206130922, 0.758961960673332, -97.7107268758118, 49.8969595879316, 5.41947395540774, 76.3401997741312, 38.9869387727231, -69.9544305447489, -62.7304617781192, -28.9641594514251, -98.7272569909692
+input.z.3: 96.6044981963933, 1.57265784218907, 45.9907903335989, -3.32801463082433, 96.9419070053846, 54.3271706439555, -27.2647544741631, 68.1218984071165, -35.9079149086028, -80.5656238924712, 19.4677114021033, 61.2382191233337, -17.1889714431018, -66.9516512192786, -77.3835943546146
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -71.562309935689, 61.2971490249038, -67.2613488975912, -67.605738947168, -44.75500555709, -27.0675545092672, 6.42645112238824, 34.9141472950578, -70.4944793600589, -65.8430821727961
+y: -97.3966186866164, 30.0345255527645, 1.98479322716594, 35.255804983899, 97.4348559975624, 51.2336597312242, 37.0358873624355, -43.8290268182755, 73.1889605987817, -83.4334774874151
+method: k
+rm: FALSE
+result: 0.101975707913878
+input.z.1: 96.5124187991023, 59.7589443437755, -28.1401800457388, -48.1452223844826, -69.1250930074602, -1.13946236670017, -33.8115575257689, 92.0685294549912, -65.9486766438931, -50.8275568950921
+input.z.2: 0.635389657691121, -48.1256590690464, -73.9453377667814, 36.4519818220288, 14.4354915246367, -30.946854641661, 75.4334991797805, -78.7696894258261, -84.3629696406424, -68.5122138820589
+input.z.3: -42.2178110573441, -84.9118709564209, 10.6240403372794, 47.0018105581403, 76.3429581187665, -98.3215926680714, 23.1543749570847, -66.7542746756226, 51.0812507942319, 51.7371312715113
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 37.3612422030419, -62.2976862825453, -20.3225356992334, 35.1625409442931, 7.00941164977849, 10.8022364787757, 85.6041926890612, 2.7432450093329, 55.2531471475959, -46.698701241985, -32.8795406967402, 56.1582171358168, -53.7892970722169, -29.8783036880195, 5.5769944563508
+y: 84.9823753815144, 20.0704097282141, -57.9668726306409, 80.5891362018883, -93.7707980629057, 82.1314251981676, 30.4476763121784, 64.8252506740391, 2.73968982510269, 56.2543767504394, -51.3445142190903, 1.49674671702087, 76.8511690199375, -92.6638629753143, 9.00869187898934
+z: 35.5673008598387, 21.8645379412919, -19.9136686045676, 17.4843213986605, -32.0220090914518, -98.673325125128, -53.7705447990447, -30.4427234455943, -88.6013784445822, 49.2624955251813, 47.7439268957824, -80.527631752193, -21.2106753140688, 95.8693802822381, 55.6788475718349
+method: k
+rm: FALSE
+result: 0.0376521663149937
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -12.6099046785384, 62.9503787495196, -41.7074305936694, 57.2416189592332, -14.5429391879588, -21.0340389516205, -75.441445922479, -53.8398617412895, 50.1939499285072, 80.4451046511531, 7.77875101193786
+y: -91.1863091867417, -45.6564084161073, 18.2509679812938, 12.5384614802897, -87.7081437502056, -59.8072885535657, 38.1740126293153, -90.6736130360514, -80.6179660372436, 67.7958796266466, -48.2190220616758
+method: k
+rm: FALSE
+result: 0.00487774919045338
+input.z.1: 82.2277778759599, -71.9359886832535, -81.6467982716858, 87.6012657303363, 66.7304196860641, 15.4578864574432, 82.6261980924755, 79.0331508498639, 11.5147780161351, -38.4340744931251, -51.4472227077931
+input.z.2: 61.85322124511, -16.4658469613642, -17.9835374001414, 36.6121453233063, -53.3555198460817, 95.8382083568722, 87.7777935471386, 31.6483219154179, 8.8566864375025, -72.558317007497, 6.72606155276299
+input.z.3: 1.57859744504094, 96.2870470248163, 78.9755351375788, -5.87459797970951, -89.8536934517324, 99.9234729912132, -11.5885237697512, -94.2207021638751, -19.373999722302, 74.6413060463965, -58.9515981264412
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -26.585637498647, 76.3977353926748, 22.9591794777662, -57.9062177799642, -97.8634255006909, 9.66014945879579, 94.0443340688944, 76.1497691739351, -19.7134216316044, 2.45499121956527
+y: -18.0846814997494, -19.364173989743, -96.0522200912237, 87.5091985799372, -64.7892713081092, -90.5939534306526, -65.4118294361979, 17.4070830456913, -31.0635536443442, 4.03321231715381
+z: 80.9113253839314, -81.8780994042754, -10.1767265703529, 12.6185321249068, 31.2433938495815, 40.1075961999595, -88.4132706094533, -0.259516015648842, -67.1224204823375, 4.2356951162219
+method: p
+rm: FALSE
+result: -0.133460373384683
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 69.5500911679119, 85.6129388790578, -59.8321632482111, -16.6489555500448, -23.689411021769, 7.28359869681299, 11.7851179093122, 0.971409818157554, 14.6698507014662, 12.5228200107813, -82.5623630546033, 10.7475840020925, 64.5495726261288, 33.6947743780911, 17.5113253761083
+y: -23.2205286622047, 79.4048092793673, -25.0229370314628, 93.0385292042047, 85.515082301572, -71.9814633019269, -32.8320536762476, 4.79555446654558, 11.8861138820648, 35.2179647423327, 53.5490271635354, -38.2638583891094, 47.7496858686209, -81.6408428829163, -51.109107490629
+z: -51.3139498885721, 91.0043549723923, -29.6979720238596, 64.7927256301045, 24.9896527733654, -49.5973426382989, -61.108489241451, -79.4058836530894, 56.8568713963032, -31.4483558293432, -81.7292190622538, 99.1093489807099, -31.6041610203683, 51.2187057640404, -1.86318131163716
+method: s
+rm: TRUE
+result: -0.220132277259967
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 90.7971289940178, 64.8458667099476, -26.1766018811613, -21.0994517896324, -99.1302272770554, -50.7842414081097, -3.6383499391377, 27.4873042944819, -38.7462536804378, 68.3057898655534, 98.1881877873093, -45.7978362683207, -17.603207891807, 25.2952293958515, -22.7400164585561, 60.9401299152523, 62.4521202407777
+y: 29.2903814464808, -65.5612081754953, -78.4191365353763, -4.56041805446148, -30.2704517263919, -21.605000179261, 1.48401004262269, -44.5922049693763, 84.3162531964481, -4.89589110948145, -26.2383857276291, -76.1553710792214, 5.88274369947612, -78.4085688181221, 36.7778526153415, -39.9336752016097, -28.1932056415826
+z: -17.2037285752594, 13.8319098390639, 34.7095286007971, -27.703050384298, 9.93002681061625, 44.7098897304386, 54.4988644309342, 1.10581130720675, 42.3894800245762, -23.5900762956589, 83.1359798554331, -3.49259204231203, 37.7722999081016, 66.1500211339444, 51.4814839698374, -78.5076813772321, 24.2365219630301
+method: s
+rm: FALSE
+result: 0.0274828394860458
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: -80.7853449136019, -38.3992948569357, -22.2798614297062, 75.4607704933733, 33.0631603021175, -73.7780206371099, 5.96331777051091, -50.5084481555969, -31.7969931289554, 19.0575924701989, 85.3613562881947, -30.7409678120166, -73.8598890602589
+y: -19.4839437957853, -90.817145537585, 89.9142569396645, -7.78982224874198, -80.0989099312574, -58.8081724476069, -77.3309513460845, -16.1730996333063, -87.9085985478014, -17.9587779100984, -0.581334996968508, -42.1605377923697, 21.935287443921
+method: k
+rm: FALSE
+result: 0.229681482630548
+input.z.1: -63.2329418789595, 50.4205111879855, 1.37699875049293, 31.9463331252337, 90.1739185210317, -49.1128060501069, -6.9747703615576, -59.983176458627, -86.428006272763, -11.0352266114205, -48.7479498144239, 34.5943303313106, -78.9999180007726
+input.z.2: -40.928622148931, 97.1864043734968, -52.0364633761346, 65.8855800982565, -22.5181400310248, -12.0427423156798, 8.44123368151486, -70.3309573233128, -48.4425970353186, -76.6650391276926, 60.1132703013718, -98.2566928025335, 40.263629052788
+input.z.3: -45.1057865284383, 16.6654115542769, -58.5233464371413, 61.7927123326808, -47.9555701836944, -22.6161092054099, 28.3364725764841, -68.6806954909116, 54.0026980917901, 27.6144355069846, -17.2973237466067, 64.1560755204409, -59.8855725023896
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: 92.2603438608348, -56.4207409042865, 83.6725204717368, -80.7003829162568, 67.8985660895705, -75.0979449599981, -32.0562332868576, 56.0634645167738, -85.5500471778214, 33.3249835297465, 47.6551554165781, 66.1726305726916, 48.9350370597094
+y: 71.4295863639563, -18.2109759189188, 91.2296816706657, 93.7020284123719, -38.427047431469, -5.06591922603548, -71.242788201198, -43.5830219183117, -50.5092308390886, -32.3183794040233, -48.7796126864851, -84.1315757483244, -79.6182266902179
+method: k
+rm: TRUE
+result: 0.00477210789686704
+input.z.1: -4.25235852599144, 30.4247013293207, 22.6726256776601, 88.1398701108992, -14.9512176867574, -22.8902320377529, 15.2597426902503, 90.1389559265226, -87.9985238891095, 79.24031810835, 48.9382231608033, -63.0733355879784, 81.9164112210274
+input.z.2: 15.7161565031856, -86.386077105999, -11.9819261599332, 12.0433977805078, -84.1572615318, -88.4014238603413, -78.5426302812994, 6.74741943366826, 17.4219592940062, 42.3801865894347, 57.2220828849822, 18.5213928110898, 13.8206535484642
+input.z.3: -25.2769957762212, -79.8697541002184, 47.9512831196189, -40.2225833386183, 61.2570276018232, -89.5395552739501, 57.2230133228004, -6.20145709253848, -81.831949763, 37.4231112189591, 3.57026224955916, -6.8920056335628, 15.1464655529708
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: 60.5032597202808, -55.3992924746126, -57.1532733272761, 39.3540678545833, 41.2322402000427, 94.9976013973355, -25.1228974200785, 69.2301294766366, -62.8194462973624, 83.1489353906363, 64.4181499723345, 27.0436024758965, 54.5952781569213
+y: 50.8026732131839, -59.9888855125755, -26.8583768047392, 95.3958404250443, 71.0329591296613, -5.07162217982113, -57.6757784001529, 5.96255329437554, -26.5671603847295, 74.9519627541304, 55.9876888524741, -56.6113821230829, -65.2430968359113
+method: p
+rm: TRUE
+result: 0.564561996864683
+input.z.1: 25.9787803515792, -20.9894978906959, 42.6014113239944, 2.97193983569741, 31.9062470458448, -48.1516422238201, 75.1286832150072, 11.4769574254751, -55.0779395271093, -5.5713998619467, -42.5516823772341, -73.3385164290667, 61.5631113294512
+input.z.2: 52.3108799010515, -13.4730744641274, -26.2112704571337, -94.4241392426193, -87.1290047187358, 44.8173874057829, 16.0077110864222, -88.8399564195424, 32.9815314617008, 92.6361351739615, 64.8398043587804, -30.7204295415431, 84.6931307576597
+input.z.3: -77.9948043171316, -66.0049752797931, 62.4562206678092, 77.8233026154339, 42.9607164580375, 57.5163295958191, -70.2494252007455, 31.4489458687603, 10.7635230291635, 30.1841662731022, -80.0336173269898, -22.9067022912204, 67.9993652738631
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: 37.9142162390053, -8.26726146042347, -61.9123779702932, -57.8167630825192, 23.4680826310068, -99.7927295975387, 33.9280273765326, 79.8843482043594, -43.2324070017785, 56.6228452604264
+y: -62.526094680652, 61.9219188578427, -75.2686517313123, -74.1751136723906, -96.7679353430867, 1.48558439686894, 76.4188889879733, -61.2491626292467, 80.3087358362973, -45.7866244483739
+method: k
+rm: FALSE
+result: 0.0164627901375515
+input.z.1: 35.9344144817442, 98.7220860086381, -36.6842451039702, 48.8638223614544, -52.5896870996803, 23.3808947727084, -10.3175325319171, -89.9521626532078, -39.3597731832415, -21.7722129542381
+input.z.2: 40.9232123754919, 25.3107699099928, 31.3104595988989, 29.8185504972935, -80.9525416232646, 5.50809823907912, 57.8906395006925, -22.5699768867344, -12.0202441699803, 4.25414703786373
+input.z.3: 9.19963982887566, -56.4450024627149, -81.8353800103068, -71.7948751524091, -8.96710567176342, -0.098739517852664, -49.8610728420317, 68.7743380665779, 7.88735868409276, -84.7688094712794
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: -56.1894082464278, -12.6557477749884, -63.4441782720387, 0.33514741808176, 60.3243499062955, -64.7020475938916, 50.4497223068029, -2.1715194452554, 9.01610897853971, 76.9646459724754, -47.7160341106355, -41.9100993778557, -15.766973933205, 27.5259118992835, -35.4518753942102, -85.60910099186, 24.0823043975979, 93.0186438839883, 93.6028228607029
+y: -20.745520433411, -9.38104907982051, -74.1150409914553, -4.49656955897808, 69.9145309627056, -31.7319374531507, -59.7572867292911, -15.8576601184905, -12.6222641207278, -80.7064605411142, -55.2672634832561, 99.9313631560653, -6.02937843650579, -9.62814935483038, 48.0359378270805, -78.4953159280121, 99.3151890579611, -46.1329385638237, 48.141875769943
+method: p
+rm: TRUE
+result: 0.211991511824896
+input.z.1: 1.58806922845542, 86.8181970436126, 31.5542962402105, 55.2137501072139, -39.5924519281834, 33.013613242656, 14.7862681187689, -74.0772366523743, 58.9972470421344, -7.06596486270428, -21.0627525113523, 99.2032013833523, 56.6067849751562, -98.3875119592994, 41.2923750467598, -30.0579020753503, 4.85188476741314, 10.3777845390141, -27.4298328906298
+input.z.2: 34.8385723307729, 20.5119372811168, 77.690208144486, 44.7117544244975, 92.1282112132758, -90.9193224273622, 27.3936607409269, 44.8808068875223, -86.0024070832878, 92.0378822367638, -10.629472322762, 55.4692803882062, -25.0772546976805, 41.4051091298461, 6.33945902809501, 10.3499594610184, 54.4835149776191, 7.99261094070971, 89.524426497519
+input.z.3: 70.5266479868442, 56.8428464233875, 79.8325890209526, 48.6981757450849, 20.3497425187379, 14.0441357623786, -51.5891078859568, -7.34991990029812, 32.2692793328315, 68.6593409627676, 4.454291658476, 84.4771948643029, -73.7373711075634, 8.70008966885507, 71.2375602219254, -45.4772807657719, 35.3090388700366, -77.8953650034964, 56.713536940515
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -73.061874229461, -13.9738537371159, 64.2177643720061, 15.2220948133618, -66.5882191620767, -6.66814856231213, 95.0206854380667, 53.7092166487128, 79.339360864833, -73.5059819649905, 26.2280288618058
+y: -17.2816875390708, 95.8707445301116, -79.8597431275994, 23.603032855317, 1.01680792868137, 27.7978147845715, -46.8073261901736, 60.1170611102134, -14.4904991146177, 80.4983365815133, 35.0678949151188
+method: s
+rm: FALSE
+result: -0.533103656117009
+input.z.1: 24.0054220892489, -38.2218769751489, -36.391848186031, 39.4758492242545, 82.74105344899, -14.3297997768968, -85.4651961009949, -86.8203293066472, -44.1936294082552, -47.1563939470798, 45.3097125981003
+input.z.2: -57.668925030157, -99.2560090962797, 73.3224391471595, 74.1201536729932, 81.7828055471182, -9.52679859474301, 14.1464875079691, 37.1397321112454, 31.4963829703629, 19.5132269058377, 54.907073546201
+input.z.3: 5.39321177639067, 51.5115650836378, -48.5234751366079, 59.8083338700235, 20.2424349728972, 7.82965249381959, -62.3213066253811, -52.3974419105798, -46.1440681945533, -96.0028395056725, -92.1209430787712
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -75.8598148822784, -57.8679403290153, -70.5489284358919, 79.6496780589223, 83.6893404368311, -3.89578277245164, 30.8455263730139, 43.4356688987464, -93.7735083512962, 64.8750048596412, -27.4969315156341
+y: 10.6346141081303, 97.3708054516464, 77.6781819760799, 32.1429692208767, 44.3270593881607, -51.0296199470758, 53.1075953040272, -56.6818379797041, 82.5988807249814, 76.4641304500401, 67.2767641022801
+method: k
+rm: FALSE
+result: -0.372011732403109
+input.z.1: -30.0938377622515, 88.116044877097, -9.76424408145249, 89.2513517756015, 77.7156874071807, -77.6198823004961, -66.8529264628887, 74.9286437407136, 79.5354966074228, 39.1315433662385, 8.71772766113281
+input.z.2: -26.1263587512076, -62.1837942395359, 38.3388991933316, -42.6557110622525, -5.76013564132154, -60.0944366771728, 63.1011837162077, -62.5058522913605, 48.8114280160517, 1.21210310608149, -50.4604283254594
+input.z.3: -17.3055913764983, -79.3155479244888, 28.9295102003962, -18.9371800981462, 74.2997703608125, -40.0637871120125, -94.551969319582, -62.8503665328026, -7.13514289818704, 49.9038027599454, -51.9183388911188
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -54.107921756804, 42.0997333712876, -6.38097845949233, 9.82502051629126, -28.6193792242557, -34.3836144544184, -3.67244216613472, 22.6311068516225, 13.8194078113884, -22.9492321144789
+y: 60.5207195039839, -81.0600532218814, 49.1948895156384, 64.3602961674333, -23.8067456521094, 48.5145658254623, -19.1302789840847, -57.330949883908, -92.603252409026, -34.9809643812478
+method: s
+rm: FALSE
+result: -0.522505562585742
+input.z.1: 73.3824520371854, -81.4419587142766, 59.7223955206573, -1.82209219783545, 84.9416411016136, -54.7515032812953, 2.77886907570064, -14.5639284979552, -18.736483482644, 56.108499923721
+input.z.2: 67.43677794002, -99.9857230111957, -97.4766474217176, -52.3709758650512, 65.8947822172195, -71.7632448300719, -15.8094623591751, 82.0473594591022, -14.198503177613, -16.3246036507189
+input.z.3: 62.8384766634554, 19.0266913268715, 35.5061936192214, -95.0661971699446, 28.3454976044595, -89.0745501965284, -14.7294794674963, -76.8557195086032, -18.2478179223835, 86.78869898431
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -1.2142707593739, 1.14291775971651, -7.26283476687968, -61.8523230310529, 78.1381260138005, 28.326230077073, 88.5825785808265, 91.083605773747, 21.5207824483514, -8.56816032901406, -25.5072731059045
+y: 14.1181503422558, -36.2708885222673, -35.4297156445682, -1.67753333225846, -34.6098212525249, -62.3401450458914, -56.7325585987419, -19.2465652711689, 72.2250512335449, -30.4523368366063, 37.1804839931428
+method: s
+rm: TRUE
+result: -0.375187368938524
+input.z.1: 68.2266510091722, 26.6301542986184, 25.1655354164541, 95.4604937694967, -14.2991234082729, 12.1803054586053, 80.9723742306232, 74.5170688722283, -9.39638176932931, 13.0635335110128, 6.38360045850277
+input.z.2: 14.1705195885152, -74.5514953974634, 27.798350667581, 34.9743040278554, -4.05116858892143, -91.3039809092879, 8.21988149546087, 80.3523061797023, 30.8039418887347, -55.6892755441368, 88.9822357334197
+input.z.3: 45.2729779761285, -96.8037121929228, -1.97316566482186, 18.6038000043482, 98.2673170976341, 33.5015752818435, 63.8064842671156, -14.044907130301, -52.3745216429234, 21.3815015740693, -63.2074198685586
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: 94.328890228644, 5.75797557830811, 25.441690068692, 88.1982096005231, 45.7035119645298, 16.9675328303128, -87.1538819279522, -98.0717894155532, -91.5767922997475, -6.85307481326163, -9.82285114005208, 67.6100679673254, 58.5152864456177, -97.2691165748984, 91.1229528021067, -32.0776640437543, -69.0255750901997, -7.09530152380466, -6.81365500204265
+y: -80.5371531285346, -10.2979036048055, -38.8368986546993, -61.8645419366658, -83.1780408043414, 79.711103765294, 21.272880397737, -54.3522239662707, -86.3086901139468, -38.0223195534199, 52.8202678076923, -84.461157117039, 47.7731225080788, 7.32796876691282, 77.0558503456414, 31.592853507027, -87.3366552405059, 31.9443213287741, -37.1386748738587
+method: k
+rm: TRUE
+result: 0.0980405314826719
+input.z.1: 23.2567406725138, 21.890681842342, -89.1896610148251, 96.3604890275747, 49.5936496648937, -63.1400676444173, 14.4897532183677, -67.2666956204921, 49.4363921228796, 62.1179447509348, 47.1755699720234, 44.8309970088303, -12.7215121872723, 19.4518850184977, 17.0972461346537, -80.8160409796983, 88.3082031738013, -12.9626977723092, -81.6842820961028
+input.z.2: -55.4383310489357, 47.4879994057119, -0.869575794786215, 45.0101721100509, 3.4380410797894, 73.0201048310846, -25.7476052735001, 86.2380142789334, -52.0658289082348, 45.1091858092695, -55.0217658746988, 74.9276738613844, 92.2757615335286, 90.0036279112101, 74.9076794832945, 83.3363148383796, -64.1434239689261, 57.4586546048522, 25.7639687042683
+input.z.3: 6.6876329947263, 40.4029506258667, 94.9899430852383, 4.70264269970357, 17.7098400890827, 79.6689927112311, -46.7597783543169, -29.3036337476224, -9.24668917432427, -87.3026769608259, -67.9541712626815, 99.6626032050699, 33.7271203286946, -6.46288637071848, 1.44459712319076, -66.6438368149102, 26.0329113807529, 90.9082849510014, -29.0545757859945
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -39.9631946347654, -38.9883862808347, -50.3526273649186, -9.96270119212568, -48.5522696282715, -11.14162793383, -24.0112878382206, 9.39341643825173, -80.0630148500204, -59.9971971008927, 69.5586620829999
+y: 52.67443805933, -48.463183036074, 90.0137397460639, 95.1239809859544, -98.6111979465932, -70.7381737418473, -97.7023174054921, -4.86181387677789, -99.9695376493037, -84.6450063865632, 35.2110210806131
+method: k
+rm: FALSE
+result: 0.288504241332419
+input.z.1: 80.2214500959963, -16.4790869224817, 14.9447090923786, -76.3074616901577, -95.7911690697074, -42.1649531461298, -10.7618189882487, -37.5353710725904, 75.4259538371116, 0.160726672038436, -84.0096296742558
+input.z.2: 79.9426295794547, -98.1330295559019, 20.2024064492434, -83.4212276618928, 81.9087484385818, 15.698215784505, -59.1874286532402, 2.41743079386652, -56.4012502320111, -29.0360070765018, -61.3683750387281
+input.z.3: 31.0607691761106, -70.0570112094283, -50.5196814890951, 81.6438420210034, -50.414383225143, -7.72223989479244, -13.9937483239919, 98.8766676280648, -96.4582050219178, 44.9282119981945, -58.7133090011775
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: 54.5031766872853, -48.0435361154377, -48.2549458742142, 13.5190900415182, -99.9459353275597, -43.1967475451529, -51.7230877652764, 85.8822505921125, 98.8075927365571, -23.5670748632401, 95.2128172852099
+y: -33.1321520730853, 75.4384634085, 41.4772017393261, 68.0324987508357, 96.748707164079, 36.6900125518441, 47.0263858791441, -6.55903057195246, 70.0058882124722, 1.28378001973033, 9.69074643217027
+z: -61.9628706481308, -42.8054075222462, -81.5592133905739, 48.7764513585716, -8.34423061460257, -73.7232564948499, 51.6754065640271, -52.4331694003195, -32.1930185891688, -79.7134197782725, -7.73797025904059
+method: s
+rm: FALSE
+result: -0.506675300750236
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: -79.6152154449373, 78.4319852013141, 49.7870131861418, 40.9128565341234, -38.9413299970329, 57.6212736777961, 95.6886244937778, -13.8690806459635, -14.3649831879884, -40.1887675281614, -35.8756079338491, -88.0116830579937, -76.4377722982317, -38.2442264817655, 22.5824641063809, 83.3017565310001, -18.2699847500771
+y: -56.8321019876748, -6.38408325612545, -6.54365173541009, 25.2405792940408, 77.7101498097181, 81.7850700579584, -23.5927077010274, 70.0163369532675, 13.4725551586598, -93.8025828450918, 82.9350834712386, -19.1807002294809, -96.641027694568, -13.9271743129939, 24.2437047883868, -33.1552400719374, -93.8347009476274
+z: -8.44970187172294, 9.03076659888029, -18.9505951944739, 60.2045745123178, 56.0176801867783, -57.2494097519666, 51.5992518980056, -28.4653120208532, -67.6779610104859, -84.3946997541934, -16.2014594767243, 97.8818096686155, -62.7145827747881, -66.8768094852567, 42.6931785885245, -18.1804189458489, -58.9151185937226
+method: s
+rm: TRUE
+result: 0.245647438689431
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -8.95535191521049, 83.1295024137944, 26.2705389875919, 67.8139599040151, -69.8907925281674, -67.5867159385234, 59.5211905892938, -61.4588709548116, 20.9577512461692, -88.4819873142987, 21.290334360674, 43.7073293607682, 61.680910969153, 62.1506804600358
+y: 86.6269668098539, -32.5135345570743, 59.5476369839162, -55.8229512535036, 52.6881521567702, -83.0401647370309, -92.1478198841214, 54.4313754420727, -83.3293351810426, -62.313958723098, 60.8884260989726, 61.8840378709137, 57.433863170445, 18.0313312448561
+z: -69.2746695596725, -54.081470426172, 21.0898623801768, 18.5468762181699, 0.908048637211323, -63.3753003552556, 91.7176062241197, 0.488004460930824, 79.7440263442695, 4.30610617622733, -34.7610086202621, 22.1601004712284, 89.4652825780213, 48.7705412320793
+method: k
+rm: FALSE
+result: 0.0111111111111111
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -50.7522673346102, -73.3074016869068, 14.5340465009212, -66.5852255187929, 2.34679142013192, 73.8169429823756, -64.9932525586337, 46.2075220886618, -18.173229880631, 12.1496684849262, -71.3544078636914, -47.5662395823747, -21.4743808377534, -4.69422470778227
+y: -13.8064284808934, -12.5385803636163, -65.9088707063347, 44.2371282726526, -82.2711412794888, -51.4188673347235, 95.4864253755659, -31.0616248752922, -23.6471280455589, -74.6061203535646, 66.8357694987208, -22.5880632176995, 21.1619397625327, 13.0164582282305
+z: 77.0700187422335, -88.5332877282053, 6.34226612746716, 27.1646889857948, -0.0974785536527634, -26.363241719082, 60.9230055008084, -31.0812496580184, 5.27547332458198, 9.03973975218832, -88.1527445744723, -48.2249503489584, -81.6687730140984, -53.646367136389
+method: p
+rm: FALSE
+result: -0.670943883857255
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 85.8026267029345, -88.8567392714322, 71.1906284093857, -42.287467001006, -87.2793929185718, 89.4890809431672, 43.1974852457643, -9.35818273574114, -17.5565235316753, -0.453179562464356, 43.4112564660609, 23.7805525306612
+y: -62.8617578186095, -89.3592846114188, -95.8116262685508, -41.6362321935594, -35.4687537997961, -28.9752063341439, 15.1240817271173, -81.4014834351838, 25.7772642653435, -83.8245145976543, -74.7226158156991, 63.2226870860904
+method: p
+rm: FALSE
+result: -0.0154314221847857
+input.z.1: -8.85584801435471, -76.0518108960241, -90.1860152371228, -27.0599717739969, -93.4562219306827, -93.58797124587, -23.47795618698, -94.6772815193981, -22.2225652541965, 41.5394491516054, -80.6787559762597, 86.2606703769416
+input.z.2: -38.7689351569861, -40.2000843081623, -99.1867681965232, 80.4073409643024, -44.9677177704871, 93.8172904308885, 59.8454762250185, 94.3912515882403, 34.1965254861861, 16.6013369802386, 67.8427397739142, -38.8580628670752
+input.z.3: 83.9653053786606, 95.5453366506845, 31.6075063310564, -49.3629164528102, 39.3006291706115, 58.262199210003, 36.9852046016604, -51.8655603285879, 14.8231557570398, 65.4056573286653, -76.6185896005481, -9.75128882564604
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 42.2951359767467, -98.0670476797968, 72.95155916363, -97.5872188806534, 29.4609900098294, 53.7210481241345, -33.2761470228434, 18.8987899105996, -66.2275532726198, -79.557922296226, 29.3099474161863, 9.5911558251828, 95.1384756248444, -33.7378962431103, -10.1655352395028, -44.7425982914865, -50.7976255379617
+y: 33.169471565634, -84.5846886280924, 62.4898296315223, 75.4857927095145, 68.9234993886203, -54.5816842000932, 91.2322744727135, 1.25600299797952, -54.1735134553164, -12.8964414354414, 80.9569772332907, 82.643111422658, -64.9629856459796, 71.2960900738835, -58.9118956122547, 34.2774460092187, 79.9432563595474
+method: k
+rm: FALSE
+result: -0.0840388092297653
+input.z.1: 24.8670800123364, 96.9902894925326, 18.2047539856285, 29.9416149966419, -67.6683164667338, -94.5415789727122, -94.464895548299, -89.070585463196, -93.1418780237436, 7.63960015028715, -27.3726081941277, -20.9940173197538, -40.1839104946703, 22.9435044806451, 79.4069023337215, 82.1736453101039, -1.15302046760917
+input.z.2: 81.2827946152538, 18.1390372104943, 42.039096634835, 3.42075540684164, -88.2026459556073, 26.7978167627007, -13.1311344914138, -82.1488615125418, -74.8239930719137, 19.9365015141666, 30.6700795423239, -12.6407288946211, 25.2683679107577, 80.5456896778196, 3.72873861342669, 61.0932228621095, 94.7194188367575
+input.z.3: 18.1032594759017, 81.0059050098062, 0.533604482188821, -31.8593421019614, -82.4320225045085, 59.2174014076591, 12.148222932592, 32.3002810589969, 15.2615524362773, -20.450661983341, 83.4245914593339, -59.7416742704809, -37.4349432997406, -35.7613458298147, 45.3094141557813, -48.7132341135293, -60.4963214602321
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 39.8641279432923, 36.6818822920322, -40.780941862613, -87.3267628718168, -28.2410716172308, 42.4047458916903, 0.0225101597607136, -8.9056434109807, -2.91150966659188, 39.6428920328617, -75.8707294706255, -73.5319286584854, 63.4615595918149, 22.4617537111044, -41.1442595068365
+y: -55.4940924514085, -64.180206740275, -80.1653628237545, 3.60332592390478, -41.3710146211088, -47.208951972425, 50.7955606561154, 68.0279347579926, 24.1804163902998, -58.5063801147044, 53.4048205241561, -62.6482892315835, 74.8165004421026, -35.8001246582717, -16.7477594222873
+z: 57.1126049384475, 13.7041463050991, 92.6308101508766, -98.5024768393487, -2.28023235686123, -23.9749090280384, 59.5866456627846, 37.3168694321066, -49.8011747840792, -61.9211140088737, 35.5470598209649, 27.0186287350953, 84.0462429448962, -53.7428881041706, -20.3638930339366
+method: p
+rm: FALSE
+result: -0.0698817922106879
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: 90.9256948158145, -42.5652571022511, -67.079691728577, -44.3737761117518, 39.7340807132423, -60.089198499918, 35.8762004878372, 22.369765676558, 82.5496308971196, 54.5133300125599, 85.3771304246038
+y: -83.5164808668196, -2.3147423285991, 54.9748376943171, 58.0427039414644, -64.0521888621151, -2.81249335967004, 98.0928914155811, 73.602551035583, 51.3121796306223, -34.7387288231403, -72.9273286648095
+method: s
+rm: TRUE
+result: -0.523042743416072
+input.z.1: 85.7249903026968, 83.893974032253, 35.4516032617539, -28.1841973308474, 17.7539859898388, 28.1705584842712, 62.0195430703461, 6.89598307944834, -43.7137708067894, -6.51348838582635, 64.4391702953726
+input.z.2: -77.2161093074828, -34.4602860976011, -31.7707217298448, 69.7988425847143, 24.0384986624122, 2.52298396080732, 67.1068411786109, -59.9436047486961, -6.02900786325336, 14.7358069196343, -39.7780386731029
+input.z.3: 27.5480494368821, 80.7176610920578, 45.4240935388952, -25.5288687068969, -8.32626689225435, 18.6241313349456, 56.0617660637945, -99.768823524937, -32.49516421929, 57.5501822866499, 84.3718754593283
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: 45.8342797122896, -77.0667779725045, -64.2237342894077, 4.22732839360833, -46.0417157970369, -47.2304744645953, 29.3592920526862, 63.4333388879895, -71.0418430157006, 70.1868168544024, -6.70211175456643, 88.2698916830122, -16.8335956986994, -10.7731471769512
+y: -66.40481101349, 46.3921690359712, 20.5301644280553, 2.09054443985224, -38.9518717769533, -82.9474763479084, 33.7044085841626, 96.5075950138271, -63.3534894324839, -20.2410046011209, -43.0850372184068, 92.0669205486774, 47.347361408174, 66.1714978050441
+z: 85.8965543098748, -37.6489527057856, -4.43430640734732, -76.9130968954414, 73.8492679782212, -9.16740805841982, -69.2597345914692, -95.8653298206627, -12.3851452954113, -1.94358341395855, 95.0880268588662, 13.8634593226016, 64.1506760846823, -61.8146073073149
+method: p
+rm: FALSE
+result: 0.362686685201407
+------------------------------------------------------------
+function_name: pcor.rec
+count: 18
+x: 4.83486847952008, -33.575087832287, 5.45295123010874, -7.36544406972826, -51.7337966710329, -76.9358182325959, -35.6409954372793, 76.3785248622298, -39.3296065274626, 49.9114766716957, -54.7522674780339, 45.3345373272896, 44.5223123300821, -3.24754253961146, -81.5377961844206, 86.3679833710194, 36.4841728005558, -98.1516223866493
+y: -62.7916551660746, -98.1929061934352, -95.5918425694108, 85.3282696101815, 45.650498336181, 91.1865540314466, 18.8234640751034, -35.8555696438998, -78.9908673148602, -93.5970240272582, 61.6506161633879, -19.7622532490641, 20.6596003379673, -13.2536272518337, -34.9431619979441, -77.814610209316, -96.883852686733, -87.7667313441634
+method: p
+rm: TRUE
+result: -0.166800709155144
+input.z.1: 0.114683574065566, 76.4428338501602, 55.6030308827758, -12.6116141211241, 22.8804398793727, 28.3099383115768, 70.0053324922919, 8.81802220828831, -76.2668633367866, 51.8301085103303, -11.9479915592819, 58.2237378694117, 49.3079916574061, 61.2620721571147, -8.63581006415188, 44.7254316415638, -27.6764208450913, 97.5463242735714
+input.z.2: 73.784694634378, 99.4395392481238, -50.6187239196151, -32.5045205187052, -47.0645889639854, -29.0419731289148, 46.5196094475687, -26.6453473828733, 73.8187781535089, -14.7704138420522, -5.36934426054358, -84.8333730362356, -71.3679736480117, -72.7307432331145, -39.5870515611023, -47.0888705458492, -41.963919159025, -77.1274531260133
+input.z.3: 43.4523142874241, 39.5262993406504, -99.5481145102531, 43.935475917533, 90.169087331742, -1.52269233949482, 57.9886345658451, -58.3146122284234, 96.0287448484451, -77.5498211849481, 82.5941725168377, -6.65150554850698, -80.9493550099432, -73.9797147922218, -67.7011332008988, -17.1580271329731, -43.8098904676735, 44.4789375178516
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 75.4411236383021, -19.5394861511886, 54.8095060512424, -92.0215208083391, -21.294112643227, 26.4304304961115, 95.5353437922895, 25.3490419127047, 37.6811063848436, 22.0898760482669, 51.9865156151354, -0.527428183704615
+y: -2.90723177604377, -99.8164829332381, 86.0683097504079, -96.8761240597814, 97.06368483603, 14.7922529838979, -77.4926966521889, 86.5167673677206, 60.2897321805358, -38.285131752491, 10.3472337592393, -51.6168985515833
+method: p
+rm: FALSE
+result: 0.275501840529125
+input.z.1: -93.3178124949336, 63.9247000217438, 52.2618164308369, 52.2421864327043, 7.9075523186475, 29.9971995875239, -1.57735198736191, -43.6246140860021, 33.8648134842515, 23.0104923713952, 96.1260831449181, -43.5764740686864
+input.z.2: -42.9460354615003, 72.2460472024977, 9.14394510909915, 41.6251530405134, -12.9338803701103, 60.1190572604537, 69.2696672864258, 53.0324925202876, 2.6995662599802, 78.4068618901074, 78.4405670128763, 91.7038987390697
+input.z.3: -48.3382353559136, -20.7997158169746, -82.1640026755631, -54.2279165703803, 50.1300446689129, -71.9413852319121, 46.1742796003819, 86.1585101578385, 36.9840029627085, 72.7105645928532, -3.33922882564366, 27.4154386017472
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -28.5778240300715, 44.3743884563446, 33.4759910590947, -60.2454300504178, -41.7592494748533, 50.522102182731, -85.6955510564148, -66.6345450095832, -89.569599321112, 47.7078658994287
+y: -67.8200133610517, 27.5062628090382, 71.7565322294831, 67.6066937856376, -74.0544877480716, 17.2822214663029, 36.4111427217722, -46.7251748312265, 82.4704122263938, 41.7229991871864
+method: p
+rm: FALSE
+result: -0.604998498254511
+input.z.1: -58.7718021590263, -96.4335916098207, 32.5497580226511, -70.9680902771652, -47.4293766077608, 78.2334991265088, 59.4156378414482, -34.6753363031894, -34.3722300603986, 65.5848338268697
+input.z.2: 23.9919899962842, -38.0485058296472, 47.6243172306567, -77.3341711610556, -41.7488056235015, -20.8688801620156, -69.1063681617379, 60.9236182179302, -64.5143582485616, -26.092412089929
+input.z.3: -32.6844338327646, -59.2932476196438, -68.7602701596916, 2.40732813253999, 27.1003542467952, 14.0520400833338, 84.4277138821781, -70.8949789404869, -9.41576450131834, 20.9310320671648
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -69.387745950371, -49.2386457044631, 78.5358119290322, -84.7651823423803, -6.51485347189009, 39.3126453272998, -72.8123931214213, -61.9186998344958, -18.6902535147965, -88.9804591890424, -91.7242038995028, 86.5591046400368, -34.7955056931823, 33.6816429160535, 64.656486036256
+y: -54.2493806686252, -62.5815090723336, -53.7531255278736, -48.4718740917742, 10.1653558667749, -3.61327603459358, 98.8740086555481, 78.1578201800585, 29.4536428991705, -72.3204976413399, -61.3744611851871, -58.5085956379771, 34.6117965877056, 18.9841146115214, 90.7721454277635
+method: p
+rm: TRUE
+result: 0.152489072601148
+input.z.1: -17.8637297824025, -29.0924018714577, 12.0219393633306, 89.730524783954, 20.4635892994702, -40.1110864710063, 97.1969441976398, 24.2813416291028, -7.22711877897382, -6.58672391436994, 85.9623525757343, 13.9038019813597, -1.48428776301444, 70.1985373161733, 99.4452722370625
+input.z.2: -24.2749121971428, 11.0093058086932, 1.79093312472105, 34.6534831449389, 77.1981728728861, -47.0347272697836, -38.3209746796638, 14.4402433186769, 25.9882995393127, -37.2800651006401, 33.4694077260792, -54.7662175260484, -18.9552983269095, 24.5075556915253, 77.4359260685742
+input.z.3: -54.5507300645113, -58.4174287971109, 3.50196729414165, 70.3624501358718, -85.4037730023265, 16.6389497928321, 46.1369656492025, -26.1817390564829, 27.9330456629395, 19.4141190964729, -51.5585941262543, -81.4289728645235, 52.6618564967066, 88.6152235791087, -3.4073153976351
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -52.5501887779683, 76.0798906907439, -6.81492239236832, 51.8030108883977, -86.934806779027, -98.4599460382015, -38.9213243033737, -4.49495259672403, -87.9419339820743, -30.7407310698181, -20.1296131126583, -84.7388334106654, 95.9355524275452, 37.6330619677901, 11.805298179388, 71.3551525957882
+y: -35.7584306504577, -27.3668797221035, -72.6249604485929, -57.6672877185047, 89.3170366995037, 38.8797192834318, 66.2799593992531, -96.7583430930972, 71.8599527608603, 3.1670056283474, 6.21368275023997, 97.4829965736717, -74.2258692160249, -85.100900195539, 93.3626578655094, -6.60710437223315
+z: 68.3757029939443, -93.1859899777919, 73.9776723086834, 63.8459702953696, 4.1983631439507, 92.5801522098482, 58.4410866722465, -54.9838863313198, -18.4496367815882, 52.0247212145478, 41.2156102247536, 1.31171490065753, -86.6873883642256, -3.71779990382493, 53.2298434525728, -49.8276673723012
+method: k
+rm: TRUE
+result: -0.390867979985286
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -75.3095431718975, 77.2476399783045, -30.7190073654056, -76.5569956507534, -38.3892927318811, -97.640515351668, 40.7633638009429, 80.9929232578725, 69.9184333905578, 37.5527075491846
+y: 83.5916271433234, -26.9137156195939, 97.4208392202854, 7.80353010632098, 0.348421139642596, -91.0831026732922, -46.7444436624646, -29.6432333532721, 73.4219971578568, -78.7570051383227
+z: 34.0024248231202, 31.6505118273199, -34.0259387623519, -88.8631666544825, 34.7183919977397, -9.8018751014024, 19.560739537701, -16.2760076113045, -64.0254020690918, 91.1820934619755
+method: s
+rm: FALSE
+result: -0.0560875688519553
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: -38.3992325514555, 32.8475083690137, 79.121769266203, 21.0495824925601, 44.6178534068167, 4.39555062912405, -51.3640556950122, -55.6133981328458, 79.1281075682491, -95.4117084853351, -35.9894464723766, 91.6743733920157, 7.56984488107264, 73.7063893117011, -94.4896949455142, -69.728662725538, 34.1863818001002
+y: -1.27204842865467, 15.5883238650858, 52.7721991296858, 35.2760184090585, 50.1832047477365, -34.9931715521961, -60.3594477288425, 53.8173413835466, 82.5948101934046, 97.0483394339681, 55.829929606989, 2.9106458183378, 1.44075509160757, -25.6358910351992, -89.6978388074785, -55.6567288935184, -13.0775235593319
+z: -48.5710377339274, 64.2419253010303, 41.1617243662477, 70.234408415854, -10.9620631206781, 95.1862500514835, -40.9594263415784, 45.6709728576243, 56.5230576787144, -32.0230093318969, -73.3659269753844, -57.5494988355786, -26.7636676784605, 68.3923695702106, -4.33183843269944, 28.4814916085452, -7.51618449576199
+method: p
+rm: TRUE
+result: 0.262299008214051
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: 63.9999500010163, 6.35658605024219, -61.2774891313165, -55.0585428252816, 87.6808669418097, 30.6727230083197, 25.9130414575338, -88.0746370647103, -32.165707834065, -21.940717799589, 14.2026159446687, -23.0245357844979, -52.1892547141761, -12.0932789519429, -79.3347698170692, -98.9265380427241
+y: 97.3826597910374, -99.0675398614258, 73.9090912975371, 34.971971809864, 25.0468590762466, 18.0295334663242, 17.503083543852, -87.189973378554, -39.5246281754225, 30.6683254428208, 92.4373132176697, 62.0077466126531, 86.7115816101432, 10.9139364678413, 78.7267089821398, -20.369843300432
+method: s
+rm: TRUE
+result: 0.152631744587296
+input.z.1: 95.2498456928879, 10.1988882757723, 82.5301209464669, -63.0169591400772, -80.2177854347974, -92.172612156719, 81.9323406554759, -98.8836394157261, -55.1519786007702, -9.92068941704929, 69.03902948834, -64.8831372149289, -59.4855682458729, -43.2437205221504, 32.601273059845, 51.8672341480851
+input.z.2: 98.8599751610309, 61.2078364472836, -79.2565326672047, -91.2782166618854, 4.95080463588238, -74.4587088469416, -58.5738305002451, -11.1764627043158, -42.7475158125162, -19.5871444884688, 15.3298336546868, -76.2663461267948, 35.0223543122411, -17.0931177213788, -53.7032708991319, 39.0595389995724
+input.z.3: -82.2170123457909, -61.1209249123931, 75.4895146936178, 24.8059226665646, 2.35008695162833, 20.5680044833571, 22.843256406486, -54.538040002808, 53.478835709393, -32.7691012993455, 73.4401112888008, -48.4993967227638, -32.6875764410943, 16.6579740121961, -35.9389083925635, 48.6933783162385
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -38.0344086326659, -69.9757680296898, -96.0218561347574, 69.8170815128833, 84.4397103879601, -59.2046371195465, -25.6243887357414, -34.0098573360592, -18.5869125649333, 20.9443704690784, -17.8864942863584, 71.729579847306, -10.980512201786, 19.9342513456941
+y: 13.3373680990189, -28.0795010738075, 60.10332996957, -18.4444782789797, -98.1782922986895, 24.3794317822903, -76.4999823644757, 55.177218047902, 63.7693482451141, -21.0158154368401, 46.3093394879252, 38.5526302736253, -20.9319279063493, 43.4511065948755
+z: 91.1088630091399, -80.6348104495555, 14.3109522294253, -30.541270179674, -45.445510186255, -70.923288539052, -42.259228695184, -32.2218311950564, 26.1644289363176, 72.1342351287603, 58.3190027624369, 37.6866820268333, -47.4517594091594, 9.29418164305389
+method: k
+rm: FALSE
+result: -0.283731050383254
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 95.6271091010422, 3.03470036014915, 16.5275795850903, 39.0536304097623, 64.3952058628201, 60.8842697460204, 77.1877882070839, 7.39374337717891, -35.8326355461031, -96.9841248355806, -2.37456695176661, -66.4348848164082
+y: 52.346898894757, -0.568210193887353, -57.0029267109931, -55.1746561657637, 41.1318924743682, -48.4784295782447, -11.867310013622, 58.9504377450794, 49.1472533904016, -48.130969516933, 87.50881687738, 95.0276869349182
+z: -27.8131592553109, -58.7517556268722, -79.0835770312697, -62.2862636577338, -40.9212727565318, 40.4043748509139, 60.9704895410687, 80.6037961505353, -29.821108514443, -72.1863387618214, 73.8867315929383, -71.3265169877559
+method: s
+rm: FALSE
+result: -0.498847227000007
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -17.7215591538697, 33.0656519625336, 73.2753658201545, 66.6529010981321, 55.8624967001379, -18.1828083004802, -56.0154461767524, -80.258708121255, 74.527901597321, 22.4931557662785, 87.0472464710474, -68.2707403320819, -57.8954718075693, -55.7025399059057, 1.64373158477247, 89.0081748832017
+y: -11.6898256354034, -31.8874595686793, -27.6948968414217, -93.0535418447107, 94.3694983609021, -15.3473258949816, -30.3451092448086, 47.9080203920603, -12.34792903997, 70.1379578560591, 28.4610396251082, 82.0771362166852, -52.1409922279418, 73.4910554252565, 70.6270689610392, 29.6015367377549
+z: -3.16192414611578, 91.681189648807, -8.44467529095709, 61.7250246461481, -39.3754992168397, 10.0268266629428, -80.2241073921323, -30.7949334383011, 38.7846238911152, 99.9698612838984, -10.4493941180408, -79.5240023173392, 84.4389423727989, -90.3318281285465, -0.888433260843158, -9.30486363358796
+method: s
+rm: TRUE
+result: 0.00723744241918376
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: 34.7738367971033, 79.1716305539012, 76.4990594238043, -81.775622535497, -27.1493992302567, 10.8191972598433, -30.871396837756, -0.714902393519878, 61.4628181327134, -36.771080410108
+y: 53.3137893304229, -50.2570678945631, -41.6580128017813, -7.47664775699377, -88.6360401753336, -91.5539033245295, 12.6738691702485, 40.7443516887724, 83.883469318971, 49.5867451652884
+method: s
+rm: FALSE
+result: -0.282719593431579
+input.z.1: -84.4675720669329, -67.0466589275748, -18.3911125641316, 98.2628283090889, 51.9808443728834, -30.4428660310805, 21.8935457058251, -90.0795019697398, -70.4285278450698, 5.32920747064054
+input.z.2: 45.5949940253049, -83.0156840384007, -35.4019852355123, -30.4982414469123, 24.3814556859434, -71.7630771454424, -88.9764131512493, -57.2371034882963, 70.5831084866077, 35.4439703281969
+input.z.3: -14.7715406492352, -59.8912607412785, -99.6177072636783, -28.8444213569164, 59.2899556737393, 12.0164824649692, 99.4955199304968, 24.3026872631162, 19.8734523262829, 86.9021194986999
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -56.3390923663974, -93.8485420309007, -76.1460797395557, 87.2354988474399, -9.28768664598465, -31.4640353433788, 43.1042958050966, -79.2129376437515, 69.6591412648559, 50.0667770393193, 51.4706159941852, 48.2311789412051, -87.6915453933179, 41.4921804331243, 46.0590915754437
+y: -30.0428883638233, 23.8112844526768, -66.162470029667, -58.4669277537614, -13.7554917950183, 40.0350350420922, 80.381247960031, 76.8449954222888, 8.20867097936571, -2.99584232270718, -27.960628317669, -8.26242859475315, -77.6679917704314, 37.3565788380802, -14.3165319226682
+method: s
+rm: TRUE
+result: 0.0255435017969936
+input.z.1: 15.6856134068221, 44.3085910752416, 60.8353640884161, 80.8151323813945, -93.5956147965044, -54.3712676037103, -1.6567571554333, 90.8884244039655, -21.2625379674137, 81.0105908196419, -93.1311052292585, -8.25112308375537, -19.440022809431, 98.4774097334594, -18.0913300719112
+input.z.2: 82.7684669289738, -12.4109126627445, 53.7559506483376, 83.7132328189909, 99.6508095413446, 71.7520699370652, -92.9998741485178, 56.0302780009806, -51.0383900720626, 21.5518812183291, -18.6573163140565, 36.7927459068596, -84.7163817845285, 55.2210496272892, -70.2050358057022
+input.z.3: -98.7551828846335, 19.49746995233, -17.9139976389706, -35.7827616389841, -75.590154202655, 29.1891138069332, -27.3778593633324, -23.2670258264989, -71.2701795622706, -35.3796728886664, -53.1982235610485, -72.0516404602677, -0.0638416036963463, -60.8670709189028, 10.7043496333063
+------------------------------------------------------------
+function_name: pcor.rec
+count: 18
+x: -41.4313202258199, 45.9841891657561, 73.0351263191551, 14.5961822941899, 74.4030376896262, 0.350432144477963, 80.5028904695064, -86.0359017271549, -39.5940739195794, 17.8364073392004, -95.8692795597017, 23.454642156139, 63.9558572787791, 16.6738138534129, -14.6638540551066, -12.6493938267231, -47.084568021819, -49.758878769353
+y: -78.1604333780706, 39.5707542076707, -12.7265444491059, -38.0420819856226, -55.3764114156365, -7.27670988999307, 58.9023143518716, -13.7581620831043, 22.982121957466, -91.5119064040482, -72.0678606536239, 90.5886249616742, -51.7078758683056, 26.0097248945385, -23.915150295943, 68.5918164905161, -81.5348560921848, -15.0977482553571
+method: p
+rm: FALSE
+result: 0.188671955029874
+input.z.1: 80.1465837750584, -10.501228319481, 89.6407624240965, -39.7226133849472, 16.4567670319229, -71.1080288980156, -88.0229809321463, -75.8985460270196, 52.3780675604939, 34.3009188305587, 6.18860609829426, 97.8012350853533, 75.5968149285764, -61.0649057663977, 48.5446393955499, 18.231154140085, 1.47281852550805, -22.2872096579522
+input.z.2: 46.3825967162848, -82.8961354214698, -35.6839893851429, -25.5692901555449, 99.5609007310122, -31.00421926938, -14.7553088143468, -46.3190216105431, -89.3388437107205, -88.630617922172, 4.92621585726738, 89.5269899163395, -18.8370112795383, -40.9037253819406, -33.2164043094963, 74.5714424178004, 88.6978259775788, 61.7720224894583
+input.z.3: 81.4619556535035, -94.0986347850412, 98.9308916497976, 70.2591719571501, 39.478223817423, -88.385613868013, 9.04444772750139, 91.7586042545736, -47.6329161785543, 59.0545888524503, 70.1687247492373, -63.067327439785, -78.9021805860102, -49.9975389800966, 66.2716360297054, -55.5166335310787, -31.9789612665772, 51.4375566504896
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: 10.40073283948, -13.6921347118914, 84.5260130241513, -25.3665409516543, -78.2397591974586, 26.9345681648701, -58.5972013417631, 88.9882248360664, 45.4503744374961, -65.1228747330606, -27.4899946060032, 18.1972809601575, 11.3279470708221, -10.4332664050162, -60.4957120958716, -72.7518951985985
+y: -71.9699081033468, -99.9155370518565, 27.7240531984717, 85.3693515062332, 35.6472678948194, -23.4722698107362, 44.0854747779667, 95.8298934157938, -64.2083233222365, -29.3003208469599, -59.2611992266029, -29.7768235672265, 72.6343247108161, 49.7656984720379, 20.3026765026152, 17.2155754175037
+method: p
+rm: FALSE
+result: 0.0493694878245429
+input.z.1: 35.6308063026518, 4.66748662292957, 30.0429651513696, 76.2124869506806, 41.5056325495243, -30.4092030506581, -40.1510936673731, 91.4136198814958, 54.569678613916, -38.229710329324, 17.4495459534228, 42.4616932403296, -83.6061837617308, -96.9037922099233, 9.05879577621818, -81.1989603098482
+input.z.2: -13.610919052735, -2.48283445835114, 43.406359385699, -1.01326643489301, -71.5403430629522, 42.3702582251281, -57.7236965764314, -98.0018012225628, -2.94910599477589, -99.2285002022982, -30.1409310661256, -15.3791854158044, 63.2841229904443, -59.3148066196591, 89.0598343685269, 50.3705789800733
+input.z.3: 65.1514234952629, -52.134693833068, 37.3474742751569, -34.9965825211257, 29.8068393021822, -37.6201854553074, 28.4822612535208, 58.1028845626861, -71.3396343402565, 6.92787766456604, -81.047579832375, 6.40434417873621, -3.12588470987976, -85.8339602127671, -89.5489359740168, 36.9031661655754
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -97.1265674103051, -30.6887221056968, -58.1901613157243, 41.3434299640357, -44.8513293173164, -47.3897785879672, -11.2351455260068, 4.53527974896133, -53.9899244904518, -34.4885903876275, 84.1011397540569, 98.0846612714231, -97.2742294892669, -30.2832910791039
+y: 50.7123678456992, -41.0642932634801, 59.7222890239209, -87.1463846880943, 88.5209604166448, 76.3058924581856, -78.5172951407731, 23.3256267383695, -33.4639381617308, 67.8117078728974, -34.5261936541647, 13.6419337242842, 71.4485326316208, 29.9240712542087
+method: k
+rm: TRUE
+result: -0.414455855539734
+input.z.1: 95.3356681857258, -82.6237799599767, 61.6875410079956, -55.9806656092405, -98.3273911755532, -27.0171985961497, 45.6566241104156, -60.7003193348646, 39.0095799230039, -4.835369810462, -82.758112763986, -63.1046458613127, 22.5925303529948, -27.5266251526773
+input.z.2: 40.2346897870302, -80.8139885775745, 79.8951716627926, -99.673797795549, -11.8247658014297, -4.43669916130602, 21.9069521874189, -96.3469043839723, -12.5659705139697, 5.28370542451739, -2.05569667741656, -46.0224835202098, 37.0902071706951, 13.7604320421815
+input.z.3: -75.4078052937984, 53.1730110291392, 32.1218248456717, -3.36327841505408, -64.6848318167031, 46.9770870171487, 56.2149090692401, 77.8601902537048, -99.6458038687706, 17.093415139243, 30.976364063099, -21.0922583937645, 64.4309076480567, 28.8166706915945
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -21.7418022919446, -19.7270201519132, -51.0829096194357, 95.4731678124517, 63.3456526324153, 10.2449305355549, -30.8713216334581, 56.4763959497213, 97.5144575815648, -99.8349095229059, -36.944431765005
+y: 41.1633080337197, 71.5601967647672, -32.7024550177157, 95.0067212339491, -41.5371483657509, 76.2717307079583, 64.7539126221091, -59.7191719803959, 38.3289860095829, -5.68816638551652, 46.9167932402343
+method: k
+rm: TRUE
+result: 0.2560174270761
+input.z.1: -13.6582542210817, -54.4519340153784, 60.2084300015122, -22.9066342581064, -1.08100399374962, -39.2812125850469, -59.9119843449444, -89.6116081625223, -93.6755935661495, -30.0237529911101, 63.4646773803979
+input.z.2: 5.04081835970283, -7.67772262915969, 64.7993986494839, 10.6604609638453, 29.0101025719196, -11.9249556213617, -69.8554737027735, -2.71794814616442, 34.5893805380911, 52.1268622484058, -87.2946038842201
+input.z.3: 96.479544788599, 73.5420207027346, -65.0878861546516, -57.7022604178637, 81.0698586516082, -82.7021759469062, 21.458005765453, -53.0339238233864, -43.9016601070762, 60.7445098459721, 50.4766744561493
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -34.2646942008287, -78.1300825066864, 6.60557821393013, -57.4746059719473, 5.91994277201593, -58.6971938144416, 81.2527935951948, 58.9401760604233, -13.9615070074797, 84.4087808858603
+y: -84.765654662624, 30.2333278115839, -10.119401384145, -17.8130576852709, 14.3761526793242, -21.2025688029826, 59.4600023236126, 22.4814132321626, 43.6779118143022, 10.5381097644567
+z: -67.6395879592746, -63.1648739799857, 25.9779758285731, 68.5387071222067, 95.8367916755378, -11.1885727383196, 89.5199802704155, 29.4853665400296, 40.4386383015662, -79.2295292485505
+method: s
+rm: FALSE
+result: 0.31648230729558
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 65.2889241464436, -25.8309810422361, 41.5279346518219, 33.3778714761138, -78.418835811317, -86.3514642696828, -57.550333160907, -88.9864289667457, 83.8500074576586, 86.0779710579664, -72.9724165517837, 62.1391572058201, 35.1193575654179, -83.0525180790573, 27.2962907794863, -75.9986287914217, -59.743734030053
+y: -79.1268857661635, 21.6799827292562, -86.7284807842225, 76.4053526800126, 93.5399503912777, -7.59860742837191, 42.910123243928, -64.9026639293879, -39.5152932032943, 32.3382542468607, 79.3962649535388, 22.9047404136509, -17.6881920080632, 48.4937213361263, 51.0530607774854, 88.3627690374851, 36.3776166923344
+method: s
+rm: TRUE
+result: -0.50973498058253
+input.z.1: -90.2783849742264, 67.8969173692167, 81.9336336571723, 23.094120528549, 45.3741174656898, -61.7810368537903, -40.4937511309981, 65.4344111215323, -88.5476648341864, -64.6377388387918, -44.140517571941, 1.47411120124161, 79.240211751312, -60.1765193045139, 55.3837953601032, 43.3551961556077, -66.288702422753
+input.z.2: -36.9666110258549, -19.9583745095879, 17.8784884046763, 13.4679388720542, 4.24224487505853, 75.965761533007, 77.3604078684002, 14.5181270781904, 96.6304958797991, -90.3991216327995, 23.3897795435041, 87.7320431172848, 44.0418939571828, 98.0463651940227, -0.360229099169374, 33.0039616208524, 31.0656359884888
+input.z.3: -19.3495023064315, -2.21126056276262, 63.4957967326045, -92.3508635722101, 3.20365112274885, 89.5428656134754, -92.3482635524124, -38.769258139655, -49.6236519422382, -46.3103124406189, -85.6290648691356, -92.7534214686602, 7.33050634153187, -3.93257569521666, -19.6759086567909, -99.842318193987, -74.6654002927244
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -79.5160966925323, -74.9874663539231, -78.7817076314241, -77.2851656656712, -70.8517644088715, -33.5970929358155, -43.6421300284564, -41.397284111008, -92.8962790872902, 70.4068915918469, 47.7719811256975, -92.2868068795651, 28.4771746024489, 79.5827704947442, -28.5637738183141
+y: -37.4145726673305, -0.288628088310361, 47.6206338498741, -88.7128345202655, 30.3396196104586, 25.5081232637167, -72.0780373550951, -73.6024056561291, -57.554987911135, 81.4102350268513, -87.255728431046, 42.0090320520103, -5.66472639329731, -5.92177757062018, -14.2655706964433
+z: -23.3767181169242, 31.2546348199248, 56.052082311362, -27.3735378868878, 3.64539204165339, 64.6297093015164, -93.1361247785389, 99.8736266978085, -36.8254229426384, 86.4495293237269, -95.7299213390797, -50.8483925368637, -78.292038384825, -36.2992297858, -24.5581880677491
+method: k
+rm: FALSE
+result: -0.0134693114610091
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: -43.5266146436334, 18.0117554031312, 58.6101210676134, -41.2745150737464, 32.3130699340254, 54.0322658605874, 24.1791611537337, 73.3054053038359, 42.0464181806892, -96.5218428522348, 29.9439492635429, -12.5784670002759, -44.0562542993575, -25.4333753138781, 94.4393996614963, 98.0722198262811, 55.4907775018364
+y: -9.93549497798085, -45.8743677474558, -93.3299192227423, 79.5469779986888, 8.02246518433094, -14.3250429537147, 70.3237357083708, -99.5543221011758, -87.8637499641627, -86.2719914410263, -61.0736012924463, 24.7784069273621, -37.3273107688874, -28.9717409294099, 93.1313112843782, -25.6219055503607, -49.4559060782194
+z: -64.1072164289653, 87.7694536466151, -37.9586412105709, -22.3177924286574, 40.3714318294078, -63.5947197675705, -22.0420437864959, 33.9729850180447, 5.00115477479994, 10.3678717743605, 35.4822291061282, -45.7916335668415, -18.1938569061458, 15.615754853934, 19.5150196552277, 23.4867738094181, -95.2608565799892
+method: s
+rm: FALSE
+result: -0.112611956543292
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -92.1721640042961, -44.6145492140204, 86.8770225439221, -17.2698491252959, -40.4595222324133, -81.152014946565, 76.5948620159179, 14.66314336285, -43.7089977785945, 74.8940746765584, -20.9608427714556, 60.4101787786931, 92.6798572763801, -13.8263172935694, -15.3552802279592, 30.9063795022666
+y: 34.0978310443461, -93.5446070507169, -52.1205889526755, -60.0228164810687, 40.2410709764808, 68.5365847777575, -20.6536095123738, 96.2824455928057, 94.9520392809063, 38.3727887645364, 5.11064333841205, -42.3503454308957, 7.87821393460035, -15.5445182230324, 55.9228281490505, -54.4300060719252
+z: 72.2797598224133, -36.7589842528105, -31.7109297960997, 14.8865082301199, 14.2975315917283, -33.6676219012588, 73.4386292751878, 42.6696452777833, -49.9572122935206, -16.0288103390485, 91.8950178194791, -22.2982299048454, 43.716481141746, -83.7867478840053, -26.7168609891087, -40.8360068220645
+method: k
+rm: TRUE
+result: -0.152451910661407
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: -73.5700607765466, -27.4823492858559, -18.4957931749523, 75.0972531735897, -84.0701918583363, -73.6900016199797, -80.8014692272991, 1.56031367368996, 53.5824096295983, -15.8273342996836, 27.9865844640881, 71.9814067240804, 16.1229219753295
+y: 61.8587560020387, -54.1709136217833, -85.5680546723306, 11.5867487620562, 8.42031557112932, -19.0553280990571, 53.1157708261162, -6.55828071758151, -57.5449388939887, 60.9522576443851, 14.8441521450877, 21.0842114407569, 98.9267005119473
+z: -77.1422278601676, 71.9358698930591, 30.8435730170459, -37.9183823242784, -2.70509789697826, 11.3845904357731, 98.1391918379813, 59.1201251372695, 16.70933207497, 83.35813540034, -73.9252686966211, -44.1968939267099, 35.4018601123244
+method: s
+rm: TRUE
+result: 0.0029677519984588
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 66.390974028036, -16.8352647218853, -53.4644976258278, 75.3752870019525, -57.9270939808339, 54.5454489067197, -96.0464406758547, 33.1332623958588, 86.3947817590088, -18.4396516531706, 35.6390007771552, -6.8594797514379
+y: 66.0928500816226, -76.8080259207636, -82.475224789232, -87.0922611560673, -90.1318115647882, -71.2204404175282, 46.6621011029929, 10.2849024347961, 71.9189416617155, 68.8622513320297, -65.4017291031778, 3.43264965340495
+z: 13.3069343399256, -62.5784140080214, -27.0972901489586, -74.1631664801389, -57.5879731215537, 70.6120911519974, 77.241751877591, -38.2255645468831, -2.94962706975639, -86.2344280350953, 56.0441972222179, -88.6967639438808
+method: p
+rm: TRUE
+result: 0.110920134285541
+------------------------------------------------------------
+function_name: pcor.rec
+count: 11
+x: -8.54161819443107, 28.0718581750989, -32.8153485432267, -41.8009532149881, -83.3797766361386, 93.1131374556571, 80.5043308064342, -62.7610028255731, -15.2504758443683, 48.5718804877251, 17.7535368595272
+y: 42.7155940327793, -65.7041405327618, 69.3401046097279, 41.7508821003139, -67.2856659628451, -72.5374098867178, 6.22773463837802, 29.1457378771156, -41.368066938594, -95.4474326688796, -37.1582591440529
+z: -14.5949687808752, 82.971200812608, -59.7984070889652, -99.9608739744872, 97.1308692358434, -19.0055053215474, 88.3440440520644, 31.6497736144811, -24.3022648151964, -35.1213763467968, 14.9526675231755
+method: p
+rm: TRUE
+result: -0.401692765812538
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: 80.8533196337521, -18.1722048204392, -75.5538297817111, -67.8516203071922, -22.7996712550521, 57.1183586027473, -69.1113813780248, -62.8999908920377, 22.4695996847004, -0.333229219540954, 48.4565405640751, -92.8434989415109, 29.1625312995166, -83.2451142836362
+y: -38.2450382225215, 67.0644144061953, 38.6723168659955, 24.438568437472, 69.5456247311085, -84.6855477429926, -58.3137557841837, -94.6218158118427, 8.89068827964365, 15.1739988476038, -96.3306906633079, 96.3657117914408, 69.1964435856789, 0.972708594053984
+method: k
+rm: FALSE
+result: -0.243926934409628
+input.z.1: -93.7178533058614, -0.183204282075167, -37.0745961554348, -74.5082440320402, 28.1698084902018, -21.653729910031, 61.0449272207916, -63.0486940033734, -3.97970410995185, -26.7391014844179, 79.7092916909605, -75.7014720700681, -69.53080361709, -82.0775283966213
+input.z.2: -48.5075518488884, 1.95450144819915, -3.33806169219315, -92.2314285300672, 22.3729324061424, -89.7453350014985, -53.7487217225134, -54.0849874261767, 17.1049350406975, -86.7313547525555, 75.2309385687113, -21.8698643147945, 80.9956186451018, 89.605490071699
+input.z.3: -90.0013716425747, 85.5859903153032, -27.047320175916, 46.6997304465622, 21.4192960876971, 77.8831989970058, -8.81227441132069, -6.12898389808834, -87.6430103555322, -61.6656949743629, -82.8727319370955, -7.43764750659466, 69.1672470420599, 87.8232514485717
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -31.3715231604874, 78.4395510796458, 37.7813975326717, 90.9998905379325, 4.0892272721976, 23.3491680119187, -44.3821705877781, -37.741759326309, -32.6842260081321, -95.3462653793395, 83.2728854846209, 30.0052943173796, 73.2703904621303, 32.3609015904367, 88.8722232542932, 68.1857937481254
+y: 40.6233130022883, -30.0252608954906, -74.1636462509632, -92.0489497948438, 27.8864013496786, -99.424716597423, -20.6159302499145, 25.279173720628, 7.00154760852456, -95.5817312467843, 48.8055042922497, 56.2402768526226, -77.4240196682513, 44.1807419992983, 20.404072990641, -1.18401693180203
+z: 66.9464991427958, 6.30434169434011, -39.6972810849547, -52.4486493319273, -56.4930079970509, 52.421877393499, 55.8516921009868, -4.39011608250439, -74.2396947927773, -25.1450017560273, 42.0996841508895, 16.1958371754736, -22.8619898669422, 90.4492018744349, -74.1765698883682, 39.9869302753359
+method: k
+rm: TRUE
+result: 0.0357828133482257
+------------------------------------------------------------
+function_name: pcor.rec
+count: 14
+x: -94.1282887943089, 0.863795494660735, -54.5142192859203, -14.0683484263718, 10.5734667275101, -55.2807766478509, -71.1918077431619, -88.842673227191, 71.1261768825352, 19.2098991014063, -29.3649735860527, -96.3000339921564, 20.0530176516622, -48.131195968017
+y: 46.0645425599068, -97.9253031779081, 70.4843280371279, 80.5193558335304, 23.0555126443505, -97.9770058766007, 84.8336459603161, -77.9917985666543, 35.5348350480199, -46.9889497384429, 84.9599295295775, 33.0589215271175, 32.9579345881939, 24.89710515365
+z: 42.9362330120057, 42.9295230191201, -64.6692109759897, 38.3608576841652, -17.3026880249381, -25.5683950148523, 90.6109735369682, -16.0139869432896, -38.463629456237, -59.1028479859233, 87.1063947211951, -6.00760709494352, 12.1647471096367, -52.6431480888277
+method: p
+rm: TRUE
+result: 0.0366450176631751
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -84.5445530954748, 32.1405971888453, -23.0592608451843, -92.6854473073035, 58.4254698362201, -84.7419968340546, -22.7555541787297, 63.9643139205873, 76.1275416240096, -73.178022634238, -3.98154174908996, 26.802809163928, 50.5906715523452, 52.159122005105, 80.1790326368064
+y: -18.9386786427349, -84.6106726676226, 48.5546028707176, -44.6534102782607, 20.7739837002009, 4.48967423290014, -37.7230455633253, -80.9451036620885, 29.9852483905852, 23.2817359268665, -16.882407432422, -53.8926647044718, -97.029253654182, -26.2379488907754, -15.1613433845341
+z: -99.1309873294085, -72.4603479262441, 66.8711055070162, -75.8488883730024, 39.4639032427222, 43.4117903932929, 62.2310574632138, -2.13857642374933, -6.8422191310674, -14.0866828151047, -62.183153629303, -49.4522110093385, -16.3348558358848, 64.6755408030003, -61.5349486470222
+method: p
+rm: FALSE
+result: -0.291819029638886
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -89.2644015140831, -42.963656084612, 87.6042891759425, -15.7976613845676, -57.8714273869991, 61.3913614768535, 73.5168375074863, -4.00514821521938, 77.7676994912326, -54.8066982533783
+y: 32.5989249162376, 82.6726690400392, 23.7537688110024, -63.3400282356888, 29.2318671010435, -96.3339688256383, 5.10485065169632, -74.1683969274163, 27.5063658133149, -20.300987130031
+method: k
+rm: TRUE
+result: -0.357889493427411
+input.z.1: 53.2483558636159, -62.8594945184886, 69.805056694895, -91.7430310044438, 3.41492984443903, 67.3900785390288, -98.4968071337789, -0.730537809431553, -72.1466899383813, 87.7064510248601
+input.z.2: -89.8748981766403, 15.6837180722505, 14.6945471409708, -73.451646277681, 36.8902978952974, 22.0203426666558, 87.802790151909, -19.431734085083, -43.2061756029725, -2.11614053696394
+input.z.3: -36.9409368839115, 2.75738257914782, 97.5110043305904, 17.5617986824363, -32.737740688026, -28.1387409660965, 58.5559561382979, 41.4380328729749, 63.8094739057124, -65.0269193574786
+------------------------------------------------------------
+function_name: pcor.rec
+count: 13
+x: -42.7785499952734, 87.383286235854, 25.6565656047314, 62.4534173868597, 54.393582046032, -88.4201749227941, -95.5750266090035, 66.1459297407418, -16.2288751453161, -20.9175069350749, -13.3836749475449, 18.3453384786844, 47.9472403414547
+y: -22.8746916633099, -98.0151399970055, -19.1907866857946, -59.1198869049549, -82.8722677659243, 78.9457001723349, 63.5891283862293, 91.796372551471, -77.384944120422, 77.7682485058904, 49.4990679901093, -59.758533583954, 34.0949323493987
+z: 31.6309703979641, 11.225744150579, -23.2299293857068, -64.9821206461638, 44.5281345862895, 29.6854661777616, 26.658301660791, -77.0363720599562, 14.9900930933654, -43.017488764599, -84.5935768913478, -86.2529832404107, 68.9730571582913
+method: k
+rm: FALSE
+result: -0.324337486570401
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: 20.6052641384304, -34.7386178560555, 64.5274777896702, 48.2837058603764, 32.1162473410368, -61.5267707034945, 18.7145279254764, -96.3212412316352, -9.05703571625054, -72.3377135582268, -36.9318156503141, 48.5457048285753, 16.1100664176047, -99.9019818846136, -6.93311747163534, 42.5408709794283
+y: -68.1519189383835, -21.3783976621926, 83.5196397732943, -21.0456018336117, -65.211294637993, -4.57787401974201, -72.63866760768, 21.234114235267, -97.2475761082023, -79.9188132863492, 79.5116892550141, -38.4806913789362, 19.9322822969407, 94.5325861684978, -42.9837487637997, 22.1684457268566
+z: -39.7361300420016, 99.3054033722728, 29.9724598415196, 95.9335449617356, 81.9420096464455, 94.5490169804543, 45.2891474124044, -18.8411912880838, 21.6612101066858, -46.4374198112637, 57.1713132318109, -16.4783576037735, -28.1885820906609, 94.3112654611468, -75.3233570605516, 86.627834988758
+method: p
+rm: TRUE
+result: -0.197035364225789
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: 68.7338494230062, -90.181301580742, 10.1553022861481, 88.3507196325809, -85.4962442070246, 26.208075415343, -51.701020821929, -30.7254826184362, 10.9224076382816, 96.7410780023783, -39.8431303910911, 65.5343361198902, 41.4392391685396, -88.4308515582234, -52.8691418003291, 66.4409405551851, -55.0576376728714, -38.1625887006521, -48.4449471812695
+y: -86.0378950368613, 46.4772601611912, 68.4132843278348, -11.8289707694203, -30.7506918441504, 36.8791323155165, 91.6302738245577, -46.0631328169256, 10.5568787548691, 60.4254566133022, -35.1412182673812, 92.5516024231911, 41.4456882048398, 10.1779696531594, 76.3081361539662, 81.4410069491714, -23.1231520418078, 11.1144263762981, -66.3827836513519
+method: s
+rm: TRUE
+result: 0.201921490839196
+input.z.1: 66.5893373545259, -94.5090161636472, -32.1443051565439, -26.2381840497255, -67.3655487131327, -45.237745763734, 15.975698409602, 56.1301979236305, -72.355697536841, -1.03531731292605, 51.5078302007169, -34.9794320762157, 7.16000627726316, -69.1763840615749, -29.5579122379422, 77.2579966578633, -2.20924792811275, 22.5620280019939, -25.0138834584504
+input.z.2: 18.2577608153224, -72.2484740428627, 4.15805950760841, 33.5841840598732, -38.4825916495174, -59.1983853839338, -23.3986431267112, -93.8368917442858, -65.0328462012112, 77.1746356505901, 8.98702275007963, -45.9206078201532, -11.1201015301049, -6.38252813369036, -16.0341050941497, 38.0308180116117, 45.4919638112187, -53.2359473407269, 42.4233398400247
+input.z.3: -80.4229929577559, 72.5026939529926, -64.9018800351769, 19.9812149628997, -86.3108912948519, -53.0842928215861, 66.3097468670458, -54.4293747283518, 84.6861940808594, 52.5425457395613, -58.5939683020115, 56.8557804916054, 44.3008310161531, 38.0050702951849, 60.04942744039, 3.64885800518095, -1.5428779181093, -5.60614042915404, -2.5199462659657
+------------------------------------------------------------
+function_name: pcor.rec
+count: 18
+x: -79.1204867418855, -95.156848942861, -58.1009825225919, 1.4517383184284, 5.50476736389101, -62.5133258290589, 38.2517375983298, 96.7142606619745, 47.5910087116063, -65.3327509295195, 76.1547356843948, -0.804628105834126, 75.1669812947512, -96.6471124906093, 59.5920866820961, -17.1567432116717, 84.0993498452008, 77.0434119738638
+y: -7.90872192010283, 69.3680602591485, -10.8002967666835, 72.9388284031302, -59.5035542268306, 32.4369426351041, 27.8420885559171, -8.3828354254365, -34.5960255712271, 94.1054672468454, 90.5859648250043, 54.2748330626637, 77.9608488548547, 26.6538372728974, -84.3118285760283, -61.4382669329643, -36.6503063589334, -97.6180238183588
+z: -41.9485231861472, 16.5158891119063, 94.3834115285426, -48.5038497019559, -72.4178664851934, -12.9061355721205, -45.3039852436632, -22.6247455924749, -81.2429226003587, 21.1907632183284, 60.5692085344344, 45.7070804666728, 49.69632467255, -67.7394894417375, 7.82280783168972, -73.2445613015443, -38.9073747675866, -44.2419451661408
+method: k
+rm: TRUE
+result: -0.226172401437073
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: -18.5641910415143, -20.0593877583742, 25.6991996429861, -19.6434530429542, -49.3258328642696, 74.0071775857359, -14.2312118317932, -98.484157724306, 26.4571780338883, 24.9734192620963
+y: 63.7182058766484, -21.0957065224648, -13.5498566087335, 80.4991848766804, -59.0782665647566, 48.8544872496277, 21.7224644031376, 65.6007543206215, -89.8360439110547, 30.1321961451322
+method: p
+rm: FALSE
+result: -0.208651612863199
+input.z.1: -54.182271566242, -81.6743851173669, -47.1539053600281, 92.6043943036348, -78.3327240496874, 26.2651245109737, -93.9263246953487, -87.8016094211489, -16.633188771084, -78.5125374794006
+input.z.2: 18.6473812907934, -54.5641149859875, -94.9858000036329, -80.5813108570874, 67.0117434114218, -18.388499552384, -90.0589608587325, 79.7222523484379, -29.4443475548178, -2.07264893688262
+input.z.3: -32.8892857767642, 57.8148124739528, -57.9109583515674, 77.5278323795646, -67.0391498599201, -8.65513472817838, 81.3078344333917, 28.577094245702, 39.4989902153611, 74.875748809427
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -11.7029183078557, 20.6746962387115, -6.4186317846179, -65.7957127317786, -53.4551188349724, -95.6971417646855, 8.08795387856662, -82.9692668747157, 65.0797595269978, -40.0556065142155, 22.845498425886, 1.03095825761557, -14.8108241148293, -78.0993150081486, 30.944905616343
+y: 82.0563825778663, -93.5029713902622, -33.4759468212724, 34.7522557713091, -40.9242569468915, 12.8855560906231, 87.9595287609845, -29.6215635724366, 86.1932807136327, 14.4459169823676, -32.873512012884, -95.2299362048507, -49.8739655595273, 36.8796242401004, -65.0861688889563
+method: p
+rm: FALSE
+result: -0.104743080690118
+input.z.1: 65.66839707084, 92.6697647199035, 38.6834030039608, -1.27137661911547, -28.2877578865737, -84.7902995534241, 27.4061929434538, -27.7048649732023, -63.9012438245118, 28.058318933472, -20.2759954612702, 22.2938399296254, 77.1114971488714, 70.4757141880691, -76.6643046401441
+input.z.2: -39.5549254957587, -19.5246502757072, 18.0171636864543, -57.7165036462247, 95.6821781117469, 33.9750271290541, 71.6323775239289, -66.8427237775177, 10.4952494148165, -29.4743011239916, 71.6373374685645, 40.0875151157379, -42.4196716863662, -1.66454841382802, -60.522589366883
+input.z.3: 98.3820408582687, 25.1781207975, -82.4520411435515, -78.9945350494236, -60.6463038828224, 38.1571523845196, -2.5337272323668, 51.339119952172, 28.5604369360954, -55.1758613903075, -4.05583186075091, -33.9473246596754, 25.7808249443769, -45.2997167594731, -18.1844201404601
+------------------------------------------------------------
+function_name: pcor.rec
+count: 18
+x: -19.9252225458622, -52.1368729881942, 47.0799256581813, 4.0996206458658, -47.799872700125, -30.0670292694122, 99.486964661628, -60.6471673119813, 87.9351426847279, -87.2190349269658, -14.3205997534096, -65.2433201204985, -91.2750414572656, 57.8982046339661, -58.4296739194542, 75.9663732722402, -39.1042973380536, 81.5513394307345
+y: -90.2006414718926, -16.2967856507748, -79.3194455094635, 84.4338634051383, 89.2368617933244, -12.7161718904972, 75.4535779356956, 37.1095749549568, 49.1659552324563, -26.1069383472204, 45.5694596283138, 38.4463460184634, 33.344994019717, -1.42435110174119, 47.1649888902903, -99.7756907250732, 46.394665306434, 15.2081664185971
+method: s
+rm: TRUE
+result: -0.181282481020533
+input.z.1: -50.1517540775239, -67.6142763812095, 48.4815247356892, 8.75700111500919, 31.7483810242265, -90.2583417017013, -67.3944258131087, 9.49530829675496, 90.4742771759629, -84.6624474041164, 91.2189200520515, 97.8029098827392, 68.2472475804389, 37.4118328094482, -83.8537451345474, 69.1915712784976, 19.8050633072853, 33.8238943368196
+input.z.2: 55.8937823399901, -13.7481592129916, -2.85266265273094, -92.6436629146338, -8.95788944326341, 35.6726922094822, -52.2164586465806, 41.2114669103175, -82.6304302550852, 99.3652961216867, 2.97346808947623, -24.6266740374267, 55.9584220405668, 27.8859186451882, -78.0235532671213, 92.6008366048336, -46.0081057623029, 46.4334186166525
+input.z.3: 75.9668093174696, 48.5109059140086, -24.6230148244649, 47.1537347882986, -52.6724417228252, -0.0623919069766998, 60.068893712014, -47.2048899624497, -31.3584079500288, -30.8376907836646, 72.9500978253782, -4.89845988340676, 8.7826278526336, 55.5695308372378, 89.7840007673949, -20.1651885174215, 54.3830844108015, 82.4272679630667
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -89.2206337768584, -93.6034481041133, -92.6505226641893, -27.2543139755726, -68.1821953039616, -21.7996491119266, 71.5557252522558, 43.2489835191518, -90.4781390912831, 7.11716823279858, -82.050916319713, -26.397502142936, 55.4946079850197, 64.7005498874933, -25.9218308143318, -16.6726984549314
+y: -35.1899597793818, -21.6532570309937, 18.4573667123914, 62.4437351245433, -68.842231342569, -73.8841473590583, -11.0737474635243, -20.1630857773125, -50.4398448392749, 35.7471308205277, -27.5834964122623, -26.5524230897427, 56.0133414808661, -27.9868010431528, -10.7581190299243, -61.9544327724725
+method: k
+rm: TRUE
+result: 0.1802927896232
+input.z.1: -40.1324992999434, 9.90798645652831, -6.51583895087242, -81.11083349213, 84.9643123336136, -87.4527308158576, -60.1582251954824, 77.6400165166706, -42.5469139125198, -82.8197461552918, -48.6188884824514, -13.3140456862748, 88.9097800478339, -57.9036547336727, 65.818764641881, -16.4653040003031
+input.z.2: -84.256647573784, 12.2872774954885, -66.00108044222, 56.7613907624036, 48.1513442005962, 77.6724391616881, -62.4357144348323, -36.4606843795627, -25.3354148473591, -14.6164451725781, -82.1608787402511, 63.0101605318487, -43.4699194505811, 62.6883119344711, 60.930627817288, -4.78333029896021
+input.z.3: 74.4455846492201, 21.936039859429, 57.6761968899518, 89.8042913526297, 63.5838260874152, 38.8069860637188, -54.178605042398, -76.1459093540907, -22.7403795812279, 68.8472212292254, 84.6168057061732, 11.0940378624946, 85.7618093956262, -15.3427021112293, 1.49911385960877, 20.5723023507744
+------------------------------------------------------------
+function_name: pcor.rec
+count: 10
+x: 24.9564551748335, 18.5923957265913, -46.4656071271747, 86.6394772194326, 65.5116721056402, -98.461588146165, 53.3600708469748, -78.3477867487818, 76.5432852786034, 54.6317078173161
+y: -41.7801002506167, 0.232810061424971, 87.8145711030811, 74.0377931389958, 24.6370416134596, 77.2726675961167, 0.525932526215911, 71.0617937613279, 1.96412657387555, -1.88834308646619
+z: -79.2718555312604, -16.1210845690221, 29.8867321573198, 24.5947330724448, -84.9225256126374, 11.1365122720599, -72.2685813438147, 60.749769769609, 8.51291613653302, -13.8399054761976
+method: s
+rm: FALSE
+result: -0.0470490565729547
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -85.2682391647249, -25.1930296886712, 36.2195362802595, 11.7865398991853, 68.5172120574862, -83.3658806513995, -75.6855964194983, -20.0753760524094, -19.762350525707, 35.1225445978343, 30.2758548408747, 1.45033104345202, -14.6772135049105, 14.2147125676274, 49.1841867566109, -35.2573278360069
+y: -20.5554758664221, -97.0802981872112, -26.0747340507805, 71.6280955821276, -85.3886511176825, -55.2334129810333, 43.0862717330456, 28.4769951831549, 78.5121974069625, -81.3196417409927, 39.5874671638012, -1.8134135287255, 85.9221469610929, -95.360365929082, 19.3586761597544, -66.9956528581679
+method: p
+rm: TRUE
+result: -0.0236982307617225
+input.z.1: 3.02675268612802, 29.488014569506, -90.2211040258408, 18.5702975373715, 81.4835339784622, -81.491480441764, -81.4419069793075, 49.6095394250005, 15.8508184831589, 55.1565334200859, 93.1393330916762, -18.7935738358647, -27.2714839782566, 28.1014911364764, 7.63522856868804, 86.4262473303825
+input.z.2: 15.2697853278369, 21.544589381665, -42.2709172591567, 66.4516931399703, -80.4499278310686, 7.60396728292108, -66.5740209631622, 42.6155330613256, -25.6430941168219, 98.4072601888329, 50.5805794615299, -68.1811819784343, 73.6316103953868, 79.5231841970235, 76.5872830990702, 44.7566782590002
+input.z.3: 6.84692151844501, -56.8186898250133, -52.9168414417654, 38.5583185125142, -1.00095826201141, -6.59536058083177, 55.0686245784163, -76.6531312838197, 56.9502690341324, 5.48669574782252, 98.175480728969, -63.4856688790023, 85.1667809765786, -59.0522172860801, 79.1193772573024, 9.27014825865626
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -91.3233927916735, -15.5439792200923, 43.0199227761477, 39.7756622638553, -9.58535838872194, -32.0357569493353, -48.6907037906349, 4.63044187054038, -2.5522580370307, 73.4696492087096, 58.3276907913387, 43.7473264522851, -2.46611316688359, -30.3629717323929, -17.4933492671698
+y: -5.91190569102764, -82.0860084611923, -99.643186153844, 16.0177246667445, 19.4741931278259, -7.10836984217167, 47.0438427757472, -83.1305775791407, 78.383247833699, 79.6709012705833, 86.369459098205, 70.2751192264259, -15.8207864966244, -29.9358425661922, 60.3160366881639
+z: 26.2397599872202, -59.9476198200136, 95.269483095035, -0.995413586497307, -45.5644907429814, 24.1255348082632, 54.9571478739381, 6.70850914902985, 83.7543970439583, -42.7414426580071, -30.6731200776994, 86.6206298582256, -21.0456729866564, 20.3609951306134, -51.160212373361
+method: k
+rm: FALSE
+result: 0.160422236979937
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: -54.2834484484047, -99.5062152389437, 11.2263063900173, 4.25140345469117, -6.57475399784744, -47.9635813273489, 13.5771594475955, -17.8992413450032, 44.7320376522839, 10.5947217904031, -95.9636783692986, 78.552111517638
+y: 25.7135692518204, 65.7770814839751, -47.1805317793041, 86.2048698589206, 84.3483364675194, 52.1802646573633, 38.1061236839741, -24.7705412562937, 70.3330162912607, 70.1622222550213, -19.1713237203658, 66.428263951093
+method: p
+rm: TRUE
+result: 0.329071793149575
+input.z.1: -41.6167279239744, 30.5627764668316, -46.9200180843472, 70.171003555879, 14.7832777816802, 66.5134385228157, 90.0630659423769, 50.129773048684, 99.1226064972579, 20.8656733389944, 93.0510560981929, -58.9669019449502
+input.z.2: -28.3709186594933, 67.1317570377141, -65.2744254097342, 84.8623389843851, 43.1941722985357, -2.67433333210647, 73.5897833947092, 45.3403359744698, -82.2376867290586, -16.9432976283133, 51.7834584228694, 73.2923530042171
+input.z.3: 88.4447504300624, 29.8185252584517, 70.2338655479252, 96.2983122095466, -7.37721398472786, -47.8313674218953, 50.365524366498, 45.9664605092257, -55.9734042268246, 21.4261449407786, 40.0185635779053, 55.8912822511047
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -57.1398223750293, -23.3540481887758, -22.2071134019643, 96.7134712729603, -57.6335528399795, -49.1604723967612, -78.7016066256911, -84.9242495838553, 65.3399391565472, -31.4437021967024, -9.51485671103001, 70.0565829873085, -71.0057987365872, 91.0863234195858, 72.5100541952997, 58.0725823994726
+y: 18.8888671807945, -22.8483431972563, 24.8971822671592, 4.40226024948061, -48.3475063927472, 50.9493664372712, 92.7150129340589, 63.0087484139949, 43.2604452129453, -33.4913415834308, -35.9951756428927, -87.5060506630689, 15.4649335425347, 88.3686876855791, -25.8083974011242, 0.085412198677659
+z: 81.5011800732464, -99.7660262044519, -93.3500723913312, -79.0094709955156, -71.6781900729984, 1.03125544264913, 11.5347918123007, 86.6896205116063, 34.3875902239233, 7.78482472524047, 85.7462510932237, -45.7913243677467, 22.8047444485128, 4.74429242312908, -16.1633410025388, -13.6797955725342
+method: k
+rm: FALSE
+result: -0.0899565056297501
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -75.1803813036531, 32.6554085128009, 46.5199385304004, 10.0931627675891, -84.9136417731643, 99.0708300843835, 43.4466718696058, -27.9581206385046, 52.7613752521574, 0.147021608427167, 11.5825299639255, -29.0862209163606, 85.5328780598938, -23.4052004758269, 13.3759755641222
+y: 28.4078094642609, -40.5093076638877, -3.29849710687995, -45.7378671970218, 4.03570998460054, 0.237223505973816, 23.7162163015455, 49.5277442503721, -6.30603078752756, -22.8287412319332, 94.9057441670448, -63.0924633704126, -42.9297237191349, -78.4588639158756, -39.1431424301118
+z: 49.7008972335607, -69.9944775551558, 34.2155236750841, -53.7857625633478, 40.5958297196776, 52.6141790673137, -80.8522994164377, -3.425587201491, -66.6255864314735, 47.9161818511784, -5.30791841447353, -65.1415256317705, -46.0642572958022, 43.2463189586997, 92.9539552424103
+method: s
+rm: FALSE
+result: -0.0445130955220816
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: -51.6405268572271, -71.7918659094721, -73.2296792324632, -31.7894198000431, -20.4344088677317, 6.17863591760397, 67.1885369811207, 26.0930087417364, 77.9443024657667, -59.804061613977, 66.2859657779336, -92.9702171590179, -48.0025853030384, 75.9013353381306, -0.952996592968702, -45.6366574391723
+y: -66.1892560776323, 40.1626775972545, -78.6765556782484, 3.59122948721051, 54.1154608596116, -33.2301977556199, -51.3999274931848, -36.8912567384541, -16.5293656755239, -39.3365318421274, 7.12325950153172, -8.90163774602115, -26.7156166490167, -38.0113017745316, 96.5745037887245, -93.0887303315103
+method: s
+rm: TRUE
+result: 0.00646891417813344
+input.z.1: -71.3289998471737, -89.4274845253676, 80.2009513135999, -96.6635977383703, 1.58105902373791, 44.5951706264168, -22.3852779716253, 97.8820891585201, -66.1968573462218, -6.31989082321525, 23.1592249590904, -83.3515228237957, 57.0112504996359, 31.7412199452519, 68.0809809826314, -37.4492235481739
+input.z.2: -67.5689687952399, 79.3258271180093, 97.4323255009949, -68.1801676284522, 58.8779048528522, -95.3483588527888, -66.6574165225029, -66.7481596115977, -43.544950382784, 13.8981956988573, -96.2374809663743, 30.4743104148656, -20.3307262156159, 58.3140489179641, 83.9318192563951, 18.8910231459886
+input.z.3: 61.8831608444452, -13.0282598547637, -9.60066677071154, 64.577030390501, -36.6879174951464, -47.287135059014, -49.6693975757807, -20.8232561592013, -56.3352135941386, 77.1996547002345, -68.4678519610316, -52.4340079631656, -43.0555366910994, -27.0189959555864, -47.0933285541832, 11.8024677969515
+------------------------------------------------------------
+function_name: pcor.rec
+count: 16
+x: 6.02917508222163, 27.8621552977711, 92.6266786642373, -67.0329743530601, 80.2830060012639, -55.2314624190331, -57.516923872754, -20.3406107611954, -88.6821561027318, -74.7315115761012, 22.0172420144081, -99.7548290062696, 63.5964724700898, -92.0153565239161, 10.2219923399389, 19.8053610976785
+y: 31.9939563982189, -15.3352430090308, -48.4936602413654, 18.2333611883223, -33.8946952484548, 41.1579161882401, -8.68082982487977, 31.8826792296022, -32.7911721542478, -56.1658204998821, -55.476590571925, -76.0229810606688, -28.4876780118793, 46.7708960175514, 26.4549767132849, 21.7337732668966
+z: -61.3926334772259, -8.43798192217946, 49.4600793812424, 12.1881818864495, 4.04470223002136, -0.887329550459981, -14.2089146189392, -69.8127029463649, -23.6053369939327, 37.6661356538534, 28.68687286973, -40.214622952044, -28.2490330282599, -30.1233724225312, 16.7358654085547, -60.9078065026551
+method: s
+rm: TRUE
+result: 0.0109861740383809
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: -22.6301351562142, -0.401159888133407, -51.0836260858923, 52.9926339164376, -31.112408824265, 7.74280959740281, 57.6454367488623, -58.9728377293795, -55.3409872576594, 93.505600746721, -39.4296121783555, 98.1291733682156, 95.6328963395208, -47.2205543890595, -91.3154749665409, -46.4315792080015, -55.1306743174791, -83.6544279474765, 25.9763963054866
+y: 10.233701299876, -34.3406205065548, -44.1589217633009, 18.0708408355713, -33.9899700134993, -92.1382100787014, -31.3480507116765, 34.7450574394315, -26.1664397548884, -10.6908304151148, -56.8871490191668, 42.0222526416183, -38.5681716259569, -50.3884779289365, 62.0742606930435, 18.8085388857871, -98.4062366187572, -42.258721170947, -78.7414902821183
+method: s
+rm: TRUE
+result: 0.260997031943953
+input.z.1: 93.6964779626578, 97.6941250264645, 84.2403077054769, -21.0036048665643, 30.8375779073685, -66.1338172387332, 5.2408910356462, 61.1676721367985, 60.5456584133208, 0.74210693128407, -37.1678366325796, 29.5855506323278, 27.7806338854134, -5.75614403933287, 67.2522669658065, 76.9101575016975, -26.9960866309702, 77.3400701582432, 27.4017762858421
+input.z.2: 59.9046770483255, 75.6403599400073, 95.9070024080575, -53.2769947312772, 50.6330458912998, 23.7067949026823, 35.1966741029173, 89.4811980891973, 35.9289538580924, 20.3873679041862, 34.1469102073461, 94.6420239284635, 53.1159293837845, -12.1292291209102, 15.0359552353621, 9.68966633081436, 78.1882911454886, 66.8827974237502, 2.47473819181323
+input.z.3: 19.4207503460348, 51.5944085083902, 66.9528753962368, -48.429446760565, -93.2403178419918, -87.8670411650091, -56.8921292200685, -65.7475048676133, 19.9255768209696, 4.57514231093228, -10.249630920589, 69.709189189598, -64.6382919047028, 17.4305737949908, -67.6548017188907, -12.9575524479151, 61.2475155852735, -36.1469886265695, 87.6915104687214
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 9.37572391703725, 31.7226287443191, 43.1954346597195, -60.2317395154387, 57.4296472128481, 33.2106852438301, 30.182341625914, 16.8947563041002, 8.45923842862248, 39.1486890614033, -21.3120787870139, 5.00677810050547, 42.3083784524351, 52.4043606128544, 78.8675017654896, 34.8648357205093, 95.3381980303675
+y: 73.7328485585749, -65.1126708835363, -50.9216074366122, -12.8152929246426, -98.8350537605584, -20.3600559849292, 98.9452924579382, 3.61747466959059, 35.8806551899761, 65.8439641352743, -16.7892712634057, 93.2440320961177, -63.617469696328, -95.0687137432396, 37.9251030739397, -75.4912422038615, -6.28811488859355
+method: s
+rm: TRUE
+result: -0.391668812877604
+input.z.1: 84.7690727096051, 35.6805397663265, 2.92688133195043, -2.66396179795265, 59.4639756251127, 63.7523754499853, 18.2699968107045, -82.0927425753325, 15.0487997569144, -88.0888516549021, -27.5004559662193, -25.4689407534897, -42.007040977478, 93.5237852390856, 47.0437038689852, 61.5355266258121, 54.8702186439186
+input.z.2: -87.6829659100622, 47.0985118299723, 12.1185038704425, -46.7640890274197, -69.5790245663375, 5.30735715292394, -4.46678730659187, 93.2893170509487, 50.3495833836496, -34.9353915080428, 18.0263666901737, 58.3935454953462, 87.4742162879556, 30.3390501532704, -73.5950434580445, -74.5545803103596, 38.0712570156902
+input.z.3: -61.2569669261575, -96.3447272777557, -29.3482882902026, -19.3482856731862, 13.6697378009558, 40.6999397091568, 41.9870645273477, 62.1129790320992, 30.4264964070171, 73.9961228799075, -55.8274395298213, -70.7107780966908, 39.5272477529943, 39.4379249308258, 71.6056514065713, -89.4290968310088, -71.2074970826507
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 23.9549969322979, -94.3478518631309, 53.8556181825697, -63.9131240081042, -33.5065440740436, -27.5726289022714, -36.9144127704203, 9.75463544018567, 80.6153140030801, -69.4012255873531, 99.9501515645534, 16.0135179758072
+y: -41.6901842225343, 71.2601354811341, 94.5316863711923, -76.7564448993653, 67.3882042057812, 79.135302407667, 85.5548634659499, 98.4304254874587, -25.5130287259817, -22.0055079087615, -95.5722292885184, -19.1982574760914
+z: 31.5045582596213, -61.6609159391373, -53.6041364073753, -54.1261918842793, 55.5201834533364, -70.761605957523, -37.8632005769759, -5.51536502316594, 22.109322855249, -5.48479808494449, 62.8399562090635, 66.7187201790512
+method: k
+rm: TRUE
+result: -0.046547725411756
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: -86.8803692981601, -36.0070365015417, -70.1002893038094, -86.1806470900774, 66.3614605087787, -94.7579635307193, -49.5362688787282, 39.0053760726005, 28.0300771817565, 65.3048079926521, -78.614980308339, -99.5677480939776, 37.4129545409232, 57.5423365924507, -25.4214689135551, -67.64843207784, -25.7995640393347, -59.050830733031, -49.872957682237
+y: -97.1362472046167, -90.4611896723509, 67.4148492049426, 38.2251622155309, 71.9721779692918, -18.9910460263491, 69.1500102169812, 51.959238294512, -38.5041401255876, -68.6116041615605, 24.4872363749892, -88.0486444570124, 59.0363015886396, 24.4759861845523, -39.4574940670282, 46.4638626202941, 69.4575124420226, 83.6080874316394, -21.5877468697727
+method: p
+rm: TRUE
+result: 0.222856530894645
+input.z.1: 60.3581060189754, 36.6046156268567, -80.6256499607116, 67.3364251852036, 20.8286061882973, 90.5355037655681, 34.4946308527142, 72.2939557861537, 24.818326253444, -73.8570734858513, 60.6789906043559, -78.2595306634903, 31.5215276554227, 88.7460107449442, 47.5978660862893, 37.7674763090909, 14.174500759691, 23.2667552307248, -44.4074565544724
+input.z.2: -71.1571972351521, 67.5592693034559, 32.7134820166975, 50.4700905177742, -5.32517521642148, -9.73571254871786, 62.8018686547875, -33.77331267111, 82.4934613425285, -82.5158701743931, 23.7224648240954, -12.2990741860121, -32.6325906906277, -60.1869959384203, 15.1140324771404, -47.5414104759693, 39.1125004738569, 34.8343822639436, -41.0773036535829
+input.z.3: -83.8173258583993, -41.9550708029419, 94.7827941272408, 44.7238489985466, 7.73765784688294, -76.5092555899173, -70.8226544782519, -20.9283753763884, 30.5160601157695, 8.20419332012534, -23.4743303153664, 1.33969597518444, -45.6315482035279, -20.0630795676261, -55.0699974875897, 76.2154544703662, 90.7609693706036, 49.0804013330489, 24.8603868298233
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: -95.6984742544591, -17.0751072466373, -74.351422348991, 97.9444544762373, -78.9809799753129, -91.6577459778637, 47.7074146270752, -16.9179151300341, -39.3213587347418, 65.5904557090253, 60.0742573849857, 87.3231331352144, -78.467915719375, 28.0999443493783, 89.8317760322243
+y: 38.1394040770829, -79.9139173235744, -11.8167380336672, -27.1410693414509, 0.926599558442831, -76.7347189597785, -78.9869936183095, -44.4243895355612, -84.7858403343707, -42.7895428147167, 95.1523006428033, -37.1474313084036, -20.4304214566946, -45.007686316967, 53.1755958218127
+z: 10.8393523376435, -5.54150752723217, 6.67336750775576, 94.895927561447, 28.04304221645, 8.71308073401451, -63.6728871613741, 25.6648155860603, 94.4418403320014, 65.6681419815868, 14.3071625847369, -18.7641613651067, 47.0834728330374, -34.1443062759936, 41.7607615236193
+method: k
+rm: TRUE
+result: 0.0567462819506484
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 18.4970577247441, 78.3253606874496, 79.4621794950217, -44.2970278672874, 49.8550353106111, 96.2965226732194, -91.7066268622875, -10.6500246096402, 83.8136198464781, 82.6252206228673, -75.066755246371, 41.5468964725733, 23.8436101470143, -14.4322760403156, 84.5842578914016
+y: -34.6368032041937, -88.1088628899306, 63.0725324619561, -2.26956433616579, 3.40624032542109, 33.9189363643527, -34.2757223173976, -10.0570505019277, -72.027294524014, 89.8351664654911, -98.8331866916269, 73.1307323090732, -50.5687814205885, -23.6362583935261, -91.3148396648467
+z: 79.7483292408288, -81.3085496425629, -7.89254033006728, 11.9726373814046, -15.717267151922, -22.2710655536503, 70.8750586956739, -90.9301116131246, 91.3467094767839, 75.1269446220249, 36.3692390266806, 4.92376713082194, -42.952916584909, 59.6110574901104, 37.576672853902
+method: p
+rm: TRUE
+result: 0.268386356974156
+------------------------------------------------------------
+function_name: pcor.rec
+count: 15
+x: 76.5814383048564, 57.0448996499181, -62.4477106612176, 60.2575681172311, -25.0475298147649, -15.6559887807816, -75.9389230050147, -65.7562242820859, -39.8771365173161, -8.23787515982985, 79.7387945000082, -91.5918366517872, 22.8263909928501, -71.058910060674, 84.923558216542
+y: 28.6601890809834, -36.4405090454966, -5.37604507990181, -37.0503096841276, 65.667122695595, -50.3413951955736, 34.6017302479595, 89.4681378733367, -57.4270334560424, 9.56006632186472, -49.7303061187267, 18.1288056541234, 86.5119753405452, 30.3892049472779, -58.9283072855324
+method: p
+rm: FALSE
+result: -0.581327155629278
+input.z.1: -30.6997185107321, 3.00485193729401, -19.0188682172447, -62.2001667506993, 58.9584777131677, -93.9231510274112, 49.4996389839798, -19.6634422056377, -97.4878797773272, -94.901405647397, 79.1410635225475, -90.6966128386557, -94.0285502001643, 82.7198777813464, -98.452693875879
+input.z.2: -49.3249548599124, 11.3597484305501, 40.297681838274, 56.4172050915658, 41.8464520014822, -4.97913383878767, 69.742794893682, -10.7891221065074, -78.006159607321, -78.0675538815558, -28.415847895667, -91.1122145596892, 74.2001689970493, -99.0127950441092, 5.19012762233615
+input.z.3: -84.0839372947812, 10.4595458135009, 65.0016738567501, -53.3911125268787, -55.4832744412124, 97.5152499508113, 97.4566194228828, 4.70035099424422, -47.3684732802212, 60.6352349743247, -14.0548746567219, 98.1940933503211, -17.8199341520667, -37.4515796545893, 0.333152059465647
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: -8.38315580040216, 62.577842688188, 49.0786945447326, -23.4214183874428, -50.7951765786856, 63.7958682142198, 18.6142495833337, -65.1562116574496, 9.13515938445926, -13.0318598821759, -14.7402583155781, 43.8437720295042
+y: -95.1547249685973, 65.3086547274143, 64.0893495641649, 41.7833789717406, 79.1582422330976, 77.25128098391, -49.0278182085603, -83.4303252864629, -39.6045518573374, 99.8193635139614, 75.6284608971328, 48.1379889883101
+z: 43.6136350035667, -27.2865650709718, 46.6717171482742, -32.6379572506994, 46.3561374694109, 46.1588426493108, -10.5283190496266, 99.1817278321832, -19.9576248880476, -8.7395085953176, 78.7625784985721, -9.77536281570792
+method: k
+rm: TRUE
+result: 0.1995741655921
+------------------------------------------------------------
+function_name: pcor.rec
+count: 19
+x: 47.2569864243269, -54.1419552639127, 4.58478815853596, -46.2462868075818, 91.8153540231287, 92.8692331537604, -62.5648601911962, 73.8267461303622, 41.3589684758335, -97.9034782387316, 98.4798386693001, -68.1963364593685, 72.0308075658977, 45.4933300614357, -9.36734918504953, -95.2568708453327, 33.6745547596365, -43.6154155991971, -41.3312709424645
+y: -29.2843889445066, -53.1314035411924, -87.0913468301296, 37.3094552196562, -77.3197258356959, 70.0469268020242, -42.8911098279059, 41.4748248644173, 12.3367053456604, 57.5248312205076, -80.0365700386465, 98.4118913300335, 61.524490872398, 65.7054962124676, -65.2169495355338, 14.661518856883, -85.6023627799004, 75.6984632462263, 78.1068930402398
+method: p
+rm: TRUE
+result: -0.135855608847657
+input.z.1: -74.9636400956661, -50.4529112484306, 20.7700976636261, -80.2104050759226, -71.0900575388223, 50.9530781302601, -23.8234671298414, -71.7071319930255, -7.94364735484123, -20.3485743142664, -9.50398133136332, 82.8783791512251, 10.5230217799544, -51.2824773322791, 47.7249845862389, 39.2762039788067, 9.9144400563091, -20.7925260532647, 13.0731736309826
+input.z.2: -94.6578295435756, -64.8527128156275, -58.4413472097367, -85.668760119006, 7.32597187161446, 95.7994839642197, -44.0633145626634, 55.6779716163874, 99.0699136164039, -30.3195034619421, 49.2766278330237, -58.7089132983238, 67.0478899031878, -90.4275255743414, 15.3474381193519, 85.5800486635417, 78.1179318670183, -51.7158948816359, -65.5134835746139
+input.z.3: 45.1672998256981, -82.2150366380811, 60.7568521052599, 59.0756023768336, 6.37573790736496, 85.7110049575567, -48.6619451083243, -57.3790710419416, -43.1352959014475, 90.6157708261162, -64.2348555382341, -62.1769628021866, 99.3770319968462, 37.6210938673466, -57.459226064384, 93.9496335107833, 65.8080945257097, -91.4751033298671, 98.6923529300839
+------------------------------------------------------------
+function_name: pcor.rec
+count: 17
+x: 37.2042017057538, 99.8944859951735, -2.07033073529601, 90.3329219669104, 5.66258640028536, -75.7469927892089, 77.5577671360224, 73.5588663257658, -13.3695781696588, 44.1321019083261, 87.7224891912192, 76.8428465351462, -61.9186359457672, -29.1462487541139, 91.7470158077776, 18.7315174844116, -49.4004189968109
+y: 34.0684679802507, -9.32011008262634, -14.0058151446283, 62.1845297981054, 49.7096230275929, -21.9136434141546, -14.504536613822, -16.5688768029213, -21.3160504121333, -75.6585834547877, -23.5258265398443, 55.5550341960043, 81.8944736849517, -10.6297532562166, -45.3006814233959, -80.5884425528347, -66.3937121629715
+method: k
+rm: FALSE
+result: 0.010709211073504
+input.z.1: -18.9110844396055, -90.7871477305889, -43.4062168933451, 37.5648979563266, 85.6148176360875, 88.7003752402961, 51.7822846770287, -90.8645707648247, 23.4855143819004, 30.8463104069233, -34.2037714086473, -88.5380632244051, -10.789051419124, 48.4769470058382, 97.4002870731056, 25.5868528038263, 77.5939787738025
+input.z.2: -49.3421413935721, -79.5107122976333, -69.2758508492261, 70.2953652944416, -26.0492874309421, -20.896744215861, -75.7518227212131, -0.518101826310158, 46.2639306206256, 70.5356315709651, -40.9173401538283, 92.4795118160546, 55.0997568294406, 16.338200122118, 44.9827799107879, -39.441972784698, 48.6015120055526
+input.z.3: -73.5004779882729, 87.9872216377407, 92.7410830743611, -13.9436025172472, 64.5655245985836, -42.4590483307838, 36.8305039592087, -82.2956138756126, -6.28325091674924, -18.8072303775698, -80.3971918765455, -1.98830938898027, 35.4344930965453, -68.9127727877349, 34.085252834484, 42.8761828225106, -8.14059982076287
+------------------------------------------------------------
+function_name: pcor.rec
+count: 12
+x: 22.8633187245578, 98.9057261962444, 24.6264463290572, -67.5152567680925, -14.0114265028387, -23.4609092120081, -16.0529976245016, -74.1293652914464, -38.613182771951, 21.516504464671, -63.1570098455995, 3.43058109283447
+y: 66.3851822260767, 15.0869043543935, 34.2552722897381, -47.5028248038143, -18.82304972969, 7.55783263593912, 87.5256262719631, -45.0442485976964, 22.7592587005347, 15.5071972869337, 6.64250506088138, -61.0094598028809
+method: k
+rm: FALSE
+result: 0.380642612922639
+input.z.1: -43.5355789028108, 3.15432427451015, 42.3869500402361, -85.9040122944862, -91.3019767962396, -4.38300650566816, -36.0976214520633, 82.1006664074957, -86.6311294957995, -17.1651322394609, 45.6184559967369, 78.0932303052396
+input.z.2: -50.4019991960377, 53.8435474969447, 46.2169490288943, 57.7160312794149, -80.6737503968179, 4.29811356589198, -8.02055508829653, -29.807900544256, -26.4149129390717, 54.7383895143867, -1.05271721258759, 2.92500704526901
+input.z.3: 82.1892600506544, 1.68216228485107, -81.9020131602883, 21.994966128841, -25.5232597701252, 56.1190348584205, -62.1999088674784, -84.2725639231503, -35.7946417294443, -20.4277000855654, -81.0949407052249, 48.0415523983538
+------------------------------------------------------------
diff --git a/tests/unit/computations/test_correlation.py b/tests/unit/computations/test_correlation.py
index 706520a..267ced3 100644
--- a/tests/unit/computations/test_correlation.py
+++ b/tests/unit/computations/test_correlation.py
@@ -1,10 +1,12 @@
"""Module contains the tests for correlation"""
+import math
from unittest import TestCase
from unittest import mock
-import unittest
-
from collections import namedtuple
+import pytest
+from numpy.testing import assert_almost_equal
+
from gn3.computations.correlations import normalize_values
from gn3.computations.correlations import compute_sample_r_correlation
from gn3.computations.correlations import compute_all_sample_correlation
@@ -56,12 +58,12 @@ class DataBase(QueryableMixin):
"""expects the expectede results value to be an array"""
self.password = password
self.db_name = db_name
- self.__query_options = None
+ self.__query_options = None # pylint: disable=[W0238]
self.results_generator(expected_results)
def execute(self, query_options):
"""method to execute an sql query"""
- self.__query_options = query_options
+ self.__query_options = query_options # pylint: disable=[W0238]
return 1
def cursor(self):
@@ -90,53 +92,48 @@ class DataBase(QueryableMixin):
class TestCorrelation(TestCase):
"""Class for testing correlation functions"""
+ @pytest.mark.unit_test
def test_normalize_values(self):
"""Function to test normalizing values """
- results = normalize_values([2.3, None, None, 3.2, 4.1, 5],
- [3.4, 7.2, 1.3, None, 6.2, 4.1])
- expected_results = [(2.3, 4.1, 5), (3.4, 6.2, 4.1)]
+ test_data = [
+ [[2.3, None, None, 3.2, 4.1, 5], [3.4, 7.2, 1.3, None, 6.2, 4.1],
+ [(2.3, 4.1, 5), (3.4, 6.2, 4.1)]],
+ [[2.3, None, 1.3, None], [None, None, None, 1.2], []],
+ [[], [], []]
+ ]
- self.assertEqual(list(zip(*list(results))), expected_results)
+ for a_values, b_values, expected_result in test_data:
+ with self.subTest(a_values=a_values, b_values=b_values):
+ results = normalize_values(a_values, b_values)
+ self.assertEqual(list(zip(*list(results))), expected_result)
- @unittest.skip("reason for skipping")
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.compute_corr_coeff_p_value")
@mock.patch("gn3.computations.correlations.normalize_values")
def test_compute_sample_r_correlation(self, norm_vals, compute_corr):
"""Test for doing sample correlation gets the cor\
and p value and rho value using pearson correlation
"""
- primary_values = [2.3, 4.1, 5]
- target_values = [3.4, 6.2, 4.1]
+ primary_values = [2.3, 4.1, 5, 4.2, None, None, 4, 1.2, 1.1]
+ target_values = [3.4, 6.2, 4, 1.1, 1.2, None, 8, 1.1, 2.1]
+
- norm_vals.return_value = ([2.3, 4.1, 5, 4.2, 4, 1.2],
- [3.4, 6.2, 4, 1.1, 8, 1.1], 6)
- compute_corr.side_effect = [(0.7, 0.3), (-1.0, 0.9), (1, 0.21)]
+ norm_vals.return_value = iter(
+ [(2.3, 3.4), (4.1, 6.2), (5, 4), (4.2, 1.1), (4, 8), (1.2, 1.1), (1.1, 2.1)])
- pearson_results = compute_sample_r_correlation(trait_name="1412_at",
- corr_method="pearson",
- trait_vals=primary_values,
- target_samples_vals=target_values)
- spearman_results = compute_sample_r_correlation(trait_name="1412_at",
- corr_method="spearman",
- trait_vals=primary_values,
- target_samples_vals=target_values)
+ compute_corr.return_value = (0.8, 0.21)
bicor_results = compute_sample_r_correlation(trait_name="1412_at",
corr_method="bicor",
trait_vals=primary_values,
target_samples_vals=target_values)
- self.assertEqual(bicor_results, ("1412_at", 1, 0.21, 6))
- self.assertEqual(pearson_results, ("1412_at", 0.7, 0.3, 6))
- self.assertEqual(spearman_results, ("1412_at", -1.0, 0.9, 6))
- self.assertIsInstance(
- pearson_results, tuple, "message")
- self.assertIsInstance(
- spearman_results, tuple, "message")
+ self.assertEqual(bicor_results, ("1412_at", 0.8, 0.21, 7))
+ @pytest.mark.unit_test
def test_filter_shared_sample_keys(self):
"""Function to tests shared key between two dicts"""
@@ -164,6 +161,7 @@ class TestCorrelation(TestCase):
self.assertEqual(list(zip(*list(results))), [filtered_this_samplelist,
filtered_target_samplelist])
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.compute_sample_r_correlation")
@mock.patch("gn3.computations.correlations.filter_shared_sample_keys")
def test_compute_all_sample(self, filter_shared_samples, sample_r_corr):
@@ -206,6 +204,7 @@ class TestCorrelation(TestCase):
corr_method="pearson", trait_vals=('1.23', '6.565', '6.456'),
target_samples_vals=('6.266', '6.565', '6.456'))
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.compute_corr_coeff_p_value")
def test_tissue_correlation_for_trait(self, mock_compute_corr_coeff):
"""Test given a primary tissue values for a trait and and a list of\
@@ -224,6 +223,7 @@ class TestCorrelation(TestCase):
self.assertEqual(tissue_results, expected_tissue_results)
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.fetch_lit_correlation_data")
@mock.patch("gn3.computations.correlations.map_to_mouse_gene_id")
def test_lit_correlation_for_trait(self, mock_mouse_gene_id, fetch_lit_data):
@@ -251,6 +251,7 @@ class TestCorrelation(TestCase):
self.assertEqual(lit_results, expected_results)
+ @pytest.mark.unit_test
def test_fetch_lit_correlation_data(self):
"""Test for fetching lit correlation data from\
the database where the input and mouse geneid are none
@@ -264,6 +265,7 @@ class TestCorrelation(TestCase):
self.assertEqual(results, ("1", 0))
+ @pytest.mark.unit_test
def test_fetch_lit_correlation_data_db_query(self):
"""Test for fetching lit corr coefficent givent the input\
input trait mouse gene id and mouse gene id
@@ -281,6 +283,7 @@ class TestCorrelation(TestCase):
self.assertEqual(expected_results, lit_results)
+ @pytest.mark.unit_test
def test_query_lit_correlation_for_db_empty(self):
"""Test that corr coeffient returned is 0 given the\
db value if corr coefficient is empty
@@ -296,6 +299,7 @@ class TestCorrelation(TestCase):
self.assertEqual(lit_results, ("16", 0))
+ @pytest.mark.unit_test
def test_query_formatter(self):
"""Test for formatting a query given the query string and also the\
values
@@ -323,6 +327,7 @@ class TestCorrelation(TestCase):
self.assertEqual(formatted_query, expected_formatted_query)
+ @pytest.mark.unit_test
def test_query_formatter_no_query_values(self):
"""Test for formatting a query where there are no\
string placeholder
@@ -332,6 +337,7 @@ class TestCorrelation(TestCase):
self.assertEqual(formatted_query, query)
+ @pytest.mark.unit_test
def test_map_to_mouse_gene_id(self):
"""Test for converting a gene id to mouse geneid\
given a species which is not mouse
@@ -355,6 +361,7 @@ class TestCorrelation(TestCase):
self.assertEqual(results, expected_results)
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.lit_correlation_for_trait")
def test_compute_all_lit_correlation(self, mock_lit_corr):
"""Test for compute all lit correlation which acts\
@@ -375,6 +382,7 @@ class TestCorrelation(TestCase):
self.assertEqual(lit_correlation_results, expected_mocked_lit_results)
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.correlations.tissue_correlation_for_trait")
@mock.patch("gn3.computations.correlations.process_trait_symbol_dict")
def test_compute_all_tissue_correlation(self, process_trait_symbol, mock_tissue_corr):
@@ -418,6 +426,7 @@ class TestCorrelation(TestCase):
self.assertEqual(results, expected_results)
+ @pytest.mark.unit_test
def test_map_shared_keys_to_values(self):
"""test helper function needed to integrate with genenenetwork2\
given a a samplelist containing dataset sampelist keys\
@@ -438,6 +447,7 @@ class TestCorrelation(TestCase):
self.assertEqual(results, expected_results)
+ @pytest.mark.unit_test
def test_process_trait_symbol_dict(self):
"""test for processing trait symbol dict\
and fetch tissue values from tissue value dict\
@@ -456,6 +466,7 @@ class TestCorrelation(TestCase):
self.assertEqual(results, [expected_results])
+ @pytest.mark.unit_test
def test_compute_correlation(self):
"""Test that the new correlation function works the same as the original
from genenetwork1."""
@@ -470,10 +481,10 @@ class TestCorrelation(TestCase):
[None, None, None, None, None, None, None, None, None, 0],
(0.0, 1)],
[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
- (0, 10)],
+ (math.nan, 10)],
[[9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87],
[9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87, 9.87],
- (0.9999999999999998, 10)],
+ (math.nan, 10)],
[[9.3, 2.2, 5.4, 7.2, 6.4, 7.6, 3.8, 1.8, 8.4, 0.2],
[0.6, 3.97, 5.82, 8.21, 1.65, 4.55, 6.72, 9.5, 7.33, 2.34],
(-0.12720361919462056, 10)],
@@ -481,5 +492,8 @@ class TestCorrelation(TestCase):
[None, None, None, None, 2, None, None, 3, None, None],
(0.0, 2)]]:
with self.subTest(dbdata=dbdata, userdata=userdata):
- self.assertEqual(compute_correlation(
- dbdata, userdata), expected)
+ actual = compute_correlation(dbdata, userdata)
+ with self.subTest("correlation coefficient"):
+ assert_almost_equal(actual[0], expected[0])
+ with self.subTest("overlap"):
+ self.assertEqual(actual[1], expected[1])
diff --git a/tests/unit/computations/test_diff.py b/tests/unit/computations/test_diff.py
index e4f5dde..128fb60 100644
--- a/tests/unit/computations/test_diff.py
+++ b/tests/unit/computations/test_diff.py
@@ -2,6 +2,8 @@
import unittest
import os
+import pytest
+
from gn3.computations.diff import generate_diff
TESTDIFF = """3,4c3,4
@@ -19,6 +21,7 @@ TESTDIFF = """3,4c3,4
class TestDiff(unittest.TestCase):
"""Test cases for computations.diff"""
+ @pytest.mark.unit_test
def test_generate_diff(self):
"""Test that the correct diff is generated"""
data = os.path.join(os.path.dirname(__file__).split("unit")[0],
diff --git a/tests/unit/computations/test_gemma.py b/tests/unit/computations/test_gemma.py
index 73dd5eb..137c95c 100644
--- a/tests/unit/computations/test_gemma.py
+++ b/tests/unit/computations/test_gemma.py
@@ -1,7 +1,9 @@
"""Test cases for procedures defined in computations.gemma"""
import unittest
-
from unittest import mock
+
+import pytest
+
from gn3.computations.gemma import generate_gemma_cmd
from gn3.computations.gemma import generate_hash_of_string
from gn3.computations.gemma import generate_pheno_txt_file
@@ -9,6 +11,7 @@ from gn3.computations.gemma import generate_pheno_txt_file
class TestGemma(unittest.TestCase):
"""Test cases for computations.gemma module"""
+ @pytest.mark.unit_test
def test_generate_pheno_txt_file(self):
"""Test that the pheno text file is generated correctly"""
open_mock = mock.mock_open()
@@ -19,18 +22,20 @@ class TestGemma(unittest.TestCase):
self.assertEqual(_file, ("/tmp/gn2/phenotype_"
"P7y6QWnwBPedSZdL0+m/GQ.txt"))
open_mock.assert_called_with(("/tmp/gn2/phenotype_"
- "P7y6QWnwBPedSZdL0+m/GQ.txt"), "w")
+ "P7y6QWnwBPedSZdL0+m/GQ.txt"), "w", encoding="utf-8")
open_mock.return_value.write.assert_has_calls([
mock.call("NA\n"),
mock.call("NA\n"),
mock.call("BXD07 438.700\n")
])
+ @pytest.mark.unit_test
def test_generate_hash_of_string(self):
"""Test that a string is hashed correctly"""
self.assertEqual(generate_hash_of_string("I^iQP&TlSR^z"),
"hMVRw8kbEp49rOmoIkhMjA")
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.gemma.get_hash_of_files")
def test_compute_k_values_without_loco(self, mock_get_hash):
"""Test computing k values without loco"""
@@ -52,6 +57,7 @@ class TestGemma(unittest.TestCase):
"-gk > /tmp/my-token/my-hash-output.json")
})
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.gemma.get_hash_of_files")
def test_generate_gemma_cmd_with_loco(self, mock_get_hash):
"""Test computing k values with loco"""
diff --git a/tests/unit/computations/test_parsers.py b/tests/unit/computations/test_parsers.py
index b51b0bf..f05f766 100644
--- a/tests/unit/computations/test_parsers.py
+++ b/tests/unit/computations/test_parsers.py
@@ -2,17 +2,21 @@
import unittest
import os
+import pytest
+
from gn3.computations.parsers import parse_genofile
class TestParsers(unittest.TestCase):
"""Test cases for some various parsers"""
+ @pytest.mark.unit_test
def test_parse_genofile_without_existing_file(self):
"""Assert that an error is raised if the genotype file is absent"""
self.assertRaises(FileNotFoundError, parse_genofile,
"/non-existent-file")
+ @pytest.mark.unit_test
def test_parse_genofile_with_existing_file(self):
"""Test that a genotype file is parsed correctly"""
samples = ["bxd1", "bxd2"]
diff --git a/tests/unit/computations/test_partial_correlations.py b/tests/unit/computations/test_partial_correlations.py
index 83cb9d9..81ddbcc 100644
--- a/tests/unit/computations/test_partial_correlations.py
+++ b/tests/unit/computations/test_partial_correlations.py
@@ -1,16 +1,18 @@
"""Module contains tests for gn3.partial_correlations"""
-import csv
-from unittest import TestCase, skip
+from unittest import TestCase
+
+import pandas
+import pytest
+from numpy.testing import assert_allclose
+
from gn3.computations.partial_correlations import (
fix_samples,
control_samples,
- dictify_by_samples,
+ build_data_frame,
tissue_correlation,
find_identical_traits,
- partial_correlation_matrix,
- good_dataset_samples_indexes,
- partial_correlation_recursive)
+ good_dataset_samples_indexes)
sampleslist = ["B6cC3-1", "BXD1", "BXD12", "BXD16", "BXD19", "BXD2"]
control_traits = (
@@ -93,32 +95,10 @@ dictified_control_samples = (
"BXD1": {"sample_name": "BXD1", "value": 7.77141, "variance": None},
"BXD2": {"sample_name": "BXD2", "value": 7.80944, "variance": None}})
-def parse_test_data_csv(filename):
- """
- Parse test data csv files for R -> Python conversion of some functions.
- """
- def __str__to_tuple(line, field):
- return tuple(float(s.strip()) for s in line[field].split(","))
-
- with open(filename, newline="\n") as csvfile:
- reader = csv.DictReader(csvfile, delimiter=",", quotechar='"')
- lines = tuple(row for row in reader)
-
- methods = {"p": "pearson", "s": "spearman", "k": "kendall"}
- return tuple({
- **line,
- "x": __str__to_tuple(line, "x"),
- "y": __str__to_tuple(line, "y"),
- "z": __str__to_tuple(line, "z"),
- "method": methods[line["method"]],
- "rm": line["rm"] == "TRUE",
- "result": float(line["result"])
- } for line in lines)
-
-
class TestPartialCorrelations(TestCase):
"""Class for testing partial correlations computation functions"""
+ @pytest.mark.unit_test
def test_control_samples(self):
"""Test that the control_samples works as expected."""
self.assertEqual(
@@ -133,36 +113,7 @@ class TestPartialCorrelations(TestCase):
(None, None, None)),
(6, 4, 3)))
- def test_dictify_by_samples(self):
- """
- Test that `dictify_by_samples` generates the appropriate dict
-
- Given:
- a sequence of sequences with sample names, values and variances, as
- in the output of `gn3.partial_correlations.control_samples` or
- the output of `gn3.db.traits.export_informative`
- When:
- the sequence is passed as an argument into the
- `gn3.partial_correlations.dictify_by_sample`
- Then:
- return a sequence of dicts with keys being the values of the sample
- names, and each of who's values being sub-dicts with the keys
- 'sample_name', 'value' and 'variance' whose values correspond to the
- values passed in.
- """
- self.assertEqual(
- dictify_by_samples(
- ((("B6cC3-1", "BXD1", "BXD12", "BXD16", "BXD19", "BXD2"),
- ("BXD12", "BXD16", "BXD19", "BXD2"),
- ("B6cC3-1", "BXD1", "BXD2")),
- ((7.51879, 7.77141, 8.39265, 8.17443, 8.30401, 7.80944),
- (8.39265, 8.17443, 8.30401, 7.80944),
- (7.51879, 7.77141, 7.80944)),
- ((None, None, None, None, None, None), (None, None, None, None),
- (None, None, None)),
- (6, 4, 3))),
- dictified_control_samples)
-
+ @pytest.mark.unit_test
def test_fix_samples(self):
"""
Test that `fix_samples` returns only the common samples
@@ -208,13 +159,14 @@ class TestPartialCorrelations(TestCase):
(None, None, None, None, None, None, None, None, None, None, None,
None, None)))
+ @pytest.mark.unit_test
def test_find_identical_traits(self):
"""
Test `gn3.partial_correlations.find_identical_traits`.
Given:
- the name of a primary trait
- - the value of a primary trait
+ - a sequence of values for the primary trait
- a sequence of names of control traits
- a sequence of values of control traits
When:
@@ -225,12 +177,14 @@ class TestPartialCorrelations(TestCase):
decimal places are considered
"""
for primn, primv, contn, contv, expected in (
- ("pt", 12.98395, ("ct0", "ct1", "ct2"),
- (0.1234, 2.3456, 3.4567), tuple()),
- ("pt", 12.98395, ("ct0", "ct1", "ct2"),
- (12.98354, 2.3456, 3.4567), ("pt", "ct0")),
- ("pt", 12.98395, ("ct0", "ct1", "ct2", "ct3"),
- (0.1234, 2.3456, 0.1233, 4.5678), ("ct0", "ct2"))
+ ("pt", (12.98395,), ("ct0", "ct1", "ct2"),
+ ((0.1234, 2.3456, 3.4567),), tuple()),
+ ("pt", (12.98395, 2.3456, 3.4567), ("ct0", "ct1", "ct2"),
+ ((12.98354, 2.3456, 3.4567), (64.2334, 6.3256, 64.2364),
+ (4.2374, 67.2345, 7.48234)), ("pt", "ct0")),
+ ("pt", (12.98395, 75.52382), ("ct0", "ct1", "ct2", "ct3"),
+ ((0.1234, 2.3456), (0.3621, 6543.572), (0.1234, 2.3456),
+ (0.1233, 4.5678)), ("ct0", "ct2"))
):
with self.subTest(
primary_name=primn, primary_value=primv,
@@ -238,6 +192,7 @@ class TestPartialCorrelations(TestCase):
self.assertEqual(
find_identical_traits(primn, primv, contn, contv), expected)
+ @pytest.mark.unit_test
def test_tissue_correlation_error(self):
"""
Test that `tissue_correlation` raises specific exceptions for particular
@@ -272,7 +227,8 @@ class TestPartialCorrelations(TestCase):
with self.assertRaises(error, msg=error_msg):
tissue_correlation(primary, target, method)
- def test_tissue_correlation(self):
+ @pytest.mark.unit_test
+ def test_tissue_correlation(self): # pylint: disable=R0201
"""
Test that the correct correlation values are computed for the given:
- primary trait
@@ -281,13 +237,14 @@ class TestPartialCorrelations(TestCase):
"""
for primary, target, method, expected in (
((12.34, 18.36, 42.51), (37.25, 46.25, 46.56), "pearson",
- (0.6761779253, 0.5272701134)),
+ (0.6761779252651052, 0.5272701133657985)),
((1, 2, 3, 4, 5), (5, 6, 7, 8, 7), "spearman",
- (0.8207826817, 0.0885870053))):
+ (0.8207826816681233, 0.08858700531354381))):
with self.subTest(primary=primary, target=target, method=method):
- self.assertEqual(
+ assert_allclose(
tissue_correlation(primary, target, method), expected)
+ @pytest.mark.unit_test
def test_good_dataset_samples_indexes(self):
"""
Test that `good_dataset_samples_indexes` returns correct indices.
@@ -298,38 +255,22 @@ class TestPartialCorrelations(TestCase):
("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l")),
(0, 4, 8, 10))
- @skip
- def test_partial_correlation_matrix(self):
+ @pytest.mark.unit_test
+ def test_build_data_frame(self):
"""
- Test that `partial_correlation_matrix` computes the appropriate
- correlation value.
+ Check that the function builds the correct data frame.
"""
- for sample in parse_test_data_csv(
- ("tests/unit/computations/partial_correlations_test_data/"
- "pcor_mat_blackbox_test.csv")):
- with self.subTest(
- xdata=sample["x"], ydata=sample["y"], zdata=sample["z"],
- method=sample["method"], omit_nones=sample["rm"]):
- self.assertEqual(
- partial_correlation_matrix(
- sample["x"], sample["y"], sample["z"],
- method=sample["method"], omit_nones=sample["rm"]),
- sample["result"])
-
- @skip
- def test_partial_correlation_recursive(self):
- """
- Test that `partial_correlation_recursive` computes the appropriate
- correlation value.
- """
- for sample in parse_test_data_csv(
- ("tests/unit/computations/partial_correlations_test_data/"
- "pcor_rec_blackbox_test.csv")):
- with self.subTest(
- xdata=sample["x"], ydata=sample["y"], zdata=sample["z"],
- method=sample["method"], omit_nones=sample["rm"]):
- self.assertEqual(
- partial_correlation_recursive(
- sample["x"], sample["y"], sample["z"],
- method=sample["method"], omit_nones=sample["rm"]),
- sample["result"])
+ for xdata, ydata, zdata, expected in (
+ ((0.1, 1.1, 2.1), (2.1, 3.1, 4.1), (5.1, 6.1, 7.1),
+ pandas.DataFrame({
+ "x": (0.1, 1.1, 2.1), "y": (2.1, 3.1, 4.1),
+ "z": (5.1, 6.1, 7.1)})),
+ ((0.1, 1.1, 2.1), (2.1, 3.1, 4.1),
+ ((5.1, 6.1, 7.1), (5.2, 6.2, 7.2), (5.3, 6.3, 7.3)),
+ pandas.DataFrame({
+ "x": (0.1, 1.1, 2.1), "y": (2.1, 3.1, 4.1),
+ "z0": (5.1, 6.1, 7.1), "z1": (5.2, 6.2, 7.2),
+ "z2": (5.3, 6.3, 7.3)}))):
+ with self.subTest(xdata=xdata, ydata=ydata, zdata=zdata):
+ self.assertTrue(
+ build_data_frame(xdata, ydata, zdata).equals(expected))
diff --git a/tests/unit/computations/test_pca.py b/tests/unit/computations/test_pca.py
new file mode 100644
index 0000000..0189948
--- /dev/null
+++ b/tests/unit/computations/test_pca.py
@@ -0,0 +1,101 @@
+"""module contains unittests for pca"""
+import unittest
+from unittest.mock import patch
+from unittest.mock import Mock
+
+import numpy as np
+import pytest
+
+from gn3.computations.pca import cache_pca_dataset
+from gn3.computations.pca import generate_pca_temp_traits
+from gn3.computations.pca import generate_scree_plot_data
+from gn3.computations.pca import process_factor_loadings_tdata
+
+
+class TestPCA(unittest.TestCase):
+ """pca testcase class"""
+
+ @pytest.mark.unit_test
+ def test_process_factor_loadings(self):
+ """test for processing factor loadings"""
+
+ test_array = np.array([
+ [-0.23511749, -0.61483617, -0.26872797, 0.70319381],
+ [-0.71057342, 0.4623377, -0.52921008, -0.0355803],
+ [-0.60977093, -0.02877103, 0.78874096, 0.07238328],
+ [0.26073856, 0.63827311, 0.16003023, 0.70640864]
+ ])
+
+ expected_results = [[-0.23511749, -0.71057342, -0.60977093],
+ [-0.61483617, 0.4623377, -0.02877103],
+ [-0.26872797, -0.52921008, 0.78874096],
+ [0.70319381, -0.0355803, 0.07238328]]
+
+ self.assertEqual(process_factor_loadings_tdata(
+ test_array, 3), expected_results)
+
+ @pytest.mark.unit_test
+ @patch("gn3.computations.pca.generate_pca_traits_vals")
+ def test_generate_pca_datasets(self, mock_pca_data):
+ """test for generating temp pca dataset"""
+
+ mock_pca_data.return_value = np.array([[21, 10, 17, 15, 13],
+ [21, 11, 18,
+ 9, 1],
+ [22, 16, 0,
+ 0.22667229, -1],
+ [31, 12, 10, 17, 11]])
+
+ shared_samples = ["BXD1", "BXD2", "BXD", "BXD4", "Unkown"]
+
+ dataset_samples = ["BXD1", "BXD5", "BXD4", "BXD"]
+ expected_results = {
+ "PCA1_mouse_G1_now": ["21.0", "x", "10.0", "17.0"],
+ "PCA2_mouse_G1_now": ["21.0", "x", "11.0", "18.0"],
+ "PCA3_mouse_G1_now": ["22.0", "x", "16.0", "0.0"],
+ "PCA4_mouse_G1_now": ["31.0", "x", "12.0", "10.0"]
+ }
+
+ results = generate_pca_temp_traits(species="mouse", group="G1",
+ traits_data=[],
+ dataset_samples=dataset_samples,
+ corr_array=[],
+ shared_samples=shared_samples,
+ create_time="now")
+
+ self.assertEqual(results, expected_results)
+
+ @pytest.mark.unit_test
+ def test_generate_scree_plot(self):
+ """test scree plot data is generated"""
+
+ variance = [0.9271, 0.06232, 0.031]
+
+ self.assertEqual(generate_scree_plot_data(variance),
+ (['PC1', 'PC2', 'PC3'], [92.7, 6.2, 3.1]))
+
+ @pytest.mark.unit_test
+ def test_cache_pca_datasets(self):
+ """test for caching pca datasets"""
+
+ pca_traits = {
+ "PCA_1": ["11.0", "x", "9.0", "7.0"],
+ "PCA_2": ["x", "x", "1.2", "3.1"]
+ }
+
+ self.assertEqual(cache_pca_dataset(redis_conn={}, exp_days=30,
+ pca_trait_dict=pca_traits), False)
+
+ mock_redis = Mock()
+ mock_redis.set.return_value = True
+
+ test_data = [({}, 30, pca_traits, False),
+ (mock_redis, 30, pca_traits, True)]
+
+ for (test_redis, exp_day, test_traits, expected) in test_data:
+
+ with self.subTest(redis_conn=test_redis,
+ exp_days=exp_day, pca_trait_dict=test_traits):
+
+ self.assertEqual(cache_pca_dataset(
+ test_redis, exp_day, test_traits), expected)
diff --git a/tests/unit/computations/test_qtlreaper.py b/tests/unit/computations/test_qtlreaper.py
index 742d106..607f4a6 100644
--- a/tests/unit/computations/test_qtlreaper.py
+++ b/tests/unit/computations/test_qtlreaper.py
@@ -1,5 +1,6 @@
"""Module contains tests for gn3.computations.qtlreaper"""
from unittest import TestCase
+import pytest
from gn3.computations.qtlreaper import (
parse_reaper_main_results,
organise_reaper_main_results,
@@ -9,6 +10,7 @@ from tests.unit.sample_test_data import organised_trait_1
class TestQTLReaper(TestCase):
"""Class for testing qtlreaper interface functions."""
+ @pytest.mark.unit_test
def test_parse_reaper_main_results(self):
"""Test that the main results file is parsed correctly."""
self.assertEqual(
@@ -67,6 +69,7 @@ class TestQTLReaper(TestCase):
}
])
+ @pytest.mark.unit_test
def test_parse_reaper_permutation_results(self):
"""Test that the permutations results file is parsed correctly."""
self.assertEqual(
@@ -77,6 +80,7 @@ class TestQTLReaper(TestCase):
5.63874, 5.71346, 5.71936, 5.74275, 5.76764, 5.79815, 5.81671,
5.82775, 5.89659, 5.92117, 5.93396, 5.93396, 5.94957])
+ @pytest.mark.unit_test
def test_organise_reaper_main_results(self):
"""Check that results are organised correctly."""
self.assertEqual(
diff --git a/tests/unit/computations/test_rqtl.py b/tests/unit/computations/test_rqtl.py
index 955d0ab..51df281 100644
--- a/tests/unit/computations/test_rqtl.py
+++ b/tests/unit/computations/test_rqtl.py
@@ -2,10 +2,12 @@
import unittest
from unittest import mock
+import pytest
from gn3.computations.rqtl import generate_rqtl_cmd
class TestRqtl(unittest.TestCase):
"""Test cases for computations.rqtl module"""
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.rqtl.generate_hash_of_string")
@mock.patch("gn3.computations.rqtl.get_hash_of_files")
def test_generate_rqtl_command(self, mock_get_hash_files, mock_generate_hash_string):
diff --git a/tests/unit/computations/test_slink.py b/tests/unit/computations/test_slink.py
index 995393b..276133a 100644
--- a/tests/unit/computations/test_slink.py
+++ b/tests/unit/computations/test_slink.py
@@ -1,6 +1,8 @@
"""Module contains tests for slink"""
from unittest import TestCase
+import pytest
+
from gn3.computations.slink import slink
from gn3.computations.slink import nearest
from gn3.computations.slink import LengthError
@@ -9,6 +11,7 @@ from gn3.computations.slink import MirrorError
class TestSlink(TestCase):
"""Class for testing slink functions"""
+ @pytest.mark.unit_test
def test_nearest_expects_list_of_lists(self):
"""Test that function only accepts a list of lists."""
# This might be better handled with type-hints and mypy
@@ -18,6 +21,7 @@ class TestSlink(TestCase):
with self.assertRaises(ValueError, msg="Expected list or tuple"):
nearest(item, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_does_not_allow_empty_lists(self):
"""Test that function does not accept an empty list, or any of the child
lists to be empty."""
@@ -29,6 +33,7 @@ class TestSlink(TestCase):
with self.assertRaises(ValueError):
nearest(lst, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_expects_children_are_same_length_as_parent(self):
"""Test that children lists are same length as parent list."""
for lst in [[[0, 1]],
@@ -40,6 +45,7 @@ class TestSlink(TestCase):
with self.assertRaises(LengthError):
nearest(lst, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_expects_member_is_zero_distance_from_itself(self):
"""Test that distance of a member from itself is zero"""
for lst in [[[1]],
@@ -50,6 +56,7 @@ class TestSlink(TestCase):
with self.assertRaises(ValueError):
nearest(lst, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_expects_distance_atob_is_equal_to_distance_btoa(self):
"""Test that the distance from member A to member B is the same as that
from member B to member A."""
@@ -60,6 +67,7 @@ class TestSlink(TestCase):
with self.assertRaises(MirrorError):
nearest(lst, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_expects_zero_or_positive_distances(self):
"""Test that all distances are either zero, or greater than zero."""
# Based on:
@@ -74,6 +82,7 @@ class TestSlink(TestCase):
with self.assertRaises(ValueError, msg="Distances should be positive."):
nearest(lst, 1, 1)
+ @pytest.mark.unit_test
def test_nearest_returns_shortest_distance_given_coordinates_to_both_group_members(self):
"""Test that the shortest distance is returned."""
# This test is named wrong - at least I think it is, from the expected results
@@ -234,6 +243,7 @@ class TestSlink(TestCase):
with self.subTest(lst=lst):
self.assertEqual(nearest(lst, i, j), expected)
+ @pytest.mark.unit_test
def test_nearest_gives_shortest_distance_between_list_of_members_and_member(self):
"""Test that the shortest distance is returned."""
for members_distances, members_list, member_coordinate, expected_distance in [
@@ -260,6 +270,7 @@ class TestSlink(TestCase):
members_distances, member_coordinate, members_list),
expected_distance)
+ @pytest.mark.unit_test
def test_nearest_returns_shortest_distance_given_two_lists_of_members(self):
"""Test that the shortest distance is returned."""
for members_distances, members_list, member_list2, expected_distance in [
@@ -289,12 +300,14 @@ class TestSlink(TestCase):
members_distances, member_list2, members_list),
expected_distance)
+ @pytest.mark.unit_test
def test_slink_wrong_data_returns_empty_list(self):
"""Test that empty list is returned for wrong data."""
for data in [1, "test", [], 2.945, nearest, [0]]:
with self.subTest(data=data):
self.assertEqual(slink(data), [])
+ @pytest.mark.unit_test
def test_slink_with_data(self):
"""Test slink with example data, and expected results for each data
sample."""
diff --git a/tests/unit/computations/test_wgcna.py b/tests/unit/computations/test_wgcna.py
index 5f23a86..a9108b0 100644
--- a/tests/unit/computations/test_wgcna.py
+++ b/tests/unit/computations/test_wgcna.py
@@ -2,6 +2,8 @@
from unittest import TestCase
from unittest import mock
+import pytest
+
from gn3.computations.wgcna import dump_wgcna_data
from gn3.computations.wgcna import compose_wgcna_cmd
from gn3.computations.wgcna import call_wgcna_script
@@ -10,6 +12,7 @@ from gn3.computations.wgcna import call_wgcna_script
class TestWgcna(TestCase):
"""test class for wgcna"""
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.wgcna.process_image")
@mock.patch("gn3.computations.wgcna.run_cmd")
@mock.patch("gn3.computations.wgcna.compose_wgcna_cmd")
@@ -95,6 +98,7 @@ class TestWgcna(TestCase):
self.assertEqual(results, expected_output)
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.wgcna.run_cmd")
@mock.patch("gn3.computations.wgcna.compose_wgcna_cmd")
@mock.patch("gn3.computations.wgcna.dump_wgcna_data")
@@ -117,6 +121,7 @@ class TestWgcna(TestCase):
self.assertEqual(call_wgcna_script(
"input_file.R", ""), expected_error)
+ @pytest.mark.unit_test
def test_compose_wgcna_cmd(self):
"""test for composing wgcna cmd"""
wgcna_cmd = compose_wgcna_cmd(
@@ -124,6 +129,7 @@ class TestWgcna(TestCase):
self.assertEqual(
wgcna_cmd, "Rscript ./scripts/wgcna.r /tmp/wgcna.json")
+ @pytest.mark.unit_test
@mock.patch("gn3.computations.wgcna.TMPDIR", "/tmp")
@mock.patch("gn3.computations.wgcna.uuid.uuid4")
def test_create_json_file(self, file_name_generator):
@@ -160,7 +166,7 @@ class TestWgcna(TestCase):
expected_input)
file_handler.assert_called_once_with(
- "/tmp/facb73ff-7eef-4053-b6ea-e91d3a22a00c.json", 'w')
+ "/tmp/facb73ff-7eef-4053-b6ea-e91d3a22a00c.json", 'w', encoding='utf-8')
self.assertEqual(
results, "/tmp/facb73ff-7eef-4053-b6ea-e91d3a22a00c.json")
diff --git a/tests/unit/db/test_audit.py b/tests/unit/db/test_audit.py
index 7480169..884afc6 100644
--- a/tests/unit/db/test_audit.py
+++ b/tests/unit/db/test_audit.py
@@ -3,6 +3,8 @@ import json
from unittest import TestCase
from unittest import mock
+import pytest
+
from gn3.db import insert
from gn3.db.metadata_audit import MetadataAudit
@@ -10,6 +12,7 @@ from gn3.db.metadata_audit import MetadataAudit
class TestMetadatAudit(TestCase):
"""Test cases for fetching chromosomes"""
+ @pytest.mark.unit_test
def test_insert_into_metadata_audit(self):
"""Test that data is inserted correctly in the audit table
diff --git a/tests/unit/db/test_correlation.py b/tests/unit/db/test_correlation.py
new file mode 100644
index 0000000..5afe55f
--- /dev/null
+++ b/tests/unit/db/test_correlation.py
@@ -0,0 +1,100 @@
+"""
+Tests for the gn3.db.correlations module
+"""
+
+from unittest import TestCase
+
+import pytest
+
+from gn3.db.correlations import (
+ build_query_sgo_lit_corr,
+ build_query_tissue_corr)
+
+class TestCorrelation(TestCase):
+ """Test cases for correlation data fetching functions"""
+ maxDiff = None
+
+ @pytest.mark.unit_test
+ def test_build_query_sgo_lit_corr(self):
+ """
+ Test that the literature correlation query is built correctly.
+ """
+ self.assertEqual(
+ build_query_sgo_lit_corr(
+ "Probeset",
+ "temp_table_xy45i7wd",
+ "T1.value, T2.value, T3.value",
+ (("LEFT JOIN ProbesetData AS T1 "
+ "ON T1.Id = ProbesetXRef.DataId "
+ "AND T1.StrainId=%(T1_sample_id)s"),
+ (
+ "LEFT JOIN ProbesetData AS T2 "
+ "ON T2.Id = ProbesetXRef.DataId "
+ "AND T2.StrainId=%(T2_sample_id)s"),
+ (
+ "LEFT JOIN ProbesetData AS T3 "
+ "ON T3.Id = ProbesetXRef.DataId "
+ "AND T3.StrainId=%(T3_sample_id)s"))),
+ (("SELECT Probeset.Name, temp_table_xy45i7wd.value, "
+ "T1.value, T2.value, T3.value "
+ "FROM (Probeset, ProbesetXRef, ProbesetFreeze) "
+ "LEFT JOIN temp_table_xy45i7wd ON temp_table_xy45i7wd.GeneId2=ProbeSet.GeneId "
+ "LEFT JOIN ProbesetData AS T1 "
+ "ON T1.Id = ProbesetXRef.DataId "
+ "AND T1.StrainId=%(T1_sample_id)s "
+ "LEFT JOIN ProbesetData AS T2 "
+ "ON T2.Id = ProbesetXRef.DataId "
+ "AND T2.StrainId=%(T2_sample_id)s "
+ "LEFT JOIN ProbesetData AS T3 "
+ "ON T3.Id = ProbesetXRef.DataId "
+ "AND T3.StrainId=%(T3_sample_id)s "
+ "WHERE ProbeSet.GeneId IS NOT NULL "
+ "AND temp_table_xy45i7wd.value IS NOT NULL "
+ "AND ProbesetXRef.ProbesetFreezeId = ProbesetFreeze.Id "
+ "AND ProbesetFreeze.Name = %(db_name)s "
+ "AND Probeset.Id = ProbesetXRef.ProbesetId "
+ "ORDER BY Probeset.Id"),
+ 2))
+
+ @pytest.mark.unit_test
+ def test_build_query_tissue_corr(self):
+ """
+ Test that the tissue correlation query is built correctly.
+ """
+ self.assertEqual(
+ build_query_tissue_corr(
+ "Probeset",
+ "temp_table_xy45i7wd",
+ "T1.value, T2.value, T3.value",
+ (("LEFT JOIN ProbesetData AS T1 "
+ "ON T1.Id = ProbesetXRef.DataId "
+ "AND T1.StrainId=%(T1_sample_id)s"),
+ (
+ "LEFT JOIN ProbesetData AS T2 "
+ "ON T2.Id = ProbesetXRef.DataId "
+ "AND T2.StrainId=%(T2_sample_id)s"),
+ (
+ "LEFT JOIN ProbesetData AS T3 "
+ "ON T3.Id = ProbesetXRef.DataId "
+ "AND T3.StrainId=%(T3_sample_id)s"))),
+ (("SELECT Probeset.Name, temp_table_xy45i7wd.Correlation, "
+ "temp_table_xy45i7wd.PValue, "
+ "T1.value, T2.value, T3.value "
+ "FROM (Probeset, ProbesetXRef, ProbesetFreeze) "
+ "LEFT JOIN temp_table_xy45i7wd ON temp_table_xy45i7wd.Symbol=ProbeSet.Symbol "
+ "LEFT JOIN ProbesetData AS T1 "
+ "ON T1.Id = ProbesetXRef.DataId "
+ "AND T1.StrainId=%(T1_sample_id)s "
+ "LEFT JOIN ProbesetData AS T2 "
+ "ON T2.Id = ProbesetXRef.DataId "
+ "AND T2.StrainId=%(T2_sample_id)s "
+ "LEFT JOIN ProbesetData AS T3 "
+ "ON T3.Id = ProbesetXRef.DataId "
+ "AND T3.StrainId=%(T3_sample_id)s "
+ "WHERE ProbeSet.Symbol IS NOT NULL "
+ "AND temp_table_xy45i7wd.Correlation IS NOT NULL "
+ "AND ProbesetXRef.ProbesetFreezeId = ProbesetFreeze.Id "
+ "AND ProbesetFreeze.Name = %(db_name)s "
+ "AND Probeset.Id = ProbesetXRef.ProbesetId "
+ "ORDER BY Probeset.Id"),
+ 3))
diff --git a/tests/unit/db/test_datasets.py b/tests/unit/db/test_datasets.py
index 39f4af9..e4abd2f 100644
--- a/tests/unit/db/test_datasets.py
+++ b/tests/unit/db/test_datasets.py
@@ -1,6 +1,7 @@
"""Tests for gn3/db/datasets.py"""
from unittest import mock, TestCase
+import pytest
from gn3.db.datasets import (
retrieve_dataset_name,
retrieve_group_fields,
@@ -11,35 +12,36 @@ from gn3.db.datasets import (
class TestDatasetsDBFunctions(TestCase):
"""Test cases for datasets functions."""
+ @pytest.mark.unit_test
def test_retrieve_dataset_name(self):
"""Test that the function is called correctly."""
- for trait_type, thresh, trait_name, dataset_name, columns, table in [
- ["ProbeSet", 9, "probesetTraitName", "probesetDatasetName",
- "Id, Name, FullName, ShortName, DataScale", "ProbeSetFreeze"],
- ["Geno", 3, "genoTraitName", "genoDatasetName",
- "Id, Name, FullName, ShortName", "GenoFreeze"],
- ["Publish", 6, "publishTraitName", "publishDatasetName",
- "Id, Name, FullName, ShortName", "PublishFreeze"],
- ["Temp", 4, "tempTraitName", "tempTraitName",
- "Id, Name, FullName, ShortName", "TempFreeze"]]:
+ for trait_type, thresh, dataset_name, columns, table, expected in [
+ ["ProbeSet", 9, "probesetDatasetName",
+ "Id, Name, FullName, ShortName, DataScale", "ProbeSetFreeze",
+ {"dataset_id": None, "dataset_name": "probesetDatasetName",
+ "dataset_fullname": "probesetDatasetName"}],
+ ["Geno", 3, "genoDatasetName",
+ "Id, Name, FullName, ShortName", "GenoFreeze", {}],
+ ["Publish", 6, "publishDatasetName",
+ "Id, Name, FullName, ShortName", "PublishFreeze", {}]]:
db_mock = mock.MagicMock()
with self.subTest(trait_type=trait_type):
with db_mock.cursor() as cursor:
cursor.fetchone.return_value = {}
self.assertEqual(
retrieve_dataset_name(
- trait_type, thresh, trait_name, dataset_name, db_mock),
- {})
+ trait_type, thresh, dataset_name, db_mock),
+ expected)
cursor.execute.assert_called_once_with(
- "SELECT {cols} "
- "FROM {table} "
+ f"SELECT {columns} "
+ f"FROM {table} "
"WHERE public > %(threshold)s AND "
"(Name = %(name)s "
"OR FullName = %(name)s "
- "OR ShortName = %(name)s)".format(
- table=table, cols=columns),
+ "OR ShortName = %(name)s)",
{"threshold": thresh, "name": dataset_name})
+ @pytest.mark.unit_test
def test_retrieve_probeset_group_fields(self):
"""
Test that the `group` and `group_id` fields are retrieved appropriately
@@ -63,6 +65,7 @@ class TestDatasetsDBFunctions(TestCase):
" AND ProbeSetFreeze.Name = %(name)s"),
{"name": trait_name})
+ @pytest.mark.unit_test
def test_retrieve_group_fields(self):
"""
Test that the group fields are set up correctly for the different trait
@@ -88,6 +91,7 @@ class TestDatasetsDBFunctions(TestCase):
trait_type, trait_name, dataset_info, db_mock),
expected)
+ @pytest.mark.unit_test
def test_retrieve_publish_group_fields(self):
"""
Test that the `group` and `group_id` fields are retrieved appropriately
@@ -110,6 +114,7 @@ class TestDatasetsDBFunctions(TestCase):
" AND PublishFreeze.Name = %(name)s"),
{"name": trait_name})
+ @pytest.mark.unit_test
def test_retrieve_geno_group_fields(self):
"""
Test that the `group` and `group_id` fields are retrieved appropriately
diff --git a/tests/unit/db/test_db.py b/tests/unit/db/test_db.py
index e47c9fd..8ac468c 100644
--- a/tests/unit/db/test_db.py
+++ b/tests/unit/db/test_db.py
@@ -2,6 +2,8 @@
from unittest import TestCase
from unittest import mock
+import pytest
+
from gn3.db import fetchall
from gn3.db import fetchone
from gn3.db import update
@@ -14,6 +16,7 @@ from gn3.db.metadata_audit import MetadataAudit
class TestCrudMethods(TestCase):
"""Test cases for CRUD methods"""
+ @pytest.mark.unit_test
def test_update_phenotype_with_no_data(self):
"""Test that a phenotype is updated correctly if an empty Phenotype dataclass
is provided
@@ -24,6 +27,7 @@ class TestCrudMethods(TestCase):
conn=db_mock, table="Phenotype",
data=Phenotype(), where=Phenotype()), None)
+ @pytest.mark.unit_test
def test_update_phenotype_with_data(self):
"""
Test that a phenotype is updated correctly if some
@@ -46,6 +50,7 @@ class TestCrudMethods(TestCase):
"Submitter = %s WHERE id = %s AND Owner = %s",
('Test Pre Pub', 'Test Post Pub', 'Rob', 1, 'Rob'))
+ @pytest.mark.unit_test
def test_fetch_phenotype(self):
"""Test that a single phenotype is fetched properly
@@ -68,6 +73,7 @@ class TestCrudMethods(TestCase):
"SELECT * FROM Phenotype WHERE id = %s AND Owner = %s",
(35, 'Rob'))
+ @pytest.mark.unit_test
def test_fetchall_metadataaudit(self):
"""Test that multiple metadata_audit entries are fetched properly
@@ -96,6 +102,7 @@ class TestCrudMethods(TestCase):
"dataset_id = %s AND editor = %s"),
(35, 'Rob'))
+ @pytest.mark.unit_test
# pylint: disable=R0201
def test_probeset_called_with_right_columns(self):
"""Given a columns argument, test that the correct sql query is
@@ -112,6 +119,7 @@ class TestCrudMethods(TestCase):
"Name = %s",
("1446112_at",))
+ @pytest.mark.unit_test
def test_diff_from_dict(self):
"""Test that a correct diff is generated"""
self.assertEqual(diff_from_dict({"id": 1, "data": "a"},
diff --git a/tests/unit/db/test_genotypes.py b/tests/unit/db/test_genotypes.py
index c125224..28728bf 100644
--- a/tests/unit/db/test_genotypes.py
+++ b/tests/unit/db/test_genotypes.py
@@ -1,5 +1,6 @@
"""Tests gn3.db.genotypes"""
from unittest import TestCase
+import pytest
from gn3.db.genotypes import (
parse_genotype_file,
parse_genotype_labels,
@@ -10,6 +11,7 @@ from gn3.db.genotypes import (
class TestGenotypes(TestCase):
"""Tests for functions in `gn3.db.genotypes`."""
+ @pytest.mark.unit_test
def test_parse_genotype_labels(self):
"""Test that the genotype labels are parsed correctly."""
self.assertEqual(
@@ -22,6 +24,7 @@ class TestGenotypes(TestCase):
("type", "test_type"), ("mat", "test_mat"), ("pat", "test_pat"),
("het", "test_het"), ("unk", "test_unk")))
+ @pytest.mark.unit_test
def test_parse_genotype_header(self):
"""Test that the genotype header is parsed correctly."""
for header, expected in [
@@ -43,6 +46,7 @@ class TestGenotypes(TestCase):
with self.subTest(header=header):
self.assertEqual(parse_genotype_header(header), expected)
+ @pytest.mark.unit_test
def test_parse_genotype_data_line(self):
"""Test parsing of data lines."""
for line, geno_obj, parlist, expected in [
@@ -76,6 +80,7 @@ class TestGenotypes(TestCase):
parse_genotype_marker(line, geno_obj, parlist),
expected)
+ @pytest.mark.unit_test
def test_build_genotype_chromosomes(self):
"""
Given `markers` and `geno_obj`, test that `build_genotype_chromosomes`
@@ -115,6 +120,7 @@ class TestGenotypes(TestCase):
build_genotype_chromosomes(geno_obj, markers),
expected)
+ @pytest.mark.unit_test
def test_parse_genotype_file(self):
"""Test the parsing of genotype files. """
self.assertEqual(
diff --git a/tests/unit/db/test_genotypes2.py b/tests/unit/db/test_genotypes2.py
new file mode 100644
index 0000000..453120b
--- /dev/null
+++ b/tests/unit/db/test_genotypes2.py
@@ -0,0 +1,13 @@
+"""Module to test functions in gn3.db.genotypes"""
+
+import pytest
+
+from gn3.db.genotypes import load_genotype_samples
+
+@pytest.mark.unit_test
+@pytest.mark.parametrize(
+ "genotype_filename,file_type,expected", (
+ ("tests/unit/test_data/genotype.txt", "geno", ("BXD1","BXD2")),))
+def test_load_genotype_samples(genotype_filename, file_type, expected):
+ """Test that the genotype samples are loaded correctly"""
+ assert load_genotype_samples(genotype_filename, file_type) == expected
diff --git a/tests/unit/db/test_sample_data.py b/tests/unit/db/test_sample_data.py
new file mode 100644
index 0000000..2524e07
--- /dev/null
+++ b/tests/unit/db/test_sample_data.py
@@ -0,0 +1,188 @@
+"""Tests for gn3.db.sample_data"""
+import pytest
+import gn3
+
+from gn3.db.sample_data import __extract_actions
+from gn3.db.sample_data import delete_sample_data
+from gn3.db.sample_data import insert_sample_data
+from gn3.db.sample_data import update_sample_data
+
+
+@pytest.mark.unit_test
+def test_insert_sample_data(mocker):
+ """Test that inserts work properly"""
+ mock_conn = mocker.MagicMock()
+ strain_id, data_id, inbredset_id = 1, 17373, 20
+ with mock_conn.cursor() as cursor:
+ cursor.fetchone.side_effect = (
+ 0,
+ [
+ 19,
+ ],
+ 0,
+ )
+ mocker.patch(
+ "gn3.db.sample_data.get_sample_data_ids",
+ return_value=(strain_id, data_id, inbredset_id),
+ )
+ insert_sample_data(
+ conn=mock_conn,
+ trait_name=35,
+ data="BXD1,18,3,0,M",
+ csv_header="Strain Name,Value,SE,Count,Sex",
+ phenotype_id=10007,
+ )
+ calls = [
+ mocker.call(
+ "SELECT Id FROM PublishData where Id = %s " "AND StrainId = %s",
+ (data_id, strain_id),
+ ),
+ mocker.call(
+ "INSERT INTO PublishData " "(StrainId, Id, value) VALUES (%s, %s, %s)",
+ (strain_id, data_id, "18"),
+ ),
+ mocker.call(
+ "INSERT INTO PublishSE "
+ "(StrainId, DataId, error) VALUES (%s, %s, %s)",
+ (strain_id, data_id, "3"),
+ ),
+ mocker.call(
+ "INSERT INTO NStrain " "(StrainId, DataId, count) VALUES (%s, %s, %s)",
+ (strain_id, data_id, "0"),
+ ),
+ mocker.call("SELECT Id FROM CaseAttribute WHERE Name = %s", ("Sex",)),
+ mocker.call(
+ "SELECT StrainId FROM CaseAttributeXRefNew "
+ "WHERE StrainId = %s AND "
+ "CaseAttributeId = %s AND InbredSetId = %s",
+ (strain_id, 19, inbredset_id),
+ ),
+ mocker.call(
+ "INSERT INTO CaseAttributeXRefNew "
+ "(StrainId, CaseAttributeId, Value, "
+ "InbredSetId) VALUES (%s, %s, %s, %s)",
+ (strain_id, 19, "M", inbredset_id),
+ ),
+ ]
+ cursor.execute.assert_has_calls(calls, any_order=False)
+
+
+@pytest.mark.unit_test
+def test_delete_sample_data(mocker):
+ """Test that deletes work properly"""
+ mock_conn = mocker.MagicMock()
+ strain_id, data_id, inbredset_id = 1, 17373, 20
+ with mock_conn.cursor() as cursor:
+ cursor.fetchone.side_effect = (
+ 0,
+ [
+ 19,
+ ],
+ 0,
+ )
+ mocker.patch(
+ "gn3.db.sample_data.get_sample_data_ids",
+ return_value=(strain_id, data_id, inbredset_id),
+ )
+ delete_sample_data(
+ conn=mock_conn,
+ trait_name=35,
+ data="BXD1,18,3,0,M",
+ csv_header="Strain Name,Value,SE,Count,Sex",
+ phenotype_id=10007,
+ )
+ calls = [
+ mocker.call(
+ "DELETE FROM PublishData WHERE " "StrainId = %s AND Id = %s",
+ (strain_id, data_id),
+ ),
+ mocker.call(
+ "DELETE FROM PublishSE WHERE " "StrainId = %s AND DataId = %s",
+ (strain_id, data_id),
+ ),
+ mocker.call(
+ "DELETE FROM NStrain WHERE " "StrainId = %s AND DataId = %s",
+ (strain_id, data_id),
+ ),
+ mocker.call(
+ "DELETE FROM CaseAttributeXRefNew WHERE "
+ "StrainId = %s AND CaseAttributeId = "
+ "(SELECT CaseAttributeId FROM "
+ "CaseAttribute WHERE Name = %s) "
+ "AND InbredSetId = %s",
+ (strain_id, "Sex", inbredset_id),
+ ),
+ ]
+ cursor.execute.assert_has_calls(calls, any_order=False)
+
+
+@pytest.mark.unit_test
+def test_extract_actions():
+ """Test that extracting the correct dict of 'actions' work properly"""
+ assert __extract_actions(
+ original_data="BXD1,18,x,0,x",
+ updated_data="BXD1,x,2,1,F",
+ csv_header="Strain Name,Value,SE,Count,Sex",
+ ) == {
+ "delete": {"data": "BXD1,18", "csv_header": "Strain Name,Value"},
+ "insert": {"data": "BXD1,2,F", "csv_header": "Strain Name,SE,Sex"},
+ "update": {"data": "BXD1,1", "csv_header": "Strain Name,Count"},
+ }
+ assert __extract_actions(
+ original_data="BXD1,18,x,0,x",
+ updated_data="BXD1,19,2,1,F",
+ csv_header="Strain Name,Value,SE,Count,Sex",
+ ) == {
+ "delete": None,
+ "insert": {"data": "BXD1,2,F", "csv_header": "Strain Name,SE,Sex"},
+ "update": {"data": "BXD1,19,1", "csv_header": "Strain Name,Value,Count"},
+ }
+
+
+@pytest.mark.unit_test
+def test_update_sample_data(mocker):
+ """Test that updates work properly"""
+ mock_conn = mocker.MagicMock()
+ strain_id, data_id, inbredset_id = 1, 17373, 20
+ with mock_conn.cursor() as cursor:
+ # cursor.fetchone.side_effect = (0, [19, ], 0)
+ mocker.patch(
+ "gn3.db.sample_data.get_sample_data_ids",
+ return_value=(strain_id, data_id, inbredset_id),
+ )
+ mocker.patch("gn3.db.sample_data.insert_sample_data", return_value=1)
+ mocker.patch("gn3.db.sample_data.delete_sample_data", return_value=1)
+ update_sample_data(
+ conn=mock_conn,
+ trait_name=35,
+ original_data="BXD1,18,x,0,x",
+ updated_data="BXD1,x,2,1,F",
+ csv_header="Strain Name,Value,SE,Count,Sex",
+ phenotype_id=10007,
+ )
+ # pylint: disable=[E1101]
+ gn3.db.sample_data.insert_sample_data.assert_called_once_with(
+ conn=mock_conn,
+ trait_name=35,
+ data="BXD1,2,F",
+ csv_header="Strain Name,SE,Sex",
+ phenotype_id=10007,
+ )
+ # pylint: disable=[E1101]
+ gn3.db.sample_data.delete_sample_data.assert_called_once_with(
+ conn=mock_conn,
+ trait_name=35,
+ data="BXD1,18",
+ csv_header="Strain Name,Value",
+ phenotype_id=10007,
+ )
+ cursor.execute.assert_has_calls(
+ [
+ mocker.call(
+ "UPDATE NStrain SET count = %s "
+ "WHERE StrainId = %s AND DataId = %s",
+ ("1", strain_id, data_id),
+ )
+ ],
+ any_order=False,
+ )
diff --git a/tests/unit/db/test_species.py b/tests/unit/db/test_species.py
index b2c4844..e883b21 100644
--- a/tests/unit/db/test_species.py
+++ b/tests/unit/db/test_species.py
@@ -2,6 +2,8 @@
from unittest import TestCase
from unittest import mock
+import pytest
+
from gn3.db.species import get_chromosome
from gn3.db.species import get_all_species
@@ -9,6 +11,7 @@ from gn3.db.species import get_all_species
class TestChromosomes(TestCase):
"""Test cases for fetching chromosomes"""
+ @pytest.mark.unit_test
def test_get_chromosome_using_species_name(self):
"""Test that the chromosome is fetched using a species name"""
db_mock = mock.MagicMock()
@@ -24,6 +27,7 @@ class TestChromosomes(TestCase):
"Species.Name = 'TestCase' ORDER BY OrderId"
)
+ @pytest.mark.unit_test
def test_get_chromosome_using_group_name(self):
"""Test that the chromosome is fetched using a group name"""
db_mock = mock.MagicMock()
@@ -39,6 +43,7 @@ class TestChromosomes(TestCase):
"InbredSet.Name = 'TestCase' ORDER BY OrderId"
)
+ @pytest.mark.unit_test
def test_get_all_species(self):
"""Test that species are fetched correctly"""
db_mock = mock.MagicMock()
diff --git a/tests/unit/db/test_traits.py b/tests/unit/db/test_traits.py
index 4aa9389..434f758 100644
--- a/tests/unit/db/test_traits.py
+++ b/tests/unit/db/test_traits.py
@@ -1,11 +1,11 @@
"""Tests for gn3/db/traits.py"""
from unittest import mock, TestCase
+import pytest
from gn3.db.traits import (
build_trait_name,
export_trait_data,
export_informative,
set_haveinfo_field,
- update_sample_data,
retrieve_trait_info,
set_confidential_field,
set_homologene_id_field,
@@ -49,6 +49,7 @@ trait_data = {
class TestTraitsDBFunctions(TestCase):
"Test cases for traits functions"
+ @pytest.mark.unit_test
def test_retrieve_publish_trait_info(self):
"""Test retrieval of type `Publish` traits."""
db_mock = mock.MagicMock()
@@ -75,15 +76,15 @@ class TestTraitsDBFunctions(TestCase):
" Publication.Year, PublishXRef.Sequence, Phenotype.Units,"
" PublishXRef.comments"
" FROM"
- " PublishXRef, Publication, Phenotype, PublishFreeze"
+ " PublishXRef, Publication, Phenotype"
" WHERE"
" PublishXRef.Id = %(trait_name)s"
" AND Phenotype.Id = PublishXRef.PhenotypeId"
" AND Publication.Id = PublishXRef.PublicationId"
- " AND PublishXRef.InbredSetId = PublishFreeze.InbredSetId"
- " AND PublishFreeze.Id =%(trait_dataset_id)s"),
+ " AND PublishXRef.InbredSetId = %(trait_dataset_id)s"),
trait_source)
+ @pytest.mark.unit_test
def test_retrieve_probeset_trait_info(self):
"""Test retrieval of type `Probeset` traits."""
db_mock = mock.MagicMock()
@@ -119,6 +120,7 @@ class TestTraitsDBFunctions(TestCase):
"AND ProbeSetFreeze.Name = %(trait_dataset_name)s "
"AND ProbeSet.Name = %(trait_name)s"), trait_source)
+ @pytest.mark.unit_test
def test_retrieve_geno_trait_info(self):
"""Test retrieval of type `Geno` traits."""
db_mock = mock.MagicMock()
@@ -134,14 +136,14 @@ class TestTraitsDBFunctions(TestCase):
"SELECT "
"Geno.name, Geno.chr, Geno.mb, Geno.source2, Geno.sequence "
"FROM "
- "Geno, GenoFreeze, GenoXRef "
+ "Geno INNER JOIN GenoXRef ON GenoXRef.GenoId = Geno.Id "
+ "INNER JOIN GenoFreeze ON GenoFreeze.Id = GenoXRef.GenoFreezeId "
"WHERE "
- "GenoXRef.GenoFreezeId = GenoFreeze.Id "
- "AND GenoXRef.GenoId = Geno.Id "
- "AND GenoFreeze.Name = %(trait_dataset_name)s "
+ "GenoFreeze.Name = %(trait_dataset_name)s "
"AND Geno.Name = %(trait_name)s"),
trait_source)
+ @pytest.mark.unit_test
def test_retrieve_temp_trait_info(self):
"""Test retrieval of type `Temp` traits."""
db_mock = mock.MagicMock()
@@ -154,6 +156,7 @@ class TestTraitsDBFunctions(TestCase):
"SELECT name, description FROM Temp WHERE Name = %(trait_name)s",
trait_source)
+ @pytest.mark.unit_test
def test_build_trait_name_with_good_fullnames(self):
"""
Check that the name is built correctly.
@@ -170,6 +173,7 @@ class TestTraitsDBFunctions(TestCase):
with self.subTest(fullname=fullname):
self.assertEqual(build_trait_name(fullname), expected)
+ @pytest.mark.unit_test
def test_build_trait_name_with_bad_fullnames(self):
"""
Check that an exception is raised if the full name format is wrong.
@@ -179,6 +183,7 @@ class TestTraitsDBFunctions(TestCase):
with self.assertRaises(AssertionError, msg="Name format error"):
build_trait_name(fullname)
+ @pytest.mark.unit_test
def test_retrieve_trait_info(self):
"""Test that information on traits is retrieved as appropriate."""
for threshold, trait_fullname, expected in [
@@ -195,39 +200,7 @@ class TestTraitsDBFunctions(TestCase):
threshold, trait_fullname, db_mock),
expected)
- def test_update_sample_data(self):
- """Test that the SQL queries when calling update_sample_data are called with
- the right calls.
-
- """
- # pylint: disable=C0103
- db_mock = mock.MagicMock()
-
- STRAIN_ID_SQL: str = "UPDATE Strain SET Name = %s WHERE Id = %s"
- PUBLISH_DATA_SQL: str = (
- "UPDATE PublishData SET value = %s "
- "WHERE StrainId = %s AND Id = %s")
- PUBLISH_SE_SQL: str = (
- "UPDATE PublishSE SET error = %s "
- "WHERE StrainId = %s AND DataId = %s")
- N_STRAIN_SQL: str = (
- "UPDATE NStrain SET count = %s "
- "WHERE StrainId = %s AND DataId = %s")
-
- with db_mock.cursor() as cursor:
- type(cursor).rowcount = 1
- self.assertEqual(update_sample_data(
- conn=db_mock, strain_name="BXD11",
- strain_id=10, publish_data_id=8967049,
- value=18.7, error=2.3, count=2),
- (1, 1, 1, 1))
- cursor.execute.assert_has_calls(
- [mock.call(STRAIN_ID_SQL, ('BXD11', 10)),
- mock.call(PUBLISH_DATA_SQL, (18.7, 10, 8967049)),
- mock.call(PUBLISH_SE_SQL, (2.3, 10, 8967049)),
- mock.call(N_STRAIN_SQL, (2, 10, 8967049))]
- )
-
+ @pytest.mark.unit_test
def test_set_haveinfo_field(self):
"""Test that the `haveinfo` field is set up correctly"""
for trait_info, expected in [
@@ -236,6 +209,7 @@ class TestTraitsDBFunctions(TestCase):
with self.subTest(trait_info=trait_info, expected=expected):
self.assertEqual(set_haveinfo_field(trait_info), expected)
+ @pytest.mark.unit_test
def test_set_homologene_id_field(self):
"""Test that the `homologene_id` field is set up correctly"""
for trait_type, trait_info, expected in [
@@ -250,6 +224,7 @@ class TestTraitsDBFunctions(TestCase):
self.assertEqual(
set_homologene_id_field(trait_type, trait_info, db_mock), expected)
+ @pytest.mark.unit_test
def test_set_confidential_field(self):
"""Test that the `confidential` field is set up correctly"""
for trait_type, trait_info, expected in [
@@ -261,6 +236,7 @@ class TestTraitsDBFunctions(TestCase):
self.assertEqual(
set_confidential_field(trait_type, trait_info), expected)
+ @pytest.mark.unit_test
def test_export_trait_data_dtype(self):
"""
Test `export_trait_data` with different values for the `dtype` keyword
@@ -276,6 +252,7 @@ class TestTraitsDBFunctions(TestCase):
export_trait_data(trait_data, samplelist, dtype=dtype),
expected)
+ @pytest.mark.unit_test
def test_export_trait_data_dtype_all_flags(self):
"""
Test `export_trait_data` with different values for the `dtype` keyword
@@ -317,6 +294,7 @@ class TestTraitsDBFunctions(TestCase):
n_exists=nflag),
expected)
+ @pytest.mark.unit_test
def test_export_informative(self):
"""Test that the function exports appropriate data."""
# pylint: disable=W0621
diff --git a/tests/unit/test_authentication.py b/tests/unit/test_authentication.py
index 061b684..59c88ef 100644
--- a/tests/unit/test_authentication.py
+++ b/tests/unit/test_authentication.py
@@ -1,8 +1,10 @@
"""Test cases for authentication.py"""
import json
import unittest
-
from unittest import mock
+
+import pytest
+
from gn3.authentication import AdminRole
from gn3.authentication import DataRole
from gn3.authentication import get_highest_user_access_role
@@ -24,6 +26,7 @@ class TestGetUserMembership(unittest.TestCase):
'"created_timestamp": "Oct 06 2021 06:39PM"}')}
self.conn = conn
+ @pytest.mark.unit_test
def test_user_is_group_member_only(self):
"""Test that a user is only a group member"""
self.assertEqual(
@@ -34,6 +37,7 @@ class TestGetUserMembership(unittest.TestCase):
{"member": True,
"admin": False})
+ @pytest.mark.unit_test
def test_user_is_group_admin_only(self):
"""Test that a user is a group admin only"""
self.assertEqual(
@@ -44,6 +48,7 @@ class TestGetUserMembership(unittest.TestCase):
{"member": False,
"admin": True})
+ @pytest.mark.unit_test
def test_user_is_both_group_member_and_admin(self):
"""Test that a user is both an admin and member of a group"""
self.assertEqual(
@@ -58,6 +63,7 @@ class TestGetUserMembership(unittest.TestCase):
class TestCheckUserAccessRole(unittest.TestCase):
"""Test cases for `get_highest_user_access_role`"""
+ @pytest.mark.unit_test
@mock.patch("gn3.authentication.requests.get")
def test_edit_access(self, requests_mock):
"""Test that the right access roles are set if the user has edit access"""
@@ -79,6 +85,7 @@ class TestCheckUserAccessRole(unittest.TestCase):
"admin": AdminRole.EDIT_ACCESS,
})
+ @pytest.mark.unit_test
@mock.patch("gn3.authentication.requests.get")
def test_no_access(self, requests_mock):
"""Test that the right access roles are set if the user has no access"""
diff --git a/tests/unit/test_commands.py b/tests/unit/test_commands.py
index e644e1a..4dd8735 100644
--- a/tests/unit/test_commands.py
+++ b/tests/unit/test_commands.py
@@ -5,6 +5,7 @@ from dataclasses import dataclass
from datetime import datetime
from typing import Callable
from unittest import mock
+import pytest
from gn3.commands import compose_gemma_cmd
from gn3.commands import compose_rqtl_cmd
from gn3.commands import queue_cmd
@@ -23,6 +24,7 @@ class MockRedis:
class TestCommands(unittest.TestCase):
"""Test cases for commands.py"""
+ @pytest.mark.unit_test
def test_compose_gemma_cmd_no_extra_args(self):
"""Test that the gemma cmd is composed correctly"""
self.assertEqual(
@@ -37,6 +39,7 @@ class TestCommands(unittest.TestCase):
"-p /tmp/gf13Ad0tRX/phenofile.txt"
" -gk"))
+ @pytest.mark.unit_test
def test_compose_gemma_cmd_extra_args(self):
"""Test that the gemma cmd is composed correctly"""
self.assertEqual(
@@ -54,6 +57,7 @@ class TestCommands(unittest.TestCase):
"-p /tmp/gf13Ad0tRX/phenofile.txt"
" -gk"))
+ @pytest.mark.unit_test
def test_compose_rqtl_cmd(self):
"""Test that the R/qtl cmd is composed correctly"""
self.assertEqual(
@@ -78,6 +82,7 @@ class TestCommands(unittest.TestCase):
"--addcovar")
)
+ @pytest.mark.unit_test
def test_queue_cmd_exception_raised_when_redis_is_down(self):
"""Test that the correct error is raised when Redis is unavailable"""
self.assertRaises(RedisConnectionError,
@@ -88,10 +93,10 @@ class TestCommands(unittest.TestCase):
hset=mock.MagicMock(),
rpush=mock.MagicMock()))
+ @pytest.mark.unit_test
@mock.patch("gn3.commands.datetime")
@mock.patch("gn3.commands.uuid4")
- def test_queue_cmd_correct_calls_to_redis(self, mock_uuid4,
- mock_datetime):
+ def test_queue_cmd_correct_calls_to_redis(self, mock_uuid4, mock_datetime):
"""Test that the cmd is queued properly"""
mock_uuid4.return_value = 1234
mock_datetime.now.return_value = datetime.fromisoformat('2021-02-12 '
@@ -106,12 +111,13 @@ class TestCommands(unittest.TestCase):
job_queue="GN2::job-queue"),
actual_unique_id)
mock_redis_conn.hset.assert_has_calls(
- [mock.call(name=actual_unique_id, key="cmd", value="ls"),
+ [mock.call(name=actual_unique_id, key="cmd", value='"ls"'),
mock.call(name=actual_unique_id, key="result", value=""),
mock.call(name=actual_unique_id, key="status", value="queued")])
mock_redis_conn.rpush.assert_has_calls(
[mock.call("GN2::job-queue", actual_unique_id)])
+ @pytest.mark.unit_test
@mock.patch("gn3.commands.datetime")
@mock.patch("gn3.commands.uuid4")
def test_queue_cmd_right_calls_to_redis_with_email(self,
@@ -132,21 +138,23 @@ class TestCommands(unittest.TestCase):
email="me@me.com"),
actual_unique_id)
mock_redis_conn.hset.assert_has_calls(
- [mock.call(name=actual_unique_id, key="cmd", value="ls"),
+ [mock.call(name=actual_unique_id, key="cmd", value='"ls"'),
mock.call(name=actual_unique_id, key="result", value=""),
mock.call(name=actual_unique_id, key="status", value="queued"),
mock.call(name=actual_unique_id, key="email", value="me@me.com")
- ])
+ ], any_order=True)
mock_redis_conn.rpush.assert_has_calls(
[mock.call("GN2::job-queue", actual_unique_id)])
+ @pytest.mark.unit_test
def test_run_cmd_correct_input(self):
"""Test that a correct cmd is processed correctly"""
- self.assertEqual(run_cmd("echo test"),
+ self.assertEqual(run_cmd('"echo test"'),
{"code": 0, "output": "test\n"})
+ @pytest.mark.unit_test
def test_run_cmd_incorrect_input(self):
"""Test that an incorrect cmd is processed correctly"""
- result = run_cmd("echoo test")
+ result = run_cmd('"echoo test"')
self.assertEqual(127, result.get("code"))
self.assertIn("not found", result.get("output"))
diff --git a/tests/unit/test_csvcmp.py b/tests/unit/test_csvcmp.py
new file mode 100644
index 0000000..c2fda6b
--- /dev/null
+++ b/tests/unit/test_csvcmp.py
@@ -0,0 +1,170 @@
+"""Tests for gn3.csvcmp"""
+import pytest
+
+from gn3.csvcmp import clean_csv_text
+from gn3.csvcmp import csv_diff
+from gn3.csvcmp import extract_invalid_csv_headers
+from gn3.csvcmp import extract_strain_name
+from gn3.csvcmp import fill_csv
+from gn3.csvcmp import get_allowable_sampledata_headers
+from gn3.csvcmp import remove_insignificant_edits
+
+
+@pytest.mark.unit_test
+def test_fill_csv():
+ """Test that filling a csv works properly"""
+ test_input = """
+Strain Name,Value,SE,Count,Sex
+BXD1,18,x,0,
+BXD12,16,x,x,
+BXD14,15,x,x,
+BXD15,14,x,x
+"""
+ expected_output = """Strain Name,Value,SE,Count,Sex
+BXD1,18,x,0,x
+BXD12,16,x,x,x
+BXD14,15,x,x,x
+BXD15,14,x,x,x"""
+ assert fill_csv(test_input, width=5, value="x") == expected_output
+
+
+@pytest.mark.unit_test
+def test_remove_insignificant_data():
+ """Test that values outside ε are removed/ ignored"""
+ diff_data = {
+ "Additions": [],
+ "Deletions": [],
+ "Modifications": [
+ {"Current": "1.000001,3", "Original": "1,3"},
+ {"Current": "1,3", "Original": "1.000001,3"},
+ {"Current": "2.000001,3", "Original": "2,2"},
+ {"Current": "1.01,3", "Original": "1,2"},
+ ],
+ }
+ expected_json = {
+ "Additions": [],
+ "Deletions": [],
+ "Modifications": [
+ {"Current": "2,3", "Original": "2,2"},
+ {"Current": "1.01,3", "Original": "1,2"},
+ ],
+ }
+ assert remove_insignificant_edits(diff_data) == expected_json
+
+
+@pytest.mark.unit_test
+def test_csv_diff_same_columns():
+ """Test csv diffing on data with the same number of columns"""
+ assert csv_diff(base_csv="a,b \n1,2\n", delta_csv="a,b\n1,3") == {
+ "Additions": [],
+ "Deletions": [],
+ "Columns": "",
+ "Modifications": [{"Current": "1,3", "Original": "1,2"}],
+ }
+
+
+@pytest.mark.unit_test
+def test_csv_diff_different_columns():
+ """Test csv diffing on data with different columns"""
+ base_csv = """
+Strain Name,Value,SE,Count
+BXD1,18,x,0
+BXD12,16,x,x
+BXD14,15,x,x
+BXD15,14,x,x
+"""
+ delta_csv = """Strain Name,Value,SE,Count,Sex
+BXD1,18,x,0
+BXD12,16,x,x,1
+BXD14,15,x,x
+BXD15,14,x,x"""
+ assert csv_diff(base_csv=base_csv, delta_csv=delta_csv) == {
+ "Additions": [],
+ "Columns": "Strain Name,Value,SE,Count,Sex",
+ "Deletions": [],
+ "Modifications": [{"Current": "BXD12,16,x,x,1", "Original": "BXD12,16,x,x,x"}],
+ }
+
+
+@pytest.mark.unit_test
+def test_csv_diff_only_column_change():
+ """Test csv diffing when only the column header change"""
+ base_csv = """
+Strain Name,Value,SE,Count
+BXD1,18,x,0
+BXD12,16,x,x
+BXD14,15,x,x
+BXD15,14,x,x
+"""
+ delta_csv = """Strain Name,Value,SE,Count,Sex
+BXD1,18,x,0
+BXD12,16,x,x
+BXD14,15,x,x
+BXD15,14,x,x
+"""
+ assert csv_diff(base_csv=base_csv, delta_csv=delta_csv) == {
+ "Additions": [],
+ "Deletions": [],
+ "Modifications": [],
+ }
+
+
+@pytest.mark.unit_test
+def test_extract_strain_name():
+ """Test that the strain's name is extracted given a csv header"""
+ assert (
+ extract_strain_name(csv_header="Strain Name,Value,SE,Count", data="BXD1,18,x,0")
+ == "BXD1"
+ )
+
+
+@pytest.mark.unit_test
+def test_get_allowable_csv_headers(mocker):
+ """Test that all the csv headers are fetched properly"""
+ mock_conn = mocker.MagicMock()
+ expected_values = [
+ "Strain Name", "Value", "SE", "Count",
+ "Condition", "Tissue", "Sex", "Age",
+ "Ethn.", "PMI (hrs)", "pH", "Color",
+ ]
+ with mock_conn.cursor() as cursor:
+ cursor.fetchall.return_value = (
+ ('Condition',), ('Tissue',), ('Sex',),
+ ('Age',), ('Ethn.',), ('PMI (hrs)',), ('pH',), ('Color',))
+ assert get_allowable_sampledata_headers(mock_conn) == expected_values
+ cursor.execute.assert_called_once_with(
+ "SELECT Name from CaseAttribute")
+
+
+@pytest.mark.unit_test
+def test_extract_invalid_csv_headers_with_some_wrong_headers():
+ """Test that invalid column headers are extracted correctly from a csv
+string"""
+ allowed_headers = [
+ "Strain Name", "Value", "SE", "Count",
+ "Condition", "Tissue", "Sex", "Age",
+ "Ethn.", "PMI (hrs)", "pH", "Color",
+ ]
+
+ csv_text = "Strain Name, Value, SE, Colour"
+ assert extract_invalid_csv_headers(allowed_headers, csv_text) == ["Colour"]
+
+
+@pytest.mark.unit_test
+def test_clean_csv():
+ """Test that csv text input is cleaned properly"""
+ csv_text = """
+Strain Name,Value,SE,Count
+BXD1,18,x ,0
+BXD12, 16,x,x
+BXD14,15 ,x,x
+BXD15,14,x,
+"""
+ expected_csv = """Strain Name,Value,SE,Count
+BXD1,18,x,0
+BXD12,16,x,x
+BXD14,15,x,x
+BXD15,14,x,"""
+
+ assert clean_csv_text(csv_text) == expected_csv
+ assert clean_csv_text("a,b \n1,2\n") == "a,b\n1,2"
diff --git a/tests/unit/test_data_helpers.py b/tests/unit/test_data_helpers.py
index 39aea45..e7c3ae9 100644
--- a/tests/unit/test_data_helpers.py
+++ b/tests/unit/test_data_helpers.py
@@ -4,13 +4,16 @@ Test functions in gn3.data_helpers
from unittest import TestCase
-from gn3.data_helpers import partition_all, parse_csv_line
+import pytest
+
+from gn3.data_helpers import partition_by, partition_all, parse_csv_line
class TestDataHelpers(TestCase):
"""
Test functions in gn3.data_helpers
"""
+ @pytest.mark.unit_test
def test_partition_all(self):
"""
Test that `gn3.data_helpers.partition_all` partitions sequences as expected.
@@ -34,8 +37,9 @@ class TestDataHelpers(TestCase):
(13, [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
((0, 1, 2, 3, 4, 5, 6, 7, 8, 9), ))):
with self.subTest(n=count, items=items):
- self.assertEqual(partition_all(count, items), expected)
+ self.assertEqual(tuple(partition_all(count, items)), expected)
+ @pytest.mark.unit_test
def test_parse_csv_line(self):
"""
Test parsing a single line from a CSV file
@@ -59,3 +63,32 @@ class TestDataHelpers(TestCase):
parse_csv_line(
line=line, delimiter=delimiter, quoting=quoting),
expected)
+
+ @pytest.mark.unit_test
+ def test_partition_by(self):
+ """
+ Test that `partition_by` groups the data using the given predicate
+
+ Given:
+ - `part_fn`: a predicate funtion that return boolean True/False
+ - `items`: a sequence of items
+ When:
+ - the partitioning predicate function and the sequence of items are
+ passed to the `partition_by` function
+ Then:
+ - the result is a tuple, with sub-tuples containing the data in the
+ original sequence. Each sub-tuple is a partition, ending as soon as
+ the next value in the sequence, when passed to `part_fn`, returns
+ boolean `True`.
+ """
+ for part_fn, items, expected in (
+ (lambda s: s.startswith("----"),
+ ("------", "a", "b", "-----", "c", "----", "d", "e", "---",
+ "f"),
+ (("------", "a", "b"), ("-----", "c"),
+ ("----", "d", "e", "---", "f"))),
+ (lambda x: (x % 2) == 0,
+ (0, 1, 3, 2, 4, 5, 7, 6, 9, 1),
+ ((0, 1, 3), (2,), (4, 5, 7), (6, 9, 1))),):
+ with self.subTest(items=items):
+ self.assertEqual(partition_by(part_fn, items), expected)
diff --git a/tests/unit/test_db_utils.py b/tests/unit/test_db_utils.py
index 0f2de9e..7dc66c0 100644
--- a/tests/unit/test_db_utils.py
+++ b/tests/unit/test_db_utils.py
@@ -2,9 +2,10 @@
from unittest import TestCase
from unittest import mock
-
from types import SimpleNamespace
+import pytest
+
from gn3.db_utils import database_connector
from gn3.db_utils import parse_db_url
@@ -12,6 +13,7 @@ from gn3.db_utils import parse_db_url
class TestDatabase(TestCase):
"""class contains testd for db connection functions"""
+ @pytest.mark.unit_test
@mock.patch("gn3.db_utils.mdb")
@mock.patch("gn3.db_utils.parse_db_url")
def test_database_connector(self, mock_db_parser, mock_sql):
@@ -26,8 +28,9 @@ class TestDatabase(TestCase):
mock_sql.connect.assert_called_with(
"localhost", "guest", "4321", "users")
self.assertIsInstance(
- results, tuple, "database not created successfully")
+ results, SimpleNamespace, "database not created successfully")
+ @pytest.mark.unit_test
@mock.patch("gn3.db_utils.SQL_URI",
"mysql://username:4321@localhost/test")
def test_parse_db_url(self):
diff --git a/tests/unit/test_file_utils.py b/tests/unit/test_file_utils.py
index 75be4f6..2c6f0b6 100644
--- a/tests/unit/test_file_utils.py
+++ b/tests/unit/test_file_utils.py
@@ -5,6 +5,7 @@ import unittest
from dataclasses import dataclass
from typing import Callable
from unittest import mock
+import pytest
from gn3.fs_helpers import extract_uploaded_file
from gn3.fs_helpers import get_dir_hash
from gn3.fs_helpers import jsonfile_to_dict
@@ -21,17 +22,20 @@ class MockFile:
class TestFileUtils(unittest.TestCase):
"""Test cases for procedures defined in fs_helpers.py"""
+ @pytest.mark.unit_test
def test_get_dir_hash(self):
"""Test that a directory is hashed correctly"""
test_dir = os.path.join(os.path.dirname(__file__), "test_data")
self.assertEqual("3aeafab7d53b4f76d223366ae7ee9738",
get_dir_hash(test_dir))
+ @pytest.mark.unit_test
def test_get_dir_hash_non_existent_dir(self):
"""Test thata an error is raised when the dir does not exist"""
self.assertRaises(FileNotFoundError, get_dir_hash,
"/non-existent-file")
+ @pytest.mark.unit_test
def test_jsonfile_to_dict(self):
"""Test that a json file is parsed correctly""" ""
json_file = os.path.join(os.path.dirname(__file__), "test_data",
@@ -39,12 +43,14 @@ class TestFileUtils(unittest.TestCase):
self.assertEqual("Longer description",
jsonfile_to_dict(json_file).get("description"))
+ @pytest.mark.unit_test
def test_jsonfile_to_dict_nonexistent_file(self):
"""Test that a ValueError is raised when the json file is
non-existent"""
self.assertRaises(FileNotFoundError, jsonfile_to_dict,
"/non-existent-dir")
+ @pytest.mark.unit_test
@mock.patch("gn3.fs_helpers.tarfile")
@mock.patch("gn3.fs_helpers.secure_filename")
def test_extract_uploaded_file(self, mock_file, mock_tarfile):
@@ -60,11 +66,12 @@ non-existent"""
"upload-data.tar.gz")
mock_tarfile.open.assert_called_once_with("/tmp/abcdef-abcdef/"
"upload-data.tar.gz")
- mock_tarfile.open.return_value.extractall.assert_called_once_with(
+ mock_tarfile.open.return_value.__enter__.return_value.extractall.assert_called_once_with(
path='/tmp/abcdef-abcdef')
mock_file.assert_called_once_with("upload-data.tar.gz")
self.assertEqual(result, {"status": 0, "token": "abcdef-abcdef"})
+ @pytest.mark.unit_test
@mock.patch("gn3.fs_helpers.secure_filename")
def test_extract_uploaded_file_non_existent_gzip(self, mock_file):
"""Test that the right error message is returned when there is a problem
@@ -78,13 +85,15 @@ extracting the file"""
"error": "gzip failed to unpack file"
})
+ @pytest.mark.unit_test
def test_cache_ipfs_file_cache_hit(self):
"""Test that the correct file location is returned if there's a cache hit"""
# Create empty file
test_dir = "/tmp/QmQPeNsJPyVWPFDVHb77w8G42Fvo15z4bG2X8D2GhfbSXc-test"
if not os.path.exists(test_dir):
os.mkdir(test_dir)
- open(f"{test_dir}/genotype.txt", "a").close()
+ with open(f"{test_dir}/genotype.txt", "a", encoding="utf8"):
+ pass
file_loc = cache_ipfs_file(
ipfs_file=("/ipfs/"
"QmQPeNsJPyVWPFDVHb"
@@ -96,6 +105,7 @@ extracting the file"""
os.rmdir(test_dir)
self.assertEqual(file_loc, f"{test_dir}/genotype.txt")
+ @pytest.mark.unit_test
@mock.patch("gn3.fs_helpers.ipfshttpclient")
def test_cache_ipfs_file_cache_miss(self,
mock_ipfs):
diff --git a/tests/unit/test_heatmaps.py b/tests/unit/test_heatmaps.py
index 03fd4a6..8781d6f 100644
--- a/tests/unit/test_heatmaps.py
+++ b/tests/unit/test_heatmaps.py
@@ -1,5 +1,9 @@
"""Module contains tests for gn3.heatmaps.heatmaps"""
from unittest import TestCase
+
+import pytest
+from numpy.testing import assert_allclose
+
from gn3.heatmaps import (
cluster_traits,
get_loci_names,
@@ -24,7 +28,8 @@ slinked = (
class TestHeatmap(TestCase):
"""Class for testing heatmap computation functions"""
- def test_cluster_traits(self):
+ @pytest.mark.unit_test
+ def test_cluster_traits(self): # pylint: disable=R0201
"""
Test that the clustering is working as expected.
"""
@@ -39,7 +44,7 @@ class TestHeatmap(TestCase):
(6.84118, 7.08432, 7.59844, 7.08229, 7.26774, 7.24991),
(9.45215, 10.6943, 8.64719, 10.1592, 7.75044, 8.78615),
(7.04737, 6.87185, 7.58586, 6.92456, 6.84243, 7.36913)]
- self.assertEqual(
+ assert_allclose(
cluster_traits(traits_data_list),
((0.0, 0.20337048635536847, 0.16381088984330505, 1.7388553629398245,
1.5025235756329178, 0.6952839500255574, 1.271661230252733,
@@ -73,11 +78,13 @@ class TestHeatmap(TestCase):
1.7413442197913358, 0.33370067057028485, 1.3256191648260216,
0.0)))
+ @pytest.mark.unit_test
def test_compute_heatmap_order(self):
"""Test the orders."""
self.assertEqual(
compute_traits_order(slinked), (0, 2, 1, 7, 5, 9, 3, 6, 8, 4))
+ @pytest.mark.unit_test
def test_retrieve_samples_and_values(self):
"""Test retrieval of samples and values."""
for orders, slist, tdata, expected in [
@@ -103,6 +110,7 @@ class TestHeatmap(TestCase):
self.assertEqual(
retrieve_samples_and_values(orders, slist, tdata), expected)
+ @pytest.mark.unit_test
def test_get_lrs_from_chr(self):
"""Check that function gets correct LRS values"""
for trait, chromosome, expected in [
@@ -117,6 +125,7 @@ class TestHeatmap(TestCase):
with self.subTest(trait=trait, chromosome=chromosome):
self.assertEqual(get_lrs_from_chr(trait, chromosome), expected)
+ @pytest.mark.unit_test
def test_process_traits_data_for_heatmap(self):
"""Check for correct processing of data for heatmap generation."""
self.assertEqual(
@@ -129,6 +138,7 @@ class TestHeatmap(TestCase):
[[0.5, 0.579, 0.5],
[0.5, 0.5, 0.5]]])
+ @pytest.mark.unit_test
def test_get_loci_names(self):
"""Check that loci names are retrieved correctly."""
for organised, expected in (