Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

New metabolic pathway #1361

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
46a5f2c
Adding the violacein pathway to the model
ioanagherman Jan 23, 2024
728d183
Added to ignore the fireworks running files
ioanagherman Jan 23, 2024
60502ef
code cleaning done
ioanagherman Jan 24, 2024
c45f4ab
pull request changes addressed
ioanagherman Feb 23, 2024
05b0de8
Resolved merge conflicts
ioanagherman Feb 23, 2024
f5cac71
conflicts with master fixed
ioanagherman Feb 23, 2024
b6ae7fe
new gene internal shift adaptation
ioanagherman Mar 20, 2024
8505438
cleaned the code (removed print statements)
ioanagherman Mar 20, 2024
af97891
Documentation added on the addition of the external metabolic pathway
ioanagherman Mar 20, 2024
bc36c55
correction made to the documentation
ioanagherman Mar 22, 2024
b8a6b2c
Add variant analysis script for rRNA gene copy numbers (#1440)
ggsun Feb 23, 2024
67ed595
Add ParCa analysis to plot rRNA operon positions and structures (#1441)
ggsun Feb 27, 2024
073f599
Add cohort analysis to generate table of subgenerationally expressed …
ggsun Mar 1, 2024
f64e337
Skip rRNA operon structures analysis if using nonstandard rRNA operon…
ggsun Mar 1, 2024
227b7ec
doc: how to update a shared pyenv virtualenv
1fish2 Mar 10, 2024
ddd0025
EcoCyc 28.0 (#1445)
rjuenemann Mar 13, 2024
9b27fa5
Activate fewer ribosomes to resolve overcrowding if rescaling fails (…
rjuenemann Apr 16, 2024
b7abeb0
Add multigen plot for components involved in rRNA regulation (#1447)
ggsun Apr 18, 2024
5e65d4f
Add listeners for max_p in transcript and polypeptide initiation (#1448)
rjuenemann May 2, 2024
2e0eec8
Balance out synthesis probabilities of rRNA promoters (#1449)
ggsun May 6, 2024
3714dd0
Add variant plot for RNAP densities on rRNA operons (#1450)
ggsun May 10, 2024
10dcd5e
Skip rRNA gene RNAP density plot if rRNA IDs do not match (#1451)
ggsun May 28, 2024
29039b7
Change from Google Cloud Container Registry to Artifact Registry (#1452)
1fish2 Jun 21, 2024
0ef77c6
Add analysis output for table of genes involved in transertion (#1453)
ggsun Jul 8, 2024
126e003
EcoCyc 28.1 (#1454)
rjuenemann Jul 29, 2024
226cbfa
changed compartment of EG12298-MONOMER, and eliminated protein deg ad…
nvivanco Sep 13, 2024
f124dc7
update the pyenv setup steps (#1456)
1fish2 Oct 3, 2024
62aea72
Added supplemental source. (#1457)
mpg19 Oct 17, 2024
9e5728e
master with vio pathway
ioanagherman Nov 7, 2024
a162d8b
bpsA scripts
kierensharma Jan 12, 2025
ff1dd9f
Changed output dir
kierensharma Jan 12, 2025
0c1e001
bpsA
kierensharma Jan 12, 2025
a04d26c
Adding
kierensharma Jan 12, 2025
82cf049
Delete wholecell/fireworks/my_launchpad.yaml
kierensharma Jan 12, 2025
9ee7d14
Delete wholecell/fireworks/my_qadapter.yaml
kierensharma Jan 12, 2025
044aeb0
Delete reconstruction/ecoli/flat/new_gene_data/bpsA directory
kierensharma Jan 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@ To use the cached sim data file, set the `CACHED_SIM_DATA` environment variable
DESC="Example run with cached sim data." CACHED_SIM_DATA=1 python runscripts/fireworks/fw_queue.py
```

### Using an interactive Sherlock node to run a Fireworks workflow
### Using an interactive Sherlock connection to run a Fireworks workflow

To run queued simulations on an interactive Sherlock node:
To run queued simulations on an interactive connection to a Sherlock compute node:

```bash
rlaunch rapidfire
Expand All @@ -237,7 +237,7 @@ Don't do this on a Sherlock login node.

### Using the SLURM scheduler on Linux to run a Fireworks workflow

To run simulations on a Sherlock cluster (helpful when running more than one simulation):
To run simulations on a Sherlock compute cluster (helpful when running more than one simulation):

```bash
qlaunch -r rapidfire --nlaunches infinite --sleep 5
Expand All @@ -246,7 +246,7 @@ qlaunch -r rapidfire --nlaunches infinite --sleep 5
The `qlaunch` command will run forever. Hit `Ctrl-C` to kill it once the console
logs shows that all the simulation and analysis steps have finished.

`qlaunch` is relatively lightweight, so it might work on a Sherlock login node.
`qlaunch` is lightweight so it might be fine on a Sherlock login node.

`qlaunch` will create block directories with stdout and stderr from each Firework. To troubleshoot any errors or just to see the output you would normally see from an interactive session, use the following commands to search the block directories for your desired fw_id:
```bash
Expand Down
13 changes: 8 additions & 5 deletions cloud/build-runtime.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
#!/bin/sh
# Use Google Cloud Build servers to build a personalized "${ID}-wcm-runtime"
# Docker Image and store it in the Google Container Registry.
# Docker Image and store it in a Google Artifact Registry.
#
# COMMAND LINE ARGUMENTS:
# ARG1: Distinguishing ID prefix for the "${ID}-wcm-runtime" tag for the
# Docker Image to build in GCR; defaults to "${USER}". Must be in lower case.
# Docker Image to build; defaults to "${USER}". Must be in lower case.
#
# ASSUMES: The current working dir is the wcEcoli/ project root.

set -eu

ID="${1:-$USER}"

PROJECT="$(gcloud config get-value core/project)"
PROJECT="$(gcloud config get core/project)"
REGION="$(gcloud config get compute/region)"
WCM_RUNTIME="${ID}-wcm-runtime"
TAG="gcr.io/${PROJECT}/${WCM_RUNTIME}"
TAG="${REGION}-docker.pkg.dev/${PROJECT}/wcm/${WCM_RUNTIME}"

echo "=== Cloud-building WCM runtime Docker Image: ${TAG} ==="

# This needs only one payload file so copy it in rather than using a config at
# the project root which would upload the entire project.
# --region sets the Cloud Build region while TAG sets the artifact region et al.
cp requirements.txt cloud/docker/runtime/
gcloud builds submit --timeout=3h --tag "${TAG}" cloud/docker/runtime/
gcloud builds submit --timeout=3h --region="${REGION}" \
--tag="${TAG}" cloud/docker/runtime/
rm cloud/docker/runtime/requirements.txt
14 changes: 9 additions & 5 deletions cloud/build-wcm.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
#!/bin/sh
# Use Google Cloud Build servers to build a personalized "${ID}-wcm-code" Docker
# Image and store it in the Google Container Registry.
# Image and store it in a Google Artifact Registry.
#
# COMMAND LINE ARGUMENTS:
# ARG1: Distinguishing ID prefix for the "wcm-code" Docker Image tag;
# defaults to "${USER}".
# ARG2: Docker tag for the wcm-runtime Image in GCR to build FROM; defaults to
# "${ID}-wcm-runtime".
# The named Docker image must already exist in the GCR project.
# ARG2: Docker tag for the wcm-runtime Image in Artifact Registry to build FROM;
# defaults to "${ID}-wcm-runtime".
# The named Docker Image must already exist in the Artifact Registry.
#
# ASSUMES: The current working dir is the wcEcoli/ project root.

set -eu

ID="${1:-$USER}"

REGION="$(gcloud config get compute/region)"
WCM_RUNTIME="${2:-${ID}-wcm-runtime}"
WCM_CODE="${ID}-wcm-code"
GIT_HASH=$(git rev-parse HEAD)
Expand All @@ -29,7 +30,10 @@ echo "=== git hash ${GIT_HASH}, git branch ${GIT_BRANCH} ==="

# This needs a config file to identify the project files to upload and the
# Dockerfile to run.
# --region sets the Cloud Build region.
gcloud builds submit --timeout=15m --config config-build-2-wcm-code.json \
--substitutions="_WCM_RUNTIME=${WCM_RUNTIME},_WCM_CODE=${WCM_CODE},_GIT_HASH=${GIT_HASH},_GIT_BRANCH=${GIT_BRANCH},_TIMESTAMP=${TIMESTAMP}"
--region="${REGION}" \
--substitutions="_WCM_RUNTIME=${WCM_RUNTIME},_WCM_CODE=${WCM_CODE},\
_GIT_HASH=${GIT_HASH},_GIT_BRANCH=${GIT_BRANCH},_TIMESTAMP=${TIMESTAMP}"

rm source-info/git_diff.txt
2 changes: 1 addition & 1 deletion cloud/build.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# Use Google Cloud Build servers to build layered WCM Docker Images and store
# them in the Google Container Registry.
# them in a Google Artifact Registry in the current region.
#
# ASSUMES: The current working dir is the wcEcoli/ project root.

Expand Down
6 changes: 3 additions & 3 deletions cloud/docker/runtime/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#
# > docker build -f cloud/docker/runtime/Dockerfile -t ${USER}-wcm-runtime .
#
# (To build using the Cloud Build service and store in the Container Registry,
# (To build using the Cloud Build service and store in an Artifact Registry,
# run `cloud/build.sh`.)
#
# Add option `--build-arg from=ABC` to build from a different base image "ABC"
Expand Down Expand Up @@ -53,10 +53,10 @@ ARG NO_AVX2=0
ENV NO_AVX2="$NO_AVX2"

# Install OpenBLAS for numpy, scipy, and Aesara.
ENV OPENBLAS_LABEL=v0.3.23
ENV OPENBLAS_LABEL=v0.3.27
RUN if [ -f ~/.numpy-site.cfg ]; then \
(mkdir -p openblas && cd openblas \
&& curl -SL https://github.com/xianyi/OpenBLAS/archive/${OPENBLAS_LABEL}.tar.gz | tar -xz \
&& curl -SL https://github.com/OpenMathLib/OpenBLAS/archive/${OPENBLAS_LABEL}.tar.gz | tar -xz \
&& cd OpenBLAS* \
&& echo "Compiling OpenBLAS ${OPENBLAS_LABEL} with NO_AVX2=${NO_AVX2}" \
&& make "NO_AVX2=${NO_AVX2}" FC=gfortran \
Expand Down
10 changes: 6 additions & 4 deletions cloud/docker/wholecell/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# (If you want to build container image #3 on top of the locally-built base,
# you'll have to edit that Dockerfile or upload this image.)
#
# (To build using the Cloud Build service and store in the Container Registry,
# (To build using the Cloud Build service and store in an Artifact Registry,
# run `cloud/build.sh`.)
#
# After building locally you can start up a new container from the image:
Expand All @@ -18,8 +18,9 @@
#
# or if you used build.sh or build-wcm.sh to build using Cloud Build:
#
# > PROJECT="$(gcloud config get-value core/project)"
# > TAG="gcr.io/${PROJECT}/${USER}-wcm-code"
# > PROJECT="$(gcloud config get core/project)"
# > REGION="$(gcloud config get compute/region)"
# > TAG="${REGION}-docker.pkg.dev/${PROJECT}/wcm/${USER}-wcm-code"
# > docker run --name wholecelltest -it --rm "${TAG}"
#
# It will start a shell where you can execute commands:
Expand All @@ -46,7 +47,8 @@ LABEL application="Whole Cell Model of Escherichia coli" \
email="[email protected]" \
license="https://github.com/CovertLab/WholeCellEcoliRelease/blob/master/LICENSE.md" \
organization="Covert Lab at Stanford" \
website="https://www.covert.stanford.edu/"
website="https://www.covert.stanford.edu/" \
repository="https://github.com/CovertLab/wcEcoli"

COPY . /wcEcoli
WORKDIR /wcEcoli
Expand Down
6 changes: 3 additions & 3 deletions config-build-2-wcm-code.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"name": "gcr.io/cloud-builders/docker",
"args": [
"build",
"--build-arg", "from=gcr.io/${PROJECT_ID}/${_WCM_RUNTIME}",
"--build-arg", "from=${LOCATION}-docker.pkg.dev/${PROJECT_ID}/wcm/${_WCM_RUNTIME}",
"--build-arg", "git_hash=${_GIT_HASH}",
"--build-arg", "git_branch=${_GIT_BRANCH}",
"--build-arg", "timestamp=${_TIMESTAMP}",
"-t", "gcr.io/${PROJECT_ID}/${_WCM_CODE}",
"-t", "${LOCATION}-docker.pkg.dev/${PROJECT_ID}/wcm/${_WCM_CODE}",
"-f", "cloud/docker/wholecell/Dockerfile",
"."
]
}
],
"images": [
"gcr.io/${PROJECT_ID}/${_WCM_CODE}"
"${LOCATION}-docker.pkg.dev/${PROJECT_ID}/wcm/${_WCM_CODE}"
]
}
9 changes: 5 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ Docker mechanics.

```shell script
cloud/build.sh
docker pull gcr.io/${PROJECT}/${USER}-wcm-code
docker run --name=wcm -it --rm gcr.io/${PROJECT}/${USER}-wcm-code
docker pull ${REGION}-docker.pkg.dev/${PROJECT}/wcm/${USER}-wcm-code
docker run --name=wcm -it --rm ${REGION}-docker.pkg.dev/${PROJECT}/wcm/${USER}-wcm-code
```

**NOTE:** It's better to build the Docker Image on Linux (e.g. in Google Cloud
Build or WSL2) than on macOS where `build-containers-locally.sh` has to work around
a Docker bug by disabling AVX2 instructions in OpenBLAS. That change somehow
makes the computation produce different results and run a little slower.
An Image built on Linux won't have the AVX2 workaround and yet it runs fine on macOS.
See [xianyi/OpenBLAS#2244](https://github.com/xianyi/OpenBLAS/issues/2244#issuecomment-696510557).
See [OpenMathLib/OpenBLAS#2244](https://github.com/OpenMathLib/OpenBLAS/issues/2244#issuecomment-696510557).

Once you have a Docker Image, you can run the model's Python programs inside the Container.
(PyCharm Pro should support debugging into a Docker Container but we haven't tested that.)
Expand Down Expand Up @@ -100,7 +100,7 @@ Docker mechanics.
* [Required development tools](dev-tools.md) -- installation and tips
* [Creating the "pyenv" runtime environment](create-pyenv.md)
* [Setting up to run FireWorks](../wholecell/fireworks/README.md) -- needed only to run a FireWorks workflow of cell simulations and analysis plots
* [Set up Zookeeper and Kafka](../agent/README.md) -- needed only for multi-scale agents
* [Maintaining the shared Sherlock runtime environment](maintaining_the_sherlock_environment.md) -- how to update the shared virtualenv on Sherlock

* **Also**

Expand Down Expand Up @@ -131,6 +131,7 @@ Docker mechanics.

* [Simultaneous cross-evaluation of heterogeneous _E. coli_ datasets via mechanistic simulation](https://science.sciencemag.org/content/369/6502/eaav3751.full), _Science_, 24 July 2020
* [A Whole-Cell Computational Model Predicts Phenotype from Genotype](https://www.cell.com/cell/abstract/S0092-8674(12)00776-3), _Cell_, July 20, 2012
* TODO: Many more...

## dissertations
* _Computational Simulations of Whole Cells: Strategies for Framework Design and Model Parameterization_, John Mason
Expand Down
4 changes: 2 additions & 2 deletions docs/background.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ Scripts used as entry points for executing workflows or performing analysis.
* `jenkins/`: scripts to test codebase through continuous integration (CI)
* `manual/`: scripts for running portions of workflows interactively
* `debug/`: scripts useful for debugging issues like output differences and inspecting `sim_data`
* `cloud/wcm.py`: used to make Docker fireworks workflows to run locally or on Google compute engine
* `fireworks/fw_queue.py`: used to make fireworks workflows to run locally or on Sherlock
* `cloud/wcm.py`: used to build Docker FireWorks workflows to run locally or on Google compute engine
* `fireworks/fw_queue.py`: used to build FireWorks workflows to run locally or on Sherlock
* `tools/`: development tools

## Analysis
Expand Down
9 changes: 6 additions & 3 deletions docs/create-pyenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Before you begin all the steps below to install the Python runtime for the Whole

The script `cloud/build-containers-locally.sh` will build a Docker Image on
your computer if you have Docker Engine or Docker Desktop installed.
The script `cloud/build.sh` will do the same using Google Container Registry if
The script `cloud/build.sh` will do the same using Google Artifact Registry if
you have a Google Cloud project set up.

Either way, you can run the Whole Cell Model (WCM) in a Docker Container, isolated from your computer's operating system, Python versions, binary libraries, and everything else installed.
Expand Down Expand Up @@ -58,9 +58,12 @@ This page goes through the Python environment setup steps in more detail and wit
**On macOS**

```bash
brew install glpk openssl readline swig suite-sparse xz
brew install cmake glpk openssl readline swig suite-sparse xz
```

Use the `cmake` native package rather than the `cmake` pip, which can't build
`osqp` and `qdldl`.

**On Ubuntu**

```bash
Expand Down Expand Up @@ -97,7 +100,7 @@ This page goes through the Python environment setup steps in more detail and wit
. "${PI_HOME}/etc/bash_profile"
fi

module load git/2.27.0 git-lfs/2.11.
module load git/2.45.1 git-lfs/2.11.
module load wcEcoli/python3

export PYENV_ROOT="${PI_HOME}/pyenv"
Expand Down
7 changes: 4 additions & 3 deletions docs/google-cloud.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ Also see [Borealis: How to run a workflow](https://github.com/CovertLab/borealis
Cloud Firetasks that start running after you build an Image will "pull" it and use it,
even Firetasks that were already queued to run. You can do this to update your code
then use `lpad` commands to restart failed tasks and resume paused tasks.
The full Docker Image path is `gcr.io/$PROJECT/$USER-wcm-code`, where
`$PROJECT` is the Google Cloud project name and `$USER` is your local username.
You can also "pull" this Image and run it locally.
The full Docker Image path is `${REGION}-docker.pkg.dev/${PROJECT}/wcm/${USER}-wcm-code`,
where `$REGION` is Artifact Registry region (we usually use `us-west1`),
`$PROJECT` is the Google Cloud project name, and `$USER` is your local username.
You can also `pull` this Image with Docker to run it locally.

1. Open an ssh tunnel to the project's MongoDB "LaunchPad" server in Google Compute Engine:

Expand Down
Loading