You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,9 +35,13 @@ This can either use k-means or community detection on a shared nearest neighbor
35
35
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.
36
36
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.
37
37
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
+
38
42
## Quick start
39
43
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:
Copy file name to clipboardExpand all lines: docs/related/developer_notes.md
+29-24Lines changed: 29 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,47 +18,52 @@ This includes quality control, normalization, feature selection, PCA, clustering
18
18
For each step, we use Emscripten to compile the associated C++ functions into Wasm and generate Javascript-visible bindings.
19
19
We can then load the Wasm binary into a web application and call the desired functions on user-supplied data.
20
20
21
-
## Build procedure
21
+
## Pre-requisites
22
22
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.
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
30
35
31
-
To build the browser-compatible version:
36
+
Running the `build.sh` script will generate browser or Node.js-compatible builds.
32
37
33
38
```sh
34
-
bash build.sh browser
39
+
# For Node.js:
40
+
./build.sh main
41
+
42
+
# For the browser:
43
+
./build.sh browser
35
44
```
36
45
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.
39
49
40
50
## Tests
41
51
42
-
Run the test suite by calling:
43
-
44
52
```sh
45
-
# install dev dependencies
46
53
npm install --include=dev
47
54
npm run test
48
55
```
49
56
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.
51
58
52
59
```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
59
61
```
60
62
61
-
## Docker image
63
+
## Documentation
62
64
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