Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
synapsis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lucy McNeill
synapsis
Commits
b3b09da2
Commit
b3b09da2
authored
3 years ago
by
Lucy McNeill
Browse files
Options
Downloads
Patches
Plain Diff
replace instaces of file with img_file in get_pachytene
parent
66ebcaa0
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
R/get_pachytene.R
+11
-11
11 additions, 11 deletions
R/get_pachytene.R
with
11 additions
and
11 deletions
R/get_pachytene.R
+
11
−
11
View file @
b3b09da2
...
...
@@ -36,13 +36,13 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
dir.create
(
paste0
(
img_path_new
,
"/pachytene"
))
file_list
<-
list.files
(
img_path_new
)
## for each image that is *-dna.jpeg,
for
(
file
in
file_list
){
file_base
=
file
filename_path_test
=
paste0
(
img_path
,
"/crops/"
,
file
)
file
=
filename_path_test
for
(
img_
file
in
file_list
){
file_base
=
img_
file
filename_path_test
=
paste0
(
img_path
,
"/crops/"
,
img_
file
)
img_
file
=
filename_path_test
#if(grepl("*SYCP3.jpeg", file)){
if
(
grepl
(
paste0
(
'*'
,
channel2_string
,
'.'
,
file_ext
,
'$'
),
file
)){
file_dna
=
file
if
(
grepl
(
paste0
(
'*'
,
channel2_string
,
'.'
,
file_ext
,
'$'
),
img_
file
)){
file_dna
=
img_
file
file_base_dna
=
file_base
image_count
<-
image_count
+1
image
<-
readImage
(
file_dna
)
...
...
@@ -50,9 +50,9 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
antibody1_store
<-
1
}
#if(grepl("*MLH3.jpeg", file)){
if
(
grepl
(
paste0
(
'*'
,
channel1_string
,
'.'
,
file_ext
,
'$'
),
file
)){
if
(
grepl
(
paste0
(
'*'
,
channel1_string
,
'.'
,
file_ext
,
'$'
),
img_
file
)){
file_base_foci
=
file_base
file_foci
=
file
file_foci
=
img_
file
#print(file_foci)
image
<-
readImage
(
file_foci
)
img_orig_foci
<-
channel
(
image
,
"gray"
)
...
...
@@ -77,10 +77,10 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
cell_count
<-
cell_count
+
1
### identified a good image. count foci
### data frame stuff
if
(
grepl
(
WT_str
,
file
,
fixed
=
TRUE
)
==
TRUE
){
if
(
grepl
(
WT_str
,
img_
file
,
fixed
=
TRUE
)
==
TRUE
){
genotype
<-
WT_out
}
if
(
grepl
(
KO_str
,
file
,
fixed
=
TRUE
)
==
TRUE
){
if
(
grepl
(
KO_str
,
img_
file
,
fixed
=
TRUE
)
==
TRUE
){
genotype
<-
KO_out
}
image_mat
<-
as.matrix
(
new_img
)
...
...
@@ -108,7 +108,7 @@ get_pachytene <- function(img_path, species_num = 20, offset = 0.2,ecc_thresh =
if
(
mean_ecc
>
ecc_thresh
){
if
(
px_fraction
>
area_thresh
){
stage_classification
<-
"pachytene"
df_cells
<-
rbind
(
df_cells
,
t
(
c
(
file
,
cell_count
,
genotype
,
px_mask
,
px_total
,
px_fraction
,
mean_ecc
,
mean_ratio
,
skew
,
sd_bright_px
,
stage_classification
)))
df_cells
<-
rbind
(
df_cells
,
t
(
c
(
img_
file
,
cell_count
,
genotype
,
px_mask
,
px_total
,
px_fraction
,
mean_ecc
,
mean_ratio
,
skew
,
sd_bright_px
,
stage_classification
)))
pachytene_count
<-
pachytene_count
+
1
file_dna
<-
tools
::
file_path_sans_ext
(
file_base_dna
)
filename_crop
=
paste0
(
img_path_new
,
"/pachytene/"
,
file_dna
,
".jpeg"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment