Skip to content

Commit

Permalink
still errorring god..
Browse files Browse the repository at this point in the history
  • Loading branch information
ghar1821 committed Feb 29, 2024
1 parent ff5a8bb commit 68201f3
Show file tree
Hide file tree
Showing 44 changed files with 148 additions and 495 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ jobs:

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
upload-snapshots: false
build_args: 'c("--no-manual")'
4 changes: 1 addition & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ 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,20 +44,19 @@ 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)
Expand Down
3 changes: 2 additions & 1 deletion R/create.sumtable.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
#' @examples
#' ## Calculate and export results from demonstration data
#' dat <- Spectre::demo.clustered
#' counts <- data.frame('Sample' = unique(dat[['Sample']]), 'Counts' = c(rep(100000, 6), rep(1000000, 6)))
#' counts <- data.frame('Sample' = unique(dat[['Sample']]),
#' 'Counts' = c(rep(100000, 6), rep(1000000, 6)))
#'
#' sum.dat <- create.sumtable(dat = dat,
#' sample.col = "Sample",
Expand Down
2 changes: 1 addition & 1 deletion R/do.add.masks.R
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ do.add.masks <- function(dat, # list of spatial objects

message('Reading in mask files')

if(class(dat) != 'list'){
if(!is.list(dat)){
stop("Your input data 'dat' needs to be a list of spectre spatial objects")
}

Expand Down
3 changes: 2 additions & 1 deletion R/do.align.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#'
#' This function allows you to align multiple batches of a dataset, using either a "Quantile" approach, or using "CytoNorm"
#'
#' @usage do.align(ref.dat, target.dat, batch.col, align.cols, method, goal, nQ, Qmin, Qmax, write.ref.fcs, write.target.fcs)
#' @usage do.align(ref.dat, target.dat, batch.col, align.cols, method, goal,
#' nQ, Qmin, Qmax, write.ref.fcs, write.target.fcs)
#'
#' @param ref.dat NO DEFAULT. If using method = "CytoNorm", this must be a FlowSOM object created by Spectre::do.prep.fsom. If using "Quantiles", then this must be
#' @param target.dat NO DEFAULT. A data.table of data you wish to align
Expand Down
3 changes: 2 additions & 1 deletion R/do.logicle.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
#' Value greater than 0 will bring the prescribed additional range into the transformed values
#'
#' @usage
#' do.logicle(dat, use.cols, linearisation.width, max.scale.val, full.transform.width, additional.negative.range)
#' do.logicle(dat, use.cols, linearisation.width, max.scale.val,
#' full.transform.width, additional.negative.range)
#'
#' @examples
#' library(Spectre)
Expand Down
4 changes: 3 additions & 1 deletion R/make.autograph.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#' @param max.y DEFAULT = 1.4. Multiplier for plot heigh -- allowing room for stats.
#' @param path DEFAULT = getwd(). The location to save plots. By default, will save to current working directory. Can be overidden.
#'
#' @usage make.autograph(dat, x.axis, y.axis, colour.by, colours, y.axis.label, grp.order, title, filename, scale, dot.size, width, height, path)
#' @usage make.autograph(dat, x.axis, y.axis, colour.by, colours,
#' y.axis.label, grp.order, title, filename, scale, dot.size, width,
#' height, path)
#'
#' @examples
#' dat <- data.frame(Samples = c("Mock_01", "Mock_02", "Mock_03", "WNV_01", "WNV_02", "WNV_03"),
Expand Down
5 changes: 4 additions & 1 deletion R/make.multi.plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
#' @param blank.axis DEFAULT = FALSE. Logical. Do you want a minimalist graph?
#' @param save.each.plot DEFAULT = FALSE. Logical. Do you want to save each plot?
#'
#' @usage make.multi.plot(dat, x.axis, y.axis, plot.by, divide.by, add.density, col.type, figure.title, align.xy.by, align.col.by, colours, dot.size, col.min.threshold, col.max.threshold, path, plot.width, plot.height, blank.axis, save.each.plot)
#' @usage make.multi.plot(dat, x.axis, y.axis, plot.by, divide.by, add.density,
#' col.type, figure.title, align.xy.by, align.col.by, colours, dot.size,
#' col.min.threshold, col.max.threshold, path, plot.width, plot.height,
#' blank.axis, save.each.plot)
#'
#' @examples
#' # Create grid of plots on demonstration data
Expand Down
4 changes: 3 additions & 1 deletion R/make.pheatmap.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#' @param fold.colours DEFAULT = "Spectre". Character, a custom blue:black:red fold-change colour scheme. Can also be "RdYlBu", "YlGnBu", "viridis", "magma", "inferno", "spectral", "Blues", "Reds", "Greys", or "rev(RdBu)".
#' @param path DEFAULT = NULL. The location to save plots. By default, will save to current working directory. Can be overidden by entering a sub-directory name (e.g. if you have a subdirectory under your working directory called 'plots', you can enter this here).
#'
#' @usage make.pheatmap(dat, sample.col, plot.cols, annot.cols, file.name, plot.title, transpose, is.fold, fold.range, normalise, dendrograms, row.sep, col.sep, cell.size, standard.colours, path)
#' @usage make.pheatmap(dat, sample.col, plot.cols, annot.cols, file.name,
#' plot.title, transpose, is.fold, fold.range, normalise, dendrograms,
#' row.sep, col.sep, cell.size, standard.colours, path)
#'
#' @examples
#' ## MFI cluster vs marker heatmap
Expand Down
3 changes: 2 additions & 1 deletion R/package.check.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' package.check - a function to check the installation of all required packages.
#'
#' This function allows you to check to see if all the common use packages dependencies for Spectre are installed.
#' See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#' @return returns an error message if one of the common use packages are not installed. Proceeds in order of package importance, and only the first error message encountered will be returned.
#'
Expand All @@ -10,7 +11,7 @@
#'
#' @references \url{https://sydneycytometry.org.au/spectre}
#'
#' @usage See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#'
#' @examples
#' package.check()
Expand Down
3 changes: 2 additions & 1 deletion R/package.install.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' package.install - a function to install packages required for Spectre.
#'
#' This function allows you to check to see if all the common use packages dependencies for Spectre are installed. Will only install if the package has not been installed, will not update packages.
#' See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#' @return returns an error message if one of the common use packages are not installed. Proceeds in order of package importance, and only the first error message encountered will be returned.
#'
Expand All @@ -11,7 +12,7 @@
#'
#' @references \url{https://sydneycytometry.org.au/spectre}
#'
#' @usage See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#'
#' @examples
#' package.install()
Expand Down
2 changes: 1 addition & 1 deletion R/package.load.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#' package.load - a function to load (library) all required packages.
#'
#' This function allows you to load all of the common use packages dependencies for Spectre.
#' See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#' @return loads all the common use package libraries.
#'
Expand All @@ -11,7 +12,6 @@
#'
#' @references \url{https://sydneycytometry.org.au/spectre}
#'
#' @usage See \url{https://sydneycytometry.org.au/spectre} for usage instructions and vignettes.
#'
#' @examples
#' package.load()
Expand Down
4 changes: 2 additions & 2 deletions R/read.spatial.files.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ read.spatial.files <- function(dir,
message(" -- reading single band in TIFF:", i)
tiff.list[[i]] <- raster(tiff.list[[i]])
}

if(class(tiff.list[[i]]) != 'matrix'){
if(! is.matrix(tiff.list[[i]])){
# if(class(tiff.list[[i]]) != 'matrix'){
if('array' %in% class(tiff.list[[i]])){

message(" -- merging multiple bands in TIFF:", i)
Expand Down
201 changes: 0 additions & 201 deletions R/run.chronoclust.R

This file was deleted.

19 changes: 11 additions & 8 deletions R/run.fitsne.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,17 @@
#' substructure in the embedding. See Kobak et al. (2019) for details.
#'
#' @usage
#' run.fitsne(dat, use.cols, seed = 42, fitsne.x.name = "FItSNE_X", fitsne.y.name = "FItSNE_Y",
#' dims = 2, perplexity = 30, theta = 0.5, max_iter = 750, fft_not_bh = TRUE, ann_not_vptree = TRUE,
#' stop_early_exag_iter = 250, exaggeration_factor = 12.0, no_momentum_during_exag = FALSE,
#' start_late_exag_iter = -1, late_exag_coeff = 1.0, mom_switch_iter = 250, momentum = 0.5,
#' final_momentum = 0.8, learning_rate = 'auto', n_trees = 50, search_k = -1, nterms = 3,
#' intervals_per_integer = 1, min_num_intervals = 50, K = -1, sigma = -30, initialization = 'pca',
#' max_step_norm = 5, load_affinities = NULL, fast_tsne_path = NULL, nthreads = 0,
#' perplexity_list = NULL, get_costs = FALSE, df = 1.0)
#' run.fitsne(dat, use.cols, seed = 42, fitsne.x.name = "FItSNE_X",
#' fitsne.y.name = "FItSNE_Y", dims = 2, perplexity = 30, theta = 0.5,
#' max_iter = 750, fft_not_bh = TRUE, ann_not_vptree = TRUE,
#' stop_early_exag_iter = 250, exaggeration_factor = 12.0,
#' no_momentum_during_exag = FALSE,start_late_exag_iter = -1,
#' late_exag_coeff = 1.0, mom_switch_iter = 250, momentum = 0.5,
#' final_momentum = 0.8, learning_rate = 'auto', n_trees = 50,
#' search_k = -1, nterms = 3, intervals_per_integer = 1,
#' min_num_intervals = 50, K = -1, sigma = -30, initialization = 'pca',
#' max_step_norm = 5, load_affinities = NULL, fast_tsne_path = NULL,
#' nthreads = 0, perplexity_list = NULL, get_costs = FALSE, df = 1.0)
#'
#' @examples
#' dat <- demo.clustered
Expand Down
Loading

0 comments on commit 68201f3

Please sign in to comment.