Skip to content

Commit 9585358

Browse files
Merge pull request #9 from lorenzobonaguro/dev
Update to version 0.2.0
2 parents 7b772a2 + 62cdb5d commit 9585358

103 files changed

Lines changed: 1348 additions & 1082 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rhistory

Lines changed: 505 additions & 505 deletions
Large diffs are not rendered by default.

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: cyCONDOR
22
Type: Package
33
Title: Flow Cytometry data analysis toolbox
4-
Version: 0.1.6
4+
Version: 0.2.0
55
Authors@R: c(
66
person(given = "Lorenzo", family = "Bonaguro", email = "lorenzo.bonaguro@dzne.de", role = c("aut", "cre")),
77
person(given = "Charlotte", family = "Kroeger", email = "charlotte.kroeger@dzne.de", role = "aut"),

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export(run_cytonorm)
5353
export(runtSNE)
5454
export(scaleColors)
5555
export(subset_fcd)
56+
export(subset_fcd_byparam)
5657
export(train_classifier_model)
5758
export(train_cytonorm)
5859
export(train_transfer_model)

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# cyCONDOR 0.2.0
2+
* Bump of major version for official release and publication
3+
* Changed order of events in the `prep_fcd` function. This makes the process faster (especially in smaller machines) and reduces the usage of memory.
4+
* Added function `subset_fcd_byparam`. This function allows to randomly subset a `condor` object proportionally across a selected parameter. For example is not possible to randomly subset `n` cells from each samples.
5+
* Included more professionalization in the `read_fcd` function. This allows the user to customize few aspects of the `condor` object
6+
* Included `cyCONDOR` version in the `condor` object under the `extras` slot. This enables the user to trace the version used for the analysis.
7+
18
# cyCONDOR 0.1.6
29

310
* Reorganization of existing visualization functions including harmonization of function names and function arguments, utilization of `condor` object as main input object and addition of more extensive documentation and error messages.

R/data_load_and_transform.R

Lines changed: 183 additions & 67 deletions
Large diffs are not rendered by default.

R/misc.R

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ filter_fcd <- function(fcd, cell_ids) {
8585

8686
}
8787

88+
class(new_fcd) <- "flow_cytometry_dataframe"
89+
8890
return(new_fcd)
8991

9092
}
@@ -257,6 +259,53 @@ subset_fcd <- function(fcd, size, seed = 91) {
257259
return(condor_filter)
258260
}
259261

262+
#' subset_fcd_byparam
263+
#'
264+
#' @title subset_fcd_byparam
265+
#' @description Performs a random subset of the fcd
266+
#'
267+
#' @param fcd flow cytometry dataset.
268+
#' @param param Name of the parameter to be used to equaly subset the fcd. This should be a columns in the cell annotation table.
269+
#' @param size Numeric: size of the sub-sampling for each element in `param`.
270+
#' @param seed A seed is set for reproducibility.
271+
#'
272+
#' @return subset_fcd_byparam
273+
#'
274+
#' @export
275+
subset_fcd_byparam <- function(fcd,
276+
param,
277+
size,
278+
seed = 91) {
279+
280+
# Store the annotation and prepare a container
281+
282+
anno <- fcd$anno$cell_anno
283+
284+
selected_cells <- c()
285+
286+
# Define the cell IDs to keep
287+
288+
for (single_param in unique(fcd$anno$cell_anno[[param]])) {
289+
290+
set.seed(seed)
291+
292+
single_param_cells <- sample(x = rownames(anno[anno[[param]] == single_param,]),
293+
size = size,
294+
replace = F)
295+
296+
selected_cells <- c(selected_cells, single_param_cells)
297+
298+
}
299+
300+
# Filter the fcd
301+
302+
fcd_filter <- filter_fcd(fcd = fcd,
303+
cell_ids = selected_cells)
304+
305+
# return the filtered object
306+
return(fcd_filter)
307+
308+
}
260309

261310
#' df_frequency
262311
#'

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ We developed an easy-to-use computational framework (condor) covering not only a
99

1010
**You can find the detailed documentation of cyCONDOR [here](https://lorenzobonaguro.github.io/cyCONDOR/)**
1111

12-
We recommend using `cyCONDOR` from our pre-build `Docker` container [lorenzobonaguro/condor](https://hub.docker.com/r/lorenzobonaguro/condor), the latest version of the image can be pulled with:
12+
We recommend using `cyCONDOR` from our pre-build `Docker` container [lorenzobonaguro/cycondor](https://hub.docker.com/r/lorenzobonaguro/cycondor), the latest version of the image can be pulled with:
1313
```
14-
docker pull lorenzobonaguro/cycondor:v016
14+
docker pull lorenzobonaguro/cycondor:v020
1515
```
1616

1717
To run the image you can then follow the following script
@@ -21,7 +21,7 @@ docker run -dp [YOURPORT]:8787 \
2121
-e USER=[YOURUSERNAME] -e PASSWORD=[YOURPASSWORD] \
2222
--name condor_analysis \
2323
-v [PATHTODATA]:/home/[YOURUSERNAME]/data/ \
24-
lorenzobonaguro/cycondor:v016
24+
lorenzobonaguro/cycondor:v020
2525
```
2626
You can then access RStudio from your web browser at the address
2727

@@ -57,7 +57,7 @@ devtools::install_github(repo = c("JinmiaoChenLab/Rphenograph", "stuchly/Rphenoa
5757

5858
Finally we install cyCONDOR, here we manually provide the link to the Bioconductor repositories.
5959
```
60-
devtools::install_url("https://github.com/lorenzobonaguro/cyCONDOR/releases/download/v016/cyCONDOR_0.1.6.tar.gz",
60+
devtools::install_url("https://github.com/lorenzobonaguro/cyCONDOR/releases/download/v020/cyCONDOR_0.2.0.tar.gz",
6161
repos = BiocManager::repositories())
6262
```
6363

@@ -110,3 +110,5 @@ follow me:
110110
<img src="man/figures/twitter.png" width="8%" style="float: left;"/>
111111

112112
[@LorenzoBonaguro](<https://twitter.com/LorenzoBonaguro>)
113+
114+
If you want to directly chat with us join our [Slack Workspace](https://join.slack.com/t/cycondor/shared_invite/zt-2keb5ztaa-0aNKxP3OCglOTUiXDrtkhg)

_pkgdown.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ reference:
9595
- filter_fcd
9696
- merge_condor
9797
- subset_fcd
98+
- subset_fcd_byparam
9899
- checkInput
99100
- measured_markers
100101

docs/404.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/LICENSE-text.html

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)