Skip to content

Commit b319d57

Browse files
committed
Updated NEWS, mention restrictions for 64-bit Wasm in README.
Also updated the developer notes.
1 parent 0c3dc51 commit b319d57

3 files changed

Lines changed: 45 additions & 25 deletions

File tree

NEWS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# scran.js news
22

3+
## 4.1.0
4+
5+
- Switch to 64-bit Wasm builds, which allows memory usage up to 16 GB.
6+
These only work with Node.js 24 or higher, and are currently not supported on Safari at all.
7+
- Updated to the latest version of the **mnncorrect** library, which uses a new algorithm -
8+
see https://github.com/libscran/mnncorrect/releases/tag/v3.0.0 for details.
9+
- Updated **igraph** to v1.0.0, which may yield different results for graph-based clustering.
10+
- Updated **hdf5** to v2.0.0, to support files produced in the new formats.
11+
- Updated to the latest version of the **tatami_hdf5** library,
12+
which improves performance for several types of non-contiguous reads from the HDF5 file.
13+
314
## 4.0.9
415

516
- Updated the **phyper** library for more accurate p-value calculations in `hypergeometricTest()`.

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,13 @@ This can either use k-means or community detection on a shared nearest neighbor
3535
The theory behind these methods is described in more detail in the [**Orchestrating Single Cell Analysis with Bioconductor**](https://bioconductor.org/books/release/OSCA/) book.
3636
All steps are implemented in C++ and compiled to WebAssembly for near-native performance - see the [developer notes](docs/related/developer_notes.md) for details.
3737

38+
> [!IMPORTANT]
39+
> **scran.js** v4.1.0 and higher use WebAssembly in 64-bit mode, which makes it possible to process larger datasets.
40+
> However, this is only supported in more recent versions of Chrome, Firefox and Node.js (24+), and is currently not supported in Safari at all.
41+
3842
## Quick start
3943

40-
**scran.js** is available as an [npm package](https://www.npmjs.com/package/scran.js), so installation can be performed via the usual procedure:
44+
**scran.js** is available as an [npm package](https://www.npmjs.com/package/scran.js), so installation can be performed via the usual commands:
4145

4246
```sh
4347
npm install scran.js

docs/related/developer_notes.md

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,47 +18,52 @@ This includes quality control, normalization, feature selection, PCA, clustering
1818
For each step, we use Emscripten to compile the associated C++ functions into Wasm and generate Javascript-visible bindings.
1919
We can then load the Wasm binary into a web application and call the desired functions on user-supplied data.
2020

21-
## Build procedure
21+
## Pre-requisites
2222

23-
Make sure [Emscripten](https://emscripten.org/docs/getting_started/downloads.html) and [CMake](https://cmake.org/download/) are installed on your machine.
24-
Running the `build.sh` script will then generate ES6 and Node.js-compatible builds.
25-
To build the Node.js version:
23+
Install the most recent versions of the following tools.
2624

27-
```sh
28-
bash build.sh main
29-
```
25+
- [Emscripten](https://emscripten.org/docs/getting_started/downloads.html).
26+
- [CMake](https://cmake.org/download/).
27+
Avoid 4.2.0 though, see https://gitlab.kitware.com/cmake/cmake/-/issues/27421.
28+
- [Node.js](https://nodejs.org/en/download).
29+
This requires 24.0.0 or higher to support Wasm64.
30+
31+
Alternatively, developers can use the [Docker image](https://github.com/kanaverse/emcmake-docker) for building and test.
32+
This image is also used by our [GitHub actions](../../.github/workflows/run-tests.yaml), so it will probably work.
33+
34+
## Build
3035

31-
To build the browser-compatible version:
36+
Running the `build.sh` script will generate browser or Node.js-compatible builds.
3237

3338
```sh
34-
bash build.sh browser
39+
# For Node.js:
40+
./build.sh main
41+
42+
# For the browser:
43+
./build.sh browser
3544
```
3645

37-
This will create the `main` and `browser` directories respectively,
38-
containing the Wasm file in the `wasm` subdirectory as well as copying all the relevant Javascript bindings.
46+
These calls will create the `main` and `browser` directories respectively.
47+
Each directory will contain its corresponding Wasm file in the `wasm` subdirectory.
48+
All relevant Javascript files will also be copied into each subdirectory.
3949

4050
## Tests
4151

42-
Run the test suite by calling:
43-
4452
```sh
45-
# install dev dependencies
4653
npm install --include=dev
4754
npm run test
4855
```
4956

50-
For earlier versions of Node, you may instead need to do some combination of the following options:
57+
To test the RDS reading functions, use a recent version of [R](https://cran.r-project.org/) to run [generate.R](../../tests/rds/generate.R) inside the `tests/rds` directory.
5158

5259
```sh
53-
node \
54-
--experimental-vm-modules \
55-
--experimental-wasm-threads \
56-
--experimental-wasm-bulk-memory \
57-
--experimental-wasm-bigint \
58-
node_modules/jest/bin/jest.js --runInBand
60+
CHECK_RDS=1 npm run test -- tests/rds
5961
```
6062

61-
## Docker image
63+
## Documentation
6264

63-
Alternatively, developers can use the [Docker image](https://github.com/kanaverse/scran.js-docker/pkgs/container/scran.js-docker%2Fbuilder) to build and test.
64-
This image is also used by our [GitHub actions](../../.github/workflows/run-tests.yaml), so it will probably work.
65+
```sh
66+
npm run jsdoc
67+
```
68+
69+
This creates an index file at `docs/built/index.html`.

0 commit comments

Comments
 (0)