Skip to content

Commit

Permalink
update documentation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Jan 31, 2024
1 parent 4f7b059 commit 2136149
Show file tree
Hide file tree
Showing 29 changed files with 989 additions and 843 deletions.
Binary file modified docs/doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/doctrees/index.doctree
Binary file not shown.
Binary file modified docs/doctrees/pages/modules.doctree
Binary file not shown.
Binary file modified docs/doctrees/pages/notebooks/example_stitching_notebook.doctree
Binary file not shown.
Binary file modified docs/doctrees/pages/tutorials.doctree
Binary file not shown.
2 changes: 1 addition & 1 deletion docs/html/.buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 727bb9b1d78a33f916926cb28f3549a4
config: 58447cc7763988a8e2886fa512125b6f
tags: 645f666f9bcd5a90fca523b33c5a78b7
33 changes: 23 additions & 10 deletions docs/html/_sources/pages/tutorials.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Parsing and Stitching Data from Opera Phenix
============================================

First you need to export your data from Harmony and rename the path to eliminate any spaces in the name.
Then you can run the following script to parses and stitch your data.
Then you can run the following script to parse and stitch your data.

.. code-block:: python
:caption: example script for parsing and stitching phenix data
Expand All @@ -32,18 +32,19 @@ Then you can run the following script to parses and stitch your data.
overlap = 0.1 #adjust in case your data was aquired with another overlap
#define parameters to find correct slide in experiment folder
row = 1
well = 1
zstack_value = 1
timepoint = str(1)
overlap = 0.1 #adjust in case your data was aquired with another overlap
row = str(2).zfill(2) #specify the row of the well you want to stitch
well = str(4).zfill(2) #specifc the well number you wish to stitch
zstack_value = str(1).zfill(3) #specify the zstack you want to stitch. for multiple zstacks please make a loop and iterate through each of them.
timepoint = str(1).zfill(3) #specifz the timepoint you wish to stitch
#define on which channel should be stitched
stitching_channel = "Alexa647"
output_filetype = [".tif", "ome.zarr"] #one of .tif, .ome.tif, .ome.zarr (can pass several if you want to generate all filetypes)
#adjust cropping parameter
crop = {'top':0, 'bottom':0, 'left':0, 'right':0} #this does no cropping
#crop = {'top':72, 'bottom':52, 'left':48, 'right':58} #this is good default values for an entire PPS slide with cell culture samples imaged with the SPARCSpy protocol
#crop = {'top':72, 'bottom':52, 'left':48, 'right':58} #this is good default values for an entire PPS slides with cell culture samples imaged with the SPARCS protocol
#create output directory if it does not exist
if not os.path.exists(outdir):
Expand All @@ -52,15 +53,26 @@ Then you can run the following script to parses and stitch your data.
#define pattern to recognize which slide should be stitched
#remember to adjust the zstack value if you aquired zstacks and want to stitch a speciifc one in the parameters above
pattern = "Timepoint"+str(timepoint.zfill(3) +"_Row"+ str(row).zfill(2) + "_" + "Well" + str(well).zfill(2) + "_{channel}_"+"zstack"+str(zstack_value).zfill(3)+"_r{row:03}_c{col:03}.tif")
#you can define different rescale ranges for each channel if you want to or alternatively use the same range for all channels
#same range for all channels
rescale_range = (1, 99)
#custom for each channel
rescale_range = {"Alexa647":(1, 98), "DAPI":(1, 99), "mCherry":(1, 99)} #channels need to be named as is the case in the parsed folder
pattern = f"Timepoint{timepoint}_Row{row}_Well{well}_{{channel}}_zstack{zstack_value}_r{{row:03}}_c{{col:03}}.tif"
generate_stitched(input_dir,
slidename,
pattern,
outdir,
overlap,
crop = crop ,
stitching_channel = stitching_channel,
filetype = output_filetype)
filetype = output_filetype,
plot_QC = True,
do_intensity_rescale = True,
rescale_range = rescale_range)
Generated output
------------------
Expand All @@ -73,6 +85,7 @@ The stitching script will generate the following files:
├── QC_edge_quality.pdf
├── QC_edge_scatter.pdf
├── stitching_test.XML
├── stitching_test.ome.zarr
├── stitching_test_Alexa488.tif
├── stitching_test_DAPI.tif
├── stitching_test_mCherry.tif
Expand All @@ -91,6 +104,8 @@ The stitching script will generate the following files:
- Plots the alignment quality against each other
* - `stitching_test.XML`
- contains the required input for reading the stitched files into BIAS
* - `<slidename>.ome.zarr`
- stitched image containing all channels in the ome.zarr format, optimal for viewing in napari
* - `<slidename>_<channel_name>.tif`
- stitched image for the given channel
* - `stitching_test_tile_positions.tsv`
Expand All @@ -102,5 +117,3 @@ Example Results
.. image:: ../_static/stitched_channels.png
:width: 100 %
73 changes: 27 additions & 46 deletions docs/html/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* Sphinx stylesheet -- basic theme.
*
* :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
* :license: BSD, see LICENSE for details.
*
*/
Expand Down Expand Up @@ -222,7 +222,7 @@ table.modindextable td {
/* -- general body styles --------------------------------------------------- */

div.body {
min-width: 360px;
min-width: 450px;
max-width: 800px;
}

Expand All @@ -237,8 +237,14 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
a.brackets:before,
span.brackets > a:before{
content: "[";
}

a.brackets:after,
span.brackets > a:after {
content: "]";
}

h1:hover > a.headerlink,
Expand Down Expand Up @@ -329,16 +335,12 @@ p.sidebar-title {
font-weight: bold;
}

nav.contents,
aside.topic,
div.admonition, div.topic, blockquote {
clear: left;
}

/* -- topics ---------------------------------------------------------------- */

nav.contents,
aside.topic,
div.topic {
border: 1px solid #ccc;
padding: 7px;
Expand Down Expand Up @@ -377,17 +379,13 @@ div.body p.centered {

div.sidebar > :last-child,
aside.sidebar > :last-child,
nav.contents > :last-child,
aside.topic > :last-child,
div.topic > :last-child,
div.admonition > :last-child {
margin-bottom: 0;
}

div.sidebar::after,
aside.sidebar::after,
nav.contents::after,
aside.topic::after,
div.topic::after,
div.admonition::after,
blockquote::after {
Expand Down Expand Up @@ -430,6 +428,10 @@ table.docutils td, table.docutils th {
border-bottom: 1px solid #aaa;
}

table.footnote td, table.footnote th {
border: 0 !important;
}

th {
text-align: left;
padding-right: 5px;
Expand Down Expand Up @@ -613,26 +615,19 @@ ul.simple p {
margin-bottom: 0;
}

aside.footnote > span,
div.citation > span {
dl.footnote > dt,
dl.citation > dt {
float: left;
margin-right: 0.5em;
}
aside.footnote > span:last-of-type,
div.citation > span:last-of-type {
padding-right: 0.5em;
}
aside.footnote > p {
margin-left: 2em;
}
div.citation > p {
margin-left: 4em;
}
aside.footnote > p:last-of-type,
div.citation > p:last-of-type {

dl.footnote > dd,
dl.citation > dd {
margin-bottom: 0em;
}
aside.footnote > p:last-of-type:after,
div.citation > p:last-of-type:after {

dl.footnote > dd:after,
dl.citation > dd:after {
content: "";
clear: both;
}
Expand All @@ -649,6 +644,10 @@ dl.field-list > dt {
padding-right: 5px;
}

dl.field-list > dt:after {
content: ":";
}

dl.field-list > dd {
padding-left: 0.5em;
margin-top: 0em;
Expand All @@ -674,16 +673,6 @@ dd {
margin-left: 30px;
}

.sig dd {
margin-top: 0px;
margin-bottom: 0px;
}

.sig dl {
margin-top: 0px;
margin-bottom: 0px;
}

dl > dd:last-child,
dl > dd:last-child > :last-child {
margin-bottom: 0;
Expand Down Expand Up @@ -752,14 +741,6 @@ abbr, acronym {
cursor: help;
}

.translated {
background-color: rgba(207, 255, 207, 0.2)
}

.untranslated {
background-color: rgba(255, 207, 207, 0.2)
}

/* -- code displays --------------------------------------------------------- */

pre {
Expand Down
2 changes: 1 addition & 1 deletion docs/html/_static/css/theme.css

Large diffs are not rendered by default.

Loading

0 comments on commit 2136149

Please sign in to comment.