Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
^.*\.{jpeg,png,gif,tiff}$
.cicd-env
^LICENSE.md
^CRAN-SUBMISSION$
^\.Rcheck$
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
.RData
*.Rproj*
.Rproj.user
*CRAN-SUBMISSION*
..Rcheck
15 changes: 8 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
Package: iSubGen
Title: Integrative Subtype Generation
Version: 1.0.4
Date: 2026-01-20
Version: 1.1.0
Date: 2026-01-21
Authors@R: c(
person("Mao Tian", role = "cre", email = "[email protected]"),
person("Paul Boutros", role = "aut"),
person("Natalie Fox", role = "aut"),
person("Dan Knight", role = "ctb"))
person("Natalie", "Fox", role = "aut"),
person("Paul", "Boutros", role = "aut"),
person("Mao", "Tian", email = "[email protected]", role = c("cre", "ctb")),
person("Dan", "Knight", role = "ctb")
)
Description: Multi-data type subtyping, which is data type agnostic and accepts missing data. Subtyping is performed using intermediary assessments created with autoencoders and similarity calculations.
Depends: R (>= 3.2.3)
Imports: ConsensusClusterPlus, cluster (>= 1.14.4), keras, tensorflow, philentropy
Imports: ConsensusClusterPlus, cluster (>= 1.14.4), keras3, tensorflow, philentropy
Suggests: knitr, rmarkdown
Remotes:
bioc::ConsensusClusterPlus
Expand Down
2 changes: 1 addition & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ importFrom("grDevices", "colorRampPalette");
importFrom("cluster","diana");
importFrom("ConsensusClusterPlus","ConsensusClusterPlus","calcICL");
importFrom("philentropy","distance");
import(tensorflow, keras);
import(tensorflow, keras3);
3 changes: 2 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# iSubGen 1.0.4 (2026-01-20)
# iSubGen 1.1.0 (2026-01-21)

## Changed
* Update maintainer information and email
* Update `keras` package to `keras3`

# iSubGen 1.0.3 (2025-06-18)

Expand Down
2 changes: 1 addition & 1 deletion R/create.autoencoder.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ create.autoencoder <- function(
optimizer = 'adam'
);

ae.output.file <- paste0(sub('/$','',model.file.output.dir),'/',data.type,'_model.hdf5');
ae.output.file <- paste0(sub('/$','',model.file.output.dir),'/',data.type,'_model.keras');
checkpoint <- callback_model_checkpoint(
filepath = ae.output.file,
save_best_only = TRUE,
Expand Down
6 changes: 3 additions & 3 deletions R/create.autoencoder.irf.matrix.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ create.autoencoder.irf.matrix <- function(
if (data.type %in% names(autoencoders)) {
# load the neural net for the data.type
model <- autoencoders[[data.type]];
if (is.character(autoencoders[[data.type]]) && grep('hdf5$',autoencoders[[data.type]]) == 1) {
model <- load_model_hdf5(
if (is.character(autoencoders[[data.type]]) && grep('keras$',autoencoders[[data.type]]) == 1) {
model <- load_model(
autoencoders[[data.type]],
compile = FALSE);
}

# create the autoencoder encoding layers from input to the bottleneck layer
intermediate.layer.model <- keras_model(inputs = model$input, outputs = get_layer(model, 'bottleneck')$output);
intermediate.layer.model <- keras_model(inputs = model$inputs, outputs = get_layer(model, 'bottleneck')$output);

# get the bottleneck values from the autoencoder
bottleneck.values <- predict(intermediate.layer.model,x = t(data.matrices[[data.type]]));
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ The first step is to load the data. Here the genomic features are rows and patie
```{r load-data}
# Load the library and the data included with the package
library(iSubGen);
library(tensorflow);
library(keras3);
library(reticulate);

molecular.data <- list();
for(i in c('cna','methy','snv')) {
molecular.data[[i]] <- load.molecular.aberration.data(
Expand Down Expand Up @@ -72,7 +76,7 @@ A benefit of using autoencoders for compressing features is that autoencoders ca
### Create independent reduced features (IRFs)

We create autoencoders individually for each data type.
The create.autoencoder function is a wrapper function to create an autoencoder using the [keras](https://cran.r-project.org/package=keras) package.
The create.autoencoder function is a wrapper function to create an autoencoder using the [keras3](https://cran.r-project.org/package=keras3) package.
Here we create two compressed features for the CNA feature set and one compressed feature for each of the SNV and methylation feature sets.

```{r ae-matrix}
Expand Down Expand Up @@ -231,7 +235,7 @@ IRF: Independent Reduced Features.

iSubGen: integrative Subtype Generation. This tool!

Keras R package: [https://cran.r-project.org/package=keras](https://cran.r-project.org/package=keras)
keras3 R package: [https://cran.r-project.org/package=keras3](https://cran.r-project.org/package=keras3)

Methylation: a DNA modification where methyl groups of are added to cytosines in DNA to help regulate DNA transcription.

Expand Down
10 changes: 5 additions & 5 deletions man/create.autoencoder.Rd
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
\name{create.autoencoder}
\alias{create.autoencoder}
\title{Create an autoencoder for dimensionality reduction}
\description{Create an autoencoder for dimensionality reduction using keras and tensorflow packages}
\description{Create an autoencoder for dimensionality reduction using keras3 and tensorflow packages}
\usage{
create.autoencoder(data.type, data.matrix, encoder.layers.node.nums = c(15,2),
autoencoder.activation = 'tanh', optimization.loss.function = 'mean_squared_error',
autoencoder.activation = 'tanh', optimization.loss.function = 'mean_squared_error',
model.file.output.dir = '.')
}
\arguments{
\item{data.type}{data type ID. The ID will be used for naming the output file}
\item{data.matrix}{matrix with data features as rows and patients as columns}
\item{encoder.layers.node.nums}{vector with the number of nodes for each layer when the reducing the feature dimensions within the autoencoder. The autoencoder will be made symmetrically so the number of nodes in each layer will be used in reverse, not repeating the last layer to re encode the features in the autoencoder}
\item{encoder.layers.node.nums}{vector with the number of nodes for each layer when the reducing the feature dimensions within the autoencoder. The autoencoder will be made symmetrically so the number of nodes in each layer will be used in reverse, not repeating the last layer to re encode the features in the autoencoder}
\item{autoencoder.activation}{activation function to use in the autoencoder}
\item{optimization.loss.function}{loss function used for optimization while fitting the autoencoder}
\item{model.file.output.dir}{file location for the autoencoder file}
}
\value{
\item{autoencoder}{the autoencoder created by the keras package}
\item{autoencoder.file}{the hdf5 file that the model was saved in and can be loaded from}
\item{autoencoder}{the autoencoder created by the keras3 package}
\item{autoencoder.file}{the keras file that the model was saved in and can be loaded from}
}
\author{Natalie Fox}
\examples{
Expand Down
2 changes: 1 addition & 1 deletion metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Description: 'Multi-data type subtyping, which is data type agnostic and accepts
Maintainers: '[email protected]'
Contributors: ['Natalie Fox', 'Paul C. Boutros', 'Mao Tian']
Languages: 'R'
Dependencies: ['ConsensusClusterPlus', 'cluster', 'keras', 'tensorflow', 'philentropy']
Dependencies: ['ConsensusClusterPlus', 'cluster', 'keras3', 'tensorflow', 'philentropy']
References: 'Fox, Natalie S., Mao Tian, Alexander L. Markowitz, Syed Haider, Constance H. Li, and Paul C. Boutros. “iSubGen Generates Integrative Disease Subtypes by Pairwise Similarity Assessment.” Cell Reports Methods 4, no. 11 (2024): 100884. https://doi.org/10.1016/j.crmeth.2024.100884.'
7 changes: 5 additions & 2 deletions vignettes/iSubGenGuide.Rnw
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ The first step is to load the data. Here the genomic features are rows and patie
<<load-data, eval = FALSE>>=
# Load the library and the data included with the package
library(iSubGen);
library(tensorflow);
library(keras3);
library(reticulate);
molecular.data <- list();
for (i in c('cna','methy','snv')) {
molecular.data[[i]] <- load.molecular.aberration.data(
Expand Down Expand Up @@ -128,7 +131,7 @@ A benefit of using autoencoders for compressing features is that autoencoders ca
\subsection{Create independent reduced features (IRFs)}

We create autoencoders individually for each data type.
The create.autoencoder function is a wrapper function to create an autoencoder using the \href{https://cran.r-project.org/package=keras}{keras} package.
The create.autoencoder function is a wrapper function to create an autoencoder using the \href{https://cran.r-project.org/package=keras3}{keras3} package.
Here we create two compressed features for the CNA feature set and one compressed feature for each of the SNV and methylation feature sets.

<<ae-matrix, eval = FALSE>>=
Expand Down Expand Up @@ -276,7 +279,7 @@ DNA segments can be deleted so there are less than 2 copies. \\

\noindent \textbf{iSubGen:} integrative Subtype Generation. This tool!\\

\noindent \textbf{Keras R package:} \url{https://cran.r-project.org/package=keras} \\
\noindent \textbf{keras3 R package:} \url{https://cran.r-project.org/package=keras3} \\

\noindent \textbf{Methylation:} a DNA modification where methyl groups of are added to cytosines in DNA to help regulate DNA transcription. \\

Expand Down