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

Update readme #2

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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.
45 changes: 29 additions & 16 deletions analysis/ML-2024-04-24_sample_notebook.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2021-05-31T09:25:05.984402Z",
Expand All @@ -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"
]
},
{
Expand All @@ -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"
]
}
],
Expand All @@ -131,7 +120,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -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": {},
Expand Down
Loading