diff --git a/docker-compose.yml b/docker-compose.yml index 497a8fa..6f87101 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -321,6 +321,8 @@ services: # Predict-route credentials (public user). Must match make gateway-auth / .htpasswd-user. GATEWAY_USER: ${GATEWAY_USER:-user} GATEWAY_USER_PASSWORD: ${GATEWAY_USER_PASSWORD:-change-me-gateway-user} + # Compose uses plain HTTP to nginx; disable TLS verification explicitly. + GATEWAY_VERIFY_TLS: "false" depends_on: - embedding-api - go-prediction-api diff --git a/docs/data.md b/docs/data.md index d3e6b64..018fc23 100644 --- a/docs/data.md +++ b/docs/data.md @@ -6,12 +6,14 @@ This document defines data sources, layout, versioning, preprocessing, and repro ### Primary training dataset (Kaggle) -| Field | Value | -|-------|-------| + +| Field | Value | +| ------- | ----------------------------------------------------------------------------------------------- | | Dataset | [cafa-5-6-train-dataset](https://www.kaggle.com/datasets/behrouzmirabdi/cafa-5-6-train-dataset) | -| Owner | `behrouzmirabdi` | -| Access | Kaggle API (`~/.kaggle/kaggle.json`) or browser download | -| License | See Kaggle dataset page | +| Owner | `behrouzmirabdi` | +| Access | Kaggle API (`~/.kaggle/kaggle.json`) or browser download | +| License | See Kaggle dataset page | + **Required files** (paths relative to repo root, matching `configs/config.yaml`): @@ -22,6 +24,8 @@ data/cafa-5-cafa-6-protein-function-prediction/ └── train_terms.tsv ``` + + ### Integrity checksums Verify files after download: @@ -31,20 +35,26 @@ sha256sum data/cafa-5-cafa-6-protein-function-prediction/Train/train_sequences.f data/cafa-5-cafa-6-protein-function-prediction/Train/train_terms.tsv ``` -| File | Expected sha256 | -|------|-----------------| + +| File | Expected sha256 | +| ----------------------- | ------------------------------------------------------------------ | | `train_sequences.fasta` | `434addef94c14eb8fb263ad2f5801a73a43fcb69d10955e5463d20c6b8aaac82` | -| `train_terms.tsv` | `c9489b802b8955d3cb14c23cc465674de86e08ad23107296260c8a8040361535` | +| `train_terms.tsv` | `c9489b802b8955d3cb14c23cc465674de86e08ad23107296260c8a8040361535` | + + + ### External model weights (Hugging Face) Embedding backends download pretrained weights on first use: -| Backend key | HF model | -|-------------|----------| -| `esm2` | `facebook/esm2_t33_650M_UR50D` | -| `protbert` | `Rostlab/prot_bert` | -| `t5` | `Rostlab/prot_t5_xl_uniref50` | + +| Backend key | HF model | +| ----------- | ------------------------------ | +| `esm2` | `facebook/esm2_t33_650M_UR50D` | +| `protbert` | `Rostlab/prot_bert` | +| `t5` | `Rostlab/prot_t5_xl_uniref50` | + Cache directory: `data/hf_cache/` (mounted in embedding containers). @@ -70,16 +80,20 @@ outputs/ └── training_api/ # Training API job outputs ``` + + ### Raw vs processed vs derived -| Stage | Location | Regenerable | Git-tracked | -|-------|----------|-------------|-------------| -| Raw FASTA + terms | `data/.../Train/` | Re-download from Kaggle | No | -| Label matrix | `outputs/labels/` | `scripts/preprocess.py` | No | -| Splits | `outputs/splits/` | `scripts/split_train_holdout.py` | No | -| Embeddings | `data/embeddings/` | `scripts/embed_sequences.py` | No | -| HF cache | `data/hf_cache/` | Auto on first embed | No | -| Checkpoints / MLflow artifacts | `outputs/`, MinIO | Training pipeline | No | + +| Stage | Location | Regenerable | Git-tracked | +| ------------------------------ | ------------------ | -------------------------------- | ----------- | +| Raw FASTA + terms | `data/.../Train/` | Re-download from Kaggle | No | +| Label matrix | `outputs/labels/` | `scripts/preprocess.py` | No | +| Splits | `outputs/splits/` | `scripts/split_train_holdout.py` | No | +| Embeddings | `data/embeddings/` | `scripts/embed_sequences.py` | No | +| HF cache | `data/hf_cache/` | Auto on first embed | No | +| Checkpoints / MLflow artifacts | `outputs/`, MinIO | Training pipeline | No | + Serving (`make up`) does **not** require training data. Preprocess, embed, train, and holdout evaluation do. @@ -96,8 +110,12 @@ Record in every training run: - `embedding.backend` and `embedding.pooling` - split seed / holdout fraction from config + + ## Ingestion workflow + + ### Download via Kaggle CLI ```bash @@ -106,6 +124,8 @@ kaggle datasets download -d behrouzmirabdi/cafa-5-6-train-dataset \ -p data/cafa-5-cafa-6-protein-function-prediction/Train --unzip ``` + + ### Validation checks After download: @@ -114,8 +134,12 @@ After download: 2. Run sha256 verification (table above). 3. Spot-check FASTA record count and terms file column structure. + + ## Preprocessing pipeline + + ### 1. Label matrix ```bash @@ -129,6 +153,8 @@ Key config (`configs/config.yaml`): - `data.num_labels`: top-N GO terms (default 500) - `data.train_val_split`: train/validation fraction within labeled set + + ### 2. Train/holdout split ```bash @@ -161,14 +187,20 @@ API endpoints (`/api/v1/predict-go-from-sequences`, FASTA upload) use the same n ## Data contracts + + ### Training / inference inputs -| Field | Requirement | -|-------|-------------| -| Protein ID | Non-empty string; matches FASTA header or JSON `id` | -| Sequence | Amino acid string; normalized as above | -| Embedding vector | Length must match model input dim for GO predictor | -| GO labels | `GO:#######` format in terms file | + +| Field | Requirement | +| ---------------- | --------------------------------------------------- | +| Protein ID | Non-empty string; matches FASTA header or JSON `id` | +| Sequence | Amino acid string; normalized as above | +| Embedding vector | Length must match model input dim for GO predictor | +| GO labels | `GO:#######` format in terms file | + + + ### Config-driven paths @@ -186,11 +218,13 @@ Do not hardcode machine-specific absolute paths in scripts or configs committed ## Storage and retention -| Environment | Raw data | Embeddings | Artifacts | -|-------------|----------|------------|-----------| -| Local dev | `./data/` bind mount | `./data/embeddings/` | `./outputs/` | -| Compose services | `./data`, `./outputs` volumes | `./data/hf_cache` | `./outputs/service_artifacts/` | -| MLflow (prod-like) | N/A | N/A | MinIO `mlflow-artifacts` bucket | + +| Environment | Raw data | Embeddings | Artifacts | +| ------------------ | ----------------------------- | -------------------- | ------------------------------- | +| Local dev | `./data/` bind mount | `./data/embeddings/` | `./outputs/` | +| Compose services | `./data`, `./outputs` volumes | `./data/hf_cache` | `./outputs/service_artifacts/` | +| MLflow (prod-like) | N/A | N/A | MinIO `mlflow-artifacts` bucket | + **Regenerable without data loss:** embeddings, splits, label matrix, local checkpoints. @@ -207,14 +241,19 @@ To rerun training on the same data: - [ ] Point `MLFLOW_TRACKING_URI` at the same tracking server - [ ] Log dataset checksums from `train_run_summary.json` + + ## Privacy and compliance - Training data is public competition data; confirm Kaggle license before redistribution. - Do not commit raw data, credentials, or user-submitted sequences from production inference to git. - Service artifacts under `outputs/service_artifacts/` may contain user sequences; treat as sensitive in shared environments. + + ## Related documentation - [training.md](training.md) — how processed data feeds the training pipeline - [architecture.md](architecture.md) — data flow through services - [deployment.md](deployment.md) — volume mounts and data paths in Compose + diff --git a/scripts/build_go_term_metadata.py b/scripts/build_go_term_metadata.py new file mode 100644 index 0000000..2c819bb --- /dev/null +++ b/scripts/build_go_term_metadata.py @@ -0,0 +1,121 @@ +#! /usr/bin/env python +"""Build the GO term metadata for the GO term prediction model from go-basic.obo file +and for outputs/label_matrix_top500/term_names.npy GO term names. +""" + +import argparse +from pathlib import Path +import numpy as np +import pandas as pd + +def parse_obo(go_basic_obo_file: Path) -> list[dict]: + """Parse a go-basic.obo file into a list of term dicts.""" + + terms = [] + current = None + in_term = False + + with open(go_basic_obo_file, 'r', encoding='utf-8') as f: + for line in f: + line = line.rstrip('\n') + stripped = line.strip() + + if stripped.startswith('['): + if current is not None and 'id' in current: + terms.append(current) + if stripped == '[Term]': + current = {} + in_term = True + else: + current = None + in_term = False + continue + + if not in_term or stripped == '': + continue + + if ':' not in line: + continue + + key, _, value = line.partition(':') + key = key.strip() + value = value.strip() + + if key == 'id': + current['id'] = value + elif key == 'name': + current['name'] = value + elif key == 'namespace': + current['namespace'] = value + elif key == 'def': + if value.startswith('"'): + end_quote = value.find('"', 1) + current['def'] = value[1:end_quote] + else: + current['def'] = value + + if current is not None and 'id' in current: + terms.append(current) + + return terms + + +def build_dataframe(obo_path, npy_path): + """Load the array of GO term names we want to filter on.""" + term_names = np.load(npy_path, allow_pickle=True) + term_names_set = set(term_names) + + all_terms = parse_obo(obo_path) + + rows = [] + for t in all_terms: + go_id = t.get('id') + if go_id is not None and go_id in term_names_set: + rows.append({ + 'GO_term': go_id, + 'name': t.get('name'), + 'namespace': t.get('namespace'), + 'def': t.get('def'), + }) + + df = pd.DataFrame(rows, columns=['GO_term', 'name', 'namespace', 'def']) + return df + + +def make_dir_if_not_exists(path: Path, exist_ok: bool = True) -> None: + """Make a directory if it doesn't exist.""" + if not path.exists(): + path.mkdir(parents=True, exist_ok=exist_ok) + + +def main(): + parser = argparse.ArgumentParser(description="Build the GO term metadata for the GO term prediction model from go-basic.obo file and for outputs/label_matrix_top500/term_names.npy GO term names.") + parser.add_argument( + "--go-basic-obo-file", + type=str, + default="data/cafa-6-protein-function-prediction/Train/go-basic.obo", + help="Path to the go-basic.obo file") + parser.add_argument( + "--term-names-file", + type=str, + default="outputs/label_matrix_top500/term_names.npy", + help="Path to the term_names.npy file") + parser.add_argument( + "--output-file", + type=str, + default="services/streamlit-ui/metadata/go_term_metadata.csv", + help="Path to the output file") + args = parser.parse_args() + + go_basic_obo_file = Path(args.go_basic_obo_file) + term_names_file = Path(args.term_names_file) + + make_dir_if_not_exists(Path(args.output_file).parent) + + df = build_dataframe(go_basic_obo_file, term_names_file) + df.to_csv(args.output_file, index=False) + + print(f"GO term metadata saved to {args.output_file}") + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/services/streamlit-ui/README.md b/services/streamlit-ui/README.md index fd92449..e07f089 100644 --- a/services/streamlit-ui/README.md +++ b/services/streamlit-ui/README.md @@ -1,28 +1,24 @@ # Streamlit UI Service -This service provides a lightweight web UI for sequence-to-GO prediction in the CAFA-5 stack. +This service provides a lightweight web UI for ProSeqGO (Protein Sequence Gene Ontology prediction platform). ## What Was Implemented The Streamlit app in `services/streamlit-ui/app.py` includes: -- Project header and description for the CAFA-5 MLOps solution. -- Quick links to: - - MLflow: `https://127.0.0.1/mlflow/` - - Prometheus: `http://127.0.0.1:9090` - - Grafana: `http://127.0.0.1:3000` -- Workflow visualization rendered via Graphviz (`st.graphviz_chart`). +- Project header and description for ProSeqGO sequence-to-GO inference. - Prediction form with: - - protein sequence input, - - `top_k` input (`1..500`), - - gateway base URL input (defaults from `GATEWAY_BASE_URL` env var), - - API username/password fields (defaults from `GATEWAY_USER` / `GATEWAY_USER_PASSWORD`), - - optional TLS verification toggle. + - protein sequence input or FASTA upload, + - `top_k` input (`1..500`). +- Gateway connection is injected from service environment only (not shown in the form): + - `GATEWAY_BASE_URL` + - `GATEWAY_USER` / `GATEWAY_USER_PASSWORD` + - optional `GATEWAY_VERIFY_TLS` (`true`/`false`; defaults from URL scheme when unset) - Input QC and validation: - trims whitespace/newlines from sequence, - uppercases sequence, - validates against amino-acid alphabet `ACDEFGHIKLMNPQRSTVWY`, - - checks required credentials and gateway URL. + - fails fast if gateway env config is missing. - Prediction call to: - `POST /api/v1/predict-go-from-sequences` - Request payload contract used by UI: @@ -68,10 +64,12 @@ The service container is defined in `docker/docker_streamlit/Dockerfile.streamli - Build context and dockerfile: - `context: .` - `dockerfile: docker/docker_streamlit/Dockerfile.streamlit` -- Image name: `cafa5-streamlit-ui:local` -- Network: `cafa5` +- Image name: `proseqgo-streamlit-ui:local` +- Network: `proseqgo` - Environment: - - `GATEWAY_BASE_URL: https://nginx` + - `GATEWAY_BASE_URL: http://nginx` + - `GATEWAY_USER` / `GATEWAY_USER_PASSWORD` (from `.env`) + - `GATEWAY_VERIFY_TLS: "false"` - Dependencies: - `embedding-api` - `go-prediction-api` @@ -99,9 +97,9 @@ The service container is defined in `docker/docker_streamlit/Dockerfile.streamli Important auth boundary: - Streamlit UI path itself is public (`/ui/`). -- Prediction endpoint `/api/v1/predict-go-from-sequences` still uses NGINX basic auth (`.htpasswd-user`). -- Defaults come from `.env` via Compose (`GATEWAY_USER` / `GATEWAY_USER_PASSWORD`). Run `make gateway-auth` so htpasswd matches. -- Admin credentials (`GATEWAY_ADMIN_*`) are for `/mlflow` and admin `/api/v1` routes — not the public UI defaults. +- Prediction endpoints still use NGINX basic auth (`.htpasswd-user`). +- The UI injects `GATEWAY_USER` / `GATEWAY_USER_PASSWORD` from the service environment (Compose / `.env`); users never enter credentials in the form. Run `make gateway-auth` so htpasswd matches. +- Admin credentials (`GATEWAY_ADMIN_*`) are for `/mlflow` and admin `/api/v1` routes — not used by the Streamlit UI. ## Run And Access @@ -127,8 +125,10 @@ Validation done for this integration included: ## Troubleshooting -- `Connection refused` from Streamlit to `127.0.0.1:443`: - - in-container localhost is not NGINX; use `GATEWAY_BASE_URL=https://nginx`. +- `Connection refused` from Streamlit to `127.0.0.1`: + - in-container localhost is not NGINX; set `GATEWAY_BASE_URL=http://nginx` on the `streamlit-ui` service. +- Misconfigured UI error about missing gateway env: + - ensure `GATEWAY_BASE_URL`, `GATEWAY_USER`, and `GATEWAY_USER_PASSWORD` are set for `streamlit-ui`. - `502 Bad Gateway` for `/ui/*`: - can happen with stale upstream resolution if upstream is hardcoded; - current config uses runtime DNS with variable upstream. diff --git a/services/streamlit-ui/app.py b/services/streamlit-ui/app.py index 7c41633..9e12dd0 100644 --- a/services/streamlit-ui/app.py +++ b/services/streamlit-ui/app.py @@ -6,27 +6,29 @@ import pandas as pd import requests import streamlit as st +from go_metadata import enrich_prediction_rows, load_go_term_metadata from requests.auth import HTTPBasicAuth from requests.exceptions import RequestException from validation import ( MAX_FASTA_UPLOAD_BYTES, + GatewayConfig, + load_gateway_config, normalize_sequence, validate_fasta_upload, - validate_gateway_auth, validate_sequence, ) PROJECT_TITLE = "ProSeqGO" PROJECT_DESCRIPTION = ( - "Interactive sequence-to-GO inference UI backed by the embedding and GO " - "prediction APIs through the NGINX gateway." + "ProSeqGO enables state-of-the-art prediction of Gene Ontology (GO) terms " + "for protein sequences using transformer-based sequence embeddings and " + "advanced machine learning models. By integrating recent advances in protein language models, " + "ProSeqGO facilitates large-scale, automated functional annotation directly from sequence input, " + "empowering researchers to infer protein function, explore biological mechanisms, " + "and accelerate discovery in genomics and proteomics." ) -DEFAULT_GATEWAY_URL = os.getenv("GATEWAY_BASE_URL", "http://localhost") -# Public predict-route defaults (must match nginx/.htpasswd-user from make gateway-auth). -DEFAULT_API_USERNAME = os.getenv("GATEWAY_USER", "") -DEFAULT_API_PASSWORD = os.getenv("GATEWAY_USER_PASSWORD", "") PREDICT_SEQUENCES_ENDPOINT = "/api/v1/predict-go-from-sequences" PREDICT_FASTA_ENDPOINT = "/api/v1/predict-go-from-fasta" MAX_TOP_K = 500 @@ -34,25 +36,6 @@ FASTA_TIMEOUT_SECONDS = 1800 PREDICTION_MODE_SEQUENCE = "Prediction with sequence" PREDICTION_MODE_FASTA = "Prediction with FASTA" -WORKFLOW_DOT = """ -digraph cafa5 { - rankdir=LR; - node [shape=box, style=rounded]; - user [label="User Browser"]; - ui [label="Streamlit UI (/ui/)"]; - gw [label="NGINX Gateway"]; - api [label="Embedding API"]; - pred [label="GO Prediction API"]; - - user -> ui; - ui -> gw [label="Basic Auth"]; - gw -> api [label="predict-go-from-sequences\\nor predict-go-from-fasta"]; - api -> pred [label="predict()"]; - pred -> api; - api -> ui; - ui -> user; -} -""".strip() def parse_error_message(response: requests.Response) -> str: @@ -79,23 +62,20 @@ def build_request_payload(sequence: str, top_k: int) -> dict[str, Any]: def call_prediction_api( - gateway_base_url: str, - username: str, - password: str, + gateway: GatewayConfig, sequence: str, top_k: int, - verify_tls: bool, timeout_seconds: int, ) -> tuple[bool, dict[str, Any] | str]: payload = build_request_payload(sequence=sequence, top_k=top_k) - endpoint = f"{gateway_base_url.rstrip('/')}{PREDICT_SEQUENCES_ENDPOINT}" + endpoint = f"{gateway.base_url}{PREDICT_SEQUENCES_ENDPOINT}" try: response = requests.post( endpoint, json=payload, - auth=HTTPBasicAuth(username, password), - verify=verify_tls, + auth=HTTPBasicAuth(gateway.username, gateway.password), + verify=gateway.verify_tls, timeout=timeout_seconds, ) except RequestException as exc: @@ -111,16 +91,13 @@ def call_prediction_api( def call_fasta_prediction_api( - gateway_base_url: str, - username: str, - password: str, + gateway: GatewayConfig, file_bytes: bytes, filename: str, top_k: int, - verify_tls: bool, timeout_seconds: int, ) -> tuple[bool, dict[str, Any] | str]: - endpoint = f"{gateway_base_url.rstrip('/')}{PREDICT_FASTA_ENDPOINT}" + endpoint = f"{gateway.base_url}{PREDICT_FASTA_ENDPOINT}" files = {"fasta_file": (filename or "upload.fasta", file_bytes, "application/octet-stream")} data = { "backend": "esm2", @@ -138,8 +115,8 @@ def call_fasta_prediction_api( endpoint, files=files, data=data, - auth=HTTPBasicAuth(username, password), - verify=verify_tls, + auth=HTTPBasicAuth(gateway.username, gateway.password), + verify=gateway.verify_tls, timeout=timeout_seconds, ) except RequestException as exc: @@ -159,11 +136,24 @@ def render_predictions(payload: dict[str, Any]) -> None: model_version = payload.get("model_version") or "unknown" st.caption(f"Model version: `{model_version}`") + metadata: pd.DataFrame | None = None + metadata_error: str | None = None + try: + metadata = load_go_term_metadata() + except (FileNotFoundError, ValueError) as exc: + metadata_error = str(exc) + results = payload.get("results", []) if not results: st.warning("No prediction rows were returned.") return + if metadata_error: + st.warning( + "GO term metadata is unavailable. Showing GO IDs only.\n\n" + f"{metadata_error}" + ) + for result in results: sequence_id = result.get("sequence_id", "unknown") st.markdown(f"#### Sequence `{sequence_id}`") @@ -171,8 +161,19 @@ def render_predictions(payload: dict[str, Any]) -> None: if not predictions: st.info("No GO terms returned for this sequence.") continue - table = pd.DataFrame(predictions) - table = table.rename(columns={"go_term": "GO Term", "score": "Score"}) + if metadata is not None: + table = enrich_prediction_rows(predictions=predictions, metadata=metadata) + else: + table = pd.DataFrame(predictions) + table = table.rename( + columns={ + "go_term": "GO Term", + "score": "Score", + "name": "GO Name", + "namespace": "Namespace", + "def": "Definition", + } + ) st.dataframe(table, use_container_width=True, hide_index=True) failures = payload.get("failures", []) @@ -181,42 +182,30 @@ def render_predictions(payload: dict[str, Any]) -> None: st.json(failures) -def _render_shared_connection_fields( - gateway_base_url: str, - verify_tls_default: bool, -) -> tuple[str, str, str, bool, int]: - top_k = st.number_input("top_k", min_value=1, max_value=MAX_TOP_K, value=10, step=1) - gateway_base_url_input = st.text_input("Gateway base URL", value=gateway_base_url) - username = st.text_input("API username", value=DEFAULT_API_USERNAME) - password = st.text_input("API password", type="password", value=DEFAULT_API_PASSWORD) - verify_tls = st.checkbox("Verify TLS", value=verify_tls_default) - return gateway_base_url_input, username, password, verify_tls, int(top_k) - - def main() -> None: st.set_page_config(page_title="ProSeqGO", page_icon="🧬", layout="wide") - st.title("🧬 ProSeqGO: Protein Sequence to GO Prediction") + st.title("🧬 ProSeqGO: Protein Sequence to Gene Ontology Prediction") st.write(PROJECT_DESCRIPTION) - st.subheader("Platform Links") - c1, c2, c3 = st.columns(3) - with c1: - st.markdown("- [MLflow](http://localhost/mlflow/)") - with c2: - st.markdown("- [Prometheus](http://localhost:9090)") - with c3: - st.markdown("- [Grafana](http://localhost:3000)") - - st.subheader("Workflow") - st.graphviz_chart(WORKFLOW_DOT, use_container_width=True) + gateway, config_error = load_gateway_config( + base_url=os.getenv("GATEWAY_BASE_URL"), + username=os.getenv("GATEWAY_USER"), + password=os.getenv("GATEWAY_USER_PASSWORD"), + verify_tls=os.getenv("GATEWAY_VERIFY_TLS"), + ) + if config_error or gateway is None: + st.error( + f"Streamlit UI is misconfigured: {config_error} " + "Set GATEWAY_BASE_URL, GATEWAY_USER, and GATEWAY_USER_PASSWORD " + "(optional GATEWAY_VERIFY_TLS) in the service environment." + ) + return - st.subheader("Predict GO Terms") prediction_mode = st.radio( "Input mode", options=[PREDICTION_MODE_SEQUENCE, PREDICTION_MODE_FASTA], horizontal=True, ) - verify_tls_default = DEFAULT_GATEWAY_URL.startswith("https://") if prediction_mode == PREDICTION_MODE_SEQUENCE: with st.form("predict_sequence_form"): @@ -225,10 +214,7 @@ def main() -> None: height=180, placeholder="Paste a single protein sequence (FASTA header excluded).", ) - gateway_base_url, username, password, verify_tls, top_k = _render_shared_connection_fields( - DEFAULT_GATEWAY_URL, - verify_tls_default, - ) + top_k = st.number_input("top_k", min_value=1, max_value=MAX_TOP_K, value=10, step=1) submit = st.form_submit_button("Run prediction") if not submit: @@ -239,19 +225,12 @@ def main() -> None: if not is_valid: st.error(message) return - auth_error = validate_gateway_auth(gateway_base_url, username, password) - if auth_error: - st.error(auth_error) - return with st.spinner(f"Submitting request to {PREDICT_SEQUENCES_ENDPOINT} ..."): ok, result = call_prediction_api( - gateway_base_url=gateway_base_url.strip(), - username=username.strip(), - password=password, + gateway=gateway, sequence=cleaned, - top_k=top_k, - verify_tls=verify_tls, + top_k=int(top_k), timeout_seconds=SEQUENCE_TIMEOUT_SECONDS, ) else: @@ -265,10 +244,7 @@ def main() -> None: "Non-canonical residues are normalized by the API at embedding time." ), ) - gateway_base_url, username, password, verify_tls, top_k = _render_shared_connection_fields( - DEFAULT_GATEWAY_URL, - verify_tls_default, - ) + top_k = st.number_input("top_k", min_value=1, max_value=MAX_TOP_K, value=10, step=1) submit = st.form_submit_button("Run prediction") if not submit: @@ -283,10 +259,6 @@ def main() -> None: if not is_valid: st.error(message) return - auth_error = validate_gateway_auth(gateway_base_url, username, password) - if auth_error: - st.error(auth_error) - return record_count = sum( 1 for line in file_bytes.decode("utf-8").splitlines() if line.startswith(">") @@ -299,13 +271,10 @@ def main() -> None: with st.spinner(f"Submitting request to {PREDICT_FASTA_ENDPOINT} ..."): ok, result = call_fasta_prediction_api( - gateway_base_url=gateway_base_url.strip(), - username=username.strip(), - password=password, + gateway=gateway, file_bytes=file_bytes, filename=fasta_file.name, - top_k=top_k, - verify_tls=verify_tls, + top_k=int(top_k), timeout_seconds=FASTA_TIMEOUT_SECONDS, ) diff --git a/services/streamlit-ui/go_metadata.py b/services/streamlit-ui/go_metadata.py new file mode 100644 index 0000000..2ad36a0 --- /dev/null +++ b/services/streamlit-ui/go_metadata.py @@ -0,0 +1,152 @@ +from __future__ import annotations + +import os +from functools import lru_cache +from pathlib import Path +from typing import Any + +import pandas as pd + +try: + import streamlit as st # type: ignore + + _cache_data = st.cache_data +except Exception: # pragma: no cover - Streamlit not required for helpers + _cache_data = None + + +REPO_ROOT = Path(__file__).resolve().parents[2] + +# Per-step requirement: this exact CSV is the source of truth. +DEFAULT_GO_TERM_METADATA_CSV = ( + REPO_ROOT + / "services" + / "streamlit-ui" + / "metadata" + / "go_term_metadata.csv" +) + + +def _left_join_predictions_with_metadata( + predictions: list[dict[str, Any]], + metadata: pd.DataFrame, +) -> pd.DataFrame: + if not predictions: + # Return empty frame with stable columns to simplify UI code later. + return pd.DataFrame(columns=["go_term", "score", "name", "namespace", "def"]) + + pred_df = pd.DataFrame(predictions).copy() + if "go_term" not in pred_df.columns: + raise KeyError("Predictions payload must contain 'go_term' column.") + if "score" not in pred_df.columns: + raise KeyError("Predictions payload must contain 'score' column.") + + # Preserve row order for display and deterministic CSV export. + pred_df["__row_id"] = range(len(pred_df)) + + merged = pred_df.merge(metadata, on="go_term", how="left", validate="m:1") + merged = merged.sort_values("__row_id").drop(columns=["__row_id"]) + return merged[["go_term", "score", "name", "namespace", "def"]] + + +def load_go_term_metadata( + metadata_csv_path: str | Path | None = None, +) -> pd.DataFrame: + """ + Load GO term metadata (go_term, name, namespace) for enrichment joins. + + The CSV is expected to be produced by `scripts/build_go_term_metadata.py`. + """ + path = ( + Path(metadata_csv_path) + if metadata_csv_path is not None + else Path(os.getenv("GO_TERM_METADATA_CSV", str(DEFAULT_GO_TERM_METADATA_CSV))) + ) + + if not path.exists(): + raise FileNotFoundError( + f"GO term metadata CSV not found: {path}\n" + "Generate it with `python scripts/build_go_term_metadata.py` " + "or mount it into the Streamlit container and set GO_TERM_METADATA_CSV." + ) + + df = pd.read_csv(path) + + # Normalize column names from build_go_term_metadata.py. + if "GO_term" in df.columns and "go_term" not in df.columns: + df = df.rename(columns={"GO_term": "go_term"}) + + required = {"go_term", "name", "namespace", "def"} + missing = required - set(df.columns) + if missing: + raise ValueError( + f"GO term metadata CSV missing required columns {sorted(missing)}: {path}" + ) + + # Keep only needed columns and ensure consistent dtypes for merge. + df = df.loc[:, ["go_term", "name", "namespace", "def"]].copy() + df["go_term"] = df["go_term"].astype(str).str.strip() + df["name"] = df["name"].astype(str) + df["namespace"] = df["namespace"].astype(str) + df["def"] = df["def"].astype(str) + return df + + +# Optional caching wrapper to avoid re-reading the CSV on every rerun. +if _cache_data is not None: + load_go_term_metadata = _cache_data(load_go_term_metadata) # type: ignore[method-assign] +else: + load_go_term_metadata = lru_cache(maxsize=1)(load_go_term_metadata) # type: ignore[method-assign] + + +def enrich_prediction_rows( + predictions: list[dict[str, Any]], + *, + metadata: pd.DataFrame | None = None, + metadata_csv_path: str | Path | None = None, +) -> pd.DataFrame: + """ + Enrich `{go_term, score}` prediction rows with `name`, `namespace`, and `def`. + """ + meta = metadata if metadata is not None else load_go_term_metadata(metadata_csv_path) + return _left_join_predictions_with_metadata(predictions=predictions, metadata=meta) + + +def enrich_predict_go_response( + payload: dict[str, Any], + *, + metadata: pd.DataFrame | None = None, + metadata_csv_path: str | Path | None = None, +) -> dict[str, Any]: + """ + Enrich an embedding-api prediction response in-place (returns a shallow copy). + + Expected shape: + { + "results": [ + {"sequence_id": "...", "predictions": [{"go_term": "...", "score": ...}, ...]}, + ... + ], + "failures": [...] + } + """ + meta = metadata if metadata is not None else load_go_term_metadata(metadata_csv_path) + out: dict[str, Any] = dict(payload) + results = payload.get("results", []) + enriched_results: list[dict[str, Any]] = [] + + for result in results: + predictions = result.get("predictions", []) or [] + enriched_df = _left_join_predictions_with_metadata(predictions, meta) + enriched_predictions = enriched_df.to_dict(orient="records") + + enriched_results.append( + { + **result, + "predictions": enriched_predictions, + } + ) + + out["results"] = enriched_results + return out + diff --git a/services/streamlit-ui/metadata/go_term_metadata.csv b/services/streamlit-ui/metadata/go_term_metadata.csv new file mode 100644 index 0000000..06313c7 --- /dev/null +++ b/services/streamlit-ui/metadata/go_term_metadata.csv @@ -0,0 +1,501 @@ +GO_term,name,namespace,def +GO:0000003,obsolete reproduction,biological_process,OBSOLETE. The production of new individuals that contain some portion of genetic material inherited from one or more parent organisms. +GO:0000122,negative regulation of transcription by RNA polymerase II,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of transcription mediated by RNA polymerase II." +GO:0000166,nucleotide binding,molecular_function,"Binding to a nucleotide, any compound consisting of a nucleoside that is esterified with (ortho)phosphate or an oligophosphate at any hydroxyl group on the ribose or deoxyribose." +GO:0000226,microtubule cytoskeleton organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of cytoskeletal structures comprising microtubules and their associated proteins." +GO:0000278,mitotic cell cycle,biological_process,"Progression through the phases of the mitotic cell cycle, the most common eukaryotic cell cycle, which canonically comprises four successive phases called G1, S, G2, and M and includes replication of the genome and the subsequent segregation of chromosomes into daughter cells. In some variant cell cycles nuclear replication or nuclear division may not be followed by cell division, or G1 and G2 phases may be absent." +GO:0000323,lytic vacuole,cellular_component,"A vacuole that is maintained at an acidic pH and which contains degradative enzymes, including a wide variety of acid hydrolases." +GO:0000785,chromatin,cellular_component,"The ordered and organized complex of DNA, protein, and sometimes RNA, that forms the chromosome." +GO:0000902,cell morphogenesis,biological_process,The developmental process in which the size or shape of a cell is generated and organized. +GO:0000904,obsolete cell morphogenesis involved in differentiation,biological_process,"OBSOLETE. The change in form (cell shape and size) that occurs when relatively unspecialized cells, e.g. embryonic or regenerative cells, acquire specialized structural and/or functional features that characterize the cells, tissues, or organs of the mature organism or some other relatively stable phase of the organism's life history." +GO:0000976,transcription cis-regulatory region binding,molecular_function,"Binding to a specific sequence of DNA that is part of a regulatory region that controls transcription of that section of the DNA. The transcribed region might be described as a gene, cistron, or operon." +GO:0001067,transcription regulatory region nucleic acid binding,molecular_function,"Binding to a nucleic acid region that regulates a nucleic acid-based process. Such processes include transcription, DNA replication, and DNA repair." +GO:0001654,eye development,biological_process,"The process whose specific outcome is the progression of the eye over time, from its formation to the mature structure. The eye is the organ of sight." +GO:0001932,regulation of protein phosphorylation,biological_process,"Any process that modulates the frequency, rate or extent of addition of phosphate groups into an amino acid in a protein." +GO:0001944,vasculature development,biological_process,"The process whose specific outcome is the progression of the vasculature over time, from its formation to the mature structure. The vasculature is an interconnected tubular multi-tissue structure that contains fluid that is actively transported around the organism." +GO:0002009,morphogenesis of an epithelium,biological_process,"The process in which the anatomical structures of epithelia are generated and organized. An epithelium consists of closely packed cells arranged in one or more layers, that covers the outer surfaces of the body or lines any internal cavity or tube." +GO:0002376,immune system process,biological_process,"Any process involved in the development or functioning of the immune system, an organismal system for calibrated responses to potential internal or invasive threats." +GO:0002682,regulation of immune system process,biological_process,"Any process that modulates the frequency, rate, or extent of an immune system process." +GO:0002684,positive regulation of immune system process,biological_process,"Any process that activates or increases the frequency, rate, or extent of an immune system process." +GO:0003002,regionalization,biological_process,The pattern specification process that results in the subdivision of an axis or axes in space to define an area or volume in which specific patterns of cell differentiation will take place or in which cells interpret a specific environment. +GO:0003006,developmental process involved in reproduction,biological_process,"A developmental process in which a progressive change in the state of some part of an organism, germline or somatic, specifically contributes to its ability to form offspring." +GO:0003008,system process,biological_process,A multicellular organismal process carried out by any of the organs or tissues in an organ system. An organ system is a regularly interacting or interdependent group of organs or tissues that work together to carry out a biological objective. +GO:0003674,molecular_function,molecular_function,"A molecular process that can be carried out by the action of a single macromolecular machine, usually via direct physical interactions with other molecular entities. Function in this sense denotes an action, or activity, that a gene product (or a complex) performs." +GO:0003676,nucleic acid binding,molecular_function,Binding to a nucleic acid. +GO:0003677,DNA binding,molecular_function,Any molecular function by which a gene product interacts selectively and non-covalently with DNA (deoxyribonucleic acid). +GO:0003690,double-stranded DNA binding,molecular_function,Binding to double-stranded DNA. +GO:0003700,DNA-binding transcription factor activity,molecular_function,"A transcription regulator activity that modulates transcription of gene sets via selective and non-covalent binding to a specific double-stranded genomic DNA sequence (sometimes referred to as a motif) within a cis-regulatory region. Regulatory regions include promoters (proximal and distal) and enhancers. Genes are transcriptional units, and include bacterial operons." +GO:0003723,RNA binding,molecular_function,Binding to an RNA molecule or a portion thereof. +GO:0003729,mRNA binding,molecular_function,"Binding to messenger RNA (mRNA), an intermediate molecule between DNA and protein. mRNA includes UTR and coding sequences, but does not contain introns." +GO:0003824,catalytic activity,molecular_function,"Catalysis of a biochemical reaction at physiological temperatures. In biologically catalyzed reactions, the reactants are known as substrates, and the catalysts are naturally occurring macromolecular substances known as enzymes. Enzymes possess specific binding sites for substrates, and are usually composed wholly or largely of protein, but RNA that has catalytic activity (ribozyme) is often also regarded as enzymatic." +GO:0004672,protein kinase activity,molecular_function,"Catalysis of the phosphorylation of an amino acid residue in a protein, usually according to the reaction: a protein + ATP = a phosphoprotein + ADP." +GO:0004888,transmembrane signaling receptor activity,molecular_function,Combining with an extracellular or intracellular signal and transmitting the signal from one side of the membrane to the other to initiate a change in cell activity or state as part of signal transduction. +GO:0005102,signaling receptor binding,molecular_function,"Binding to one or more specific sites on a receptor molecule, a macromolecule that undergoes combination with a hormone, neurotransmitter, drug or intracellular messenger to initiate a change in cell function." +GO:0005215,transporter activity,molecular_function,"Enables the directed movement of substances (such as macromolecules, small molecules, ions) into, out of or within a cell, accross or in between cells." +GO:0005488,binding,molecular_function,"The selective, non-covalent, often stoichiometric, interaction of a molecule with one or more specific sites on another molecule." +GO:0005515,protein binding,molecular_function,Binding to a protein. +GO:0005575,cellular_component,cellular_component,"A location, relative to cellular compartments and structures, occupied by a macromolecular machine. There are three types of cellular components described in the gene ontology: (1) the cellular anatomical entity where a gene product carries out a molecular function (e.g., plasma membrane, cytoskeleton) or membrane-enclosed compartments (e.g., mitochondrion); (2) virion components, where viral proteins act, and (3) the stable macromolecular complexes of which gene product are parts (e.g., the clathrin complex)." +GO:0005576,extracellular region,cellular_component,The space external to the outermost structure of a cell. For cells without external protective or external encapsulating structures this refers to space outside of the plasma membrane. This term covers the host cell environment outside an intracellular parasite. +GO:0005615,extracellular space,cellular_component,"That part of a multicellular organism outside the cells proper, usually taken to be outside the plasma membranes, and occupied by fluid." +GO:0005622,intracellular anatomical structure,cellular_component,A component of a cell contained within (but not including) the plasma membrane. In eukaryotes it includes the nucleus and cytoplasm. +GO:0005634,nucleus,cellular_component,"A membrane-bounded organelle of eukaryotic cells in which chromosomes are housed and replicated. In most cells, the nucleus contains all of the cell's chromosomes except the organellar chromosomes, and is the site of RNA synthesis and processing. In some species, or in specialized cell types, RNA metabolism or DNA replication may be absent." +GO:0005654,nucleoplasm,cellular_component,That part of the nuclear content other than the chromosomes or the nucleolus. +GO:0005694,chromosome,cellular_component,A structure composed of a very long molecule of DNA and associated proteins (e.g. histones) that carries hereditary information. +GO:0005730,nucleolus,cellular_component,"A small, dense body one or more of which are present in the nucleus of eukaryotic cells. It is rich in RNA and protein, is not bounded by a limiting membrane, and is not seen during mitosis. Its prime function is the transcription of the nucleolar DNA into 45S ribosomal-precursor RNA, the processing of this RNA into 5.8S, 18S, and 28S components of ribosomal RNA, and the association of these components with 5S RNA and proteins synthesized outside the nucleolus. This association results in the formation of ribonucleoprotein precursors; these pass into the cytoplasm and mature into the 40S and 60S subunits of the ribosome." +GO:0005737,cytoplasm,cellular_component,"The contents of a cell excluding the plasma membrane and nucleus, but including other subcellular structures." +GO:0005739,mitochondrion,cellular_component,"A semiautonomous, self replicating organelle that occurs in varying numbers, shapes, and sizes in the cytoplasm of virtually all eukaryotic cells. It is notably the site of tissue respiration." +GO:0005740,mitochondrial envelope,cellular_component,The double lipid bilayer enclosing the mitochondrion and separating its contents from the cell cytoplasm; includes the intermembrane space. +GO:0005768,endosome,cellular_component,A vacuole to which materials ingested by endocytosis are delivered. +GO:0005773,vacuole,cellular_component,"A closed structure, found only in eukaryotic cells, that is completely surrounded by unit membrane and contains liquid material. Cells contain one or several vacuoles, that may have different functions from each other. Vacuoles have a diverse array of functions. They can act as a storage organelle for nutrients or waste products, as a degradative compartment, as a cost-effective way of increasing cell size, and as a homeostatic regulator controlling both turgor pressure and pH of the cytosol." +GO:0005783,endoplasmic reticulum,cellular_component,"The irregular network of unit membranes, visible only by electron microscopy, that occurs in the cytoplasm of many eukaryotic cells. The membranes form a complex meshwork of tubular channels, which are often expanded into slitlike cavities called cisternae. The ER takes two forms, rough (or granular), with ribosomes adhering to the outer surface, and smooth (with no ribosomes attached)." +GO:0005789,endoplasmic reticulum membrane,cellular_component,The lipid bilayer surrounding the endoplasmic reticulum. +GO:0005794,Golgi apparatus,cellular_component,"A membrane-bound cytoplasmic organelle of the endomembrane system that further processes the core oligosaccharides (e.g. N-glycans) added to proteins in the endoplasmic reticulum and packages them into membrane-bound vesicles. The Golgi apparatus operates at the intersection of the secretory, lysosomal, and endocytic pathways." +GO:0005815,microtubule organizing center,cellular_component,"An intracellular structure that can catalyze gamma-tubulin-dependent microtubule nucleation and that can anchor microtubules by interacting with their minus ends, plus ends or sides." +GO:0005829,cytosol,cellular_component,"The part of the cytoplasm that does not contain organelles but which does contain other particulate matter, such as protein complexes." +GO:0005856,cytoskeleton,cellular_component,"A cellular structure that forms the internal framework of eukaryotic and prokaryotic cells. The cytoskeleton includes intermediate filaments, microfilaments, microtubules, the microtrabecular lattice, and other structures characterized by a polymeric filamentous nature and long-range order within the cell. The various elements of the cytoskeleton not only serve in the maintenance of cellular shape but also have roles in other cellular functions, including cellular movement, cell division, endocytosis, and movement of organelles." +GO:0005886,plasma membrane,cellular_component,The membrane surrounding a cell that separates the cell from its external environment. It consists of a phospholipid bilayer and associated proteins. +GO:0005911,cell-cell junction,cellular_component,"A cell junction that forms a connection between two or more cells of an organism; excludes direct cytoplasmic intercellular bridges, such as ring canals in insects." +GO:0005929,cilium,cellular_component,"A specialized eukaryotic organelle that consists of a filiform extrusion of the cell surface and of some cytoplasmic parts. Each cilium is largely bounded by an extrusion of the cytoplasmic (plasma) membrane, and contains a regular longitudinal array of microtubules, anchored to a basal body." +GO:0005975,carbohydrate metabolic process,biological_process,"The chemical reactions and pathways involving carbohydrates, any of a group of organic compounds based of the general formula Cx(H2O)y." +GO:0006082,organic acid metabolic process,biological_process,"The chemical reactions and pathways involving organic acids, any acidic compound containing carbon in covalent linkage." +GO:0006139,nucleobase-containing compound metabolic process,biological_process,"Any cellular metabolic process involving nucleobases, nucleosides, nucleotides and nucleic acids." +GO:0006259,DNA metabolic process,biological_process,"Any cellular metabolic process involving deoxyribonucleic acid. This is one of the two main types of nucleic acid, consisting of a long, unbranched macromolecule formed from one, or more commonly, two, strands of linked deoxyribonucleotides." +GO:0006355,regulation of DNA-templated transcription,biological_process,"Any process that modulates the frequency, rate or extent of cellular DNA-templated transcription." +GO:0006357,regulation of transcription by RNA polymerase II,biological_process,"Any process that modulates the frequency, rate or extent of transcription mediated by RNA polymerase II." +GO:0006396,RNA processing,biological_process,Any process involved in the conversion of one or more primary RNA transcripts into one or more mature RNA molecules. +GO:0006468,protein phosphorylation,biological_process,The process of introducing a phosphate group on to a protein. +GO:0006508,proteolysis,biological_process,The hydrolysis of proteins into smaller polypeptides and/or amino acids by cleavage of their peptide bonds. +GO:0006629,lipid metabolic process,biological_process,"The chemical reactions and pathways involving lipids, compounds soluble in an organic solvent but not, or sparingly, in an aqueous solvent. Includes fatty acids; neutral fats, other fatty-acid esters, and soaps; long-chain (fatty) alcohols and waxes; sphingoids and other long-chain bases; glycolipids, phospholipids and sphingolipids; and carotenes, polyprenols, sterols, terpenes and other isoprenoids." +GO:0006725,obsolete cellular aromatic compound metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving aromatic compounds, any organic compound characterized by one or more planar rings, each of which contains conjugated double bonds and delocalized pi electrons, as carried out by individual cells." +GO:0006793,phosphorus metabolic process,biological_process,The chemical reactions and pathways involving the nonmetallic element phosphorus or compounds that contain phosphorus. +GO:0006796,phosphate-containing compound metabolic process,biological_process,"The chemical reactions and pathways involving the phosphate group, the anion or salt of any phosphoric acid." +GO:0006807,obsolete nitrogen compound metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways involving organic or inorganic compounds that contain nitrogen. +GO:0006810,transport,biological_process,"The directed movement of substances (such as macromolecules, small molecules, ions) or cellular components (such as complexes and organelles) into, out of or within a cell, or between cells, or within a multicellular organism by means of some agent such as a transporter or a transporter complex, a pore or a motor protein." +GO:0006811,monoatomic ion transport,biological_process,"The directed movement of a monoatomic ion into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore. Monatomic ions (also called simple ions) are ions consisting of exactly one atom." +GO:0006812,monoatomic cation transport,biological_process,"The directed movement of a monoatomic cation, into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore. Monatomic cations (also called simple cations) are positively charged ions consisting of exactly one atom." +GO:0006935,chemotaxis,biological_process,"The directed movement of a motile cell or organism, or the directed growth of a cell guided by a specific chemical concentration gradient. Movement may be towards a higher concentration (positive chemotaxis) or towards a lower concentration (negative chemotaxis)." +GO:0006950,response to stress,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a disturbance in organismal or cellular homeostasis, usually, but not necessarily, exogenous (e.g. temperature, humidity, ionizing radiation)." +GO:0006952,defense response,biological_process,"Reactions, triggered in response to the presence of a foreign body or the occurrence of an injury, which result in restriction of damage to the organism attacked or prevention/recovery from the infection caused by the attack." +GO:0006955,immune response,biological_process,Any immune system process that functions in the calibrated response of an organism to a potential internal or invasive threat. +GO:0006974,DNA damage response,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus indicating damage to its DNA from environmental insults or errors during metabolism." +GO:0006979,response to oxidative stress,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of oxidative stress, a state often resulting from exposure to high levels of reactive oxygen species, e.g. superoxide anions, hydrogen peroxide (H2O2), and hydroxyl radicals." +GO:0006996,organelle organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of an organelle within a cell. An organelle is an organized structure of distinctive morphology and function. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton. Excludes the plasma membrane." +GO:0007010,cytoskeleton organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of cytoskeletal structures." +GO:0007017,microtubule-based process,biological_process,"Any cellular process that depends upon or alters the microtubule cytoskeleton, that part of the cytoskeleton comprising microtubules and their associated proteins." +GO:0007049,cell cycle,biological_process,"The progression of biochemical and morphological phases and events that occur in a cell during successive cell replication or nuclear replication events. Canonically, the cell cycle comprises the replication and segregation of genetic material followed by the division of the cell, but in endocycles or syncytial cells nuclear replication or nuclear division may not be followed by cell division." +GO:0007154,cell communication,biological_process,"Any process that mediates interactions between a cell and its surroundings. Encompasses interactions such as signaling or attachment between one cell and another cell, between a cell and an extracellular matrix, or between a cell and any other aspect of its environment." +GO:0007165,signal transduction,biological_process,"The cellular process in which a signal is conveyed to trigger a change in the activity or state of a cell. Signal transduction begins with reception of a signal (e.g. a ligand binding to a receptor or receptor activation by a stimulus such as light), or for signal transduction in the absence of ligand, signal-withdrawal or the activity of a constitutively active receptor. Signal transduction ends with regulation of a downstream cellular process, e.g. regulation of transcription or regulation of a metabolic process. Signal transduction covers signaling from receptors located on the surface of the cell and signaling via molecules located within the cell. For signaling between cells, signal transduction is restricted to events at and within the receiving cell." +GO:0007166,cell surface receptor signaling pathway,biological_process,"The series of molecular signals initiated by an extracellular ligand binding to a receptor located on the cell surface. The pathway ends with regulation of a downstream cellular process, e.g. transcription." +GO:0007267,cell-cell signaling,biological_process,"Any process that mediates the transfer of information from one cell to another. This process includes signal transduction in the receiving cell and, where applicable, release of a ligand and any processes that actively facilitate its transport and presentation to the receiving cell. Examples include signaling via soluble ligands, via cell adhesion molecules and via gap junctions." +GO:0007275,multicellular organism development,biological_process,The biological process whose specific outcome is the progression of a multicellular organism over time from an initial condition (e.g. a zygote or a young adult) to a later condition (e.g. a multicellular animal or an aged adult). +GO:0007276,gamete generation,biological_process,The generation and maintenance of gametes in a multicellular organism. A gamete is a haploid reproductive cell. +GO:0007281,germ cell development,biological_process,"The process whose specific outcome is the progression of an immature germ cell over time, from its formation to the mature structure (gamete). A germ cell is any reproductive cell in a multicellular organism." +GO:0007389,pattern specification process,biological_process,Any developmental process that results in the creation of defined areas or spaces within an organism to which cells respond and eventually are instructed to differentiate. +GO:0007399,nervous system development,biological_process,"The process whose specific outcome is the progression of nervous tissue over time, from its formation to its mature state." +GO:0007409,axonogenesis,biological_process,"De novo generation of a long process of a neuron, including the terminal branched region. Refers to the morphogenesis or creation of shape or form of the developing axon, which carries efferent (outgoing) action potentials from the cell body towards target cells." +GO:0007417,central nervous system development,biological_process,"The process whose specific outcome is the progression of the central nervous system over time, from its formation to the mature structure. The central nervous system is the core nervous system that serves an integrating and coordinating function. In vertebrates it consists of the brain and spinal cord. In those invertebrates with a central nervous system it typically consists of a brain, cerebral ganglia and a nerve cord." +GO:0007420,brain development,biological_process,"The process whose specific outcome is the progression of the brain over time, from its formation to the mature structure. Brain development begins with patterning events in the neural tube and ends with the mature structure that is the center of thought and emotion. The brain is responsible for the coordination and control of bodily activities and the interpretation of information from the senses (sight, hearing, smell, etc.)." +GO:0007423,sensory organ development,biological_process,"The process whose specific outcome is the progression of sensory organs over time, from its formation to the mature structure." +GO:0007507,heart development,biological_process,"The process whose specific outcome is the progression of the heart over time, from its formation to the mature structure. The heart is a hollow, muscular organ, which, by contracting rhythmically, keeps up the circulation of the blood." +GO:0007610,behavior,biological_process,"The internally coordinated responses (actions or inactions) of animals (individuals or groups) to internal or external stimuli, via a mechanism that involves nervous system activity." +GO:0008092,cytoskeletal protein binding,molecular_function,"Binding to a protein component of a cytoskeleton (actin, microtubule, or intermediate filament cytoskeleton)." +GO:0008104,protein localization,biological_process,"Any process in which a protein is transported to, or maintained in, a specific location." +GO:0008150,biological_process,biological_process,"A biological process is the execution of a genetically-encoded biological module or program. It consists of all the steps required to achieve the specific biological objective of the module. A biological process is accomplished by a particular set of molecular functions carried out by specific gene products (or macromolecular complexes), often in a highly regulated manner and in a particular temporal sequence." +GO:0008152,metabolic process,biological_process,"A cellular process consisting of the biochemical pathways by which a living organism transforms chemical substances. This includes including anabolism (biosynthetic process) and catabolism (catabolic process). Metabolic processes includes the transformation of small molecules, as well macromolecular processes such as DNA repair and replication, protein synthesis and degradation." +GO:0008219,cell death,biological_process,"Any biological process that results in permanent cessation of all vital functions of a cell. A cell should be considered dead when any one of the following molecular or morphological criteria is met: (1) the cell has lost the integrity of its plasma membrane; (2) the cell, including its nucleus, has undergone complete fragmentation into discrete bodies (frequently referred to as apoptotic bodies). The cell corpse (or its fragments) may be engulfed by an adjacent cell in vivo, but engulfment of whole cells should not be considered a strict criteria to define cell death as, under some circumstances, live engulfed cells can be released from phagosomes (see PMID:18045538)." +GO:0008233,peptidase activity,molecular_function,Catalysis of the hydrolysis of a peptide bond. A peptide bond is a covalent bond formed when the carbon atom from the carboxyl group of one amino acid shares electrons with the nitrogen atom from the amino group of a second amino acid. +GO:0008284,positive regulation of cell population proliferation,biological_process,Any process that activates or increases the rate or extent of cell proliferation. +GO:0008324,monoatomic cation transmembrane transporter activity,molecular_function,Enables the transfer of cation from one side of a membrane to the other. +GO:0008610,lipid biosynthetic process,biological_process,"The chemical reactions and pathways resulting in the formation of lipids, compounds soluble in an organic solvent but not, or sparingly, in an aqueous solvent." +GO:0009056,catabolic process,biological_process,A cellular process consisting of the biochemical pathways by which a living organism breaks down substances. This includes the breakdown of carbon compounds with the liberation of energy for use by the cell or organism. +GO:0009057,macromolecule catabolic process,biological_process,"The chemical reactions and pathways resulting in the breakdown of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0009058,biosynthetic process,biological_process,A cellular process consisting of the biochemical pathways by which a living organism synthesizes chemical substances. This typically represents the energy-requiring part of metabolism in which simpler substances are transformed into more complex ones. +GO:0009059,macromolecule biosynthetic process,biological_process,"The chemical reactions and pathways resulting in the formation of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0009266,response to temperature stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a temperature stimulus." +GO:0009314,response to radiation,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an electromagnetic radiation stimulus. Electromagnetic radiation is a propagating wave in space with electric and magnetic components. These components oscillate at right angles to each other and to the direction of propagation." +GO:0009416,response to light stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a light stimulus, electromagnetic radiation of wavelengths classified as infrared, visible or ultraviolet light." +GO:0009507,chloroplast,cellular_component,"A chlorophyll-containing plastid with thylakoids organized into grana and frets, or stroma thylakoids, and embedded in a stroma." +GO:0009536,plastid,cellular_component,"Any member of a family of organelles found in the cytoplasm of plants and some protists, which are membrane-bounded and contain DNA. Plant plastids develop from a common type, the proplastid." +GO:0009605,response to external stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an external stimulus." +GO:0009607,response to biotic stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a biotic stimulus, a stimulus caused or produced by a living organism." +GO:0009617,response to bacterium,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus from a bacterium." +GO:0009628,response to abiotic stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an abiotic (not derived from living organisms) stimulus." +GO:0009653,anatomical structure morphogenesis,biological_process,The process in which anatomical structures are generated and organized. Morphogenesis pertains to the creation of form. +GO:0009719,response to endogenous stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus arising within the organism." +GO:0009725,response to hormone,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a hormone stimulus." +GO:0009790,embryo development,biological_process,"The process whose specific outcome is the progression of an embryo from its formation until the end of its embryonic life stage. The end of the embryonic stage is organism-specific. For example, for mammals, the process would begin with zygote formation and end with birth. For insects, the process would begin at zygote formation and end with larval hatching. For plant zygotic embryos, this would be from zygote formation to the end of seed dormancy. For plant vegetative embryos, this would be from the initial determination of the cell or group of cells to form an embryo until the point when the embryo becomes independent of the parent plant." +GO:0009791,post-embryonic development,biological_process,"The process whose specific outcome is the progression of the organism over time, from the completion of embryonic development to the mature structure. See embryonic development." +GO:0009792,embryo development ending in birth or egg hatching,biological_process,"The process whose specific outcome is the progression of an embryo over time, from zygote formation until the end of the embryonic life stage. The end of the embryonic life stage is organism-specific and may be somewhat arbitrary; for mammals it is usually considered to be birth, for insects the hatching of the first instar larva from the eggshell." +GO:0009887,animal organ morphogenesis,biological_process,"Morphogenesis of an animal organ. An organ is defined as a tissue or set of tissues that work together to perform a specific function or functions. Morphogenesis is the process in which anatomical structures are generated and organized. Organs are commonly observed as visibly distinct structures, but may also exist as loosely associated clusters of cells that work together to perform a specific function or functions." +GO:0009888,tissue development,biological_process,"The process whose specific outcome is the progression of a tissue over time, from its formation to the mature structure." +GO:0009889,regulation of biosynthetic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of substances." +GO:0009890,negative regulation of biosynthetic process,biological_process,"Any process that stops, prevents, or reduces the rate of the chemical reactions and pathways resulting in the formation of substances." +GO:0009891,positive regulation of biosynthetic process,biological_process,"Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of substances." +GO:0009892,negative regulation of metabolic process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways within a cell or an organism." +GO:0009893,positive regulation of metabolic process,biological_process,"Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways within a cell or an organism." +GO:0009894,regulation of catabolic process,biological_process,"Any process that modulates the frequency, rate, or extent of the chemical reactions and pathways resulting in the breakdown of substances." +GO:0009966,regulation of signal transduction,biological_process,"Any process that modulates the frequency, rate or extent of signal transduction." +GO:0009967,positive regulation of signal transduction,biological_process,"Any process that activates or increases the frequency, rate or extent of signal transduction." +GO:0009968,negative regulation of signal transduction,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of signal transduction." +GO:0009986,cell surface,cellular_component,The external part of the cell wall and/or plasma membrane. +GO:0009987,cellular process,biological_process,"Any process that is carried out at the cellular level, but not necessarily restricted to a single cell. For example, cell communication occurs among more than one cell, but occurs at the cellular level." +GO:0009991,obsolete response to extracellular stimulus,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an extracellular stimulus." +GO:0010033,obsolete response to organic substance,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an organic substance stimulus." +GO:0010035,obsolete response to inorganic substance,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an inorganic substance stimulus." +GO:0010243,obsolete response to organonitrogen compound,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an organonitrogen stimulus. An organonitrogen compound is formally a compound containing at least one carbon-nitrogen bond." +GO:0010467,gene expression,biological_process,"The process in which a gene's sequence is converted into a mature gene product (protein or RNA). This includes the production of an RNA transcript and its processing, as well as translation and maturation for protein-coding genes." +GO:0010468,regulation of gene expression,biological_process,"Any process that modulates the frequency, rate or extent of gene expression. Gene expression is the process in which a gene's coding sequence is converted into a mature gene product (protein or RNA)." +GO:0010556,regulation of macromolecule biosynthetic process,biological_process,"Any process that modulates the rate, frequency or extent of the chemical reactions and pathways resulting in the formation of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0010557,positive regulation of macromolecule biosynthetic process,biological_process,"Any process that increases the rate, frequency or extent of the chemical reactions and pathways resulting in the formation of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0010558,negative regulation of macromolecule biosynthetic process,biological_process,"Any process that decreases the rate, frequency or extent of the chemical reactions and pathways resulting in the formation of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0010564,regulation of cell cycle process,biological_process,Any process that modulates a cellular process that is involved in the progression of biochemical and morphological phases and events that occur in a cell during successive cell replication or nuclear replication events. +GO:0010604,positive regulation of macromolecule metabolic process,biological_process,"Any process that increases the frequency, rate or extent of the chemical reactions and pathways involving macromolecules, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0010605,negative regulation of macromolecule metabolic process,biological_process,"Any process that decreases the frequency, rate or extent of the chemical reactions and pathways involving macromolecules, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0010608,post-transcriptional regulation of gene expression,biological_process,"Any process that modulates the frequency, rate or extent of gene expression after the production of an RNA transcript." +GO:0010628,positive regulation of gene expression,biological_process,"Any process that increases the frequency, rate or extent of gene expression. Gene expression is the process in which a gene's coding sequence is converted into a mature gene product (protein or RNA)." +GO:0010629,negative regulation of gene expression,biological_process,"Any process that decreases the frequency, rate or extent of gene expression. Gene expression is the process in which a gene's coding sequence is converted into a mature gene product (protein or RNA)." +GO:0010646,regulation of cell communication,biological_process,"Any process that modulates the frequency, rate or extent of cell communication. Cell communication is the process that mediates interactions between a cell and its surroundings. Encompasses interactions such as signaling or attachment between one cell and another cell, between a cell and an extracellular matrix, or between a cell and any other aspect of its environment." +GO:0010647,positive regulation of cell communication,biological_process,"Any process that increases the frequency, rate or extent of cell communication. Cell communication is the process that mediates interactions between a cell and its surroundings. Encompasses interactions such as signaling or attachment between one cell and another cell, between a cell and an extracellular matrix, or between a cell and any other aspect of its environment." +GO:0010648,negative regulation of cell communication,biological_process,"Any process that decreases the frequency, rate or extent of cell communication. Cell communication is the process that mediates interactions between a cell and its surroundings. Encompasses interactions such as signaling or attachment between one cell and another cell, between a cell and an extracellular matrix, or between a cell and any other aspect of its environment." +GO:0010941,obsolete regulation of cell death,biological_process,"OBSOLETE. Any process that modulates the rate or frequency of cell death. Cell death is the specific activation or halting of processes within a cell so that its vital functions markedly cease, rather than simply deteriorating gradually over time, which culminates in cell death." +GO:0012501,programmed cell death,biological_process,A process which begins when a cell receives an internal or external signal and activates a series of biochemical events (signaling pathway). The process ends with the death of the cell. +GO:0012505,endomembrane system,cellular_component,"A collection of membranous structures involved in transport within the cell. The main components of the endomembrane system are endoplasmic reticulum, Golgi bodies, vesicles, cell membrane and nuclear envelope. Members of the endomembrane system pass materials through each other or though the use of vesicles." +GO:0012506,vesicle membrane,cellular_component,The lipid bilayer surrounding any membrane-bounded vesicle in the cell. +GO:0014070,obsolete response to organic cyclic compound,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an organic cyclic compound stimulus." +GO:0015031,protein transport,biological_process,"The directed movement of proteins into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore." +GO:0015075,monoatomic ion transmembrane transporter activity,molecular_function,Enables the transfer of an ion from one side of a membrane to the other. +GO:0015267,channel activity,molecular_function,Enables the energy-independent facilitated diffusion of a solute through a transmembrane aqueous pore or channel. Stereospecificity is not exhibited but this transport may be specific for a particular molecular species or class of molecules. +GO:0015318,inorganic molecular entity transmembrane transporter activity,molecular_function,Enables the transfer of an inorganic molecular entity from the outside of a cell to the inside of the cell across a membrane. An inorganic molecular entity is a molecular entity that contains no carbon. +GO:0015630,microtubule cytoskeleton,cellular_component,The part of the cytoskeleton (the internal framework of a cell) composed of microtubules and associated proteins. +GO:0016020,membrane,cellular_component,A lipid bilayer along with all the proteins and protein complexes embedded in it and attached to it. +GO:0016043,cellular component organization,biological_process,"A process that results in the assembly, arrangement of constituent parts, or disassembly of a cellular component." +GO:0016070,RNA metabolic process,biological_process,"The cellular chemical reactions and pathways involving RNA, ribonucleic acid, one of the two main type of nucleic acid, consisting of a long, unbranched macromolecule formed from ribonucleotides joined in 3',5'-phosphodiester linkage." +GO:0016071,mRNA metabolic process,biological_process,"The chemical reactions and pathways involving mRNA, messenger RNA, which is responsible for carrying the coded genetic 'message', transcribed from DNA, to sites of protein assembly at the ribosomes." +GO:0016192,vesicle-mediated transport,biological_process,"A cellular transport process in which transported substances are moved in membrane-bounded vesicles; transported substances are enclosed in the vesicle lumen or located in the vesicle membrane. The process begins with a step that directs a substance to the forming vesicle, and includes vesicle budding and coating. Vesicles are then targeted to, and fuse with, an acceptor membrane." +GO:0016301,kinase activity,molecular_function,"Catalysis of the transfer of a phosphate group, usually from ATP, to a substrate molecule." +GO:0016310,phosphorylation,biological_process,"The process of introducing a phosphate group into a molecule, usually with the formation of a phosphoric ester, a phosphoric anhydride or a phosphoric amide." +GO:0016477,cell migration,biological_process,The controlled self-propelled movement of a cell from one site to a destination guided by molecular cues. +GO:0016491,oxidoreductase activity,molecular_function,"Catalysis of an oxidation-reduction (redox) reaction, a reversible chemical reaction in which the oxidation state of an atom or atoms within a molecule is altered. One substrate acts as a hydrogen or electron donor and becomes oxidized, while the other acts as hydrogen or electron acceptor and becomes reduced." +GO:0016604,nuclear body,cellular_component,Membraneless organelle present in the nucleoplasm and usually visible by confocal microscopy. +GO:0016740,transferase activity,molecular_function,"Catalysis of the transfer of a group, e.g. a methyl group, glycosyl group, acyl group, phosphorus-containing, or other groups, from one compound (generally regarded as the donor) to another compound (generally regarded as the acceptor). Transferase is the systematic name for any enzyme of EC class 2." +GO:0016772,"transferase activity, transferring phosphorus-containing groups",molecular_function,Catalysis of the transfer of a phosphorus-containing group from one compound (donor) to another (acceptor). +GO:0016773,"phosphotransferase activity, alcohol group as acceptor",molecular_function,Catalysis of the transfer of a phosphorus-containing group from one compound (donor) to an alcohol group (acceptor). +GO:0016787,hydrolase activity,molecular_function,"Catalysis of the hydrolysis of various bonds, e.g. C-O, C-N, C-C, phosphoric anhydride bonds, etc." +GO:0016788,"hydrolase activity, acting on ester bonds",molecular_function,Catalysis of the hydrolysis of any ester bond. +GO:0016829,lyase activity,molecular_function,"Catalysis of the cleavage of C-C, C-O, C-N and other bonds by other means than by hydrolysis or oxidation, or conversely adding a group to a double bond. They differ from other enzymes in that two substrates are involved in one reaction direction, but only one in the other direction. When acting on the single substrate, a molecule is eliminated and this generates either a new double bond or a new ring." +GO:0017076,purine nucleotide binding,molecular_function,"Binding to a purine nucleotide, a compound consisting of a purine nucleoside esterified with (ortho)phosphate." +GO:0018130,obsolete heterocycle biosynthetic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the formation of heterocyclic compounds, those with a cyclic molecular structure and at least two different atoms in the ring (or rings)." +GO:0019219,regulation of nucleobase-containing compound metabolic process,biological_process,"Any cellular process that modulates the frequency, rate or extent of the chemical reactions and pathways involving nucleobases, nucleosides, nucleotides and nucleic acids." +GO:0019220,regulation of phosphate metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving phosphates." +GO:0019222,regulation of metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways within a cell or an organism." +GO:0019438,obsolete aromatic compound biosynthetic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the formation of aromatic compounds, any substance containing an aromatic carbon ring." +GO:0019538,protein metabolic process,biological_process,The chemical reactions and pathways involving a protein. Includes protein modification. +GO:0019637,organophosphate metabolic process,biological_process,"The chemical reactions and pathways involving organophosphates, any phosphate-containing organic compound." +GO:0019725,cellular homeostasis,biological_process,Any process involved in the maintenance of an internal steady state at the level of the cell. +GO:0019752,carboxylic acid metabolic process,biological_process,"The chemical reactions and pathways involving carboxylic acids, any organic acid containing one or more carboxyl (COOH) groups or anions (COO-)." +GO:0019899,enzyme binding,molecular_function,"Binding to an enzyme, a protein with catalytic activity." +GO:0019953,sexual reproduction,biological_process,"A type of reproduction that combines the genetic material of two gametes (such as a sperm or egg cell or fungal spores). The gametes have an haploid genome (with a single set of chromosomes, the product of a meiotic division) and combines with one another to produce a zygote (diploid)." +GO:0022008,neurogenesis,biological_process,Generation of cells within the nervous system. +GO:0022402,cell cycle process,biological_process,The cellular process that ensures successive accurate and complete genome replication and chromosome segregation. +GO:0022412,cellular process involved in reproduction in multicellular organism,biological_process,"A process, occurring at the cellular level, that is involved in the reproductive function of a multicellular organism." +GO:0022414,reproductive process,biological_process,A biological process that directly contributes to the process of producing new individuals by one or two organisms. The new individuals inherit some proportion of their genetic material from the parent or parents. +GO:0022603,regulation of anatomical structure morphogenesis,biological_process,"Any process that modulates the frequency, rate or extent of anatomical structure morphogenesis." +GO:0022607,cellular component assembly,biological_process,"The aggregation, arrangement and bonding together of a cellular component." +GO:0022803,passive transmembrane transporter activity,molecular_function,"Enables the transfer of a single solute from one side of a membrane to the other by a mechanism involving conformational change, either by facilitated diffusion or in a membrane potential dependent process if the solute is charged." +GO:0022857,transmembrane transporter activity,molecular_function,"Enables the transfer of a substance, usually a specific substance or a group of related substances, from one side of a membrane to the other." +GO:0022890,inorganic cation transmembrane transporter activity,molecular_function,Enables the transfer of inorganic cations from one side of a membrane to the other. Inorganic cations are atoms or small molecules with a positive charge that do not contain carbon in covalent linkage. +GO:0023051,regulation of signaling,biological_process,"Any process that modulates the frequency, rate or extent of a signaling process." +GO:0023052,signaling,biological_process,The entirety of a process in which information is transmitted within a biological system. This process begins with an active signal and ends when a cellular response has been triggered. +GO:0023056,positive regulation of signaling,biological_process,"Any process that activates, maintains or increases the frequency, rate or extent of a signaling process." +GO:0023057,negative regulation of signaling,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of a signaling process." +GO:0030029,actin filament-based process,biological_process,"Any cellular process that depends upon or alters the actin cytoskeleton, that part of the cytoskeleton comprising actin filaments and their associated proteins." +GO:0030030,cell projection organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of a prolongation or process extending from a cell, e.g. a flagellum or axon." +GO:0030036,actin cytoskeleton organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of cytoskeletal structures comprising actin filaments and their associated proteins." +GO:0030054,cell junction,cellular_component,"A cellular component that forms a specialized region of connection between two or more cells, or between a cell and the extracellular matrix, or between two membrane-bound components of a cell, such as flagella." +GO:0030097,hemopoiesis,biological_process,"The process whose specific outcome is the progression of the myeloid and lymphoid derived organ/tissue systems of the blood and other parts of the body over time, from formation to the mature structure. The site of hemopoiesis is variable during development, but occurs primarily in bone marrow or kidney in many adult vertebrates." +GO:0030154,cell differentiation,biological_process,"The cellular developmental process in which a relatively unspecialized cell, e.g. embryonic or regenerative cell, acquires specialized structural and/or functional features that characterize a specific cell. Differentiation includes the processes involved in commitment of a cell to a specific fate and its subsequent development to the mature state." +GO:0030182,neuron differentiation,biological_process,The process in which a relatively unspecialized cell acquires specialized features of a neuron. +GO:0030234,enzyme regulator activity,molecular_function,A molecular function regulator that modulates a catalytic activity. +GO:0030312,external encapsulating structure,cellular_component,A structure that lies outside the plasma membrane and surrounds the entire cell or cells. This does not include the periplasmic space. +GO:0030334,regulation of cell migration,biological_process,"Any process that modulates the frequency, rate or extent of cell migration." +GO:0030424,axon,cellular_component,"The long process of a neuron that conducts nerve impulses, usually away from the cell body to the terminals and varicosities, which are sites of storage and release of neurotransmitter." +GO:0030659,cytoplasmic vesicle membrane,cellular_component,The lipid bilayer surrounding a cytoplasmic vesicle. +GO:0030855,epithelial cell differentiation,biological_process,"The process in which a relatively unspecialized cell acquires specialized features of an epithelial cell, any of the cells making up an epithelium." +GO:0031012,extracellular matrix,cellular_component,"A structure lying external to one or more cells, which provides structural support, biochemical or biomechanical cues for cells or tissues." +GO:0031090,organelle membrane,cellular_component,A membrane that is one of the two lipid bilayers of an organelle envelope or the outermost membrane of single membrane bound organelle. +GO:0031175,neuron projection development,biological_process,"The process whose specific outcome is the progression of a neuron projection over time, from its formation to the mature structure. A neuron projection is any process extending from a neural cell, such as axons or dendrites (collectively called neurites)." +GO:0031323,obsolete regulation of cellular metabolic process,biological_process,"OBSOLETE. Any process that modulates the frequency, rate or extent of the chemical reactions and pathways by which individual cells transform chemical substances." +GO:0031324,obsolete negative regulation of cellular metabolic process,biological_process,"OBSOLETE. Any process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways by which individual cells transform chemical substances." +GO:0031325,obsolete positive regulation of cellular metabolic process,biological_process,"OBSOLETE. Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways by which individual cells transform chemical substances." +GO:0031326,obsolete regulation of cellular biosynthetic process,biological_process,"OBSOLETE. Any process that modulates the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of substances, carried out by individual cells." +GO:0031327,obsolete negative regulation of cellular biosynthetic process,biological_process,"OBSOLETE. Any process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of substances, carried out by individual cells." +GO:0031328,obsolete positive regulation of cellular biosynthetic process,biological_process,"OBSOLETE. Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways resulting in the formation of substances, carried out by individual cells." +GO:0031329,obsolete regulation of cellular catabolic process,biological_process,"OBSOLETE. Any process that modulates the frequency, rate or extent of the chemical reactions and pathways resulting in the breakdown of substances, carried out by individual cells." +GO:0031344,regulation of cell projection organization,biological_process,"Any process that modulates the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of cell projections." +GO:0031347,regulation of defense response,biological_process,"Any process that modulates the frequency, rate or extent of a defense response." +GO:0031399,regulation of protein modification process,biological_process,"Any process that modulates the frequency, rate or extent of the covalent alteration of one or more amino acid residues within a protein." +GO:0031410,cytoplasmic vesicle,cellular_component,A vesicle found in the cytoplasm of a cell. +GO:0031667,response to nutrient levels,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus reflecting the presence, absence, or concentration of nutrients." +GO:0031966,mitochondrial membrane,cellular_component,Either of the lipid bilayers that surround the mitochondrion and form the mitochondrial envelope. +GO:0031967,organelle envelope,cellular_component,"A double membrane structure enclosing an organelle, including two lipid bilayers and the region between them. In some cases, an organelle envelope may have more than two membranes." +GO:0031974,membrane-enclosed lumen,cellular_component,"The enclosed volume within a sealed membrane or between two sealed membranes. Encompasses the volume enclosed by the membranes of a particular organelle, e.g. endoplasmic reticulum lumen, or the space between the two lipid bilayers of a double membrane surrounding an organelle, e.g. nuclear envelope lumen." +GO:0031975,obsolete envelope,cellular_component,"OBSOLETE. A multilayered structure surrounding all or part of a cell; encompasses one or more lipid bilayers, and may include a cell wall layer; also includes the space between layers." +GO:0031981,nuclear lumen,cellular_component,The volume enclosed by the nuclear inner membrane. +GO:0031982,vesicle,cellular_component,"Any small, fluid-filled, spherical organelle enclosed by membrane." +GO:0031984,organelle subcompartment,cellular_component,"A compartment that consists of a lumen and an enclosing membrane, and is part of an organelle." +GO:0032101,regulation of response to external stimulus,biological_process,"Any process that modulates the frequency, rate or extent of a response to an external stimulus." +GO:0032501,multicellular organismal process,biological_process,"Any biological process, occurring at the level of a multicellular organism, pertinent to its function." +GO:0032502,developmental process,biological_process,"A biological process whose specific outcome is the progression of an integrated living unit: an anatomical structure (which may be a subcellular structure, cell, tissue, or organ), or organism over time from an initial condition to a later condition." +GO:0032504,obsolete multicellular organism reproduction,biological_process,OBSOLETE. The biological process in which new individuals are produced by one or two multicellular organisms. The new individuals inherit some proportion of their genetic material from the parent or parents. +GO:0032787,monocarboxylic acid metabolic process,biological_process,"The chemical reactions and pathways involving monocarboxylic acids, any organic acid containing one carboxyl (COOH) group or anion (COO-)." +GO:0032879,regulation of localization,biological_process,"Any process that modulates the frequency, rate or extent of any process in which a cell, a substance, or a cellular entity is transported to, or maintained in, a specific location." +GO:0032880,regulation of protein localization,biological_process,"Any process that modulates the frequency, rate or extent of any process in which a protein is transported to, or maintained in, a specific location." +GO:0032989,cellular anatomical entity morphogenesis,biological_process,The process in which a cellular entity is generated and organized. A cellular entity has granularity above the level of a protein complex but below that of an anatomical system. +GO:0032990,obsolete cell part morphogenesis,biological_process,OBSOLETE. The process in which the anatomical structures of a cell part are generated and organized. +GO:0032991,protein-containing complex,cellular_component,"A stable assembly of two or more macromolecules, i.e. proteins, nucleic acids, carbohydrates or lipids, in which at least one component is a protein and the constituent parts function together." +GO:0033036,macromolecule localization,biological_process,"Any process in which a macromolecule is transported to, or maintained in, a specific location." +GO:0033043,regulation of organelle organization,biological_process,"Any process that modulates the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of an organelle." +GO:0033365,protein localization to organelle,biological_process,"A process in which a protein is transported to, or maintained in, a location within an organelle." +GO:0033554,cellular response to stress,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus indicating the organism is under stress. The stress is usually, but not necessarily, exogenous (e.g. temperature, humidity, ionizing radiation)." +GO:0033993,response to lipid,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a lipid stimulus." +GO:0034641,obsolete cellular nitrogen compound metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving various organic and inorganic nitrogenous compounds, as carried out by individual cells." +GO:0034645,obsolete cellular macromolecule biosynthetic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the formation of a macromolecule, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass, carried out by individual cells." +GO:0034654,nucleobase-containing compound biosynthetic process,biological_process,"The chemical reactions and pathways resulting in the formation of nucleobases, nucleosides, nucleotides and nucleic acids." +GO:0034660,obsolete ncRNA metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways involving non-coding RNA transcripts (ncRNAs). +GO:0035239,tube morphogenesis,biological_process,"The process in which the anatomical structures of a tube are generated and organized. Epithelial and endothelial tubes transport gases, liquids and cells from one site to another and form the basic structure of many organs and tissues, with tube shape and organization varying from the single-celled excretory organ in Caenorhabditis elegans to the branching trees of the mammalian kidney and insect tracheal system." +GO:0035295,tube development,biological_process,"The process whose specific outcome is the progression of a tube over time, from its initial formation to a mature structure. Epithelial and endothelial tubes transport gases, liquids and cells from one site to another and form the basic structure of many organs and tissues including lung and trachea, kidney, the mammary gland, the vascular system and the gastrointestinal and urinary-genital tracts." +GO:0035556,intracellular signal transduction,biological_process,"The process in which a signal is passed on to downstream components within the cell, which become activated themselves to further propagate the signal and finally trigger a change in the function or state of the cell." +GO:0036094,small molecule binding,molecular_function,"Binding to a small molecule, any low molecular weight, monomeric, non-encoded molecule." +GO:0036211,protein modification process,biological_process,"The covalent alteration of one or more amino acids occurring in proteins, peptides and nascent polypeptides (co-translational, post-translational modifications). Includes the modification of charged tRNAs that are destined to occur in a protein (pre-translation modification)." +GO:0036477,somatodendritic compartment,cellular_component,"The region of a neuron that includes the cell body (cell soma) and dendrite(s), but excludes the axon." +GO:0038023,signaling receptor activity,molecular_function,Receiving a signal and transmitting it in the cell to initiate a change in cell activity. A signal is a physical entity or change in state that is used to transfer information in order to trigger a response. +GO:0040007,growth,biological_process,"The increase in size or mass of an entire organism, a part of an organism or a cell." +GO:0040008,regulation of growth,biological_process,"Any process that modulates the frequency, rate or extent of the growth of all or part of an organism so that it occurs at its proper speed, either globally or in a specific part of the organism's development." +GO:0040011,locomotion,biological_process,Self-propelled movement of a cell or organism from one location to another. +GO:0040012,regulation of locomotion,biological_process,"Any process that modulates the frequency, rate or extent of locomotion of a cell or organism." +GO:0042127,regulation of cell population proliferation,biological_process,"Any process that modulates the frequency, rate or extent of cell proliferation." +GO:0042175,nuclear outer membrane-endoplasmic reticulum membrane network,cellular_component,The continuous network of membranes encompassing the nuclear outer membrane and the endoplasmic reticulum membrane. +GO:0042221,response to chemical,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a chemical stimulus." +GO:0042325,regulation of phosphorylation,biological_process,"Any process that modulates the frequency, rate or extent of addition of phosphate groups into a molecule." +GO:0042330,taxis,biological_process,The directed movement of a motile cell or organism in response to an external stimulus. +GO:0042592,homeostatic process,biological_process,Any biological process involved in the maintenance of an internal steady state. +GO:0042802,identical protein binding,molecular_function,Binding to an identical protein or proteins. +GO:0042803,protein homodimerization activity,molecular_function,Binding to an identical protein to form a homodimer. +GO:0042981,regulation of apoptotic process,biological_process,Any process that modulates the occurrence or rate of cell death by apoptotic process. +GO:0042995,cell projection,cellular_component,"A prolongation or process extending from a cell, e.g. a flagellum or axon." +GO:0043005,neuron projection,cellular_component,"A prolongation or process extending from a nerve cell, e.g. an axon or dendrite." +GO:0043009,chordate embryonic development,biological_process,"The process whose specific outcome is the progression of the embryo over time, from zygote formation through a stage including a notochord and neural tube until birth or egg hatching." +GO:0043066,negative regulation of apoptotic process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of cell death by apoptotic process." +GO:0043067,regulation of programmed cell death,biological_process,"Any process that modulates the frequency, rate or extent of programmed cell death, cell death resulting from activation of endogenous cellular processes." +GO:0043069,negative regulation of programmed cell death,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of programmed cell death, cell death resulting from activation of endogenous cellular processes." +GO:0043085,positive regulation of catalytic activity,biological_process,Any process that activates or increases the activity of an enzyme. +GO:0043167,ion binding,molecular_function,"Binding to an ion, a charged atoms or groups of atoms." +GO:0043168,anion binding,molecular_function,"Binding to an anion, a charged atom or group of atoms with a net negative charge." +GO:0043169,cation binding,molecular_function,"Binding to a cation, a charged atom or group of atoms with a net positive charge." +GO:0043170,macromolecule metabolic process,biological_process,"The chemical reactions and pathways involving macromolecules, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0043207,response to external biotic stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an external biotic stimulus, an external stimulus caused by, or produced by living things." +GO:0043226,organelle,cellular_component,"Organized structure of distinctive morphology and function. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton, and prokaryotic structures such as anammoxosomes and pirellulosomes. Excludes the plasma membrane." +GO:0043227,membrane-bounded organelle,cellular_component,"Organized structure of distinctive morphology and function, bounded by a single or double lipid bilayer membrane. Includes the nucleus, mitochondria, plastids, vacuoles, and vesicles. Excludes the plasma membrane." +GO:0043228,membraneless organelle,cellular_component,"Organized structure of distinctive morphology and function, not bounded by a lipid bilayer membrane. Includes ribosomes, the cytoskeleton and chromosomes." +GO:0043229,intracellular organelle,cellular_component,"Organized structure of distinctive morphology and function, occurring within the cell. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton. Excludes the plasma membrane." +GO:0043230,extracellular organelle,cellular_component,"Organized structure of distinctive morphology and function, occurring outside the cell. Includes, for example, extracellular membrane vesicles (EMVs) and the cellulosomes of anaerobic bacteria and fungi." +GO:0043231,intracellular membrane-bounded organelle,cellular_component,"Organized structure of distinctive morphology and function, bounded by a single or double lipid bilayer membrane and occurring within the cell. Includes the nucleus, mitochondria, plastids, vacuoles, and vesicles. Excludes the plasma membrane." +GO:0043232,intracellular membraneless organelle,cellular_component,"Organized structure of distinctive morphology and function, not bounded by a lipid bilayer membrane and occurring within the cell. Includes ribosomes, the cytoskeleton and chromosomes." +GO:0043233,organelle lumen,cellular_component,"The internal volume enclosed by the membranes of a particular organelle; includes the volume enclosed by a single organelle membrane, e.g. endoplasmic reticulum lumen, or the volume enclosed by the innermost of the two lipid bilayers of an organelle envelope, e.g. nuclear lumen." +GO:0043412,macromolecule modification,biological_process,"The covalent alteration of one or more monomeric units in a polypeptide, polynucleotide, polysaccharide, or other biological macromolecule, resulting in a change in its properties." +GO:0043436,oxoacid metabolic process,biological_process,"The chemical reactions and pathways involving any oxoacid; an oxoacid is a compound which contains oxygen, at least one other element, and at least one hydrogen bound to oxygen, and which produces a conjugate base by loss of positive hydrogen ion(s) (hydrons)." +GO:0043565,sequence-specific DNA binding,molecular_function,"Binding to DNA of a specific nucleotide composition, e.g. GC-rich DNA binding, or with a specific sequence motif or type of DNA e.g. promotor binding or rDNA binding." +GO:0043603,amide metabolic process,biological_process,"The chemical reactions and pathways involving an amide, any derivative of an oxoacid in which an acidic hydroxy group has been replaced by an amino or substituted amino group, as carried out by individual cells." +GO:0043604,amide biosynthetic process,biological_process,"The chemical reactions and pathways resulting in the formation of an amide, any derivative of an oxoacid in which an acidic hydroxy group has been replaced by an amino or substituted amino group." +GO:0043933,protein-containing complex organization,biological_process,"Any process in which macromolecules aggregate, disaggregate, or are modified, resulting in the formation, disassembly, or alteration of a protein complex." +GO:0044085,cellular component biogenesis,biological_process,"A process that results in the biosynthesis of constituent macromolecules, assembly, and arrangement of constituent parts of a cellular component. Includes biosynthesis of constituent macromolecules, and those macromolecular modifications that are involved in synthesis or assembly of the cellular component." +GO:0044087,regulation of cellular component biogenesis,biological_process,"Any process that modulates the frequency, rate or extent of cellular component biogenesis, a process that results in the biosynthesis of constituent macromolecules, assembly, and arrangement of constituent parts of a cellular component." +GO:0044093,positive regulation of molecular function,biological_process,"Any process that activates or increases the rate or extent of a molecular function, an elemental biological activity occurring at the molecular level, such as catalysis or binding." +GO:0044237,obsolete cellular metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways by which individual cells transform chemical substances. +GO:0044238,primary metabolic process,biological_process,"The chemical reactions and pathways involving those compounds which are formed as a part of the normal anabolic and catabolic processes. These processes take place in most, if not all, cells of the organism." +GO:0044248,obsolete cellular catabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the breakdown of substances, carried out by individual cells." +GO:0044249,obsolete cellular biosynthetic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the formation of substances, carried out by individual cells." +GO:0044255,obsolete cellular lipid metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving lipids, as carried out by individual cells." +GO:0044260,obsolete cellular macromolecule metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving macromolecules, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass, as carried out by individual cells." +GO:0044265,obsolete cellular macromolecule catabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the breakdown of a macromolecule, any large molecule including proteins, nucleic acids and carbohydrates, as carried out by individual cells." +GO:0044271,obsolete cellular nitrogen compound biosynthetic process,biological_process,OBSOLETE. The chemical reactions and pathways resulting in the formation of organic and inorganic nitrogenous compounds. +GO:0044281,small molecule metabolic process,biological_process,"The chemical reactions and pathways involving small molecules, any low molecular weight, monomeric, non-encoded molecule." +GO:0044283,small molecule biosynthetic process,biological_process,"The chemical reactions and pathways resulting in the formation of small molecules, any low molecular weight, monomeric, non-encoded molecule." +GO:0044297,cell body,cellular_component,"The portion of a cell bearing surface projections such as axons, dendrites, cilia, or flagella that includes the nucleus, but excludes all cell projections." +GO:0044403,biological process involved in symbiotic interaction,biological_process,"A process carried out by gene products in an organism that enable the organism to engage in a symbiotic relationship, a more or less intimate association, with another organism. The various forms of symbiosis include parasitism, in which the association is disadvantageous or destructive to one of the organisms; mutualism, in which the association is advantageous, or often necessary to one or both and not harmful to either; and commensalism, in which one member of the association benefits while the other is not affected. However, mutualism, parasitism, and commensalism are often not discrete categories of interactions and should rather be perceived as a continuum of interaction ranging from parasitism to mutualism. In fact, the direction of a symbiotic interaction can change during the lifetime of the symbionts due to developmental changes as well as changes in the biotic/abiotic environment in which the interaction occurs. Microscopic symbionts are often referred to as endosymbionts." +GO:0044419,biological process involved in interspecies interaction between organisms,biological_process,Any process evolved to enable an interaction with an organism of a different species. +GO:0044877,protein-containing complex binding,molecular_function,Binding to a macromolecular complex. +GO:0045184,establishment of protein localization,biological_process,The directed movement of a protein to a specific location. +GO:0045202,synapse,cellular_component,"The junction between an axon of one neuron and a dendrite of another neuron, a muscle fiber or a glial cell. As the axon approaches the synapse it enlarges into a specialized structure, the presynaptic terminal bouton, which contains mitochondria and synaptic vesicles. At the tip of the terminal bouton is the presynaptic membrane; facing it, and separated from it by a minute cleft (the synaptic cleft) is a specialized area of membrane on the receiving cell, known as the postsynaptic membrane. In response to the arrival of nerve impulses, the presynaptic terminal bouton secretes molecules of neurotransmitters into the synaptic cleft. These diffuse across the cleft and transmit the signal to the postsynaptic membrane." +GO:0045595,regulation of cell differentiation,biological_process,"Any process that modulates the frequency, rate or extent of cell differentiation, the process in which relatively unspecialized cells acquire specialized structural and functional features." +GO:0045597,positive regulation of cell differentiation,biological_process,"Any process that activates or increases the frequency, rate or extent of cell differentiation." +GO:0045892,negative regulation of DNA-templated transcription,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of cellular DNA-templated transcription." +GO:0045893,positive regulation of DNA-templated transcription,biological_process,"Any process that activates or increases the frequency, rate or extent of cellular DNA-templated transcription." +GO:0045934,negative regulation of nucleobase-containing compound metabolic process,biological_process,"Any cellular process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways involving nucleobases, nucleosides, nucleotides and nucleic acids." +GO:0045935,positive regulation of nucleobase-containing compound metabolic process,biological_process,"Any cellular process that activates or increases the frequency, rate or extent of the chemical reactions and pathways involving nucleobases, nucleosides, nucleotides and nucleic acids." +GO:0045944,positive regulation of transcription by RNA polymerase II,biological_process,"Any process that activates or increases the frequency, rate or extent of transcription from an RNA polymerase II promoter." +GO:0046483,obsolete heterocycle metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving heterocyclic compounds, those with a cyclic molecular structure and at least two different atoms in the ring (or rings)." +GO:0046872,metal ion binding,molecular_function,Binding to a metal ion. +GO:0046907,intracellular transport,biological_process,The directed movement of substances within a cell. +GO:0046983,protein dimerization activity,molecular_function,"The formation of a protein dimer, a macromolecular structure consists of two noncovalently associated identical or nonidentical subunits." +GO:0048468,cell development,biological_process,The cellular developmental process in which a specific cell progresses from an immature to a mature state. Cell development start once cell commitment has taken place. +GO:0048513,animal organ development,biological_process,"Development of a tissue or tissues that work together to perform a specific function or functions. Development pertains to the process whose specific outcome is the progression of a structure over time, from its formation to the mature structure. Organs are commonly observed as visibly distinct structures, but may also exist as loosely associated clusters of cells that work together to perform a specific function or functions." +GO:0048518,positive regulation of biological process,biological_process,"Any process that activates or increases the frequency, rate or extent of a biological process. Biological processes are regulated by many means; examples include the control of gene expression, protein modification or interaction with a protein or substrate molecule." +GO:0048519,negative regulation of biological process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of a biological process. Biological processes are regulated by many means; examples include the control of gene expression, protein modification or interaction with a protein or substrate molecule." +GO:0048522,positive regulation of cellular process,biological_process,"Any process that activates or increases the frequency, rate or extent of a cellular process, any of those that are carried out at the cellular level, but are not necessarily restricted to a single cell. For example, cell communication occurs among more than one cell, but occurs at the cellular level." +GO:0048523,negative regulation of cellular process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of a cellular process, any of those that are carried out at the cellular level, but are not necessarily restricted to a single cell. For example, cell communication occurs among more than one cell, but occurs at the cellular level." +GO:0048568,embryonic organ development,biological_process,"Development, taking place during the embryonic phase, of a tissue or tissues that work together to perform a specific function or functions. Development pertains to the process whose specific outcome is the progression of a structure over time, from its formation to the mature structure. Organs are commonly observed as visibly distinct structures, but may also exist as loosely associated clusters of cells that work together to perform a specific function or functions." +GO:0048583,regulation of response to stimulus,biological_process,"Any process that modulates the frequency, rate or extent of a response to a stimulus. Response to stimulus is a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus." +GO:0048584,positive regulation of response to stimulus,biological_process,"Any process that activates, maintains or increases the rate of a response to a stimulus. Response to stimulus is a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus." +GO:0048585,negative regulation of response to stimulus,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of a response to a stimulus. Response to stimulus is a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus." +GO:0048589,developmental growth,biological_process,"The increase in size or mass of an entire organism, a part of an organism or a cell, where the increase in size or mass has the specific outcome of the progression of the organism over time from one condition to another." +GO:0048598,embryonic morphogenesis,biological_process,"The process in which anatomical structures are generated and organized during the embryonic phase. The embryonic phase begins with zygote formation. The end of the embryonic phase is organism-specific. For example, it would be at birth for mammals, larval hatching for insects and seed dormancy in plants." +GO:0048608,reproductive structure development,biological_process,"The reproductive developmental process whose specific outcome is the progression of somatic structures that will be used in the process of creating new individuals from one or more parents, from their formation to the mature structures." +GO:0048609,multicellular organismal reproductive process,biological_process,"The process, occurring above the cellular level, that is pertinent to the reproductive function of a multicellular organism. This includes the integrated processes at the level of tissues and organs." +GO:0048646,anatomical structure formation involved in morphogenesis,biological_process,"The developmental process pertaining to the initial formation of an anatomical structure from unspecified parts. This process begins with the specific processes that contribute to the appearance of the discrete structure and ends when the structural rudiment is recognizable. An anatomical structure is any biological entity that occupies space and is distinguished from its surroundings. Anatomical structures can be macroscopic such as a carpel, or microscopic such as an acrosome." +GO:0048666,neuron development,biological_process,"The process whose specific outcome is the progression of a neuron over time, from initial commitment of the cell to a specific fate, to the fully functional differentiated cell." +GO:0048667,cell morphogenesis involved in neuron differentiation,biological_process,The process in which the structures of a neuron are generated and organized. This process occurs while the initially relatively unspecialized cell is acquiring the specialized features of a neuron. +GO:0048699,generation of neurons,biological_process,The process in which nerve cells are generated. This includes the production of neuroblasts and their differentiation into neurons. +GO:0048729,tissue morphogenesis,biological_process,The process in which the anatomical structures of a tissue are generated and organized. +GO:0048731,system development,biological_process,"The process whose specific outcome is the progression of an organismal system over time, from its formation to the mature structure. A system is a regularly interacting or interdependent group of organs or tissues that work together to carry out a given biological process." +GO:0048732,gland development,biological_process,"The process whose specific outcome is the progression of a gland over time, from its formation to the mature structure. A gland is an organ specialised for secretion." +GO:0048812,neuron projection morphogenesis,biological_process,"The process in which the anatomical structures of a neuron projection are generated and organized. A neuron projection is any process extending from a neural cell, such as axons or dendrites." +GO:0048856,anatomical structure development,biological_process,"The biological process whose specific outcome is the progression of an anatomical structure from an initial condition to its mature state. This process begins with the formation of the structure and ends with the mature structure, whatever form that may be including its natural destruction. An anatomical structure is any biological entity that occupies space and is distinguished from its surroundings. Anatomical structures can be macroscopic such as a carpel, or microscopic such as an acrosome." +GO:0048858,cell projection morphogenesis,biological_process,The process in which the anatomical structures of a cell projection are generated and organized. +GO:0048869,cellular developmental process,biological_process,A biological process whose specific outcome is the progression of a cell over time from an initial condition to a later condition. +GO:0048870,cell motility,biological_process,Any process involved in the controlled self-propelled movement of a cell that results in translocation of the cell from one place to another. +GO:0048878,chemical homeostasis,biological_process,Any biological process involved in the maintenance of an internal steady state of a chemical. +GO:0048880,sensory system development,biological_process,The process whose specific outcome is the progression of a sensory system over time from its formation to the mature structure. +GO:0050776,regulation of immune response,biological_process,"Any process that modulates the frequency, rate or extent of the immune response, the immunological reaction of an organism to an immunogenic stimulus." +GO:0050789,regulation of biological process,biological_process,"Any process that modulates the frequency, rate or extent of a biological process. Biological processes are regulated by many means; examples include the control of gene expression, protein modification or interaction with a protein or substrate molecule." +GO:0050790,regulation of catalytic activity,biological_process,Any process that modulates the activity of an enzyme. +GO:0050793,regulation of developmental process,biological_process,"Any process that modulates the frequency, rate or extent of development, the biological process whose specific outcome is the progression of a multicellular organism over time from an initial condition (e.g. a zygote, or a young adult) to a later condition (e.g. a multicellular animal or an aged adult)." +GO:0050794,regulation of cellular process,biological_process,"Any process that modulates the frequency, rate or extent of a cellular process, any of those that are carried out at the cellular level, but are not necessarily restricted to a single cell. For example, cell communication occurs among more than one cell, but occurs at the cellular level." +GO:0050801,monoatomic ion homeostasis,biological_process,Any process involved in the maintenance of an internal steady state of monoatomic ions within an organism or cell. Monatomic ions (also called simple ions) are ions consisting of exactly one atom. +GO:0050877,nervous system process,biological_process,An organ system process carried out by any of the organs or tissues of the neurological system. +GO:0050896,response to stimulus,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus. The process begins with detection of the stimulus and ends with a change in state or activity or the cell or organism." +GO:0051049,regulation of transport,biological_process,"Any process that modulates the frequency, rate or extent of the directed movement of substances (such as macromolecules, small molecules, ions) into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore." +GO:0051050,positive regulation of transport,biological_process,"Any process that activates or increases the frequency, rate or extent of the directed movement of substances (such as macromolecules, small molecules, ions) into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore." +GO:0051093,negative regulation of developmental process,biological_process,"Any process that stops, prevents or reduces the rate or extent of development, the biological process whose specific outcome is the progression of an organism over time from an initial condition (e.g. a zygote, or a young adult) to a later condition (e.g. a multicellular animal or an aged adult)." +GO:0051094,positive regulation of developmental process,biological_process,"Any process that activates or increases the rate or extent of development, the biological process whose specific outcome is the progression of an organism over time from an initial condition (e.g. a zygote, or a young adult) to a later condition (e.g. a multicellular animal or an aged adult)." +GO:0051128,regulation of cellular component organization,biological_process,"Any process that modulates the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of cell structures, including the plasma membrane and any external encapsulating structures such as the cell wall and cell envelope." +GO:0051129,negative regulation of cellular component organization,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of cell structures, including the plasma membrane and any external encapsulating structures such as the cell wall and cell envelope." +GO:0051130,positive regulation of cellular component organization,biological_process,"Any process that activates or increases the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of cell structures, including the plasma membrane and any external encapsulating structures such as the cell wall and cell envelope." +GO:0051171,obsolete regulation of nitrogen compound metabolic process,biological_process,"OBSOLETE. Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving nitrogen or nitrogenous compounds." +GO:0051172,obsolete negative regulation of nitrogen compound metabolic process,biological_process,"OBSOLETE. Any process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways involving nitrogen or nitrogenous compounds." +GO:0051173,obsolete positive regulation of nitrogen compound metabolic process,biological_process,"OBSOLETE. Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways involving nitrogen or nitrogenous compounds." +GO:0051174,regulation of phosphorus metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving phosphorus or compounds containing phosphorus." +GO:0051179,localization,biological_process,"Any process in which a cell, a substance, or a cellular entity, such as a protein complex or organelle, is transported, tethered to or otherwise maintained in a specific location. In the case of substances, localization may also be achieved via selective degradation." +GO:0051234,establishment of localization,biological_process,"Any process that localizes a substance or cellular component. This may occur via movement, tethering or selective degradation." +GO:0051239,regulation of multicellular organismal process,biological_process,"Any process that modulates the frequency, rate or extent of a multicellular organismal process, the processes pertinent to the function of a multicellular organism above the cellular level; includes the integrated processes of tissues and organs." +GO:0051240,positive regulation of multicellular organismal process,biological_process,"Any process that activates or increases the frequency, rate or extent of an organismal process, any of the processes pertinent to the function of an organism above the cellular level; includes the integrated processes of tissues and organs." +GO:0051241,negative regulation of multicellular organismal process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of an organismal process, the processes pertinent to the function of an organism above the cellular level; includes the integrated processes of tissues and organs." +GO:0051246,regulation of protein metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving a protein." +GO:0051247,positive regulation of protein metabolic process,biological_process,"Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways involving a protein." +GO:0051248,negative regulation of protein metabolic process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of chemical reactions and pathways involving a protein." +GO:0051252,regulation of RNA metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving RNA." +GO:0051253,negative regulation of RNA metabolic process,biological_process,"Any process that stops, prevents, or reduces the frequency, rate or extent of the chemical reactions and pathways involving RNA." +GO:0051254,positive regulation of RNA metabolic process,biological_process,"Any process that activates or increases the frequency, rate or extent of the chemical reactions and pathways involving RNA." +GO:0051276,chromosome organization,biological_process,"A process that is carried out at the cellular level that results in the assembly, arrangement of constituent parts, or disassembly of chromosomes, structures composed of a very long molecule of DNA and associated proteins that carries hereditary information. This term covers covalent modifications at the molecular level as well as spatial relationships among the major components of a chromosome." +GO:0051641,cellular localization,biological_process,"A cellular localization process whereby a substance or cellular entity, such as a protein complex or organelle, is transported to, and/or maintained in, a specific location within a cell including the localization of substances or cellular entities to the cell membrane." +GO:0051649,establishment of localization in cell,biological_process,"Any process, occurring in a cell, that localizes a substance or cellular component. This may occur via movement, tethering or selective degradation." +GO:0051707,response to other organism,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus from another living organism." +GO:0051716,cellular response to stimulus,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus. The process begins with detection of the stimulus by a cell and ends with a change in state or activity or the cell." +GO:0051726,regulation of cell cycle,biological_process,Any process that modulates the rate or extent of progression through the cell cycle. +GO:0055085,transmembrane transport,biological_process,"The process in which a solute is transported across a lipid bilayer, from one side of a membrane to the other." +GO:0055086,nucleobase-containing small molecule metabolic process,biological_process,"The cellular chemical reactions and pathways involving a nucleobase-containing small molecule: a nucleobase, a nucleoside, or a nucleotide." +GO:0060089,molecular transducer activity,molecular_function,A compound molecular function in which an effector function is controlled by one or more regulatory components. +GO:0060255,regulation of macromolecule metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways involving macromolecules, any molecule of high relative molecular mass, the structure of which essentially comprises the multiple repetition of units derived, actually or conceptually, from molecules of low relative molecular mass." +GO:0060284,regulation of cell development,biological_process,"Any process that modulates the rate, frequency or extent of the progression of the cell over time, from its formation to the mature structure. Cell development does not include the steps involved in committing a cell to a specific fate." +GO:0060322,head development,biological_process,The biological process whose specific outcome is the progression of a head from an initial condition to its mature state. The head is the anterior-most division of the body. +GO:0060341,regulation of cellular localization,biological_process,"Any process that modulates the frequency, rate or extent of a process in which a cell, a substance, or a cellular entity is transported to, or maintained in a specific location within or in the membrane of a cell." +GO:0060429,epithelium development,biological_process,"The process whose specific outcome is the progression of an epithelium over time, from its formation to the mature structure. An epithelium is a tissue that covers the internal or external surfaces of an anatomical structure." +GO:0060548,obsolete negative regulation of cell death,biological_process,"OBSOLETE. Any process that decreases the rate or frequency of cell death. Cell death is the specific activation or halting of processes within a cell so that its vital functions markedly cease, rather than simply deteriorating gradually over time, which culminates in cell death." +GO:0061024,membrane organization,biological_process,"A process which results in the assembly, arrangement of constituent parts, or disassembly of a membrane. A membrane is a double layer of lipid molecules that encloses all cells, and, in eukaryotes, many organelles; may be a single or double lipid bilayer; also includes associated proteins." +GO:0061061,muscle structure development,biological_process,"The progression of a muscle structure over time, from its formation to its mature state. Muscle structures are contractile cells, tissues or organs that are found in multicellular organisms." +GO:0061458,reproductive system development,biological_process,The progression of the reproductive system over time from its formation to the mature structure. The reproductive system consists of the organs that function in reproduction. +GO:0061564,axon development,biological_process,"The progression of an axon over time. Covers axonogenesis (de novo generation of an axon) and axon regeneration (regrowth), as well as processes pertaining to the progression of the axon over time (fasciculation and defasciculation)." +GO:0065003,protein-containing complex assembly,biological_process,"The aggregation, arrangement and bonding together of a set of macromolecules to form a protein-containing complex." +GO:0065007,biological regulation,biological_process,"Any process that modulates a measurable attribute of any biological process, quality or function." +GO:0065008,regulation of biological quality,biological_process,"Any process that modulates a qualitative or quantitative trait of a biological quality. A biological quality is a measurable attribute of an organism or part of an organism, such as size, mass, shape, color, etc." +GO:0065009,regulation of molecular function,biological_process,"Any process that modulates the frequency, rate or extent of a molecular function, an elemental biological activity occurring at the molecular level, such as catalysis or binding." +GO:0065010,extracellular membrane-bounded organelle,cellular_component,"Organized structure of distinctive morphology and function, bounded by a lipid bilayer membrane and occurring outside the cell." +GO:0070013,intracellular organelle lumen,cellular_component,An organelle lumen that is part of an intracellular organelle. +GO:0070062,extracellular exosome,cellular_component,"A vesicle that is released into the extracellular region by fusion of the limiting endosomal membrane of a multivesicular body with the plasma membrane. Extracellular exosomes, also simply called exosomes, have a diameter of about 40-100 nm." +GO:0070161,anchoring junction,cellular_component,A cell junction that mechanically attaches a cell (and its cytoskeleton) to neighboring cells or to the extracellular matrix. +GO:0070727,cellular macromolecule localization,biological_process,"Any process in which a macromolecule is transported to, and/or maintained in, a specific location at the level of a cell. Localization at the cellular level encompasses movement within the cell, from within the cell to the cell surface, or from one location to another at the surface of a cell." +GO:0070887,cellular response to chemical stimulus,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a chemical stimulus." +GO:0070925,organelle assembly,biological_process,"The aggregation, arrangement and bonding together of a set of components to form an organelle. An organelle is an organized structure of distinctive morphology and function. Includes the nucleus, mitochondria, plastids, vacuoles, vesicles, ribosomes and the cytoskeleton. Excludes the plasma membrane." +GO:0071310,obsolete cellular response to organic substance,biological_process,"OBSOLETE. Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an organic substance stimulus." +GO:0071495,cellular response to endogenous stimulus,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a stimulus arising within the organism." +GO:0071496,cellular response to external stimulus,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an external stimulus." +GO:0071702,obsolete organic substance transport,biological_process,"OBSOLETE. The directed movement of organic substances into, out of or within a cell, or between cells, or within a multicellular organism by means of some agent such as a transporter or pore. An organic substance is a molecular entity that contains carbon." +GO:0071704,obsolete organic substance metabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways involving an organic substance, any molecular entity containing carbon." +GO:0071705,nitrogen compound transport,biological_process,"The directed movement of nitrogen-containing compounds into, out of or within a cell, or between cells, by means of some agent such as a transporter or pore." +GO:0071840,cellular component organization or biogenesis,biological_process,"A process that results in the biosynthesis of constituent macromolecules, assembly, arrangement of constituent parts, or disassembly of a cellular component." +GO:0071944,cell periphery,cellular_component,"The broad region around and including the plasma membrane of a cell, encompassing the cell cortex (inside the cell), the plasma membrane, and any external encapsulating structures." +GO:0072359,circulatory system development,biological_process,"The process whose specific outcome is the progression of the circulatory system over time, from its formation to the mature structure. The circulatory system is the organ system that passes nutrients (such as amino acids and electrolytes), gases, hormones, blood cells, etc. to and from cells in the body to help fight diseases and help stabilize body temperature and pH to maintain homeostasis." +GO:0080090,regulation of primary metabolic process,biological_process,"Any process that modulates the frequency, rate or extent of the chemical reactions and pathways within a cell or an organism involving those compounds formed as a part of the normal anabolic and catabolic processes. These processes take place in most, if not all, cells of the organism." +GO:0080134,regulation of response to stress,biological_process,"Any process that modulates the frequency, rate or extent of a response to stress. Response to stress is a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a disturbance in organismal or cellular homeostasis, usually, but not necessarily, exogenous (e.g. temperature, humidity, ionizing radiation)." +GO:0090066,regulation of anatomical structure size,biological_process,Any process that modulates the size of an anatomical structure. +GO:0090304,nucleic acid metabolic process,biological_process,Any cellular metabolic process involving nucleic acids. +GO:0097159,obsolete organic cyclic compound binding,molecular_function,"OBSOLETE. Binding to an organic cyclic compound, any molecular entity that contains carbon arranged in a cyclic molecular structure." +GO:0097367,carbohydrate derivative binding,molecular_function,Binding to a carbohydrate derivative. +GO:0097435,supramolecular fiber organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of a supramolecular fiber, a polymer consisting of an indefinite number of protein or protein complex subunits that have polymerised to form a fiber-shaped structure." +GO:0097708,intracellular vesicle,cellular_component,Any vesicle that is part of the intracellular region. +GO:0098542,defense response to other organism,biological_process,Reactions triggered in response to the presence of another organism that act to protect the cell or organism from damage caused by that organism. +GO:0098588,bounding membrane of organelle,cellular_component,The lipid bilayer that forms the outer-most layer of an organelle. +GO:0098590,plasma membrane region,cellular_component,A membrane that is a (regional) part of the plasma membrane. +GO:0098772,molecular function regulator activity,molecular_function,A molecular function regulator regulates the activity of its target via non-covalent binding that does not result in covalent modification to the target. Examples of molecular function regulators include regulatory subunits of multimeric enzymes and channels. Mechanisms of regulation include allosteric changes in the target and competitive inhibition. +GO:0098796,membrane protein complex,cellular_component,Any protein complex that is part of a membrane. +GO:0098827,endoplasmic reticulum subcompartment,cellular_component,A distinct region of the endoplasmic reticulum. +GO:0099080,supramolecular complex,cellular_component,"A cellular component that consists of an indeterminate number of proteins or macromolecular complexes, organized into a regular, higher-order structure such as a polymer, sheet, network or a fiber." +GO:0099081,supramolecular polymer,cellular_component,A polymeric supramolecular structure. +GO:0099503,secretory vesicle,cellular_component,"A cytoplasmic, membrane bound vesicle that is capable of fusing to the plasma membrane to release its contents into the extracellular space." +GO:0099512,supramolecular fiber,cellular_component,A polymer consisting of an indefinite number of protein or protein complex subunits that have polymerised to form a fiber-shaped structure. +GO:0099568,cytoplasmic region,cellular_component,Any (proper) part of the cytoplasm of a single cell of sufficient size to still be considered cytoplasm. +GO:0110165,cellular anatomical structure,cellular_component,A part of a cellular organism consisting of a material entity with granularity above the level of a protein complex but below that of an anatomical system. Note that cellular organisms exclude viruses. +GO:0120025,plasma membrane bounded cell projection,cellular_component,"A prolongation or process extending from a cell and that is bounded by plasma membrane, e.g. a cilium, lamellipodium, or axon." +GO:0120035,regulation of plasma membrane bounded cell projection organization,biological_process,"Any process that modulates the frequency, rate or extent of a process involved in the formation, arrangement of constituent parts, or disassembly of plasma membrane bounded cell projections." +GO:0120036,plasma membrane bounded cell projection organization,biological_process,"A process that is carried out at the cellular level which results in the assembly, arrangement of constituent parts, or disassembly of a plasma membrane bounded prolongation or process extending from a cell, e.g. a cilium or axon." +GO:0120039,plasma membrane bounded cell projection morphogenesis,biological_process,The process in which the anatomical structures of a plasma membrane bounded cell projection are generated and organized. +GO:0140096,"catalytic activity, acting on a protein",molecular_function,Catalytic activity that acts to modify a protein. +GO:0140110,transcription regulator activity,molecular_function,"A molecular function that controls the rate, timing and/or magnitude of gene transcription. The function of transcriptional regulators is to modulate gene expression at the transcription step so that they are expressed in the right cell at the right time and in the right amount throughout the life of the cell and the organism. Genes are transcriptional units, and include bacterial operons." +GO:0140513,nuclear protein-containing complex,cellular_component,"A stable assembly of two or more macromolecules, i.e. proteins, nucleic acids, carbohydrates or lipids, in which at least one component is a protein and the constituent parts function together in the nucleus." +GO:0140535,intracellular protein-containing complex,cellular_component,A protein-containing complex located intracellularly. +GO:0140640,"catalytic activity, acting on a nucleic acid",molecular_function,Catalytic activity that acts to modify a nucleic acid. +GO:0140657,ATP-dependent activity,molecular_function,"A molecular function characterized by the coupling of ATP hydrolysis to other steps of a reaction mechanism to make the reaction energetically favorable, for example to catalyze a reaction or drive transport against a concentration gradient." +GO:0140677,molecular function activator activity,molecular_function,A molecular function regulator that activates or increases the activity of its target via non-covalent binding that does not result in covalent modification to the target. +GO:0150063,visual system development,biological_process,"The process whose specific outcome is the progression of the visual system over time, from its formation to the mature structure, including the eye, parts of the central nervous system (CNS) involved in processing of visual inputs, and connecting nerve pathways." +GO:1901135,carbohydrate derivative metabolic process,biological_process,The chemical reactions and pathways involving carbohydrate derivative. +GO:1901137,carbohydrate derivative biosynthetic process,biological_process,The chemical reactions and pathways resulting in the formation of carbohydrate derivative. +GO:1901265,nucleoside phosphate binding,molecular_function,Binding to nucleoside phosphate. +GO:1901360,obsolete organic cyclic compound metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways involving organic cyclic compound. +GO:1901362,obsolete organic cyclic compound biosynthetic process,biological_process,OBSOLETE. The chemical reactions and pathways resulting in the formation of organic cyclic compound. +GO:1901363,heterocyclic compound binding,molecular_function,Binding to heterocyclic compound. +GO:1901564,obsolete organonitrogen compound metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways involving organonitrogen compound. +GO:1901565,obsolete organonitrogen compound catabolic process,biological_process,OBSOLETE. The chemical reactions and pathways resulting in the breakdown of organonitrogen compound. +GO:1901566,obsolete organonitrogen compound biosynthetic process,biological_process,OBSOLETE. The chemical reactions and pathways resulting in the formation of organonitrogen compound. +GO:1901575,obsolete organic substance catabolic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the breakdown of an organic substance, any molecular entity containing carbon." +GO:1901576,obsolete organic substance biosynthetic process,biological_process,"OBSOLETE. The chemical reactions and pathways resulting in the formation of an organic substance, any molecular entity containing carbon." +GO:1901615,obsolete organic hydroxy compound metabolic process,biological_process,OBSOLETE. The chemical reactions and pathways involving organic hydroxy compound. +GO:1901698,response to nitrogen compound,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of a nitrogen compound stimulus." +GO:1901700,response to oxygen-containing compound,biological_process,"Any process that results in a change in state or activity of a cell or an organism (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an oxygen-containing compound stimulus." +GO:1901701,cellular response to oxygen-containing compound,biological_process,"Any process that results in a change in state or activity of a cell (in terms of movement, secretion, enzyme production, gene expression, etc.) as a result of an oxygen-containing compound stimulus." +GO:1901702,salt transmembrane transporter activity,molecular_function,Enables the transfer of salt from one side of a membrane to the other. +GO:1902494,catalytic complex,cellular_component,A protein complex which is capable of catalytic activity. +GO:1902531,regulation of intracellular signal transduction,biological_process,"Any process that modulates the frequency, rate or extent of intracellular signal transduction." +GO:1902533,positive regulation of intracellular signal transduction,biological_process,"Any process that activates or increases the frequency, rate or extent of intracellular signal transduction." +GO:1902679,negative regulation of RNA biosynthetic process,biological_process,"Any process that stops, prevents or reduces the frequency, rate or extent of RNA biosynthetic process." +GO:1902680,positive regulation of RNA biosynthetic process,biological_process,"Any process that activates or increases the frequency, rate or extent of RNA biosynthetic process." +GO:1903047,mitotic cell cycle process,biological_process,A process that is part of the mitotic cell cycle. +GO:1903506,obsolete regulation of nucleic acid-templated transcription,biological_process,"OBSOLETE. Any process that modulates the frequency, rate or extent of nucleic acid-templated transcription." +GO:1903507,obsolete negative regulation of nucleic acid-templated transcription,biological_process,"OBSOLETE. Any process that stops, prevents or reduces the frequency, rate or extent of nucleic acid-templated transcription." +GO:1903508,obsolete positive regulation of nucleic acid-templated transcription,biological_process,"OBSOLETE. Any process that activates or increases the frequency, rate or extent of nucleic acid-templated transcription." +GO:1903561,extracellular vesicle,cellular_component,Any vesicle that is part of the extracellular region. +GO:1990234,transferase complex,cellular_component,"A protein complex capable of catalyzing the transfer of a group, e.g. a methyl group, glycosyl group, acyl group, phosphorus-containing, or other groups, from one compound (generally regarded as the donor) to another compound (generally regarded as the acceptor)." +GO:1990837,sequence-specific double-stranded DNA binding,molecular_function,"Binding to double-stranded DNA of a specific nucleotide composition, e.g. GC-rich DNA binding, or with a specific sequence motif or type of DNA, e.g. promotor binding or rDNA binding." +GO:1990904,ribonucleoprotein complex,cellular_component,A macromolecular complex that contains both RNA and protein molecules. +GO:2000026,regulation of multicellular organismal development,biological_process,"Any process that modulates the frequency, rate or extent of multicellular organismal development." +GO:2000145,regulation of cell motility,biological_process,"Any process that modulates the frequency, rate or extent of cell motility." +GO:2001141,regulation of RNA biosynthetic process,biological_process,"Any process that modulates the frequency, rate or extent of RNA biosynthetic process." diff --git a/services/streamlit-ui/validation.py b/services/streamlit-ui/validation.py index a2378ac..6d1582b 100644 --- a/services/streamlit-ui/validation.py +++ b/services/streamlit-ui/validation.py @@ -3,11 +3,20 @@ from __future__ import annotations import re +from dataclasses import dataclass AA_PATTERN = re.compile(r"^[ACDEFGHIKLMNPQRSTVWY]+$") MAX_FASTA_UPLOAD_BYTES = 5 * 1024 * 1024 # must match embedding-api config + nginx route +@dataclass(frozen=True) +class GatewayConfig: + base_url: str + username: str + password: str + verify_tls: bool + + def normalize_sequence(raw_sequence: str) -> str: compact = re.sub(r"\s+", "", raw_sequence or "") return compact.upper() @@ -42,9 +51,48 @@ def validate_fasta_upload(file_bytes: bytes, filename: str) -> tuple[bool, str]: return True, "" -def validate_gateway_auth(gateway_base_url: str, username: str, password: str) -> str | None: - if not gateway_base_url.strip(): - return "Gateway base URL is required." - if not username.strip() or not password: - return "Both API username and password are required." - return None +def parse_verify_tls(raw: str | None, *, base_url: str) -> bool: + """Parse GATEWAY_VERIFY_TLS; default from URL scheme when unset/empty.""" + if raw is None or not str(raw).strip(): + return base_url.startswith("https://") + value = str(raw).strip().lower() + if value in ("1", "true", "yes", "on"): + return True + if value in ("0", "false", "no", "off"): + return False + raise ValueError( + "GATEWAY_VERIFY_TLS must be true/false (or 1/0, yes/no, on/off)." + ) + + +def load_gateway_config( + *, + base_url: str | None, + username: str | None, + password: str | None, + verify_tls: str | None = None, +) -> tuple[GatewayConfig | None, str | None]: + """Build gateway config from service env values (not user form input).""" + cleaned_url = (base_url or "").strip() + cleaned_user = (username or "").strip() + cleaned_password = password or "" + + if not cleaned_url: + return None, "GATEWAY_BASE_URL is required." + if not cleaned_user or not cleaned_password: + return None, "GATEWAY_USER and GATEWAY_USER_PASSWORD are required." + + try: + tls = parse_verify_tls(verify_tls, base_url=cleaned_url) + except ValueError as exc: + return None, str(exc) + + return ( + GatewayConfig( + base_url=cleaned_url.rstrip("/"), + username=cleaned_user, + password=cleaned_password, + verify_tls=tls, + ), + None, + ) diff --git a/tests/unit/test_ui_validation.py b/tests/unit/test_ui_validation.py index 87614ca..fc6ca83 100644 --- a/tests/unit/test_ui_validation.py +++ b/tests/unit/test_ui_validation.py @@ -52,8 +52,47 @@ def test_validate_fasta_upload_too_large(ui_validation) -> None: assert "exceeds" in msg.lower() -def test_validate_gateway_auth(ui_validation) -> None: - assert ui_validation.validate_gateway_auth("http://gw", "u", "p") is None - assert ui_validation.validate_gateway_auth(" ", "u", "p") is not None - assert ui_validation.validate_gateway_auth("http://gw", "", "p") is not None - assert ui_validation.validate_gateway_auth("http://gw", "u", "") is not None +def test_load_gateway_config_ok(ui_validation) -> None: + cfg, err = ui_validation.load_gateway_config( + base_url="http://nginx/", + username="user", + password="secret", + verify_tls="false", + ) + assert err is None + assert cfg is not None + assert cfg.base_url == "http://nginx" + assert cfg.username == "user" + assert cfg.password == "secret" + assert cfg.verify_tls is False + + +def test_load_gateway_config_defaults_tls_from_https(ui_validation) -> None: + cfg, err = ui_validation.load_gateway_config( + base_url="https://nginx", + username="user", + password="secret", + ) + assert err is None + assert cfg is not None + assert cfg.verify_tls is True + + +def test_load_gateway_config_missing_values(ui_validation) -> None: + _, err = ui_validation.load_gateway_config(base_url=" ", username="u", password="p") + assert err is not None + _, err = ui_validation.load_gateway_config(base_url="http://gw", username="", password="p") + assert err is not None + _, err = ui_validation.load_gateway_config(base_url="http://gw", username="u", password="") + assert err is not None + + +def test_load_gateway_config_invalid_verify_tls(ui_validation) -> None: + _, err = ui_validation.load_gateway_config( + base_url="http://gw", + username="u", + password="p", + verify_tls="maybe", + ) + assert err is not None + assert "GATEWAY_VERIFY_TLS" in err