Skip to content

Commit

Permalink
Merge pull request #5 from maren-ha/muon
Browse files Browse the repository at this point in the history
merge muon
  • Loading branch information
maren-ha authored Jun 6, 2023
2 parents 00140c4 + 1bd0df8 commit 1093ea8
Show file tree
Hide file tree
Showing 45 changed files with 4,397 additions and 1,063 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# [.github/workflows/CI.yml]
name: CI
on:
push:
branches:
- main
- muon
tags: '*'
pull_request:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
version:
- '1.7'
os:
- ubuntu-latest
- macOS-latest
# - windows-latest
arch:
- x64
steps:
- uses: actions/checkout@v1
- uses: julia-actions/setup-julia@latest
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/julia-runtest@latest
- uses: julia-actions/julia-uploadcodecov@latest
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Loess = "4345ca2d-374a-55d4-8d30-97f9976e7612"
Muon = "446846d7-b4ce-489d-bf74-72da18fe3629"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SliceMap = "82cb661a-3f19-5665-9e27-df437c7e54c8"
Expand Down
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# README

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://maren-ha.github.io/scVI.jl/)
[![codecov](https://codecov.io/gh/maren-ha/scVI.jl/branch/muon/graph/badge.svg?token=OXHPY0EI3E)](https://codecov.io/gh/maren-ha/scVI.jl)
![example workflow](https://github.com/maren-ha/scVI.jl/actions/workflows/ci.yml/badge.svg)

![](logo/scvi-julia-logo.jpg)

Expand Down Expand Up @@ -62,7 +64,7 @@ subset_to_hvg!(adata, n_top_genes=1200, verbose=true)
library_log_means, library_log_vars = init_library_size(adata)
# initialise scVAE model
m = scVAE(size(adata.countmatrix,2);
m = scVAE(size(adata.X,2);
library_log_means=library_log_means,
library_log_vars=library_log_vars
)
Expand Down Expand Up @@ -104,30 +106,14 @@ Runtests can be executed via
Pkg.test("scVI")
```

This checks whether basic functionality works: loads the PBMC dataset, initialises a `scVAE` model and start training (just 2 epochs for the sake of checking and faster runtime). Further tests to be added.
For details, see the `test` subfolder. For further information on code coverage, click on the badge at the top of this README or follow [this link](https://codecov.io/gh/maren-ha/scVI.jl). Some files are not yet fully covered, but this is being worked on.

------------
## TODO

- [x] deploy docs
- [ ] write tests
- [ ] integration of [`Muon.jl`](https://scverse.org/Muon.jl/dev/objects/) for data handling
- [ ] update docs (Muon.jl integration)
- [ ] complete runtests
- [ ] support `gene_batch` and `gene_label` dispersion
- [ ] support categorical covariates (e.g., batch information)
- [x] turn `data` and `scvis` into submodules
- [x] fix library size integration
- [x] add Gaussian generative distribution
- [x] add Bernoulli generative distribution
- [x] refactor data processing
- [x] re-write `PBMC.jl`
- [x] re-write `Tasic.jl`
- [x] add preprocessing:
- [x] log-transform
- [x] sqrt-transform
- [x] re-scaling
- [x] PCA
- [x] UMAP
- [x] filtering
- [x] add docstrings

Contributions, reporting of bugs and unexpected behaviour, missing functionalities, etc. are all very welcome, please do get in touch!
2 changes: 1 addition & 1 deletion src/data/FileIO.jl → data/FileIO.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ write_h5ad(adata, "output.h5")
"""
function write_h5ad(adata::AnnData, filename::String)
file = h5open(filename, "w")
file["countmatrix"] = adata.countmatrix
file["countmatrix"] = adata.X
for field in fieldnames(typeof(adata))
if (field [:countmatrix, :celltypes]) || (isnothing(getfield(adata, field)))
continue
Expand Down
21 changes: 21 additions & 0 deletions data/Tasic_celltypes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Vip Mybpc1
L4 Ctxn3
L2/3 Ptgs2
L2 Ngb
Pvalb Gpx3
Ndnf Cxcl14
L5a Batf3
SMC Myl9
Astro Aqp4
L5 Ucma
Micro Ctss
Endo Xdh
Sst Cbln4
L6b Serpinb11
Sncg
Igtp
Oligo 96*Rik
Smad3
OPC Pdgfra
L5b Tph2
L6a Sla
1,500 changes: 1,500 additions & 0 deletions data/Tasic_countmat.txt

Large diffs are not rendered by default.

Loading

0 comments on commit 1093ea8

Please sign in to comment.