Name | SMS-BP JSON |
Version |
0.2.4
JSON |
| download |
home_page | None |
Summary | Single Molecule Simulations and Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar |
upload_time | 2024-10-24 14:51:50 |
maintainer | None |
docs_url | None |
author | None |
requires_python | ==3.10.13 |
license | --- # License --- Copyright (c) [2024] Baljyot Singh Parmar [All rights reserved]. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY Baljyot Singh Parmar “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL [Baljyot Singh Parmar] BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
keywords |
sms
|
VCS |
|
bugtrack_url |
|
requirements |
attrs
click
colorama
contourpy
cycler
fonttools
ghp-import
griffe
imageio
jinja2
jsonschema
jsonschema-specifications
kiwisolver
lazy-loader
markdown
markdown-it-py
markupsafe
matplotlib
mdurl
mergedeep
mkdocs
mkdocs-autorefs
mkdocs-get-deps
mkdocstrings
mkdocstrings-python
networkx
numpy
packaging
pathspec
pillow
platformdirs
pygments
pymdown-extensions
pyparsing
python-dateutil
pyyaml
pyyaml-env-tag
referencing
rich
rpds-py
scikit-image
scipy
shellingham
six
tifffile
typer
typing-extensions
watchdog
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# This is a short doc for the Track Simulations along with cluster simulations.
-----------------------------------------
- Author: Baljyot Singh Parmar
- Affiliation at the time of writing: McGill University, Canada. Weber Lab
Following is an example of a single molecule simulated with motion blur.
https://github.com/user-attachments/assets/58268a2e-27d7-4486-ae29-a56f7e08ec0c
The following is an example of a single molecule simulation with the movement switching between two modes. (60 fps, 1 frame = 100 ms)
https://github.com/user-attachments/assets/984d8158-968f-435e-97ae-d81205e219a2
The following is a single molecule localization microscopy simulation (SMLM) (1 PSF per molecule here), with two dense regions in the cell.
https://github.com/user-attachments/assets/244d0a2d-4541-4ff2-a926-40e444d36789
The following is a sum-time projection of the above simulation showing the density of the molecules over the duration of the simulation (2 dense regions in a box-like cell).
<img width="849" alt="SMS_BP_Doc_fPALM_STP" src="https://github.com/user-attachments/assets/2a9a255e-7c92-4407-9347-5a86d2c30c7d">
## 1. Installation
-------------------
### Please note, all these are for macOS/linux. I need to test on windows (I don't remember the commands, but will set up a VM to test this). But these commands should have windows equivalents. If you run into any issues please create a Github issue on the repository as it will help me manage different issues with different people and also create a resource for people encountering a solved issue.
### ***Anaconda***
https://github.com/user-attachments/assets/6649d2ea-6ea3-4ac9-84fd-18be5b5e315d
1. Make sure you have anaconda installed: <https://www.anaconda.com/download>
2. Download or clone this repository.
3. In the conda prompt, navigate to the folder where you downloaded this repository using :
```bash
cd "path_to_folder"
```
4. Using the **SMS_BP.yml** file, create a new environment using:
```bash
conda env create -f SMS_BP.yml
```
- If you get an environment resolve error but you have anaconda installed just skip to step 6. The .yml file is for people who are using miniconda and might not have the packages already installed with the full anaconda install.
- You may want to still have a conda environment so just create a generic one if you want with the name SMS_BP or whatever you want with python>=3.10. Explicitly,
```bash
conda create -n [my_env_name] python=3.10.13
```
5. Activate the environment using:
```bash
conda activate SMS_BP
```
6. Now we will install this package in edit mode.
- Run the command:
```bash
pip install -e . --config-settings editable_mode=compat
```
### ***Pip***
1. Make sure you have pip installed: <https://pip.pypa.io/en/stable/installing/>
2. Make sure you have python 3.10.13 as the active interpreter (through venv or conda or whatever you want).
3. Make sure pip is also installed.
4. Install from pypi using:
```bash
pip install SMS-BP
```
### ***Installing the CLI tool using UV***
https://github.com/user-attachments/assets/fda16a3c-2a68-4132-afdb-01264aa8897b
1. Install UV (https://docs.astral.sh/uv/getting-started/installation/).
2. Run the command:
```bash
uv tool install SMS_BP
```
3. You will have access to two CLI commands (using the uv interface):
- `run_SMS_BP runsim` : This is the main entry point for the simulation. (see `run_SMS_BP runsim --help` for more details)
- `run_SMS_BP config` : This is a helper tool to generate a template config file for the simulation. (see `run_SMS_BP config --help` for more details)
- Note: using `run_SMS_BP --help` will show you all the available commands.
4. You can now use these tools (they are isolated in their own env created by uv, which is cool):
```bash
run_SMS_BP config [PATH_TO_CONFIG_FILE]
```
```bash
run_SMS_BP runsim [PATH_TO_SAVED_CONFIG_FILE]
```
## 2. Running the Simulation
Having installed the package, make sure the CLI commands are working:
```bash
run_SMS_BP --help
```
If this does not work submit an issue on the github repository. TODO: convert this into tests.
1. This is a note on using the CLI tool properly. In the install (step 6) we also installed a CLI tool to interface with the program from anywhere. The only condition is that you are in the SMS_BP conda environment or similar venv you created and installed to (unless you used uv).
- Create a template of the config file with default parameters using
```bash
run_SMS_BP config [PATH_TO_CONFIG_FILE]
```
This will create a **sim_config.json** file in the current directory. You can add a optional argument (path) to be a **[PATH]** to save the file elsewhere.
- To run the CLI tool after the install we can type
```bash
run_SMS_BP runsim [PATH_TO_SAVED_CONFIG_FILE]
```
- If you used 1) then this is just:
```bash
run_SMS_BP runsim sim_config.json
```
from anywhere assuming the path you provide is absolute.
- In the background all this is doing is running:
```python
from SMS_BP.run_cell_simulation import typer_app_sms_bp; typer_app_sms_bp()
```
This is the entry point.
- Do note that the config checker is not robust so if you have prodived the wrong types or excluded some parameters which are required alongside other ones you will get an error. Read the **src/SMS_BP/sim_config.md** for details into the config file parameters.
TODO: create CI tests for this.
2. If you run into any issues please create a Github issue on the repository as it will help me manage different issues with different people and also create a resource for people encountering a solved issue.
Raw data
{
"_id": null,
"home_page": null,
"name": "SMS-BP",
"maintainer": null,
"docs_url": null,
"requires_python": "==3.10.13",
"maintainer_email": "Baljyot Singh Parmar <baljyotparmar@hotmail.com>",
"keywords": "SMS",
"author": null,
"author_email": "Baljyot Singh Parmar <baljyotparmar@hotmail.com>",
"download_url": "https://files.pythonhosted.org/packages/55/24/b8acce98f669fad836a45ca1f8a2b42692b6590a2c325ae07d7b19fc0765/sms_bp-0.2.4.tar.gz",
"platform": null,
"description": "\n\n# This is a short doc for the Track Simulations along with cluster simulations.\n-----------------------------------------\n\n- Author: Baljyot Singh Parmar\n- Affiliation at the time of writing: McGill University, Canada. Weber Lab\n\nFollowing is an example of a single molecule simulated with motion blur.\n\nhttps://github.com/user-attachments/assets/58268a2e-27d7-4486-ae29-a56f7e08ec0c\n\nThe following is an example of a single molecule simulation with the movement switching between two modes. (60 fps, 1 frame = 100 ms)\n\n\n\nhttps://github.com/user-attachments/assets/984d8158-968f-435e-97ae-d81205e219a2\n\n\n\n\nThe following is a single molecule localization microscopy simulation (SMLM) (1 PSF per molecule here), with two dense regions in the cell.\n\n\n\n\nhttps://github.com/user-attachments/assets/244d0a2d-4541-4ff2-a926-40e444d36789\n\n\n\n\n\nThe following is a sum-time projection of the above simulation showing the density of the molecules over the duration of the simulation (2 dense regions in a box-like cell).\n\n<img width=\"849\" alt=\"SMS_BP_Doc_fPALM_STP\" src=\"https://github.com/user-attachments/assets/2a9a255e-7c92-4407-9347-5a86d2c30c7d\">\n\n\n## 1. Installation\n-------------------\n### Please note, all these are for macOS/linux. I need to test on windows (I don't remember the commands, but will set up a VM to test this). But these commands should have windows equivalents. If you run into any issues please create a Github issue on the repository as it will help me manage different issues with different people and also create a resource for people encountering a solved issue.\n\n### ***Anaconda*** \n\n\n\nhttps://github.com/user-attachments/assets/6649d2ea-6ea3-4ac9-84fd-18be5b5e315d\n\n\n\n1. Make sure you have anaconda installed: <https://www.anaconda.com/download>\n2. Download or clone this repository.\n3. In the conda prompt, navigate to the folder where you downloaded this repository using : \n```bash\ncd \"path_to_folder\"\n```\n4. Using the **SMS_BP.yml** file, create a new environment using: \n```bash\nconda env create -f SMS_BP.yml\n```\n\n- If you get an environment resolve error but you have anaconda installed just skip to step 6. The .yml file is for people who are using miniconda and might not have the packages already installed with the full anaconda install.\n- You may want to still have a conda environment so just create a generic one if you want with the name SMS_BP or whatever you want with python>=3.10. Explicitly, \n```bash\nconda create -n [my_env_name] python=3.10.13\n```\n5. Activate the environment using: \n```bash\nconda activate SMS_BP\n```\n6. Now we will install this package in edit mode.\n - Run the command:\n ```bash\n pip install -e . --config-settings editable_mode=compat\n ```\n\n\n### ***Pip***\n\n1. Make sure you have pip installed: <https://pip.pypa.io/en/stable/installing/>\n2. Make sure you have python 3.10.13 as the active interpreter (through venv or conda or whatever you want).\n3. Make sure pip is also installed.\n4. Install from pypi using: \n```bash\npip install SMS-BP\n```\n\n### ***Installing the CLI tool using UV***\n\n\n\nhttps://github.com/user-attachments/assets/fda16a3c-2a68-4132-afdb-01264aa8897b\n\n\n1. Install UV (https://docs.astral.sh/uv/getting-started/installation/).\n2. Run the command:\n```bash\nuv tool install SMS_BP\n```\n3. You will have access to two CLI commands (using the uv interface):\n - `run_SMS_BP runsim` : This is the main entry point for the simulation. (see `run_SMS_BP runsim --help` for more details)\n - `run_SMS_BP config` : This is a helper tool to generate a template config file for the simulation. (see `run_SMS_BP config --help` for more details)\n - Note: using `run_SMS_BP --help` will show you all the available commands.\n4. You can now use these tools (they are isolated in their own env created by uv, which is cool): \n```bash\nrun_SMS_BP config [PATH_TO_CONFIG_FILE]\n```\n```bash\nrun_SMS_BP runsim [PATH_TO_SAVED_CONFIG_FILE]\n```\n\n\n## 2. Running the Simulation\n\nHaving installed the package, make sure the CLI commands are working:\n```bash\nrun_SMS_BP --help\n```\nIf this does not work submit an issue on the github repository. TODO: convert this into tests.\n\n1. This is a note on using the CLI tool properly. In the install (step 6) we also installed a CLI tool to interface with the program from anywhere. The only condition is that you are in the SMS_BP conda environment or similar venv you created and installed to (unless you used uv). \n - Create a template of the config file with default parameters using \n ```bash\n run_SMS_BP config [PATH_TO_CONFIG_FILE]\n ```\n This will create a **sim_config.json** file in the current directory. You can add a optional argument (path) to be a **[PATH]** to save the file elsewhere.\n - To run the CLI tool after the install we can type \n ```bash\n run_SMS_BP runsim [PATH_TO_SAVED_CONFIG_FILE]\n ```\n - If you used 1) then this is just:\n ```bash\n run_SMS_BP runsim sim_config.json\n ```\n from anywhere assuming the path you provide is absolute.\n - In the background all this is doing is running: \n ```python\n from SMS_BP.run_cell_simulation import typer_app_sms_bp; typer_app_sms_bp()\n ```\n This is the entry point.\n - Do note that the config checker is not robust so if you have prodived the wrong types or excluded some parameters which are required alongside other ones you will get an error. Read the **src/SMS_BP/sim_config.md** for details into the config file parameters.\nTODO: create CI tests for this.\n2. If you run into any issues please create a Github issue on the repository as it will help me manage different issues with different people and also create a resource for people encountering a solved issue.\n",
"bugtrack_url": null,
"license": "--- # License --- Copyright (c) [2024] Baljyot Singh Parmar [All rights reserved]. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. THIS SOFTWARE IS PROVIDED BY Baljyot Singh Parmar \u201cAS IS\u201d AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL [Baljyot Singh Parmar] BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.",
"summary": "Single Molecule Simulations and Microscopy Simulations developed for the Weber Lab by Baljyot Singh Parmar",
"version": "0.2.4",
"project_urls": {
"Documentation": "https://joemans3.github.io/SMS_BP/",
"Source code": "https://github.com/joemans3/SMS_BP"
},
"split_keywords": [
"sms"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8c91d8e605672f2193ef97577d367982f7e0f8348e37dc68cd57a22371f29541",
"md5": "a17ba9e08b8f9ae47825d01a996bb846",
"sha256": "770cd5e0996a769f7fbd5d34d8ea4bca858be0e574e58c3944a4e9a66cb463e4"
},
"downloads": -1,
"filename": "sms_bp-0.2.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a17ba9e08b8f9ae47825d01a996bb846",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "==3.10.13",
"size": 39784,
"upload_time": "2024-10-24T14:51:49",
"upload_time_iso_8601": "2024-10-24T14:51:49.171136Z",
"url": "https://files.pythonhosted.org/packages/8c/91/d8e605672f2193ef97577d367982f7e0f8348e37dc68cd57a22371f29541/sms_bp-0.2.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5524b8acce98f669fad836a45ca1f8a2b42692b6590a2c325ae07d7b19fc0765",
"md5": "cf22ef048afd76b6fd0e8b2b3296dff8",
"sha256": "2751c11e1eb949579ea17f6eaa73bf8e798186a20b24697cb650242d691b1dc4"
},
"downloads": -1,
"filename": "sms_bp-0.2.4.tar.gz",
"has_sig": false,
"md5_digest": "cf22ef048afd76b6fd0e8b2b3296dff8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "==3.10.13",
"size": 26699813,
"upload_time": "2024-10-24T14:51:50",
"upload_time_iso_8601": "2024-10-24T14:51:50.755115Z",
"url": "https://files.pythonhosted.org/packages/55/24/b8acce98f669fad836a45ca1f8a2b42692b6590a2c325ae07d7b19fc0765/sms_bp-0.2.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-24 14:51:50",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "joemans3",
"github_project": "SMS_BP",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "attrs",
"specs": [
[
"==",
"24.2.0"
]
]
},
{
"name": "click",
"specs": [
[
"==",
"8.1.7"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.6"
]
]
},
{
"name": "contourpy",
"specs": [
[
"==",
"1.3.0"
]
]
},
{
"name": "cycler",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "fonttools",
"specs": [
[
"==",
"4.54.1"
]
]
},
{
"name": "ghp-import",
"specs": [
[
"==",
"2.1.0"
]
]
},
{
"name": "griffe",
"specs": [
[
"==",
"1.4.1"
]
]
},
{
"name": "imageio",
"specs": [
[
"==",
"2.35.1"
]
]
},
{
"name": "jinja2",
"specs": [
[
"==",
"3.1.4"
]
]
},
{
"name": "jsonschema",
"specs": [
[
"==",
"4.23.0"
]
]
},
{
"name": "jsonschema-specifications",
"specs": [
[
"==",
"2024.10.1"
]
]
},
{
"name": "kiwisolver",
"specs": [
[
"==",
"1.4.7"
]
]
},
{
"name": "lazy-loader",
"specs": [
[
"==",
"0.4"
]
]
},
{
"name": "markdown",
"specs": [
[
"==",
"3.7"
]
]
},
{
"name": "markdown-it-py",
"specs": [
[
"==",
"3.0.0"
]
]
},
{
"name": "markupsafe",
"specs": [
[
"==",
"2.1.5"
]
]
},
{
"name": "matplotlib",
"specs": [
[
"==",
"3.9.2"
]
]
},
{
"name": "mdurl",
"specs": [
[
"==",
"0.1.2"
]
]
},
{
"name": "mergedeep",
"specs": [
[
"==",
"1.3.4"
]
]
},
{
"name": "mkdocs",
"specs": [
[
"==",
"1.6.0"
]
]
},
{
"name": "mkdocs-autorefs",
"specs": [
[
"==",
"1.2.0"
]
]
},
{
"name": "mkdocs-get-deps",
"specs": [
[
"==",
"0.2.0"
]
]
},
{
"name": "mkdocstrings",
"specs": [
[
"==",
"0.26.2"
]
]
},
{
"name": "mkdocstrings-python",
"specs": [
[
"==",
"1.12.1"
]
]
},
{
"name": "networkx",
"specs": [
[
"==",
"3.3"
]
]
},
{
"name": "numpy",
"specs": [
[
"==",
"2.1.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"24.1"
]
]
},
{
"name": "pathspec",
"specs": [
[
"==",
"0.12.1"
]
]
},
{
"name": "pillow",
"specs": [
[
"==",
"10.4.0"
]
]
},
{
"name": "platformdirs",
"specs": [
[
"==",
"4.3.6"
]
]
},
{
"name": "pygments",
"specs": [
[
"==",
"2.18.0"
]
]
},
{
"name": "pymdown-extensions",
"specs": [
[
"==",
"10.11.2"
]
]
},
{
"name": "pyparsing",
"specs": [
[
"==",
"3.1.4"
]
]
},
{
"name": "python-dateutil",
"specs": [
[
"==",
"2.9.0.post0"
]
]
},
{
"name": "pyyaml",
"specs": [
[
"==",
"6.0.2"
]
]
},
{
"name": "pyyaml-env-tag",
"specs": [
[
"==",
"0.1"
]
]
},
{
"name": "referencing",
"specs": [
[
"==",
"0.35.1"
]
]
},
{
"name": "rich",
"specs": [
[
"==",
"13.9.2"
]
]
},
{
"name": "rpds-py",
"specs": [
[
"==",
"0.20.0"
]
]
},
{
"name": "scikit-image",
"specs": [
[
"==",
"0.24.0"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.14.1"
]
]
},
{
"name": "shellingham",
"specs": [
[
"==",
"1.5.4"
]
]
},
{
"name": "six",
"specs": [
[
"==",
"1.16.0"
]
]
},
{
"name": "tifffile",
"specs": [
[
"==",
"2024.9.20"
]
]
},
{
"name": "typer",
"specs": [
[
"==",
"0.12.5"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
},
{
"name": "watchdog",
"specs": [
[
"==",
"5.0.3"
]
]
}
],
"lcname": "sms-bp"
}