示例#1
0
from starfish import IntensityTable

from starfish.image import Filter
from starfish.spots import DetectPixels
# EPY: END code

# EPY: START markdown
### Load data into Starfish from the Cloud
#
#The example data here corresopond to DARTFISHv1 2017. The group is actively working on improving the protocol. The data represent human brain tissue from the human occipital cortex from 1 field of view (FOV) of larger experiment. The data from one field of view correspond to 18 images from 6 imaging rounds (r) 3 color channels (c) and 1 z-plane (z). Each image is 988x988 (y,x)
# EPY: END markdown

# EPY: START code
use_test_data = os.getenv("USE_TEST_DATA") is not None
experiment = data.DARTFISH(use_test_data=use_test_data)

imgs = experiment.fov().get_image(FieldOfView.PRIMARY_IMAGES)

print(imgs)
# EPY: END code

# EPY: START markdown
### Visualize codebook
#
#The DARTFISH codebook maps pixel intensities across the rounds and channels to the corresponding barcodes and genes that those pixels code for. For this example dataset, the codebook specifies 96 possible barcodes. The codebook used in this experiment has 3 color channels and one blank channel, each of which contribute to codes. The presence of the blank channel will be important later when the filtering is described.
# EPY: END markdown

# EPY: START code
experiment.codebook
# EPY: END code
示例#2
0
ipython.magic("matplotlib inline")

matplotlib.rcParams["figure.dpi"] = 150

###################################################################################################
# Load Data
# ---------
# The example data here correspond to DARTFISHv1 2017. The data represent human brain tissue from
# the human occipital cortex from 1 field of view (FOV) of larger experiment. The data from one
# field of view correspond to 18 images from 6 imaging rounds (r) 3 color channels (c) and 1 z-plane
# (z). Each image is 988x988 (y,x)

from starfish import data
from starfish import FieldOfView

experiment = data.DARTFISH(use_test_data=False)
imgs = experiment.fov().get_image(FieldOfView.PRIMARY_IMAGES)
print(imgs)

###################################################################################################
# Visualize codebook
# ------------------
# The DARTFISH codebook maps pixel intensities across the rounds and channels to the corresponding
# barcodes and genes that those pixels code for. For this example dataset, the codebook specifies 96
# possible barcodes. The codebook used in this experiment has 3 color channels and one blank
# channel, each of which contribute to codes. The presence of the blank channel will be important
# later when the filtering is described.

experiment.codebook

###################################################################################################
from starfish.image import Filter
from starfish.spots import PixelSpotDecoder

sns.set_context('talk')
sns.set_style('ticks')
# EPY: END code

# EPY: START markdown
#### Load image stack
#
#Note that the data here corresopond to DARTFISHv1 2017. The group is actively working on improving the protocol.
# EPY: END markdown

# EPY: START code
use_test_data = os.getenv("USE_TEST_DATA") is not None
exp = data.DARTFISH(use_test_data=use_test_data)

stack = exp.fov().get_image(FieldOfView.PRIMARY_IMAGES)
# EPY: END code

# EPY: START code
print(stack.shape)
# EPY: END code

# EPY: START code
# EPY: ESCAPE %gui qt5
display(stack)
# EPY: END code

# EPY: START markdown
#### Load codebook