Skip to content

Commit

Permalink
v1.2.6 - New version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakob Russel committed Sep 7, 2022
1 parent c507694 commit fb65148
Show file tree
Hide file tree
Showing 15 changed files with 148 additions and 46 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: RCon3D
Title: Analysis of Confocal Images of Microbial Biofilms
Version: 1.2.5
Version: 1.2.6
Authors@R: person("Jakob", "Russel", email = "russel2620@gmail.com", role = c("aut", "cre"))
Description: Various 3D analyses of confocal images. E.g. Quantification, co-aggregation and identifying 3D aggregates.
Depends: R (>= 3.2.5)
Expand All @@ -21,4 +21,4 @@ Suggests:
License: GPL (>= 3) | file LICENSE
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.1.1
RoxygenNote: 7.2.1
7 changes: 4 additions & 3 deletions R/quant.R
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
#' Quantifies the pixels in images
#'
#' Quantifies the number of pixels for each channel in each layer (z-stack)
#' Quantifies the number of pixels for each channel in any direction (default z-stack)
#' @param imgs The paths of array files; i.e. output from \code{loadIMG} or \code{findIMG} functions.
#' @param channels Character vector with name(s) of channels. Channel names should be in the names of the array files
#' @param naming Optional. Add metadata to the output dataframe by looking through names of array files. Should be a list of character vectors, each list element will be added as a variable. Example: naming=list(Time=c("T0","T1","T2")). The function inserts a variable called Time, and then looks through the names of the array files and inserts characters mathcing either T0, T1 or T2
#' @param cores Number of cores for parallel computing
#' @param axis Axis to aggregate over (1: x, 2: y, 3:z). Default 3 (z-axis)
#' @keywords array image quantify
#' @return A dataframe with number of pixels for each layer
#' @import foreach doSNOW
#' @export

quant <- function(imgs,channels,naming = NULL,cores = 1) {
quant <- function(imgs,channels,naming = NULL,cores = 1,axis=3) {

# Loop for each channel
qua.fin <- list()
Expand Down Expand Up @@ -41,7 +42,7 @@ quant <- function(imgs,channels,naming = NULL,cores = 1) {
ch_t <- readRDS(ch_files[k])

# Count for each layer
q <- apply(ch_t, 3, sum)
q <- apply(ch_t, axis, sum)

# Output
temp <- cbind(sub(paste0("_Array.*"),"",sub(".*/", "", ch_files[k])),channels[z],q,1:length(q))
Expand Down
20 changes: 16 additions & 4 deletions man/clumps.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/clumps_dist.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 11 additions & 3 deletions man/clumps_plot.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 27 additions & 4 deletions man/co_agg.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 29 additions & 6 deletions man/cross_ratio.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions man/layer_split.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/loadIMG.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/morphIMG.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 29 additions & 6 deletions man/occupancy.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions man/quant.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/smoothIMG.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions man/threshIMG.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions man/xy_splits.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fb65148

Please sign in to comment.