Skip to content

Commit

Permalink
Merge pull request #2 from quadbio/update_readme
Browse files Browse the repository at this point in the history
Update readme
  • Loading branch information
Marius1311 authored Apr 24, 2024
2 parents 2ff4085 + 25a1111 commit 113832b
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
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

0 comments on commit 113832b

Please sign in to comment.