Пример #1
0
# source_directory = "L:\\Common\\AKN\\IF test images nuc vs cyto\\11-21-16 RPE IF untreat mps nut images"  # because Windows
# source_directory = "C:\\Users\\Andrei\Desktop\\tmp\\11-21-16 RPE IF untreat mps nut images"  # because windows and smb are not collaborating today
# source_directory = "C:\\Users\Gordon\Desktop\AKN_TIFF 8BIT"

source_directory = "D:\AKN_TIFF 8BIT"
# source_directory = "D:\AKN_TIFF_16"
# source_directory = "D:\AKN_TIFF_TEST"

pipeline = uf.color_based_traversal(source_directory,
                                    coding_separator='.',
                                    group_anchor=1)
pipeline = uf.name_channels(pipeline, ['transmission', 'DAPI', 'p53'])

print "1"
pipeline = wf.gamma_stabilize(pipeline,
                              in_channel='DAPI',
                              floor_method='min',
                              alpha_clean=.5)
pipeline = wf.smooth_2d(pipeline, in_channel='DAPI',
                        smoothing_px=.5)  # corresponds to a pixel of 1500 nm
print "2"

pipeline = wf.gamma_stabilize(pipeline,
                              in_channel='p53',
                              floor_method='min',
                              alpha_clean=.0)
pipeline = wf.smooth_2d(pipeline, in_channel='p53', smoothing_px=.5)
print "3"

pipeline = wf.robust_binarize(pipeline,
                              in_channel='DAPI',
                              out_channel=['nuclei'],
Пример #2
0
import imagepipe.wrapped_functions as wf
from imagepipe import core_functions as cf

translator = {'C2': 0,
              'C1': 1
              }

source = examples.xi_support.xi_traverse('L:\\Users\\xi\\Quantification of colocalization',
                                         matching_map=translator)

# source = uf.xi_traverse('L:\\Users\\andrei\\2017\\Xi Data',
#                         matching_map=translator)

named_source = uf.name_channels(source, ['GFP', 'mCherry'])

stabilized_GFP = wf.gamma_stabilize(named_source, in_channel='GFP', floor_method='min', alpha_clean=.5)

smoothed_GFP = wf.smooth(stabilized_GFP, in_channel='GFP', smoothing_px=.5)

stabilized_mCh = wf.gamma_stabilize(smoothed_GFP, in_channel='mCherry', floor_method='min', alpha_clean=.5)

smoothed_mCh = wf.smooth(stabilized_mCh, in_channel='mCherry', smoothing_px=.5)

med_norm_GFP = wf.locally_normalize(smoothed_mCh,
                                                         in_channel='GFP',
                                                         )

med_norm_mCh = wf.locally_normalize(med_norm_GFP,
                                                         in_channel='mCherry',
                                                         )
Пример #3
0
source = examples.kristen_support.Kristen_traverse(
    '/run/user/1000/gvfs/smb-share:server=10.17.0.219,share=common/Users/kristen/Split GFP quant_Andrei/20170209',
    matching_map=translator)

named_source = uf.name_channels(source, ['DAPI', 'GFP', 'mCherry'])

max_mCherry = wf.max_projection(named_source,
                                in_channel='mCherry',
                                out_channel='max_mCherry')

max_GFP = wf.max_projection(max_mCherry,
                            in_channel='GFP',
                            out_channel='max_GFP')

stabilized_mCherry = wf.gamma_stabilize(max_GFP,
                                        in_channel='max_mCherry',
                                        floor_method='min',
                                        alpha_clean=.5)

smoothed_mCherry = wf.smooth_2d(stabilized_mCherry,
                                in_channel='max_mCherry',
                                smoothing_px=.5)

mCherry_o_n_segmented = wf.robust_binarize(smoothed_mCherry,
                                           in_channel='max_mCherry',
                                           out_channel='max_mCherry_binary',
                                           heterogeity_size=10,
                                           feature_size=250)

running_render = examples.kristen_support.Kristen_render(
    mCherry_o_n_segmented,
    in_channel=[
Пример #4
0
translator = {'w1488': 0, 'w2561': 1}

# source = uf.Linhao_traverse("L:\\Users\\jerry\\Image\\ForAndrei\\Ry233282285",
#                             matching_map=translator)

source = examples.linhao_support.Linhao_traverse(
    "/run/user/1000/gvfs/smb-share:server=10.17.0.219,share=common/Users/jerry/Image/ForAndrei/SSAmutant",
    matching_map=translator)

# that architecture actually removes the need for the debug line
# that can be incorporated into the traversal

named_source = uf.name_channels(source, ['GFP', 'mCherry'])

stabilized_GFP = wf.gamma_stabilize(named_source, in_channel='GFP')
smoothed_GFP = wf.smooth(stabilized_GFP, in_channel='GFP')

stabilized_mCh = wf.gamma_stabilize(smoothed_GFP, in_channel='mCherry')

projected_GFP = wf.sum_projection(stabilized_mCh,
                                  in_channel='GFP',
                                  out_channel='projected_GFP')

projected_mCh = wf.max_projection(projected_GFP,
                                  in_channel='mCherry',
                                  out_channel='projected_mCh')

binarized_GFP = wf.robust_binarize(projected_mCh,
                                   in_channel='projected_mCh',
                                   out_channel='cell_tags')
Пример #5
0
import examples.akshay_support
import imagepipe.traversals as uf
import imagepipe.wrapped_functions as wf
from imagepipe import core_functions as cf

# source = uf.Akshay_traverse("L:\\Common\\AKN\\IF test images nuc vs cyto\\tiff")
# source = uf.Akshay_traverse("L:\\Common\\AKN\\IF test images nuc vs cyto\\11-21-16 RPE IF untreat mps nut images")
# source_directory = '/run/user/1000/gvfs/smb-share:server=10.17.0.219,share=common/Common/AKN/IF test images nuc vs cyto/11-21-16 RPE IF untreat mps nut - Analysis run'  # because Linux
source_directory = "L:\\Common\\AKN\\IF test images nuc vs cyto\\11-21-16 RPE IF untreat mps nut images"  # because Windows
# source_directory = "C:\\Users\\Andrei\Desktop\\tmp\\11-21-16 RPE IF untreat mps nut images"  # because windows and smb are not collaborating today

source = examples.akshay_support.Akshay_traverse(source_directory)
named_source = uf.name_channels(source, ['DAPI', 'p53', 'p21'])

stablilized_1 = wf.gamma_stabilize(named_source, in_channel='DAPI', floor_method='min', alpha_clean=.5)
smoothed_1 = wf.smooth_2d(stablilized_1, in_channel='DAPI', smoothing_px=.5)  # corresponds to a pixel of 1500 nm

stablilized_2 = wf.gamma_stabilize(smoothed_1, in_channel='p53', floor_method='min', alpha_clean=.0)
smoothed_2 = wf.smooth_2d(stablilized_2, in_channel='p53', smoothing_px=.5)

stablilized_3 = wf.gamma_stabilize(smoothed_2, in_channel='p21', floor_method='5p', alpha_clean=.5)
smoothed_3 = wf.smooth_2d(stablilized_3, in_channel='p21', smoothing_px=.5)

binarized_nuclei = wf.robust_binarize(smoothed_3,
                                                           in_channel='DAPI',
                                                           out_channel=['nuclei'],
                                                           _dilation=0,
                                                           heterogeity_size=5, feature_size=50)

segmented_nuclei = wf.label_and_correct(binarized_nuclei,