Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Plate 3 and run IC pipeline #7

Merged
merged 15 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
# ignore all plates as they are downloaded from figshare in instructions
0.download_data/Plate_1
0.download_data/Plate_2
0.download_data/Plate_3

# ignore pycache
__pycache__

# ignore corrected plates images (like in download data
# ignore corrected plates images (like in download data)
1.cellprofiler_ic/Corrected_Plate_1
1.cellprofiler_ic/Corrected_Plate_2
1.cellprofiler_ic/Corrected_Plate_3

# ignore log files
*logs

# ignore Mac related files
.DS_Store
17 changes: 11 additions & 6 deletions 0.download_data/download_plates.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
"source": [
"import pathlib\n",
"\n",
"from utils.download_figshare import download_figshare"
"import sys\n",
"sys.path.append(\"../\")\n",
"from utils import download_figshare as downfig"
]
},
{
Expand Down Expand Up @@ -56,7 +58,9 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Set dictionary with specific path/variables for each plate"
"## Set dictionary with specific path/variables for each plate\n",
"\n",
"**Note:** You are able to see the correct URL for the plate by copying the link from the `Download all` button on the item (term used for dataset/plate) from the NF1 Schwann Cell Genotype Cell Painting Assay project. As well, there are mutliple versions of this dataset due to correcting the number of images and the metadata files."
]
},
{
Expand All @@ -65,17 +69,18 @@
"metadata": {},
"outputs": [],
"source": [
"# since we are dealing with zip files, we use the optional parameter `output_dir` where we specify where to extact the files to\n",
"# since we are dealing with zip files, we use the optional parameter `output_dir` where we \n",
"# specify where to extact the files to\n",
"download_plates_info_dictionary = {\n",
" \"Plate_1\": {\n",
" \"figshare_id\": \"22233292\",\n",
" \"version_number\": \"1\",\n",
" \"version_number\": \"2\",\n",
" \"output_folder\": \"Plate_1_zip\",\n",
" \"output_dir\": pathlib.Path(\"Plate_1\"),\n",
" },\n",
" \"Plate_2\": {\n",
" \"figshare_id\": \"22233700\",\n",
" \"version_number\": \"3\",\n",
" \"version_number\": \"4\",\n",
" \"output_folder\": \"Plate_2_zip\",\n",
" \"output_dir\": pathlib.Path(\"Plate_2\"),\n",
" },\n",
Expand Down Expand Up @@ -118,7 +123,7 @@
" output_dir = plate_info[\"output_dir\"]\n",
"\n",
" # download images and metadata for both plates\n",
" download_figshare(\n",
" downfig.download_figshare(\n",
" figshare_id=figshare_id,\n",
" output_file=output_folder,\n",
" output_dir=output_dir,\n",
Expand Down
6 changes: 4 additions & 2 deletions 0.download_data/metadata/barcode_platemap.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Assay_Plate_Barcode,Plate_Map_Name
1,platemap_NF1_CP
Assay_Plate_Barcode,Plate_Map_Name
plate_1,platemap_NF1_plate1
plate_2,platemap_NF1_plate2
plate_3,platemap_NF1_plate3
2 changes: 0 additions & 2 deletions 0.download_data/metadata/barcode_platemap_Plate2.csv

This file was deleted.

73 changes: 73 additions & 0 deletions 0.download_data/metadata/platemap_NF1_plate3.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
WellRow,WellCol,well_position,gene_name,genotype,seed_density
B,1,B01,NF1,WT,500
C,1,C01,NF1,WT,500
D,1,D01,NF1,WT,500
E,1,E01,NF1,WT,500
F,1,F01,NF1,WT,500
G,1,G01,NF1,WT,500
B,2,B02,NF1,WT,1000
C,2,C02,NF1,WT,1000
D,2,D02,NF1,WT,1000
E,2,E02,NF1,WT,1000
F,2,F02,NF1,WT,1000
G,2,G02,NF1,WT,1000
B,3,B03,NF1,WT,2000
C,3,C03,NF1,WT,2000
D,3,D03,NF1,WT,2000
E,3,E03,NF1,WT,2000
F,3,F03,NF1,WT,2000
G,3,G03,NF1,WT,2000
B,4,B04,NF1,WT,4000
C,4,C04,NF1,WT,4000
D,4,D04,NF1,WT,4000
E,4,E04,NF1,WT,4000
F,4,F04,NF1,WT,4000
G,4,G4,NF1,WT,4000
B,5,B05,NF1,HET,500
C,5,C05,NF1,HET,500
D,5,D05,NF1,HET,500
E,5,E05,NF1,HET,500
F,5,F05,NF1,HET,500
G,5,G05,NF1,HET,500
B,6,B06,NF1,HET,1000
C,6,C06,NF1,HET,1000
D,6,D06,NF1,HET,1000
E,6,E06,NF1,HET,1000
F,6,F06,NF1,HET,1000
G,6,G06,NF1,HET,1000
B,7,B07,NF1,HET,2000
C,7,C07,NF1,HET,2000
D,7,D07,NF1,HET,2000
E,7,E07,NF1,HET,2000
F,7,F07,NF1,HET,2000
G,7,G07,NF1,HET,2000
B,8,B08,NF1,HET,4000
C,8,C08,NF1,HET,4000
D,8,D08,NF1,HET,4000
E,8,E08,NF1,HET,4000
F,8,F08,NF1,HET,4000
G,8,G08,NF1,HET,4000
B,9,B09,NF1,NULL,500
C,9,C09,NF1,NULL,500
D,9,D09,NF1,NULL,500
E,9,E09,NF1,NULL,500
F,9,F09,NF1,NULL,500
G,9,G09,NF1,NULL,500
B,10,B10,NF1,NULL,1000
C,10,C10,NF1,NULL,1000
D,10,D10,NF1,NULL,1000
E,10,E10,NF1,NULL,1000
F,10,F10,NF1,NULL,1000
G,10,G10,NF1,NULL,1000
B,11,B11,NF1,NULL,2000
C,11,C11,NF1,NULL,2000
D,11,D11,NF1,NULL,2000
E,11,E11,NF1,NULL,2000
F,11,F11,NF1,NULL,2000
G,11,G11,NF1,NULL,2000
B,12,B12,NF1,NULL,4000
C,12,C12,NF1,NULL,4000
D,12,D12,NF1,NULL,4000
E,12,E12,NF1,NULL,4000
F,12,F12,NF1,NULL,4000
G,12,G12,NF1,NULL,4000
20 changes: 15 additions & 5 deletions 0.download_data/scripts/download_plates.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@


import pathlib
from utils.download_figshare import download_figshare

import sys
sys.path.append("../")
from utils import download_figshare as downfig


# ## Set constant paths/variables
Expand All @@ -28,20 +31,24 @@


# ## Set dictionary with specific path/variables for each plate
#
# **Note:** You are able to see the correct URL for the plate by copying the link from the `Download all` button on the item (term used for dataset/plate) from the NF1 Schwann Cell Genotype Cell Painting Assay project. As well, there are mutliple versions of this dataset due to correcting the number of images and the metadata files.

# In[3]:


# since we are dealing with zip files, we use the optional parameter `output_dir` where we
# specify where to extact the files to
download_plates_info_dictionary = {
"Plate_1": {
"figshare_id": "22233292",
"version_number": "1",
"version_number": "2",
"output_folder": "Plate_1_zip",
"output_dir": pathlib.Path("Plate_1"),
},
"Plate_2": {
"figshare_id": "22233700",
"version_number": "3",
"version_number": "4",
"output_folder": "Plate_2_zip",
"output_dir": pathlib.Path("Plate_2"),
},
Expand All @@ -54,19 +61,22 @@


for plate in download_plates_info_dictionary:
# Access the plate info stored in the dictionary
# access the plate info stored in the dictionary
plate_info = download_plates_info_dictionary[plate]
# set the parameters for the function as variables based on the plate dictionary info
figshare_id = str(
plate_info["figshare_id"] + "/versions/" + plate_info["version_number"]
)
output_folder = plate_info["output_folder"]
output_dir = plate_info["output_dir"]

download_figshare(
# download images and metadata for both plates
downfig.download_figshare(
figshare_id=figshare_id,
output_file=output_folder,
output_dir=output_dir,
metadata_dir=metadata_dir,
figshare_url=figshare_url,
unzip_files=unzip_files,
)

Loading