Skip to content
Snippets Groups Projects
Unverified Commit 6921e84d authored by Laurent Modolo's avatar Laurent Modolo
Browse files

update documentation

parent 15afe660
No related branches found
No related tags found
No related merge requests found
Pipeline #
Package: criblejurkat
Title: Analysis of FACS data for the Jurkat crible project
Type: Package
Version: 1.0.0
Version: 1.1.0
Authors@R: person("Laurent", "Modolo", email = "laurent.modolo@ens-lyon.fr",
role = c("aut", "cre"))
Description: The package provides a set of function to analyse FCS files.
......@@ -17,9 +17,10 @@ Imports:
flowWorkspace (>= 3.20),
scales (>= 0.5),
Biobase,
biglm,
methods
License: file LICENSE
LazyData: true
Suggests: testthat
RoxygenNote: 6.0.1
RoxygenNote: 6.1.0
BiocViews: CellBasedAssays, FlowCytometry, Software
# Generated by roxygen2: do not edit by hand
export(analysis)
export(anova_lm)
export(anova_rlm)
export(flowset2dataframe)
export(load_annotation)
......@@ -9,11 +10,15 @@ export(plot_column)
export(plot_line)
export(plot_well)
export(project_name)
export(remove_negatives)
export(rm_debris)
export(rm_nonfluo)
export(rm_nonsinglets)
export(set_analysis)
export(split_lm)
import(biglm)
importFrom(Biobase,AnnotatedDataFrame)
importFrom(Biobase,exprs)
importFrom(MASS,boxcox)
importFrom(MASS,psi.huber)
importFrom(MASS,rlm)
......@@ -21,12 +26,15 @@ importFrom(flowClust,flowClust)
importFrom(flowClust,getEstimates)
importFrom(flowClust,plot)
importFrom(flowClust,split)
importFrom(flowCore,colnames)
importFrom(flowCore,exprs)
importFrom(flowCore,pData)
importFrom(flowCore,phenoData)
importFrom(flowCore,read.flowSet)
importFrom(flowCore,sampleNames)
importFrom(flowCore,transform)
importFrom(flowCore,transformList)
importFrom(flowCore,truncateTransform)
importFrom(flowWorkspace,GatingSet)
importFrom(flowWorkspace,flowJo_biexp_trans)
importFrom(flowWorkspace,getData)
......
......@@ -121,13 +121,14 @@ batch_effect <- function(data) {
#' @param data a data.frame
#' @param formula (default: "ratio ~ drug + batch") the formula of the model
#' @param lower (default: TRUE) tests if "y" (the ratio) is lower than in controls
#' @param chunk (default: 20000) size of data chunk to do the computation on
#' @param outdir set the outdir directory to a path (default extracted from fcs)
#' @return a data.frame
#' @examples
#' \dontrun{
#' data <- anova_lm(data)
#' }
#' @importFrom biglm
#' @import biglm
#' @importFrom grDevices dev.off pdf
#' @importFrom stats as.formula quantile
#' @export anova_lm
......@@ -154,13 +155,12 @@ anova_lm <- function(data, formula = "ratio ~ drug + batch", lower = TRUE,
#'
#' @param data a data.frame
#' @param formula (default: "ratio ~ drug + batch") the formula of the model
#' @param chunck (default: 200000) chunk size
#' @param chunk (default: 200000) chunk size
#' @return a data.frame
#' @importFrom biglm biglm
#' @import biglm
#' @importFrom stats as.formula quantile
#' @export split_lm
split_lm <- function(data, formula = "ratio ~ drug + batch", chunk = 200000) {
data_index <- seq_len(nrow(data))
data_index <- sample(data_index, nrow(data))
index_start <- 1
......@@ -209,6 +209,7 @@ anova_rlm <- function(data, formula = "ratio ~ drug + batch", lower = TRUE,
return(data)
}
#' @import biglm
#' @importFrom stats pt
compute_pval <- function(model, lower = TRUE) {
model_anova <- data.frame(coef = coef(model),
......
#' remove debris from data
#'
#' @param fcs_data an object of class flowSet
#' @param cluster_number (default: 2) number of cluster to look for
#' @return an object of class flowSet
#' @examples
#' \dontrun{
......
......@@ -38,13 +38,14 @@ set_analysis <- function(data_path = "data/", meta = F) {
#'
#' @param data_path path to folder containing the data sets
#' @param rlm_model (default: TRUE) should rlm model be use or lm ?
#' @param chunk (default: 20000) size of data chunk to do the computation on for lm
#' @return TRUE if everythings ran correclty
#' @examples
#' \dontrun{
#' analysis("data/set_test")
#' }
#' @export analysis
analysis <- function(data_path = "data/", rlm_model = TRUE) {
analysis <- function(data_path = "data/", rlm_model = TRUE, chunk = 20000) {
if (base::file.info(data_path)$isdir) {
set_folders <- list.dirs(data_path, full.names = F)[-1]
} else {
......@@ -102,7 +103,7 @@ analysis <- function(data_path = "data/", rlm_model = TRUE) {
outdir = outdir_rlm)
} else {
data <- anova_lm(data, formula = "ratio ~ drug + batch + set",
outdir = outdir_rlm)
outdir = outdir_rlm, chunk = chunk)
}
for (folder in set_folders) {
message(paste0("plotting for ", folder))
......
......@@ -4,10 +4,14 @@
\alias{analysis}
\title{perform all the analysis for a set of data sets}
\usage{
analysis(data_path = "data/")
analysis(data_path = "data/", rlm_model = TRUE, chunk = 20000)
}
\arguments{
\item{data_path}{path to folder containing the data sets}
\item{rlm_model}{(default: TRUE) should rlm model be use or lm ?}
\item{chunk}{(default: 20000) size of data chunk to do the computation on for lm}
}
\value{
TRUE if everythings ran correclty
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anova.R
\name{anova_lm}
\alias{anova_lm}
\title{build lm model between drugs accounting for batch effect}
\usage{
anova_lm(data, formula = "ratio ~ drug + batch", lower = TRUE, outdir,
chunk = 20000)
}
\arguments{
\item{data}{a data.frame}
\item{formula}{(default: "ratio ~ drug + batch") the formula of the model}
\item{lower}{(default: TRUE) tests if "y" (the ratio) is lower than in controls}
\item{outdir}{set the outdir directory to a path (default extracted from fcs)}
\item{chunk}{(default: 20000) size of data chunk to do the computation on}
}
\value{
a data.frame
}
\description{
build lm model between drugs accounting for batch effect
}
\examples{
\dontrun{
data <- anova_lm(data)
}
}
......@@ -2,7 +2,7 @@
% Please edit documentation in R/anova.R
\name{anova_rlm}
\alias{anova_rlm}
\title{build rm model between drugs accounting for batch effect}
\title{build rlm model between drugs accounting for batch effect}
\usage{
anova_rlm(data, formula = "ratio ~ drug + batch", lower = TRUE, outdir)
}
......@@ -19,7 +19,7 @@ anova_rlm(data, formula = "ratio ~ drug + batch", lower = TRUE, outdir)
a data.frame
}
\description{
build rm model between drugs accounting for batch effect
build rlm model between drugs accounting for batch effect
}
\examples{
\dontrun{
......
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/anova.R
\name{split_lm}
\alias{split_lm}
\title{split lm model by chunck with biglm}
\usage{
split_lm(data, formula = "ratio ~ drug + batch", chunk = 2e+05)
}
\arguments{
\item{data}{a data.frame}
\item{formula}{(default: "ratio ~ drug + batch") the formula of the model}
\item{chunk}{(default: 200000) chunk size}
}
\value{
a data.frame
}
\description{
split lm model by chunck with biglm
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment