-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nuclear speckles data with tests (#84)
* add nuclear speckles data for testing * add citation * add tests * linting * add docs to test util function * remove extra line Co-Authored-By: Jenna Tomkinson <107513215+jenna-tomkinson@users.noreply.github.com> --------- Co-authored-by: Jenna Tomkinson <107513215+jenna-tomkinson@users.noreply.github.com>
- Loading branch information
1 parent
1c6fb28
commit 157bd8d
Showing
13 changed files
with
180 additions
and
54 deletions.
There are no files selected for viewing
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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
Binary file added
BIN
+5.61 MB
tests/data/cytotable/nuclear_speckles/images/plate1/slide1_A1_M10_CH0_Z09_illumcorrect.tiff
Binary file not shown.
Binary file added
BIN
+19.5 KB
...ytotable/nuclear_speckles/masks/plate1/slide1_A1_M10_CH0_Z09_illumcorrect_MaskNuclei.tiff
Binary file not shown.
31 changes: 31 additions & 0 deletions
31
tests/data/cytotable/nuclear_speckles/shrink_source_data.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
""" | ||
Module to shrink source data for testing. | ||
Original source of data (processing): | ||
https://github.com/WayScience/nuclear_speckle_image_profiling | ||
""" | ||
|
||
import os | ||
|
||
import pandas as pd | ||
|
||
# note: we assume the dataset has been manually added to the | ||
# directory containing this module. | ||
filename = f"{os.path.dirname(__file__)}/slide1_converted.parquet" | ||
|
||
# read the data from parquet, sample a fraction of the data | ||
df = pd.read_parquet(filename) | ||
|
||
# filter to only those data which include slide1_A1_M10_CH0_Z09_illumcorrect | ||
df = df[ | ||
( | ||
df["Image_FileName_A647"].str.contains( | ||
img_str := "slide1_A1_M10_CH0_Z09_illumcorrect" | ||
) | ||
) | ||
| (df["Image_FileName_DAPI"].str.contains(img_str)) | ||
| (df["Image_FileName_GOLD"].str.contains(img_str)) | ||
] | ||
|
||
# export to a new file | ||
df.to_parquet(f"{os.path.dirname(__file__)}/test_slide1_converted.parquet") |
Binary file not shown.
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
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
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