Beispiel #1
0
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data,
                                        "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
     self.img = Image3dWithSpots(repository=self.repo,
                                 image_path="mrna/arhgdia/2h/1")
     self.nucleus_mask = self.img.get_nucleus_mask()
     cell_mask = self.img.get_cell_mask()
     self.cytoplasm_mask = (cell_mask == 1) & (self.nucleus_mask == 0)
Beispiel #2
0
def open_repo():
    dataset_root_fp = pathlib.Path(
        constants.analysis_config['DATASET_CONFIG_PATH'].format(
            root_dir=global_root_dir)).parent
    primary_fp = pathlib.Path(dataset_root_fp,
                              constants.dataset_config['PRIMARY_FILE_NAME'])
    secondary_fp = pathlib.Path(
        dataset_root_fp, constants.dataset_config['SECONDARY_FILE_NAME'])
    repo = H5RepositoryWithCheckpoint(repo_path=primary_fp,
                                      secondary_repo_path=secondary_fp)
    return repo
Beispiel #3
0
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data,
                                        "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
     self.img = ImageWithMTOC(repository=self.repo,
                              image_path="mrna/arhgdia/2h/1")
     self.img1 = ImageWithMTOC(repository=self.repo,
                               image_path="mrna/arhgdia/2h/1")
     self.img10 = ImageWithMTOC(repository=self.repo,
                                image_path="mrna/arhgdia/2h/10")
     self.img11 = ImageWithMTOC(repository=self.repo,
                                image_path="mrna/arhgdia/2h/11")
     self.img12 = ImageWithMTOC(repository=self.repo,
                                image_path="mrna/arhgdia/2h/12")
     self.img13 = ImageWithMTOC(repository=self.repo,
                                image_path="mrna/arhgdia/2h/13")
Beispiel #4
0
            mads.append(mse)
        total_mads.append(mads)
    return total_mads


# Figure 2.D Mean Absolute Deviation of Arhgdia mRNA distribution for peripheral fraction descriptors of a randomly selected cell
# from a pooled average of up to ~40 cells for cultured and micropatterned cells.

constants.init_config(analysis_config_js_path=pathlib.Path(
    global_root_dir, "src/analysis/stability/config_original.json"))
dataset_root_fp = pathlib.Path(
    constants.analysis_config['DATASET_CONFIG_PATH'].format(
        root_dir=global_root_dir)).parent
primary_fp = pathlib.Path(dataset_root_fp,
                          constants.dataset_config['PRIMARY_FILE_NAME'])
secondary_fp = pathlib.Path(dataset_root_fp,
                            constants.dataset_config['SECONDARY_FILE_NAME'])
analysis_repo = H5RepositoryWithCheckpoint(repo_path=primary_fp,
                                           secondary_repo_path=secondary_fp)

total_mads = []
for gene in constants.analysis_config['MRNA_GENES']:
    total_mads.append(compute_stability(gene, bootstrap=500))

tgt_image_name = constants.analysis_config['FIGURE_NAME_FORMAT']
tgt_fp = pathlib.Path(
    constants.analysis_config['FIGURE_OUTPUT_PATH'].format(
        root_dir=global_root_dir), tgt_image_name)
plot.plot_figure(total_mads[0], total_mads[1], tgt_fp)
logger.info("Generated image at {}", str(tgt_fp).split("analysis/")[1])
Beispiel #5
0
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data,
                                        "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
     self.img = Image3dWithSpots(repository=self.repo,
                                 image_path="mrna/arhgdia/2h/1")
Beispiel #6
0
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data, "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data,
                                        "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
     self.img = Image3dWithIntensitiesAndMTOC(
         repository=self.repo, image_path="protein/arhgdia/2h/1")
Beispiel #8
0
 def setUp(self) -> None:
     self.h5_sample_path = pathlib.Path(path.global_example_data,
                                        "basic.h5")
     self.repo = H5RepositoryWithCheckpoint(repo_path=self.h5_sample_path)
     self.img = imageWithSpotsAndZlines(repository=self.repo,
                                        image_path="mrna/actn2/immature/02")