This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instructions to run this on one sample: | |
# conda env create -n quant -f quantification.yml | |
# conda activate quant | |
# python quantification.py -M /path/to/cellMask.tif -in /path/to/Sample_01.ome.tif -o /path/to/output/ -ch /path/to/channel_names.csv -c 46 | |
# <julia.casado@helsinki.fi> | |
import os | |
import argparse | |
from pathlib import Path | |
import csv | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Crop TMA ome.tif into the already detected cores | |
% Quantify with already computed masks. | |
% /casado | |
basePath = 'D:\path\to\the\project\'; | |
maskPath = 'segmentation'; | |
maskFileName = 'cellRingMask.tif'; | |
omePath = 'registration'; | |
omeSuffix = '.ome.tif'; | |
cropCoordsPath = 'dearray'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Prepare file formats for segmentation workflow: Ilastik + Cell Profiler + HistoCAT | |
// Input must be a folder with multipage TIFF files, one for each sample or core | |
// 19.6.2019 Julia and Nuppu | |
basePath = "/path/to/project/folder/"; | |
coreStacks = "tiff/files/folder/"; | |
for_histocat = "for_histocat/"; //Where to save Image sequences | |
for_ilastik = "for_ilastik/"; //Where to save .h5 files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import pandas as pd | |
import cycifsuite.detect_lost_cells as dlc | |
import numpy as np | |
import time | |
import glob | |
from multiprocessing import Process, freeze_support | |
def processFile(fname, path_out, manual_threshold=None): | |
t = time.time() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
import os | |
import pandas as pd | |
import numpy as np | |
import time | |
import skimage.io | |
pathIn = "Z:/Connor/Topacio_P2_AF/ashlar" | |
pathOut= "D:/julia/cell_filter/" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% 1. Input using Bio-formats | |
% Read image into 3D array and resize to be easy to handle | |
filePath = "tma_big.tif"; | |
image = bfOpen3DVolume(filePath); | |
image= image{1}{1}; | |
nuclei = image(:,:,1); | |
imagesub = imresize(nuclei,0.02); | |
%% 2. Morphological operations |