Skip to content

Commit 76a4362

Browse files
committed
Initial release of MOSAIC R package
Multi-Omic Sample-wise Analysis of Inter-feature Connectivity. Implements spectral co-embedding for 1-3 modalities, per-feature PERMANOVA-based differential connectivity testing, disease subgroup detection, and multi-modal simulation framework.
0 parents  commit 76a4362

82 files changed

Lines changed: 26427 additions & 0 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.

.Rbuildignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$
3+
^LICENSE\.md$
4+
^README\.Rmd$
5+
^_pkgdown\.yml$
6+
^docs$
7+
^pkgdown$
8+
^_pkgdown\.yml$
9+
^\.github$

.github/workflows/pkgdown.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
on:
2+
push:
3+
branches: [main]
4+
workflow_dispatch:
5+
6+
name: pkgdown
7+
8+
permissions:
9+
contents: write
10+
pages: write
11+
12+
jobs:
13+
pkgdown:
14+
runs-on: ubuntu-latest
15+
env:
16+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: r-lib/actions/setup-r@v2
21+
with:
22+
use-public-rspm: true
23+
24+
- uses: r-lib/actions/setup-r-dependencies@v2
25+
with:
26+
extra-packages: any::pkgdown
27+
needs: website
28+
29+
- name: Build site
30+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
31+
shell: Rscript {0}
32+
33+
- name: Deploy to GitHub pages
34+
uses: JamesIves/github-pages-deploy-action@v4
35+
with:
36+
clean: false
37+
branch: gh-pages
38+
folder: docs

DESCRIPTION

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
Package: MOSAIC
2+
Title: Multi-Omic Sample-Wise Analysis of Inter-Feature Connectivity
3+
Version: 1.0.0
4+
Authors@R: c(
5+
person("Chang", "Lu", email = "chang.lu@yale.edu", role = c("aut", "cre")),
6+
person("Rong", "Ma", email = "rongma@hsph.harvard.edu", role = "aut"),
7+
person("Yuval", "Kluger", email = "yuval.kluger@yale.edu", role = "aut")
8+
)
9+
Description: MOSAIC (Multi-Omic Sample-wise Analysis of Inter-feature
10+
Connectivity) is a spectral framework that learns a high-resolution
11+
feature-by-sample joint embedding from population-scale single-cell
12+
multi-omics data. For each individual, MOSAIC constructs a sample-specific
13+
coupling matrix capturing complete intra- and cross-modality feature
14+
interactions, then projects all samples into a shared latent space via
15+
spectral integration. The resulting embedding represents each feature by its
16+
connectivity profile relative to all other features, enabling direct
17+
comparison of regulatory network topology across individuals. MOSAIC supports
18+
differential connectivity analysis, unsupervised subgroup detection, and
19+
clinical outcome prediction.
20+
License: MIT + file LICENSE
21+
Encoding: UTF-8
22+
Roxygen: list(markdown = TRUE)
23+
RoxygenNote: 7.3.2
24+
Imports:
25+
Seurat (>= 5.0),
26+
Matrix,
27+
RSpectra,
28+
ggplot2,
29+
rlang,
30+
methods,
31+
parallel,
32+
doParallel,
33+
foreach,
34+
vegan,
35+
cluster,
36+
RColorBrewer
37+
Suggests:
38+
transport,
39+
testthat (>= 3.0.0),
40+
knitr,
41+
rmarkdown
42+
VignetteBuilder: knitr
43+
URL: https://github.com/KlugerLab/MOSAIC
44+
BugReports: https://github.com/KlugerLab/MOSAIC/issues

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2025
2+
COPYRIGHT HOLDER: Chang Lu

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2025 Chang Lu
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

NAMESPACE

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Generated by roxygen2: do not edit by hand
2+
3+
export(cal_peranova_per_feature_parallel_no_zero)
4+
export(calculate_empirical_pvalue)
5+
export(compute_module_similarity)
6+
export(find_elbow_kneedle)
7+
export(find_partition_hclust)
8+
export(generate_svd_simulated_data)
9+
export(plot_eigen)
10+
export(plot_mds_cluster)
11+
export(run_MOSAIC)
12+
importFrom(Matrix,Matrix)
13+
importFrom(RColorBrewer,brewer.pal)
14+
importFrom(RSpectra,eigs_sym)
15+
importFrom(Seurat,AddMetaData)
16+
importFrom(Seurat,CreateSeuratObject)
17+
importFrom(Seurat,DefaultAssay)
18+
importFrom(Seurat,ScaleData)
19+
importFrom(Seurat,SplitObject)
20+
importFrom(cluster,silhouette)
21+
importFrom(doParallel,registerDoParallel)
22+
importFrom(foreach,`%dopar%`)
23+
importFrom(foreach,foreach)
24+
importFrom(ggplot2,aes)
25+
importFrom(ggplot2,element_text)
26+
importFrom(ggplot2,geom_point)
27+
importFrom(ggplot2,ggplot)
28+
importFrom(ggplot2,labs)
29+
importFrom(ggplot2,scale_color_manual)
30+
importFrom(ggplot2,scale_fill_manual)
31+
importFrom(ggplot2,stat_ellipse)
32+
importFrom(ggplot2,theme)
33+
importFrom(ggplot2,theme_classic)
34+
importFrom(ggplot2,theme_minimal)
35+
importFrom(methods,as)
36+
importFrom(parallel,clusterExport)
37+
importFrom(parallel,detectCores)
38+
importFrom(parallel,makeCluster)
39+
importFrom(parallel,stopCluster)
40+
importFrom(rlang,.data)
41+
importFrom(stats,aggregate)
42+
importFrom(stats,as.dist)
43+
importFrom(stats,cmdscale)
44+
importFrom(stats,cor)
45+
importFrom(stats,cutree)
46+
importFrom(stats,dist)
47+
importFrom(stats,hclust)
48+
importFrom(stats,kmeans)
49+
importFrom(stats,median)
50+
importFrom(stats,p.adjust)
51+
importFrom(stats,rnorm)
52+
importFrom(vegan,adonis2)

R/MOSAIC-package.R

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#' @keywords internal
2+
"_PACKAGE"
3+
4+
#' @importFrom Seurat ScaleData SplitObject DefaultAssay CreateSeuratObject AddMetaData
5+
#' @importFrom RSpectra eigs_sym
6+
#' @importFrom Matrix Matrix
7+
#' @importFrom ggplot2 ggplot aes geom_point theme_minimal theme_classic labs theme
8+
#' element_text stat_ellipse scale_color_manual scale_fill_manual
9+
#' @importFrom rlang .data
10+
#' @importFrom methods as
11+
#' @importFrom parallel detectCores makeCluster stopCluster clusterExport
12+
#' @importFrom doParallel registerDoParallel
13+
#' @importFrom foreach foreach `%dopar%`
14+
#' @importFrom vegan adonis2
15+
#' @importFrom cluster silhouette
16+
#' @importFrom RColorBrewer brewer.pal
17+
#' @importFrom stats cmdscale cor dist hclust cutree kmeans median rnorm
18+
#' p.adjust aggregate as.dist
19+
NULL

0 commit comments

Comments
 (0)