Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Lucy McNeill
synapsis
Commits
d2351bce
Commit
d2351bce
authored
Jul 27, 2021
by
Lucy McNeill
Browse files
get_pachytene outputs red and green channel images into a folder called pachytene-RGB
parent
2cc7dfec
Changes
2
Hide whitespace changes
Inline
Side-by-side
.DS_Store
View file @
d2351bce
No preview for this file type
R/get_pachytene.R
View file @
d2351bce
...
@@ -45,6 +45,7 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
...
@@ -45,6 +45,7 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
colnames
(
df_cells
)
<-
df_cols
colnames
(
df_cells
)
<-
df_cols
img_path_new
<-
paste0
(
img_path
,
"/crops"
)
img_path_new
<-
paste0
(
img_path
,
"/crops"
)
dir.create
(
paste0
(
img_path_new
,
"/pachytene"
))
dir.create
(
paste0
(
img_path_new
,
"/pachytene"
))
dir.create
(
paste0
(
img_path_new
,
"/pachytene-RGB"
))
file_list
<-
list.files
(
img_path_new
)
file_list
<-
list.files
(
img_path_new
)
for
(
img_file
in
file_list
){
for
(
img_file
in
file_list
){
file_base
<-
img_file
file_base
<-
img_file
...
@@ -124,6 +125,12 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
...
@@ -124,6 +125,12 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
file_foci
<-
tools
::
file_path_sans_ext
(
file_base_foci
)
file_foci
<-
tools
::
file_path_sans_ext
(
file_base_foci
)
filename_crop_foci
<-
paste0
(
img_path_new
,
"/pachytene/"
,
file_foci
,
".jpeg"
)
filename_crop_foci
<-
paste0
(
img_path_new
,
"/pachytene/"
,
file_foci
,
".jpeg"
)
writeImage
(
img_orig_foci
,
filename_crop_foci
)
writeImage
(
img_orig_foci
,
filename_crop_foci
)
### add RGB channel
ch1
<-
channel
(
img_orig
,
"grey"
)
ch2
<-
channel
(
img_orig_foci
,
"grey"
)
RGB_img
<-
rgbImage
(
ch1
,
ch2
,
0
*
ch1
)
filename_crop_RGB
<-
paste0
(
img_path_new
,
"/pachytene-RGB/"
,
file_dna
,
".jpeg"
)
writeImage
(
RGB_img
,
filename_crop_RGB
)
}
}
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment