Skip to content

Commit

Permalink
Merge pull request #194 from ImmuneDynamics/v1.2.0-beta
Browse files Browse the repository at this point in the history
Updating v1.1.0 to v1.2.0
  • Loading branch information
ghar1821 committed Jul 19, 2024
2 parents d0dd8d4 + 6454308 commit ff5314f
Show file tree
Hide file tree
Showing 418 changed files with 3,838 additions and 2,973,592 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^.*\.Rproj$
^\.Rproj\.user$
^\.github$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
52 changes: 52 additions & 0 deletions .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, introduce_ci]
pull_request:
branches: [main, master]

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
# leave this out for now as it can take too long.
# - {os: ubuntu-latest, r: 'release'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
dependencies: '"hard"'
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: false
args: 'c("--no-examples", "--no-manual", "--no-build-vignettes")'
build_args: 'c("--no-manual")'
error-on: '"error"'
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 = "[email protected]", role = c("aut", "cre")),
person(given = "Felix", family = "Marsh-Wakefield", email = "[email protected]", role = "aut"),
person(given = "Givanna", family = "Putri", email = "[email protected]", role = "aut")
person("Thomas", "Ashhurst", , "[email protected]", role = c("aut", "cre")),
person("Felix", "Marsh-Wakefield", , "[email protected]", role = "aut"),
person("Givanna", "Putri", , "[email protected]", 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()` + file LICENSE
URL: https://github.com/ImmuneDynamics/Spectre
BugReports: https://github.com/ImmuneDynamics/Spectre/issues
Maintainer: Thomas Ashhurst <[email protected]>
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
11 changes: 5 additions & 6 deletions 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 All @@ -14,7 +15,6 @@ export(do.calculate.area)
export(do.clip)
export(do.combine.cols)
export(do.create.outlines)
export(do.embed.columns)
export(do.extract)
export(do.extract.cell.dat)
export(do.filter)
Expand All @@ -30,11 +30,12 @@ export(do.rescale)
export(do.stats)
export(do.subsample)
export(do.zscore)
export(fast.colour.plot)
export(fast.multi.plot)
export(fftRtsne)
export(make.autograph)
export(make.colour.plot)
export(make.multi.plot)
export(make.network.plot)
export(make.pheatmap)
export(make.spatial.plot)
export(make.volcano.plot)
Expand All @@ -45,24 +46,22 @@ export(prep.cytonorm)
export(read.files)
export(read.spatial.files)
export(run.align)
export(run.chronoclust)
export(run.cytonorm)
export(run.fitsne)
export(run.flowsom)
export(run.harmony)
export(run.knn.classifier)
export(run.pca)
export(run.phenograph)
export(run.prepare.chronoclust)
export(run.rpca)
export(run.ruv)
export(run.spatial.analysis)
export(run.tsne)
export(run.umap)
export(spatial)
export(train.cytonorm)
export(train.knn.classifier)
export(write.files)
export(write.hdf5)
export(write.sumtables)
exportClasses(spatial)
import(data.table)
9 changes: 4 additions & 5 deletions R/BatchAdjust.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#' BatchAdjust
#'
#' Functions provided for BatchAdjust
#'
#' @export
# BatchAdjust
#
# Functions provided for BatchAdjust
#

######## Version from https://github.com/i-cyto/CytofBatchAdjust/edit/master/BatchAdjust.R to allow on windows

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 ff5314f

Please sign in to comment.