diff --git a/README.md b/README.md index d422ad8..4bea96c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,27 @@ # Analysis template repository -This contains the raw structure I usually use when doing single-cell/spatial data analysis. +This contains the raw structure I usually use when doing single-cell/spatial data analysis. This template is based on ideas from Philipp Weiler, I took heavy inspiration and copied parts from [his template repository](https://github.com/WeilerP/sc_analysis_template). + +## Set up + +1. Rename `src/fancypackage/`. +2. Update `pyproject.toml` to include the correct information + - Project name + - Project description + - Project-specific Python requirements + - Project author + - Project maintainers + - Project URLs +3. Update `src/fancypackage/core/_constants.py` to include any paths relevant to your analysis and that should be accessible from any script or Jupyter notebook +4. Update this README to include the relevant information about your project. + +## Installation + +```bash +pip install -e ".[dev]" +pre-commit install +``` + +## Things to keep in mind + +Whenever you use a new single-cell tool, add it to `known_bio` in `pyproject.toml` s.t. `isort` can work correctly. diff --git a/analysis/ML-2024-04-24_sample_notebook.ipynb b/analysis/ML-2024-04-24_sample_notebook.ipynb index 34fe54d..fee0051 100644 --- a/analysis/ML-2024-04-24_sample_notebook.ipynb +++ b/analysis/ML-2024-04-24_sample_notebook.ipynb @@ -72,7 +72,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-05-31T09:25:05.984402Z", @@ -82,20 +82,9 @@ }, "outputs": [], "source": [ - "# import standard packages\n", - "import numpy as np\n", - "import pandas as pd\n", - "\n", - "import matplotlib.pyplot as plt\n", - "import seaborn as sns\n", - "\n", - "import sys\n", - "\n", "# import single-cell packages\n", "import scanpy as sc\n", - "\n", - "sys.path.extend([\"../\"])\n", - "from paths import DATA_DIR, FIG_DIR, CODE_DIR" + "from fancypackage import DATA_DIR, FIG_DIR" ] }, { @@ -107,14 +96,14 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "Running Scanpy 1.9.3, on 2023-08-09 11:52.\n" + "Running Scanpy 1.9.3, on 2024-04-24 17:16.\n" ] } ], @@ -131,7 +120,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -160,6 +149,30 @@ "### Data loading" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Any data should be stored in the `data` directory, or somewhere centrally on the cluster. The `data` directly is acessible from anywhere in this repo via `DATA_DIR`: " + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "/Users/mlange/Projects/analysis_template/data\n" + ] + } + ], + "source": [ + "print(DATA_DIR)" + ] + }, { "cell_type": "markdown", "metadata": {},