Skip to content

Commit

Permalink
updates, inherits changes
Browse files Browse the repository at this point in the history
  • Loading branch information
evanbiederstedt committed Sep 4, 2022
1 parent 87c13eb commit 61d0004
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## Upcoming

## [1.4.7] - 2022-04-Sept
- Fixes for Matrix, updated versions 1.4.2, 1.5.0
- Use `inherits()` for conditionals with class()


## [1.4.6] - 2022-30-March

- Fixed bug with `snn` argument in `buildGraph()` due to the parameter `snn.k.self`
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: conos
Title: Clustering on Network of Samples
Version: 1.4.6
Version: 1.4.7
Authors@R: c(person("Viktor","Petukhov", email="[email protected]", role="aut"), person("Nikolas","Barkas", email="[email protected]", role="aut"), person("Peter", "Kharchenko", email = "[email protected]", role = "aut"), person("Weiliang", "Qiu", email = "[email protected]", role = c("ctb")), person("Evan", "Biederstedt", email="[email protected]", role=c("aut", "cre")))
Description: Wires together large collections of single-cell RNA-seq datasets, which allows for both the identification of recurrent cell clusters and the propagation of information between datasets in multi-sample or atlas-scale collections. 'Conos' focuses on the uniform mapping of homologous cell types across heterogeneous sample collections. For instance, users could investigate a collection of dozens of peripheral blood samples from cancer patients combined with dozens of controls, which perhaps includes samples of a related tissue such as lymph nodes. This package interacts with data available through the 'conosPanel' package, which is available in a 'drat' repository. To access this data package, see the instructions at <https://github.com/kharchenkolab/conos>. The size of the 'conosPanel' package is approximately 12 MB.
License: GPL-3
Expand Down
8 changes: 4 additions & 4 deletions R/de_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ validatePerCellTypeParams <- function(con.obj, groups, sample.groups, ref.level,
if (is.null(ref.level)) stop('reference level is not defined')
## todo: check samplegrousp are named
if(is.null(names(sample.groups))) stop('sample.groups must be named')
if(class(groups) != 'factor') stop('groups must be a factor')
if(!inherits(groups,'factor')) stop('groups must be a factor')
if(any(grepl(cluster.sep.chr, names(con.obj$samples),fixed=TRUE)))
stop('cluster.sep.chr must not be part of any sample name')
if(any(grepl(cluster.sep.chr,levels(groups),fixed=TRUE)))
Expand All @@ -47,10 +47,10 @@ validateBetweenCellTypeParams <- function(con.obj, groups, sample.groups, refgro
stop("You have to install DESeq2 package to use differential expression")
}

if (class(con.obj) != 'Conos') stop('con.obj must be a conos object')
if (!inherits(con.obj,'Conos')) stop('con.obj must be a conos object')
if (is.null(groups) ) stop('groups must be specified');
if (is.null(sample.groups) ) stop('sample.groups must be specified')
if (class(sample.groups) != 'list' ) stop('sample.groups must be a list');
if (!inherits(sample.groups,'list')) stop('sample.groups must be a list');
#if ( length(sample.groups) != 2 ) stop('sample.groups must be of length 2');
if (!all(unlist(lapply(sample.groups, function(x) class(x) == 'character'))) )
stop('sample.groups must be a list of character vectors');
Expand All @@ -62,7 +62,7 @@ validateBetweenCellTypeParams <- function(con.obj, groups, sample.groups, refgro
if (is.null(altgroup)) stop('altgroup is not defined')
## todo: check samplegrousp are named
if(is.null(names(sample.groups))) stop('sample.groups must be named')
if(class(groups) != 'factor') stop('groups must be a factor')
if(!inherits(groups,'factor')) stop('groups must be a factor')
if(any(grepl(cluster.sep.chr, names(con.obj$samples),fixed=TRUE)))
stop('cluster.sep.chr must not be part of any sample name')
if(any(grepl(cluster.sep.chr,levels(groups),fixed=TRUE)))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,5 @@ The R package can be cited as:
```
Viktor Petukhov, Nikolas Barkas, Peter Kharchenko, and Evan
Biederstedt (2021). conos: Clustering on Network of Samples. R
package version 1.4.6.
package version 1.4.7.
```

0 comments on commit 61d0004

Please sign in to comment.