Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
keller-mark committed Sep 19, 2023
1 parent ec1e322 commit b2e30c1
Show file tree
Hide file tree
Showing 51 changed files with 4,637 additions and 0 deletions.
1 change: 1 addition & 0 deletions .BBSoptions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
UnsupportedPlatforms: win32
21 changes: 21 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
^vitessceAnalysisR\.Rproj$
^\.Rproj\.user$
^\.travis\.yml$
^\.BBSoptions$
^.github$
^package\.json$
^package-lock\.json$
^node_modules$
^img$
^webpack\.config\.js$
^inst/htmlwidgets/lib/.*$
^inst/htmlwidgets/dist/.*\.map$
^inst/testdata
^index\.md$
^LICENSE\.md$
^pkgdown$
^vignettes$
^docs$
^pkgdown$
^data$
^check$
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: Bug report
about: An existing feature does not work
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment:**
- Release or git hash:
- Operating system:
- R version:
- RStudio version:
14 changes: 14 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: feature
assignees: ''

---

**User story**

**Preferred solution**

**Possible alternatives**
95 changes: 95 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: R

on: [push, pull_request]

permissions:
contents: read
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-22.04
env:
cache-version: 8
steps:
- uses: actions/checkout@v3
- name: Set up libraries for Ubuntu
run: |
sudo apt-get update
sudo apt-get install -y libsodium-dev libharfbuzz-dev libfribidi-dev libcurl4-openssl-dev texlive-latex-base texlive-fonts-extra pandoc libmagick++-dev libhdf5-dev
- name: Set up R 4.0
uses: r-lib/actions/setup-r@v2
with:
r-version: 4.0
- name: Get R and OS version
id: get-version
run: |
cat("::set-output name=os-version::", sessionInfo()$running, "\n", sep = "")
cat("::set-output name=r-version::", R.Version()$version.string, "\n", sep = "")
cat("::endgroup::\n")
shell: Rscript {0}
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}/*
key: ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-${{ env.cache-version }}-deps
- name: Install dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: |
install.packages(c("remotes", "rcmdcheck", "BiocManager", "Seurat", "covr"))
BiocManager::install("BiocCheck")
remotes::install_github(c("RubD/Giotto", "mojaveazure/seurat-disk"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
- name: rcmdcheck
run: |
rcmdcheck::rcmdcheck(
error_on = "warning",
check_dir = "check"
)
shell: Rscript {0}
env:
_R_CHECK_FORCE_SUGGESTS_: false
- name: BiocCheck
run: |
BiocCheck::BiocCheck(
dir('check', 'tar.gz$', full.names = TRUE),
`no-check-R-ver` = TRUE,
`no-check-pkg-size` = TRUE,
`no-check-vignettes` = TRUE
)
shell: Rscript {0}
env:
_R_CHECK_FORCE_SUGGESTS_: false
- name: Run covr
run: |
covr::package_coverage()
shell: Rscript {0}
- name: Downgrade pkgdown
run: |
remotes::install_version("pkgdown", "2.0.3")
shell: Rscript {0}
- name: Build docs
run: |
Rscript -e 'pkgdown::build_site(new_process = FALSE)'
touch docs/.nojekyll
- uses: actions/upload-pages-artifact@v1
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
with:
path: ./docs
deploy:
runs-on: ubuntu-22.04
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
id: deployment
uses: actions/deploy-pages@v1
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.Rproj.user
.DS_Store
.Rhistory
*.Rcheck/
*.tar.gz
node_modules/
docs/
tests/testthat/seurat/
data/
check/
vignettes/data/
*.Rproj
.RData
62 changes: 62 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
Package: vitessceAnalysisR
Type: Package
Title: Data preparation helper functions for usage with the vitessceR library.
Version: 0.99.0
Authors@R: c(
person(
given = "Mark",
family = "Keller",
email = "mark_keller@g.harvard.edu",
role = c("cre", "aut"),
comment = c(ORCID = "0000-0003-3003-874X")
)
)
Description:
The R API contains
classes and functions for loading single-cell data stored as
SingleCellExperiment, SpatialExperiment, and Seurat objects.
biocViews: SingleCell, Spatial
License: MIT + file LICENSE
BugReports: https://github.com/vitessce/vitessceAnalysisR/issues
URL: https://github.com/vitessce/vitessceAnalysisR
Encoding: UTF-8
LazyData: false
Language: en-US
StagedInstall: no
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Imports:
Matrix,
DelayedArray,
htmlwidgets,
jsonlite,
R6,
plumber,
future,
httpuv,
stringr,
reticulate,
varhandle,
tools,
stats,
methods,
S4Vectors,
grDevices,
basilisk,
zellkonverter,
SummarizedExperiment,
SingleCellExperiment,
SpatialExperiment
Suggests:
testthat,
knitr,
covr,
bslib,
pkgdown,
rmarkdown,
purrr,
rjson,
Seurat,
SeuratDisk,
Giotto
2 changes: 2 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2020
COPYRIGHT HOLDER: Gehlenborg Lab
21 changes: 21 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2020 Gehlenborg Lab

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
44 changes: 44 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Generated by roxygen2: do not edit by hand

export(AbstractWrapper)
export(Component)
export(CoordinationType)
export(DataType)
export(FileType)
export(GiottoWrapper)
export(MultiImageWrapper)
export(OmeTiffWrapper)
export(SCEWrapper)
export(SPEWrapper)
export(SeuratWrapper)
export(VitessceConfig)
export(get_giotto_obj)
export(get_sce_obj)
export(get_seurat_obj)
export(get_spe_obj)
export(giotto_to_anndata_zarr)
export(hconcat)
export(obj_list)
export(render_vitessce)
export(sce_to_anndata_zarr)
export(seurat_to_anndata_zarr)
export(spe_to_anndata_zarr)
export(spe_to_ome_zarr)
export(vconcat)
export(vitessce_output)
export(vitessce_widget)
import(R6)
import(plumber)
importFrom(SingleCellExperiment,"reducedDims<-")
importFrom(SingleCellExperiment,int_colData)
importFrom(SingleCellExperiment,reducedDims)
importFrom(SpatialExperiment,"colData<-")
importFrom(SpatialExperiment,getImg)
importFrom(SummarizedExperiment,colData)
importFrom(grDevices,as.raster)
importFrom(grDevices,col2rgb)
importFrom(methods,new)
importFrom(methods,slot)
importFrom(stats,rnorm)
importFrom(stats,rpois)
importFrom(stats,runif)
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# vitessceR 0.99.0 (2023-09-19)

* Initial Bioconductor submission

# vitessceR 0.0.0 (early development version)

28 changes: 28 additions & 0 deletions R/basilisk.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#' The Python environment
#'
#' Defines a conda environment via Basilisk, which is used
#' to convert R objects to Zarr stores.
#' This environment has been adapted from zellkonverter::.AnnDataDependencies.
#' Reference: https://bioconductor.org/packages/release/bioc/vignettes/basilisk/inst/doc/motivation.html
#'
#' @keywords internal
py_env <- basilisk::BasiliskEnvironment(
envname="vitessce_basilisk_env",
pkgname="vitessceR",
packages=c(
"numpy==1.*",
"pandas==1.*",
"anndata==0.7.*",
"h5py==3.*",
"hdf5==1.*",
"natsort==7.*",
"packaging==20.*",
"scipy==1.*",
"sqlite==3.*",
"zarr==2.*",
"numcodecs==0.*"
),
pip=c(
"ome-zarr==0.2.1"
)
)
Loading

0 comments on commit b2e30c1

Please sign in to comment.