Skip to content

Commit

Permalink
Update documentation (#280)
Browse files Browse the repository at this point in the history
* Update documentation

* update description of notebook

* change directory back to correct name
  • Loading branch information
ngreenwald authored Oct 16, 2020
1 parent 14f7df2 commit 1a0306f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 19 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ This will generate a link to a jupyter notebook. Copy the last URL (the one with
Be sure to keep this terminal open. **Do not exit the terminal or enter control-c until you are finished with the notebooks**.

## Using the example notebooks:
- The Deepcell_preprocessing notebook walks you through the appropriate formatting steps in order to run your data through DeepCell to be segmented
- The Deepcell_postprocessing notebooks takes the segmentation predictions from DeepCell, and uses them to extract the counts of each marker from your dataset
- The Segment_Image_Data notebook walks you through the appropriate steps to format your data, run the data through deepcell, extracts the counts for each marker in each cell, and creats a csv file with the normalized counts
- The spatial_analysis notebook contains code for performing cluster- and channel-based randomization, as well as neighborhood analysis.
- The example_visualization notebooks contains code for basic plotting functions and visualizations


## Once you are finished
Expand All @@ -57,7 +57,7 @@ You can shut down the notebooks and close docker by entering control-c in the te

This project is still in development, and we are making frequent updates and improvements. If you want to update the version on your computer to have the latest changes, perform the following steps

First, copy the latest version of the code
First, get the latest version of the code

```
$ git pull
Expand All @@ -78,12 +78,6 @@ If you didn't change the name of any of the notebooks within the `scripts` folde

If you have made changes to these notebooks that you would like to keep (specific file paths, settings, custom routines, etc), rename them before updating!

Examples:
```
Deepcell_Postprocessing.ipynb -> old_postprocessing.ipynb
or postprocessing_saved.ipynb
or old_dcpostP.ipynb
...
```
For example, rename your existing copy of `Segment_Image_Data.ipynb` to `Segment_Image_Data_old.ipynb`. Then, after running the update command, a new version of `Segment_Image_Data.ipynb` will be created with the newest code, and your old copy will exist with the new name that you gave it.

After updating, you can bring changes from the old notebooks into the new notebooks at your discretion
After updating, you can copy over any important paths or modifications from the old notebooks into the new notebook
29 changes: 21 additions & 8 deletions templates/Segment_Image_Data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### This is a notebook to run the preprocessing pipeline, upload files to DeepCell and download output, processes it, segments cells, and extract channel information"
"### This is a notebook to format your data for segmentation, run the images through the cloud instance of DeepCell, and then extract marker counts and morphological information from all the cells in your images"
]
},
{
Expand All @@ -28,12 +28,12 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"### <span style=\"color:#ff0000\"> All data, images, files, etc. must be placed in the 'data' directory, and referenced via '../data/path_to_your_data' regardless of if it's input or output. </span>"
"### All data, images, files, etc. must be placed in the 'data' directory, and referenced via '../data/path_to_your_data'"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -48,9 +48,22 @@
"# create directories if do not exist\n",
"for directory in [deepcell_input_dir, deepcell_output_dir, single_cell_dir]:\n",
" if not os.path.exists(directory):\n",
" os.makedirs(directory)\n",
"\n",
"\n",
" os.makedirs(directory)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Here we are using the example data located in /data/example_dataset/input_data. To modify this notebook to run using your own data, simply change the base_dir to point to your own sub-directory within the data folder, rather than 'example_dataset'. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# set this to true for multi-channel tiffs\n",
"MIBItiff = False\n",
"\n",
Expand Down Expand Up @@ -255,9 +268,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.5"
"version": "3.6.5"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
}

0 comments on commit 1a0306f

Please sign in to comment.