Skip to content

Commit

Permalink
Merge branch 'updates' into introduce_ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ghar1821 committed May 24, 2024
2 parents 68201f3 + de3848e commit f7ba966
Show file tree
Hide file tree
Showing 317 changed files with 1,614 additions and 2,851,522 deletions.
109 changes: 61 additions & 48 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,67 +1,80 @@
Package: Spectre
Type: Package
Version: 1.1.0
Package: Spectre
Title: High-dimensional cytometry and imaging analysis.
Version: 1.2.0
Date: 2023-11-12
Title: High-dimensional cytometry and imaging analysis.
Description: A computational toolkit in R for the integration, exploration, and analysis of high-dimensional single-cell cytometry and imaging data.
Authors@R: c(
person(given = "Thomas", family = "Ashhurst", email = "thomas.ashhurst@sydney.edu.au", role = c("aut", "cre")),
person(given = "Felix", family = "Marsh-Wakefield", email = "felix.marsh-wakefield@sydney.edu.au", role = "aut"),
person(given = "Givanna", family = "Putri", email = "putri.g@wehi.edu.au", role = "aut")
person("Thomas", "Ashhurst", , "thomas.ashhurst@sydney.edu.au", role = c("aut", "cre")),
person("Felix", "Marsh-Wakefield", , "felix.marsh-wakefield@sydney.edu.au", role = "aut"),
person("Givanna", "Putri", , "putri.g@wehi.edu.au", role = "aut")
)
Description: A computational toolkit in R for the integration,
exploration, and analysis of high-dimensional single-cell cytometry
and imaging data.
License: `use_mit_license()`
URL: https://github.com/ImmuneDynamics/Spectre
BugReports: https://github.com/ImmuneDynamics/Spectre/issues
Maintainer: Thomas Ashhurst <thomas.ashhurst@sydney.edu.au>
Depends: R (>= 3.6.0)
License: MIT Licence
Encoding: UTF-8
LazyData: true
biocViews: flowCore
Depends:
R (>= 3.6.0)
biocViews:
Imports:
colorRamps,
data.table,
dendsort,
factoextra,
flowCore,
matrixStats,
Biobase,
flowViz,
FlowSOM,
rhdf5,
HDF5Array,
devtools,
BiocManager,
plyr,
dplyr,
data.table,
tidyr,
rstudioapi,
Rtsne,
umap,
ggplot2,
ggpointdensity,
ggpubr,
ggthemes,
scales,
colorRamps,
RColorBrewer,
gridExtra,
gtools,
irlba,
parallel,
patchwork,
pheatmap,
ggpubr,
class,
RColorBrewer,
rstudioapi,
rsvd,
Rtsne,
scales,
scattermore,
umap,
uwot,
viridis
Suggests:
Biobase,
caret,
CytofRUV,
CytoNorm,
devtools,
EnhancedVolcano,
exactextractr,
FNN,
ggpointdensity,
factoextra,
gtools,
tidygraph,
ggraph,
stringr,
rsvd,
irlba,
gridExtra,
formatR,
harmony,
HDF5Array,
limma,
qs,
raster,
tiff,
tidyr,
sp,
Rcpp,
rgdal,
rgeos,
rhdf5,
Rphenograph,
s2,
Seurat,
SeuratObject,
sf,
SingleCellExperiment,
sp,
stars,
qs,
s2,
exactextractr,
RoxygenNote: 7.2.3
testthat (>= 3.0.0),
tiff,
usethis
Config/testthat/edition: 3
Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

export()
export(adjust.files)
export(check.files)
export(create.dt)
export(create.stats)
export(create.sumtable)
Expand Down
27 changes: 27 additions & 0 deletions R/adjust.files.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#' adjust.files
#'
#' @param dat List of data.tables, typically one per 'sample'
#' @param colnames.table A data.table of column names. First column contains the current names, second column contains the new names to update to.
#'
#' @export

adjust.files <- function(dat, colnames.table){

new.names <- colnames.table

for(a in names(dat)){
# a <- names(dat)[1]

for(i in c(1:nrow(new.names))){
# i <- 1
old <- new.names[i,1][[1]]
new <- new.names[i,2][[1]]

if(length(which(names(dat[[a]]) == old)) == 1){
names(dat[[a]])[which(names(dat[[a]]) == old)] <- new
}
}
}

return(dat)
}
77 changes: 77 additions & 0 deletions R/check.files.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
#' check.files
#'
#' @param dat List of data.tables, typically one per 'sample'
#'
#' @export

check.files <- function(dat){

###

files <- names(dat)

file.table <- data.table('FileName' = files)
setorderv(file.table, "FileName")
file.table

colcheck.list <- list()
colname.list <- list()

###

for(i in files){
colcheck.list[[i]] <- dat[[i]][1,]
colname.list[[i]] <- names(dat[[i]])
}

colcheck.list
colname.list

### Condensing column check data

colcheck.dat <- rbindlist(colcheck.list, fill = TRUE)
colcheck.dat <- as.data.table(!is.na(colcheck.dat))
colcheck.dat

### Condensing column names summary

all.colnames <- unique(unlist(colname.list))
all.colnames

colnames.summary <- list()

for(a in all.colnames){
# a <- all.colnames[1]
colnames.summary[[a]] <- length(which(colcheck.dat[[a]]))
}

colnames.summary <- rbindlist(list(colnames.summary))
colnames.summary

###

colcheck.dat$FileName <- files
colcheck.dat

### Making colname table

colname.table <- data.table('Column name' = all.colnames, 'New name' = all.colnames)
colname.table

### Condensing test data

tempdat <- rbindlist(dat, fill = TRUE)
tempdat

### Output

res <- list('Column check' = colcheck.dat,
'Column summary' = colnames.summary,
'All column names' = all.colnames,
'Column name table' = colname.table,
'Test data' = tempdat)

### Return

return(res)
}
Loading

0 comments on commit f7ba966

Please sign in to comment.