Commit 39fb4a8b authored by Lucy McNeill's avatar Lucy McNeill
Browse files

count_foci has crowded_foci option (TRUE/FALSE) which determines whether foci...

count_foci has crowded_foci option (TRUE/FALSE) which determines whether foci channel is smoothed (FALSE). Defaults to FALSE
parent ed7cdbc8
No preview for this file type
......@@ -6,13 +6,12 @@ Authors@R:
c(person(given = "Lucy",
family = "McNeill",
role = c("aut", "cre", "cph"),
email = "lucmcneill@gmail.com",
email = "luc.mcneill@gmail.com",
comment = c(ORCID = "0000-0003-1752-4882")),
person(given = "Wayne",
family = "Crismani",
role = c("rev", "ctb"),
comment = c(ORCID = "0000-0003-0143-8293")))
Maintainer: Lucy McNeill <lucmcneill@gmail.com>
Description: Synapsis is a Bioconductor software package for automated (unbiased and reproducible) analysis of meiotic immunofluorescence datasets. The primary functions of the software can i) identify cells in meiotic prophase that are labelled by a synaptonemal complex axis or central element protein, ii) isolate individual synaptonemal complexes and measure their physical length, iii) quantify foci and co-localise them with synaptonemal complexes, iv) measure interference between synaptonemal complex-associated foci. The software has applications that extend to multiple species and to the analysis of other proteins that label meiotic prophase chromosomes. The software converts meiotic immunofluorescence images into R data frames that are compatible with machine learning methods. Given a set of microscopy images of meiotic spread slides, synapsis crops images around individual single cells, counts colocalising foci on strands on a per cell basis, and measures the distance between foci on any given strand.
biocViews:
Software,
......
......@@ -21,10 +21,11 @@
#' @param watershed_stop Turn off default watershed method with "off"
#' @param watershed_radius Radius (ext variable) in watershed method used in foci channel. Defaults to 1 (small)
#' @param watershed_tol Intensity tolerance for watershed method. Defaults to 0.05.
#' @param crowded_foci TRUE or FALSE, defaults to FALSE. Set to TRUE if you have foci > 100 or so.
#' @return foci count per cell
count_foci <- function(img_path, stage = "none", offset_px = 0.2, offset_factor = 2, brush_size = 3, brush_sigma = 3, foci_norm = 0.01, annotation = "off",channel2_string = "SYCP3", channel1_string = "MLH3",file_ext = "jpeg", KO_str = "--",WT_str = "++",KO_out = "-/-", WT_out = "+/+", watershed_stop = "off", watershed_radius = 1, watershed_tol = 0.05)
count_foci <- function(img_path, stage = "none", offset_px = 0.2, offset_factor = 2, brush_size = 3, brush_sigma = 3, foci_norm = 0.01, annotation = "off",channel2_string = "SYCP3", channel1_string = "MLH3",file_ext = "jpeg", KO_str = "--",WT_str = "++",KO_out = "-/-", WT_out = "+/+", watershed_stop = "off", watershed_radius = 1, watershed_tol = 0.05, crowded_foci = TRUE)
{
cell_count <- 0
image_count <-0
......@@ -71,7 +72,7 @@ count_foci <- function(img_path, stage = "none", offset_px = 0.2, offset_factor
# call functions: get
antibody2_store <- 1
}
if( antibody1_store +antibody2_store == 2){
if(antibody1_store +antibody2_store == 2){
antibody1_store <- 0
antibody2_store <- 0
cell_count <- cell_count + 1
......@@ -99,7 +100,7 @@ count_foci <- function(img_path, stage = "none", offset_px = 0.2, offset_factor
#### normalise the foci image
offset <- offset_factor*bg
if(stage != "pachytene"){
if(crowded_foci == TRUE){
foci_th <- foci_mask_crop > bg + offset
#foci_th <- watershed(bwlabel(foci_th)*as.matrix(img_orig_foci),tolerance=0.05, ext=1)
}
......
......@@ -22,7 +22,8 @@ count_foci(
WT_out = "+/+",
watershed_stop = "off",
watershed_radius = 1,
watershed_tol = 0.05
watershed_tol = 0.05,
crowded_foci = TRUE
)
}
\arguments{
......@@ -61,6 +62,8 @@ count_foci(
\item{watershed_radius}{Radius (ext variable) in watershed method used in foci channel. Defaults to 1 (small)}
\item{watershed_tol}{Intensity tolerance for watershed method. Defaults to 0.05.}
\item{crowded_foci}{TRUE or FALSE, defaults to FALSE. Set to TRUE if you have foci > 100 or so.}
}
\value{
foci count per cell
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment